WordPress.org

Make WordPress Core

Changeset 37422


Ignore:
Timestamp:
05/12/16 15:12:11 (13 months ago)
Author:
ocean90
Message:

List Tables: Pass the $which parameter to restrict_manage_posts and restrict_manage_users.

$which contains the location of the extra table nav markup: 'top' or 'bottom'.

Props martin.krcho.
Fixes #35307.

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

Legend:

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

    r36926 r37422  
    447447             * @since 2.1.0 
    448448             * @since 4.4.0 The `$post_type` parameter was added. 
     449             * @since 4.6.0 The `$which` parameter was added. 
    449450             * 
    450451             * @param string $post_type The post type slug. 
     452             * @param string $which     The location of the extra table nav markup: 
     453             *                          'top' or 'bottom'. 
    451454             */ 
    452             do_action( 'restrict_manage_posts', $this->screen->post_type ); 
     455            do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); 
    453456 
    454457            submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); 
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r37314 r37422  
    276276         * 
    277277         * @since 3.5.0 
     278         * @since 4.6.0 The `$which` parameter was added. 
     279         * 
     280         * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. 
    278281         */ 
    279         do_action( 'restrict_manage_users' ); 
     282        do_action( 'restrict_manage_users', $which ); 
    280283        echo '</div>'; 
    281284    } 
Note: See TracChangeset for help on using the changeset viewer.