When there are thousands of users registered in a website, the edit.php
page will have performance issues.
if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
$users_opt = array(
'hide_if_only_one_author' => false,
'who' => 'authors',
'name' => 'post_author',
'class'=> 'authors',
'multi' => 1,
'echo' => 0,
'show' => 'display_name_with_login',
);
if ( $bulk )
$users_opt['show_option_none'] = __( '— No Change —' );
if ( $authors = wp_dropdown_users( $users_opt ) ) :
$authors_dropdown = '<label class="inline-edit-author">';
$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
$authors_dropdown .= $authors;
$authors_dropdown .= '</label>';
endif;
endif; // authors
How can I remove the author list in the post edit page via functions.php
file?