Make WordPress Core


Ignore:
Timestamp:
09/15/2012 07:57:05 PM (13 years ago)
Author:
nacin
Message:

Combine some strings. props pavelevap. fixes #21087.

File:
1 edited

Legend:

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

    r21824 r21857  
    40564056
    40574057        // If an author id was provided then use it instead.
    4058         if ( isset($content_struct['wp_author_id']) && ($user->ID != $content_struct['wp_author_id']) ) {
     4058        if ( isset( $content_struct['wp_author_id'] ) && ( $user->ID != $content_struct['wp_author_id'] ) ) {
    40594059            switch ( $post_type ) {
    40604060                case "post":
    4061                     if ( !current_user_can('edit_others_posts') )
    4062                         return(new IXR_Error(401, __('You are not allowed to post as this user')));
     4061                    if ( !current_user_can( 'edit_others_posts' ) )
     4062                        return( new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) ) );
    40634063                    break;
    40644064                case "page":
    4065                     if ( !current_user_can('edit_others_pages') )
    4066                         return(new IXR_Error(401, __('You are not allowed to create pages as this user')));
     4065                    if ( !current_user_can( 'edit_others_pages' ) )
     4066                        return( new IXR_Error( 401, __( 'You are not allowed to create pages as this user.' ) ) );
    40674067                    break;
    40684068                default:
    4069                     return(new IXR_Error(401, __('Invalid post type')));
     4069                    return( new IXR_Error( 401, __( 'Invalid post type' ) ) );
    40704070                    break;
    40714071            }
Note: See TracChangeset for help on using the changeset viewer.