From 526e385e5c99f45fd8be31d1121b565d89e5b7ff Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 27 Feb 2025 00:07:07 +0000 Subject: [PATCH] Comments: Remove bulk action dropdown depending on user caps. This changeset introduces the `manage_users-network_custom_column` filter that fires for each custom column in the Network Users list table. This is an override hook for `manage_users_custom_column` which was already filtering each custom column in all Users list tables. Props lenasterg, realloc, audrasjb. Fixes #43318. git-svn-id: https://develop.svn.wordpress.org/trunk@59878 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-ms-users-list-table.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-ms-users-list-table.php b/src/wp-admin/includes/class-wp-ms-users-list-table.php index 58d31f67f8..e7d0ad21ff 100644 --- a/src/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-users-list-table.php @@ -467,7 +467,18 @@ class WP_MS_Users_List_Table extends WP_List_Table { $user = $item; /** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */ - echo apply_filters( 'manage_users_custom_column', '', $column_name, $user->ID ); + $column_output = apply_filters( 'manage_users_custom_column', '', $column_name, $user->ID ); + + /** + * Filters the display output of custom columns in the Network Users list table. + * + * @since 6.8.0 + * + * @param string $output Custom column output. Default empty. + * @param string $column_name Name of the custom column. + * @param int $user_id ID of the currently-listed user. + */ + echo apply_filters( 'manage_users-network_custom_column', $column_output, $column_name, $user->ID ); } /**