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/update-core.php

    r37162 r37914  
    2121
    2222if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) )
    23     wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     23    wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    2424
    2525/**
     
    624624
    625625    if ( ! current_user_can( 'update_core' ) )
    626         wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     626        wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    627627
    628628    check_admin_referer('upgrade-core');
     
    648648
    649649    if ( ! current_user_can( 'update_plugins' ) )
    650         wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     650        wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    651651
    652652    check_admin_referer('upgrade-core');
     
    676676
    677677    if ( ! current_user_can( 'update_themes' ) )
    678         wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     678        wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    679679
    680680    check_admin_referer('upgrade-core');
     
    706706
    707707    if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) )
    708         wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
     708        wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
    709709
    710710    check_admin_referer( 'upgrade-translations' );
Note: See TracChangeset for help on using the changeset viewer.