WordPress.org

Make WordPress Core

Changeset 33862


Ignore:
Timestamp:
09/02/15 18:20:53 (2 years ago)
Author:
SergeyBiryukov
Message:

Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/nav-menus.php.

props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33673. see #14530.

File:
1 edited

Legend:

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

    r33734 r33862  
    2020 
    2121// Permissions Check 
    22 if ( ! current_user_can('edit_theme_options') ) 
    23     wp_die( __( 'Cheatin’ uh?' ), 403 ); 
     22if ( ! current_user_can( 'edit_theme_options' ) ) { 
     23    wp_die( 
     24        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' . 
     25        '<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>', 
     26        403 
     27    ); 
     28} 
    2429 
    2530wp_enqueue_script( 'nav-menu' ); 
Note: See TracChangeset for help on using the changeset viewer.