mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@37914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -64,7 +64,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_results = _wp_translate_postdata( false, $_post_data );
|
||||
$this->assertInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertEquals( 'edit_others_posts', $_results->get_error_code() );
|
||||
$this->assertEquals( 'You are not allowed to create posts as this user.', $_results->get_error_message() );
|
||||
$this->assertEquals( 'Sorry, you are not allowed to create posts as this user.', $_results->get_error_message() );
|
||||
|
||||
// Edit Draft Post for another user
|
||||
$_post_data = array();
|
||||
@@ -77,7 +77,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
$_results = _wp_translate_postdata( true, $_post_data );
|
||||
$this->assertInstanceOf( 'WP_Error', $_results );
|
||||
$this->assertEquals( 'edit_others_posts', $_results->get_error_code() );
|
||||
$this->assertEquals( 'You are not allowed to edit posts as this user.', $_results->get_error_message() );
|
||||
$this->assertEquals( 'Sorry, you are not allowed to edit posts as this user.', $_results->get_error_message() );
|
||||
}
|
||||
|
||||
function test__wp_translate_postdata_cap_checks_editor() {
|
||||
|
||||
Reference in New Issue
Block a user