Make WordPress Core

Opened 15 months ago

Last modified 14 months ago

#23413 new enhancement

Provide query result data to custom user columns

Reported by: JohnC28 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: Cc:


When the filter manage_users_custom_column is triggered, it sends an empty string for the value field.

Since it's easy enough to extend the WP_User_Query with extra fields, it would be good to have those fields passed through if they exist to save having to requery the database with the user_id parameter to get the data.

I have attached a patch to show what I mean.

Attachments (1)

class-wp-users-list-table.php.diff (632 bytes) - added by JohnC28 15 months ago.

Download all attachments as: .zip

Change History (2)

comment:1 SergeyBiryukov14 months ago

I guess plugins might expect an empty string. An example:

Another option might be to pass $user_object as the fourth parameter.

The filter is also used in class-wp-ms-users-list-table.php:

Note: See TracTickets for help on using tickets.