WordPress.org

Make WordPress Core

Changeset 13488


Ignore:
Timestamp:
02/28/2010 06:38:15 AM (11 years ago)
Author:
dd32
Message:

Fix Author selection for non-post type posts. Props prettyboymp. Fixes #12408

File:
1 edited

Legend:

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

    r13463 r13488  
    247247
    248248    $user = new WP_User( $user_id );
    249 
    250     if ( ! $user->has_cap("edit_others_{$post_type}s") ) {
    251         if ( $user->has_cap("edit_{$post_type}s") || $exclude_zeros == false )
     249    $post_type_obj = get_post_type_object($post_type);
     250
     251    if ( ! $user->has_cap($post_type_obj->edit_others_cap) ) {
     252        if ( $user->has_cap($post_type_obj->edit_cap) || $exclude_zeros == false )
    252253            return array($user->id);
    253254        else
Note: See TracChangeset for help on using the changeset viewer.