Make WordPress Core


Ignore:
Timestamp:
04/24/2012 04:22:12 PM (14 years ago)
Author:
ryan
Message:

Revert [20568] until a publish_post cap is introduced. see #20474

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r20568 r20576  
    786786                                break;
    787787                        case 'private':
    788                 if ( $update ) {
    789                                         if ( ! current_user_can( $post_type->cap->publish_post, $post_data[ 'ID' ] ) )
    790                                                 return new IXR_Error( 401, __( 'Sorry, you are not allowed to set this post as private.' ) );
    791                                 } else {
    792                                         if ( ! current_user_can( $post_type->cap->publish_posts ) )
    793                                                 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ));
    794                                 }
     788                                if ( ! current_user_can( $post_type->cap->publish_posts ) )
     789                                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ));
    795790                                break;
    796791                        case 'publish':
    797792                        case 'future':
    798                                 if ( $update ) {
    799                                         if ( ! current_user_can( $post_type->cap->publish_post, $post_data[ 'ID' ] ) )
    800                                                 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
    801                                 } else {
    802                                         if ( ! current_user_can( $post_type->cap->publish_posts ) )
    803                                                 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ));
    804                                 }
     793                                if ( ! current_user_can( $post_type->cap->publish_posts ) )
     794                                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ));
    805795                                break;
    806796                        default:
Note: See TracChangeset for help on using the changeset viewer.