WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/29/2016 03:15:40 PM (5 years ago)
Author:
ocean90
Message:

Text Changes: Unify permission error messages.

The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.

File:
1 edited

Legend:

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

    r37488 r37914  
    7878    && ! apply_filters( 'enable_edit_any_user_configuration', true )
    7979) {
    80     wp_die( __( 'You do not have permission to edit this user.' ) );
     80    wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
    8181}
    8282
     
    111111
    112112if ( !current_user_can('edit_user', $user_id) )
    113     wp_die(__('You do not have permission to edit this user.'));
     113    wp_die(__('Sorry, you are not allowed to edit this user.'));
    114114
    115115if ( IS_PROFILE_PAGE ) {
     
    164164
    165165if ( !current_user_can('edit_user', $user_id) )
    166     wp_die(__('You do not have permission to edit this user.'));
     166    wp_die(__('Sorry, you are not allowed to edit this user.'));
    167167
    168168$sessions = WP_Session_Tokens::get_instance( $profileuser->ID );
Note: See TracChangeset for help on using the changeset viewer.