WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 4 months ago

#25360 new enhancement

Add a filter in WP_Users_List_Table

Reported by: juliobox Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.6
Component: Users Keywords:
Focuses: Cc:

Description

Hello

Can we (i) request a filter in the WP_Users_List_Table class, in the prepare_items() function :

Replace

// Query the user IDs for this page
$wp_user_search = new WP_User_Query( $args );

by

// Query the user IDs for this page
$args = apply_filters( 'users_list_table_args', $args );
$wp_user_search = new WP_User_Query( $args );

The goal is to hack the query of course.

Thank you

Change History (3)

comment:1 jeremyfelt7 months ago

  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from trivial to normal
  • Type changed from feature request to enhancement

A similar filter would be useful in WP_MS_Users_List_Table as well. I opened #25285 to address any user query, but I'd be happy with a filter at the list table level as well.

comment:2 SergeyBiryukov5 months ago

  • Version changed from trunk to 3.6
Note: See TracTickets for help on using tickets.