WordPress.org

Make WordPress Core

Changeset 38037


Ignore:
Timestamp:
07/12/2016 11:44:33 AM (4 years ago)
Author:
ocean90
Message:

Text Changes: Unify/merge two more permission error messages.

Props ramiy.
Fixes #34521.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r37999 r38037  
    44104410
    44114411        if ( !current_user_can( 'edit_posts' ) )
    4412             return new IXR_Error( 401, __( 'Sorry, you do not have access to user data on this site.' ) );
     4412            return new IXR_Error( 401, __( 'Sorry, you are not allowed to access user data on this site.' ) );
    44134413
    44144414        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r37943 r38037  
    880880                            $response = $permission;
    881881                        } else if ( false === $permission || null === $permission ) {
    882                             $response = new WP_Error( 'rest_forbidden', __( "You don't have permission to do this." ), array( 'status' => 403 ) );
     882                            $response = new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to do that.' ), array( 'status' => 403 ) );
    883883                        }
    884884                    }
Note: See TracChangeset for help on using the changeset viewer.