WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/29/2016 03:15:40 PM (4 years ago)
Author:
ocean90
Message:

Text Changes: Unify permission error messages.

The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.

File:
1 edited

Legend:

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

    r37674 r37914  
    6262
    6363    if ( !current_user_can( 'edit_comment', $comment_id ) )
    64         comment_footer_die( __('You are not allowed to edit this comment.') );
     64        comment_footer_die( __('Sorry, you are not allowed to edit this comment.') );
    6565
    6666    if ( 'trash' == $comment->comment_approved )
     
    255255        comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') );
    256256    if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
    257         comment_footer_die( __('You are not allowed to edit comments on this post.') );
     257        comment_footer_die( __('Sorry, you are not allowed to edit comments on this post.') );
    258258
    259259    if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') )
Note: See TracChangeset for help on using the changeset viewer.