Make WordPress Core


Ignore:
Timestamp:
08/27/2010 12:18:57 AM (14 years ago)
Author:
scribu
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r15528 r15539  
    506506 */
    507507function post_author_meta_box($post) {
    508     global $user_ID;
    509     $authors = get_editable_user_ids( get_current_user_id(), true, $post->post_type ); // TODO: ROLE SYSTEM
    510     if ( $post->post_author && !in_array($post->post_author, $authors) )
    511         $authors[] = $post->post_author;
     508    global $user_ID, $_editable_user_ids;
     509
    512510?>
    513511<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) ); ?>
Note: See TracChangeset for help on using the changeset viewer.