WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/19/2018 02:12:41 AM (4 years ago)
Author:
peterwilsoncc
Message:

General: Further improve error messages following [42648].

Props kristastevens, melchoyce.
Fixes #38332 for trunk.

File:
1 edited

Legend:

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

    r42648 r42719  
    1212if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    1313    wp_die(
    14         '<h1>' . __( 'You don&#8217;t have permission to do this.' ) . '</h1>' .
     14        '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    1515        '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
    1616        403
     
    2525        if ( ! $theme->exists() || ! $theme->is_allowed() ) {
    2626            wp_die(
    27                 '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
     27                '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    2828                '<p>' . __( 'The requested theme does not exist.' ) . '</p>',
    2929                403
     
    4040        if ( ! current_user_can( 'delete_themes' ) ) {
    4141            wp_die(
    42                 '<h1>' . __( 'You don&#8217;t have permission to do this.' ) . '</h1>' .
     42                '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    4343                '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
    4444                403
     
    4848        if ( ! $theme->exists() ) {
    4949            wp_die(
    50                 '<h1>' . __( 'An error has occurred.' ) . '</h1>' .
     50                '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    5151                '<p>' . __( 'The requested theme does not exist.' ) . '</p>',
    5252                403
Note: See TracChangeset for help on using the changeset viewer.