WordPress.org

Make WordPress Core

Changeset 33887


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

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

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

File:
1 edited

Legend:

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

    r32654 r33887  
    2727 */ 
    2828function edit_link( $link_id = 0 ) { 
    29     if ( !current_user_can( 'manage_links' ) ) 
    30         wp_die( __( 'Cheatin’ uh?' ), 403 ); 
     29    if ( ! current_user_can( 'manage_links' ) ) { 
     30        wp_die( 
     31            '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' . 
     32            '<p>' . __( 'You do not have sufficient permissions to edit the links for this site.' ) . '</p>', 
     33            403 
     34        ); 
     35    } 
    3136 
    3237    $_POST['link_url'] = esc_html( $_POST['link_url'] ); 
Note: See TracChangeset for help on using the changeset viewer.