WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/03/2015 07:23:20 AM (6 years ago)
Author:
DrewAPicture
Message:

Users: Introduce the users_list_table_query_args filter, for modifying the WP_User_Query arguments used within the prepare_items() methods in the users list tables.

The current list table is passed as a second parameter, $this, and can take the form of either a WP_Users_List_Table or WP_MS_Users_List_Table instance depending on the context in which the filter was evaluated.

Props juliobox for the initial patch.
Fixes #25360.

File:
1 edited

Legend:

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

    r34750 r34796  
    7575
    7676        $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode'];
     77
     78        /** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */
     79        $args = apply_filters( 'users_list_table_query_args', $args, $this );
    7780
    7881        // Query the user IDs for this page
Note: See TracChangeset for help on using the changeset viewer.