From af6ecf2d1681d16d20f94f11bf2be2ef2f747c38 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 20 Oct 2020 16:38:32 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@49238 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-posts-list-table.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index 67e7a279d4..22a46d27c9 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/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 = '