<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[27237] trunk/src/wp-admin/includes/template.php: Inline documentation for hooks in wp-admin/includes/template.php.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/27237">27237</a></dd>
<dt>Author</dt> <dd>DrewAPicture</dd>
<dt>Date</dt> <dd>2014-02-23 22:43:44 +0000 (Sun, 23 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Inline documentation for hooks in wp-admin/includes/template.php.
Props shelob9 for the initial patch. Props kpdesign.
Fixes <a href="http://core.trac.wordpress.org/ticket/26089">#26089</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludestemplatephp">trunk/src/wp-admin/includes/template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/template.php (27236 => 27237)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/template.php 2014-02-23 10:29:42 UTC (rev 27236)
+++ trunk/src/wp-admin/includes/template.php 2014-02-23 22:43:44 UTC (rev 27237)
</span><span class="lines">@@ -80,7 +80,9 @@
</span><span class="cx"> $name = 'tax_input['.$taxonomy.']';
</span><span class="cx">
</span><span class="cx"> $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
</span><del>- $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>';
</del><ins>+
+ /** This filter is documented in wp-includes/category-template.php */
+ $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters( 'the_category', $category->name ) ) . '</label>';
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -143,6 +145,17 @@
</span><span class="cx"> 'taxonomy' => 'category',
</span><span class="cx"> 'checked_ontop' => true
</span><span class="cx"> );
</span><ins>+
+ /**
+ * Filter the taxonomy terms checklist arguments.
+ *
+ * @since 3.4.0
+ *
+ * @see wp_terms_checklist()
+ *
+ * @param array $args An array of arguments.
+ * @param int $post_id The post ID.
+ */
</ins><span class="cx"> $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
</span><span class="cx">
</span><span class="cx"> extract( wp_parse_args($args, $defaults), EXTR_SKIP );
</span><span class="lines">@@ -235,8 +248,11 @@
</span><span class="cx">
</span><span class="cx"> <li id="<?php echo $id; ?>" class="popular-category">
</span><span class="cx"> <label class="selectit">
</span><del>- <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
- <?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?>
</del><ins>+ <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
+ <?php
+ /** This filter is documented in wp-includes/category-template.php */
+ echo esc_html( apply_filters( 'the_category', $term->name ) );
+ ?>
</ins><span class="cx"> </label>
</span><span class="cx"> </li>
</span><span class="cx">
</span><span class="lines">@@ -271,6 +287,8 @@
</span><span class="cx">
</span><span class="cx"> foreach ( $categories as $category ) {
</span><span class="cx"> $cat_id = $category->term_id;
</span><ins>+
+ /** This filter is documented in wp-includes/category-template.php */
</ins><span class="cx"> $name = esc_html( apply_filters( 'the_category', $category->name ) );
</span><span class="cx"> $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';
</span><span class="cx"> echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";
</span><span class="lines">@@ -292,10 +310,11 @@
</span><span class="cx">
</span><span class="cx"> $title = esc_textarea( trim( $post->post_title ) );
</span><span class="cx">
</span><ins>+ /** This filter is documented in wp-admin/edit-tag-form.php */
</ins><span class="cx"> echo '
</span><span class="cx"> <div class="hidden" id="inline_' . $post->ID . '">
</span><span class="cx"> <div class="post_title">' . $title . '</div>
</span><del>- <div class="post_name">' . apply_filters('editable_slug', $post->post_name) . '</div>
</del><ins>+ <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name ) . '</div>
</ins><span class="cx"> <div class="post_author">' . $post->post_author . '</div>
</span><span class="cx"> <div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
</span><span class="cx"> <div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
</span><span class="lines">@@ -349,9 +368,24 @@
</span><span class="cx"> * @param unknown_type $mode
</span><span class="cx"> */
</span><span class="cx"> function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {
</span><del>- // allow plugin to replace the popup content
- $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) );
</del><span class="cx">
</span><ins>+ /**
+ * Filter the in-line comment reply-to form output in the Comments
+ * list table.
+ *
+ * Returning a non-empty value here will short-circuit display
+ * of the in-line comment-reply form in the Comments list table,
+ * echoing the returned value instead.
+ *
+ * @since 2.7.0
+ *
+ * @see wp_comment_reply()
+ *
+ * @param string $content The reply-to form content.
+ * @param array $args An array of default args.
+ */
+ $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) );
+
</ins><span class="cx"> if ( ! empty($content) ) {
</span><span class="cx"> echo $content;
</span><span class="cx"> return;
</span><span class="lines">@@ -556,6 +590,15 @@
</span><span class="cx"> function meta_form( $post = null ) {
</span><span class="cx"> global $wpdb;
</span><span class="cx"> $post = get_post( $post );
</span><ins>+
+ /**
+ * Filter the number of custom fields to retrieve for the drop-down
+ * in the Custom Fields meta box.
+ *
+ * @since 2.1.0
+ *
+ * @param int $limit Number of custom fields to retrieve. Default 30.
+ */
</ins><span class="cx"> $limit = (int) apply_filters( 'postmeta_form_limit', 30 );
</span><span class="cx"> $keys = $wpdb->get_col( "
</span><span class="cx"> SELECT meta_key
</span><span class="lines">@@ -770,6 +813,16 @@
</span><span class="cx"> * @param string $action The action attribute for the form.
</span><span class="cx"> */
</span><span class="cx"> function wp_import_upload_form( $action ) {
</span><ins>+
+ /**
+ * Filter the maximum allowed upload size for import files.
+ *
+ * @since 2.3.0
+ *
+ * @see wp_max_upload_size()
+ *
+ * @param int $max_upload_size Allowed upload size. Default 1 MB.
+ */
</ins><span class="cx"> $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
</span><span class="cx"> $size = size_format( $bytes );
</span><span class="cx"> $upload_dir = wp_upload_dir();
</span><span class="lines">@@ -1430,14 +1483,27 @@
</span><span class="cx"> //]]>
</span><span class="cx"> </script>
</span><span class="cx"> <?php
</span><del>-do_action('admin_enqueue_scripts', $hook_suffix);
-do_action("admin_print_styles-$hook_suffix");
-do_action('admin_print_styles');
-do_action("admin_print_scripts-$hook_suffix");
-do_action('admin_print_scripts');
-do_action("admin_head-$hook_suffix");
-do_action('admin_head');
</del><ins>+/** This action is documented in wp-admin/admin-header.php */
+do_action( 'admin_enqueue_scripts', $hook_suffix );
</ins><span class="cx">
</span><ins>+/** This action is documented in wp-admin/admin-header.php */
+do_action( "admin_print_styles-$hook_suffix" );
+
+/** This action is documented in wp-admin/admin-header.php */
+do_action( 'admin_print_styles' );
+
+/** This action is documented in wp-admin/admin-header.php */
+do_action( "admin_print_scripts-$hook_suffix" );
+
+/** This action is documented in wp-admin/admin-header.php */
+do_action( 'admin_print_scripts' );
+
+/** This action is documented in wp-admin/admin-header.php */
+do_action( "admin_head-$hook_suffix" );
+
+/** This action is documented in wp-admin/admin-header.php */
+do_action( 'admin_head' );
+
</ins><span class="cx"> $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
</span><span class="cx">
</span><span class="cx"> if ( is_rtl() )
</span><span class="lines">@@ -1445,6 +1511,9 @@
</span><span class="cx">
</span><span class="cx"> ?>
</span><span class="cx"> </head>
</span><ins>+<?php
+/** This filter is documented in wp-admin/admin-header.php */
+?>
</ins><span class="cx"> <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>">
</span><span class="cx"> <script type="text/javascript">
</span><span class="cx"> //<![CDATA[
</span><span class="lines">@@ -1465,11 +1534,20 @@
</span><span class="cx"> *
</span><span class="cx"> */
</span><span class="cx"> function iframe_footer() {
</span><del>- //We're going to hide any footer output on iframe pages, but run the hooks anyway since they output Javascript or other needed content. ?>
</del><ins>+ /*
+ * We're going to hide any footer output on iFrame pages,
+ * but run the hooks anyway since they output Javascript
+ * or other needed content.
+ */
+ ?>
</ins><span class="cx"> <div class="hidden">
</span><span class="cx"> <?php
</span><del>- do_action('admin_footer', '');
- do_action('admin_print_footer_scripts'); ?>
</del><ins>+ /** This action is documented in wp-admin/admin-footer.php */
+ do_action( 'admin_footer', '' );
+
+ /** This action is documented in wp-admin/admin-footer.php */
+ do_action( 'admin_print_footer_scripts' );
+?>
</ins><span class="cx"> </div>
</span><span class="cx"> <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
</span><span class="cx"> </body>
</span><span class="lines">@@ -1496,6 +1574,15 @@
</span><span class="cx"> if ( is_sticky($post->ID) )
</span><span class="cx"> $post_states['sticky'] = __('Sticky');
</span><span class="cx">
</span><ins>+ /**
+ * Filter the default post display states used in the Posts list table.
+ *
+ * @since 2.8.0
+ *
+ * @param array $post_states An array of post display states. Values include 'Password protected',
+ * 'Private', 'Draft', 'Pending', and 'Sticky'.
+ * @param int $post The post ID.
+ */
</ins><span class="cx"> $post_states = apply_filters( 'display_post_states', $post_states, $post );
</span><span class="cx">
</span><span class="cx"> if ( ! empty($post_states) ) {
</span><span class="lines">@@ -1527,6 +1614,14 @@
</span><span class="cx"> $media_states[] = __( 'Background Image' );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ /**
+ * Filter the default media display states for items in the Media list table.
+ *
+ * @since 3.2.0
+ *
+ * @param array $media_states An array of media states. Default 'Header Image',
+ * 'Background Image'.
+ */
</ins><span class="cx"> $media_states = apply_filters( 'display_media_states', $media_states );
</span><span class="cx">
</span><span class="cx"> if ( ! empty( $media_states ) ) {
</span><span class="lines">@@ -1701,13 +1796,19 @@
</span><span class="cx"> if ( $is_IE )
</span><span class="cx"> @header('X-UA-Compatible: IE=edge');
</span><span class="cx">
</span><ins>+/**
+ * Fires inside the HTML tag in the admin header.
+ *
+ * @since 2.2.0
+ */
</ins><span class="cx"> ?>
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <!--[if IE 8]>
</span><del>-<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
</del><ins>+<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>>
</ins><span class="cx"> <![endif]-->
</span><span class="cx"> <!--[if !(IE 8) ]><!-->
</span><del>-<html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
</del><ins>+<?php /** This action is documented in wp-admin/includes/template.php */ ?>
+<html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>>
</ins><span class="cx"> <!--<![endif]-->
</span><span class="cx"> <head>
</span><span class="cx"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
</span></span></pre>
</div>
</div>
</body>
</html>