Make WordPress Core


Ignore:
Timestamp:
06/29/2016 03:15:40 PM (9 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-includes/class-wp-customize-manager.php

    r37700 r37914  
    388388
    389389        if ( ! current_user_can( 'customize' ) ) {
    390             $this->wp_die( -1, __( 'You are not allowed to customize this site.' ) );
     390            $this->wp_die( -1, __( 'Sorry, you are not allowed to customize this site.' ) );
    391391        }
    392392
     
    402402            // switch_themes cap, bail.
    403403            if ( ! current_user_can( 'switch_themes' ) ) {
    404                 $this->wp_die( -1, __( 'You are not allowed to edit theme options on this site.' ) );
     404                $this->wp_die( -1, __( 'Sorry, you are not allowed to edit theme options on this site.' ) );
    405405            }
    406406
Note: See TracChangeset for help on using the changeset viewer.