WordPress.org

Make WordPress Core

Changeset 33860


Ignore:
Timestamp:
09/02/2015 06:03:10 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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

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

File:
1 edited

Legend:

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

    r33821 r33860  
    99/** WordPress Administration Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    11 if ( !current_user_can('edit_posts') )
    12     wp_die( __( 'Cheatin’ uh?' ), 403 );
     11if ( ! current_user_can( 'edit_posts' ) ) {
     12    wp_die(
     13        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     14        '<p>' . __( 'You are not allowed to edit comments.' ) . '</p>',
     15        403
     16    );
     17}
    1318
    1419$wp_list_table = _get_list_table('WP_Comments_List_Table');
Note: See TracChangeset for help on using the changeset viewer.