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/edit-tags.php

    r37696 r37914  
    1919
    2020if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
    21    wp_die( __( 'You are not allowed to manage these items.' ) );
     21   wp_die( __( 'Sorry, you are not allowed to manage these items.' ) );
    2222}
    2323
     
    2525    wp_die(
    2626        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    27         '<p>' . __( 'You are not allowed to manage these items.' ) . '</p>',
     27        '<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
    2828        403
    2929    );
     
    7272        wp_die(
    7373            '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    74             '<p>' . __( 'You are not allowed to add this item.' ) . '</p>',
     74            '<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>',
    7575            403
    7676        );
     
    112112        wp_die(
    113113            '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    114             '<p>' . __( 'You are not allowed to delete this item.' ) . '</p>',
     114            '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
    115115            403
    116116        );
     
    129129        wp_die(
    130130            '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    131             '<p>' . __( 'You are not allowed to delete these items.' ) . '</p>',
     131            '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
    132132            403
    133133        );
     
    172172        wp_die(
    173173            '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    174             '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
     174            '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    175175            403
    176176        );
     
    298298    wp_die(
    299299        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
    300         '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
     300        '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    301301        403
    302302    );
Note: See TracChangeset for help on using the changeset viewer.