WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/27/2010 01:07:21 AM (10 years ago)
Author:
scribu
Message:

Deprecated get_editable_user_ids() altogether, along with similar, unused functions. See #14572

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15527 r15542  
    669669
    670670        if ( post_type_supports( $screen->post_type, 'author' ) ) :
    671             $authors = get_editable_user_ids( get_current_user_id(), true, $screen->post_type ); // TODO: ROLE SYSTEM
    672671            $authors_dropdown = '';
    673             if ( $authors && count( $authors ) > 1 ) :
    674                 $users_opt = array( 'include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1, 'echo' => 0 );
     672
     673            if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
     674                $users_opt = array(
     675                    'name' => 'post_author',
     676                    'class'=> 'authors',
     677                    'multi' => 1,
     678                    'echo' => 0
     679                );
    675680                if ( $bulk )
    676681                    $users_opt['show_option_none'] = __( '— No Change —' );
     
    679684                $authors_dropdown .= wp_dropdown_users( $users_opt );
    680685                $authors_dropdown .= '</label>';
    681 
    682686            endif; // authors
    683687    ?>
Note: See TracChangeset for help on using the changeset viewer.