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/network/sites.php

    r37488 r37914  
    1515
    1616if ( ! current_user_can( 'manage_sites' ) )
    17     wp_die( __( 'You do not have permission to access this page.' ), 403 );
     17    wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    1818
    1919$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
     
    9292
    9393        if ( $current_site->blog_id == $id ) {
    94             wp_die( __( 'You are not allowed to change the current site.' ) );
     94            wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
    9595        }
    9696
     
    127127        case 'deleteblog':
    128128            if ( ! current_user_can( 'delete_sites' ) )
    129                 wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
     129                wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) );
    130130
    131131            $updated_action = 'not_deleted';
     
    145145                            case 'delete':
    146146                                if ( ! current_user_can( 'delete_site', $val ) )
    147                                     wp_die( __( 'You are not allowed to delete the site.' ) );
     147                                    wp_die( __( 'Sorry, you are not allowed to delete the site.' ) );
    148148
    149149                                $updated_action = 'all_delete';
     
    158158                        }
    159159                    } else {
    160                         wp_die( __( 'You are not allowed to change the current site.' ) );
     160                        wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
    161161                    }
    162162                }
     
    238238        break;
    239239        case 'not_deleted':
    240             $msg = __( 'You do not have permission to delete that site.' );
     240            $msg = __( 'Sorry, you are not allowed to delete that site.' );
    241241        break;
    242242        case 'archiveblog':
Note: See TracChangeset for help on using the changeset viewer.