use get_users() in get_editable_user_ids() and cache result. See #14572

git-svn-id: https://develop.svn.wordpress.org/trunk@15539 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-08-27 00:18:57 +00:00
parent 072ea8728b
commit 8993abd1be
4 changed files with 21 additions and 27 deletions
+2 -4
View File
@@ -505,10 +505,8 @@ function post_slug_meta_box($post) {
* @param object $post
*/
function post_author_meta_box($post) {
global $user_ID;
$authors = get_editable_user_ids( get_current_user_id(), true, $post->post_type ); // TODO: ROLE SYSTEM
if ( $post->post_author && !in_array($post->post_author, $authors) )
$authors[] = $post->post_author;
global $user_ID, $_editable_user_ids;
?>
<label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
<?php