<!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>[27255] trunk/src/wp-admin/includes/class-wp-posts-list-table.php: Inline documentation for hooks in wp-admin/includes/class-wp-posts-list-table.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/27255">27255</a></dd>
<dt>Author</dt> <dd>DrewAPicture</dd>
<dt>Date</dt> <dd>2014-02-25 06:11:32 +0000 (Tue, 25 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Inline documentation for hooks in wp-admin/includes/class-wp-posts-list-table.php.

Props nicolealleyinteractivecom, kpdesign.
Fixes <a href="http://core.trac.wordpress.org/ticket/26397">#26397</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclasswppostslisttablephp">trunk/src/wp-admin/includes/class-wp-posts-list-table.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclasswppostslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/class-wp-posts-list-table.php (27254 => 27255)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/class-wp-posts-list-table.php        2014-02-25 05:24:56 UTC (rev 27254)
+++ trunk/src/wp-admin/includes/class-wp-posts-list-table.php   2014-02-25 06:11:32 UTC (rev 27255)
</span><span class="lines">@@ -89,6 +89,15 @@
</span><span class="cx"> 
</span><span class="cx">          $post_type = $this->screen->post_type;
</span><span class="cx">          $per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' );
</span><ins>+
+               /**
+                * Filter the number of posts displayed per page on the Posts list table.
+                *
+                * @since 2.8.0
+                *
+                * @param int    $per_page  Number of posts to be displayed. Default 20.
+                * @param string $post_type The post type.
+                */
</ins><span class="cx">           $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );
</span><span class="cx"> 
</span><span class="cx">          if ( $this->hierarchical_display )
</span><span class="lines">@@ -215,7 +224,17 @@
</span><span class="cx">                          );
</span><span class="cx">                          wp_dropdown_categories( $dropdown_options );
</span><span class="cx">                  }
</span><ins>+
+                       /**
+                        * Fires before the Filter button on the Posts and Pages list tables.
+                        *
+                        * The Filter button allows sorting by date and/or category on the
+                        * Posts list table, and sorting by date on the Pages list table.
+                        *
+                        * @since 2.1.0
+                        */
</ins><span class="cx">                   do_action( 'restrict_manage_posts' );
</span><ins>+
</ins><span class="cx">                   submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
</span><span class="cx">          }
</span><span class="cx"> 
</span><span class="lines">@@ -265,6 +284,17 @@
</span><span class="cx">          $taxonomies = get_object_taxonomies( $post_type, 'objects' );
</span><span class="cx">          $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
</span><span class="cx"> 
</span><ins>+               /**
+                * Filter the taxonomy columns in the Posts list table.
+                *
+                * The dynamic portion of the hook name, $post_type, refers to the post
+                * type slug.
+                *
+                * @since 3.5.0
+                *
+                * @param array  $taxonomies Array of taxonomies to show columns for.
+                * @param string $post_type  The post type.
+                */
</ins><span class="cx">           $taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type );
</span><span class="cx">          $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
</span><span class="cx"> 
</span><span class="lines">@@ -285,10 +315,38 @@
</span><span class="cx"> 
</span><span class="cx">          $posts_columns['date'] = __( 'Date' );
</span><span class="cx"> 
</span><del>-               if ( 'page' == $post_type )
</del><ins>+                if ( 'page' == $post_type ) {
+
+                       /**
+                        * Filter the columns displayed in the Pages list table.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param array $post_columns An array of column names.
+                        */
</ins><span class="cx">                   $posts_columns = apply_filters( 'manage_pages_columns', $posts_columns );
</span><del>-               else
</del><ins>+                } else {
+
+                       /**
+                        * Filter the columns displayed in the Posts list table.
+                        *
+                        * @since 1.5.0
+                        *
+                        * @param array  $posts_columns An array of column names.
+                        * @param string $post_type     The post type slug.
+                        */
</ins><span class="cx">                   $posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
</span><ins>+               }
+
+               /**
+                * Filter the columns displayed in the Posts list table for a specific post type.
+                *
+                * The dynamic portion of the hook name, $post_type, refers to the post type slug.
+                *
+                * @since 3.0.0
+                *
+                * @param array $post_columns An array of column names.
+                */
</ins><span class="cx">           $posts_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
</span><span class="cx"> 
</span><span class="cx">          return $posts_columns;
</span><span class="lines">@@ -346,7 +404,7 @@
</span><span class="cx">          }
</span><span class="cx"> 
</span><span class="cx">          /*
</span><del>-                * arrange pages into two parts: top level pages and children_pages
</del><ins>+                 * Arrange pages into two parts: top level pages and children_pages
</ins><span class="cx">            * children_pages is two dimensional array, eg.
</span><span class="cx">           * children_pages[10][] contains all sub-pages whose parent is 10.
</span><span class="cx">           * It only takes O( N ) to arrange this and it takes O( 1 ) for subsequent lookup operations
</span><span class="lines">@@ -605,14 +663,48 @@
</span><span class="cx">                          }
</span><span class="cx">                          if ( $post_type_object->public ) {
</span><span class="cx">                                  if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
</span><del>-                                               if ( $can_edit_post )
</del><ins>+                                                if ( $can_edit_post ) {
+
+                                                       /** This filter is documented in wp-admin/includes/meta-boxes.php */
</ins><span class="cx">                                                   $actions['view'] = '<a href="' . esc_url( apply_filters( 'preview_post_link', set_url_scheme( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
</span><ins>+                                               }
</ins><span class="cx">                                   } elseif ( 'trash' != $post->post_status ) {
</span><span class="cx">                                          $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>';
</span><span class="cx">                                  }
</span><span class="cx">                          }
</span><span class="cx"> 
</span><del>-                               $actions = apply_filters( is_post_type_hierarchical( $post->post_type ) ? 'page_row_actions' : 'post_row_actions', $actions, $post );
</del><ins>+                                if ( is_post_type_hierarchical( $post->post_type ) ) {
+
+                                       /**
+                                        * Filter the array of row action links on the Pages list table.
+                                        *
+                                        * The filter is evaluated only for hierarchical post types.
+                                        *
+                                        * @since 2.8.0
+                                        *
+                                        * @param array   $actions An array of row action links. Defaults are
+                                        *                         'Edit', 'Quick Edit', 'Restore, 'Trash',
+                                        *                         'Delete Permanently', 'Preview', and 'View'.
+                                        * @param WP_Post $post    The post object.
+                                        */
+                                       $actions = apply_filters( 'page_row_actions', $actions, $post );
+                               } else {
+
+                                       /**
+                                        * Filter the array of row action links on the Posts list table.
+                                        *
+                                        * The filter is evaluated only for non-hierarchical post types.
+                                        *
+                                        * @since 2.8.0
+                                        *
+                                        * @param array   $actions An array of row action links. Defaults are
+                                        *                         'Edit', 'Quick Edit', 'Restore, 'Trash',
+                                        *                         'Delete Permanently', 'Preview', and 'View'.
+                                        * @param WP_Post $post    The post object.
+                                        */
+                                       $actions = apply_filters( 'post_row_actions', $actions, $post );
+                               }
+
</ins><span class="cx">                           echo $this->row_actions( $actions );
</span><span class="cx"> 
</span><span class="cx">                          get_inline_data( $post );
</span><span class="lines">@@ -637,10 +729,28 @@
</span><span class="cx">                          }
</span><span class="cx"> 
</span><span class="cx">                          echo '<td ' . $attributes . '>';
</span><del>-                               if ( 'excerpt' == $mode )
</del><ins>+                                if ( 'excerpt' == $mode ) {
+
+                                       /**
+                                        * Filter the published time of the post.
+                                        *
+                                        * If $mode equals 'excerpt', the published time and date are both displayed.
+                                        * If $mode equals 'list' (default), the publish date is displayed, with the
+                                        * time and date together available as an abbreviation definition.
+                                        *
+                                        * @since 2.5.1
+                                        *
+                                        * @param array   $t_time      The published time.
+                                        * @param WP_Post $post        Post object.
+                                        * @param string  $column_name The column name.
+                                        * @param string  $mode        The list display mode ('excerpt' or 'list').
+                                        */
</ins><span class="cx">                                   echo apply_filters( 'post_date_column_time', $t_time, $post, $column_name, $mode );
</span><del>-                               else
</del><ins>+                                } else {
+
+                                       /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
</ins><span class="cx">                                   echo '<abbr title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post, $column_name, $mode ) . '</abbr>';
</span><ins>+                               }
</ins><span class="cx">                           echo '<br />';
</span><span class="cx">                          if ( 'publish' == $post->post_status ) {
</span><span class="cx">                                  _e( 'Published' );
</span><span class="lines">@@ -719,10 +829,46 @@
</span><span class="cx">                          }
</span><span class="cx">                  ?>
</span><span class="cx">                  <td <?php echo $attributes ?>><?php
</span><del>-                               if ( is_post_type_hierarchical( $post->post_type ) )
</del><ins>+                                if ( is_post_type_hierarchical( $post->post_type ) ) {
+
+                                       /**
+                                        * Fires in each custom column on the Posts list table.
+                                        *
+                                        * This hook only fires if the current post type is hierarchical,
+                                        * such as pages.
+                                        *
+                                        * @since 2.5.0
+                                        *
+                                        * @param string $column_name The name of the column to display.
+                                        * @param int    $post_id     The current post ID.
+                                        */
</ins><span class="cx">                                   do_action( 'manage_pages_custom_column', $column_name, $post->ID );
</span><del>-                               else
</del><ins>+                                } else {
+
+                                       /**
+                                        * Fires in each custom column in the Posts list table.
+                                        *
+                                        * This hook only fires if the current post type is non-hierarchical,
+                                        * such as posts.
+                                        *
+                                        * @since 1.5.0
+                                        *
+                                        * @param string $column_name The name of the column to display.
+                                        * @param int    $post_id     The current post ID.
+                                        */
</ins><span class="cx">                                   do_action( 'manage_posts_custom_column', $column_name, $post->ID );
</span><ins>+                               }
+
+                               /**
+                                * Fires for each custom column of a specific post type in the Posts list table.
+                                *
+                                * The dynamic portion of the hook name, $post->post_type, refers to the post type.
+                                *
+                                * @since 3.1.0
+                                *
+                                * @param string $column_name The name of the column to display.
+                                * @param int    $post_id     The current post ID.
+                                */
</ins><span class="cx">                           do_action( "manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID );
</span><span class="cx">                  ?></td>
</span><span class="cx">                  <?php
</span><span class="lines">@@ -906,7 +1052,18 @@
</span><span class="cx"> 
</span><span class="cx">          if ( $bulk )
</span><span class="cx">                  $dropdown_args['show_option_no_change'] =  __( '&mdash; No Change &mdash;' );
</span><ins>+
+               /**
+                * Filter the arguments used to generate the Quick Edit page-parent drop-down.
+                *
+                * @since 2.7.0
+                *
+                * @see wp_dropdown_pages()
+                *
+                * @param array $dropdown_args An array of arguments.
+                */
</ins><span class="cx">           $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
</span><ins>+
</ins><span class="cx">           wp_dropdown_pages( $dropdown_args );
</span><span class="cx">  ?>
</span><span class="cx">                  </label>
</span><span class="lines">@@ -1079,7 +1236,31 @@
</span><span class="cx">          foreach ( $columns as $column_name => $column_display_name ) {
</span><span class="cx">                  if ( isset( $core_columns[$column_name] ) )
</span><span class="cx">                          continue;
</span><del>-                       do_action( $bulk ? 'bulk_edit_custom_box' : 'quick_edit_custom_box', $column_name, $screen->post_type );
</del><ins>+
+                       if ( $bulk ) {
+
+                               /**
+                                * Fires once for each column in Bulk Edit mode.
+                                *
+                                * @since 2.7.0
+                                *
+                                * @param string  $column_name Name of the column to edit.
+                                * @param WP_Post $post_type   The post type slug.
+                                */
+                               do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
+                       } else {
+
+                               /**
+                                * Fires once for each column in Quick Edit mode.
+                                *
+                                * @since 2.7.0
+                                *
+                                * @param string  $column_name Name of the column to edit.
+                                * @param WP_Post $post_type   The post type slug.
+                                */
+                               do_action( 'quick_edit_custom_box', $column_name, $screen->post_type );
+                       }
+
</ins><span class="cx">           }
</span><span class="cx">  ?>
</span><span class="cx">          <p class="submit inline-edit-save">
</span></span></pre>
</div>
</div>

</body>
</html>