Hi,
This is expected behavior starting from WordPress version 5.9.
Earlier versions extracted users who can be author via ‘get_users()’ function using ‘who=>authors’ argument. Finally user level not equal 0 was checked (more details).
WordPress 5.9 declared ‘who’ argument as deprecated
if ( isset( $qv['who'] ) && 'authors' === $qv['who'] && $blog_id ) {
_deprecated_argument(
'WP_User_Query',
'5.9.0',
sprintf(
/* translators: 1: who, 2: capability */
__( '%1$s is deprecated. Use %2$s instead.' ),
'<code>who</code>',
'<code>capability</code>'
)
);
and proposed to use ‘capability’ argument, like it does itself building authors dropdown list:
function post_author_meta_box( $post ) {
global $user_ID;
$post_type_object = get_post_type_object( $post->post_type );
?>
<label class="screen-reader-text" for="post_author_override"><?php _e( 'Author' ); ?></label>
<?php
wp_dropdown_users(
array(
'capability' => array( $post_type_object->cap->edit_posts ),
'name' => 'post_author_override',
'selected' => empty( $post->ID ) ? $user_ID : $post->post_author,
'include_selected' => true,
'show' => 'display_name_with_login',
)
);
}