Make WordPress Core


Ignore:
Timestamp:
09/02/2015 06:37:28 PM (9 years ago)
Author:
SergeyBiryukov
Message:

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

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

File:
1 edited

Legend:

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

    r32642 r33865  
    1212require_once( dirname( __FILE__ ) . '/admin.php' );
    1313
    14 if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) )
    15     wp_die( __( 'Cheatin’ uh?' ), 403 );
     14if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
     15    wp_die(
     16        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
     17        '<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
     18        403
     19    );
     20}
    1621
    1722/**
Note: See TracChangeset for help on using the changeset viewer.