From be5fb561ad1f94eca0ca90e05b7502cdbd0227fb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 20 Oct 2020 16:40:05 +0000 Subject: [PATCH] Quick/Bulk Edit: Introduce `quick_edit_dropdown_authors_args` filter. This allows for customizing the arguments used to generate the Quick Edit authors drop-down. Additionally, pass the `$bulk` argument to the `quick_edit_dropdown_pages_args` filter, for consistency. Props Mista-Flo, garrett-eclipse, hellofromTonya. Fixes #47685. Built from https://develop.svn.wordpress.org/trunk@49238 git-svn-id: http://core.svn.wordpress.org/trunk@49000 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-posts-list-table.php | 18 ++++++++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 67e7a279d4..22a46d27c9 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -1587,6 +1587,18 @@ class WP_Posts_List_Table extends WP_List_Table { $users_opt['show_option_none'] = __( '— No Change —' ); } + /** + * Filters the arguments used to generate the Quick Edit authors drop-down. + * + * @since 5.6.0 + * + * @see wp_dropdown_users() + * + * @param array $users_opt An array of arguments passed to wp_dropdown_users(). + * @param bool $bulk A flag to denote if it's a bulk action. + */ + $users_opt = apply_filters( 'quick_edit_dropdown_authors_args', $users_opt, $bulk ); + $authors = wp_dropdown_users( $users_opt ); if ( $authors ) : $authors_dropdown = '