Make WordPress Core

Changeset 33644


Ignore:
Timestamp:
08/19/2015 06:22:40 AM (9 years ago)
Author:
wonderboymusic
Message:

The 'restrict_manage_posts' hook currently fires on the Post and Media list tables, but is passed zero arguments. Pass $post_type.

Props sunnyratilal, scribu.
Fixes #17891.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r33270 r33644  
    149149
    150150            /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
    151             do_action( 'restrict_manage_posts' );
     151            do_action( 'restrict_manage_posts', $this->screen->post_type );
     152           
    152153            submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
    153154        }
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r33270 r33644  
    334334             *
    335335             * @since 2.1.0
     336             *
     337             * @param string $post_type The post type slug.
    336338             */
    337             do_action( 'restrict_manage_posts' );
     339            do_action( 'restrict_manage_posts', $this->screen->post_type );
    338340
    339341            submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
     
    15141516                 * @since 2.7.0
    15151517                 *
    1516                  * @param string  $column_name Name of the column to edit.
    1517                  * @param WP_Post $post_type   The post type slug.
     1518                 * @param string $column_name Name of the column to edit.
     1519                 * @param string $post_type   The post type slug.
    15181520                 */
    15191521                do_action( 'quick_edit_custom_box', $column_name, $screen->post_type );
Note: See TracChangeset for help on using the changeset viewer.