WordPress.org

Make WordPress Core

Changeset 33886


Ignore:
Timestamp:
09/03/15 08:55:53 (2 years ago)
Author:
SergeyBiryukov
Message:

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

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

File:
1 edited

Legend:

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

    r33067 r33886  
    1313require_once(ABSPATH . 'wp-admin/includes/widgets.php'); 
    1414 
    15 if ( ! current_user_can('edit_theme_options') ) 
    16     wp_die( __( 'Cheatin’ uh?' ), 403 ); 
     15if ( ! current_user_can( 'edit_theme_options' ) ) { 
     16    wp_die( 
     17        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' . 
     18        '<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>', 
     19        403 
     20    ); 
     21} 
    1722 
    1823$widgets_access = get_user_setting( 'widgets_access' ); 
Note: See TracChangeset for help on using the changeset viewer.