From 929e4e4f9ee639e70d9a4622cefb4a9b47d8fb45 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 3 May 2022 14:51:41 +0000 Subject: [PATCH] General: Add missing `strong` tag to some error messages. This changeset adds missing `strong` tag to some error messages and updates some AJAX messages, for better consistency. Follow-up to [53118]. Props NekoJonez, audrasjb, ocean90. Fixes #54437. git-svn-id: https://develop.svn.wordpress.org/trunk@53337 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 6 +++--- src/wp-admin/options-permalink.php | 6 +++--- tests/phpunit/tests/ajax/ReplytoComment.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index c473d89455..e39739883e 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -1291,7 +1291,7 @@ function wp_ajax_replyto_comment( $action ) { if ( empty( $post->post_status ) ) { wp_die( 1 ); } elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ), true ) ) { - wp_die( __( 'Error: You cannot reply to a comment on a draft post.' ) ); + wp_die( __( 'You cannot reply to a comment on a draft post.' ) ); } $user = wp_get_current_user(); @@ -1321,7 +1321,7 @@ function wp_ajax_replyto_comment( $action ) { } if ( '' === $comment_content ) { - wp_die( __( 'Error: Please type your comment text.' ) ); + wp_die( __( 'Please type your comment text.' ) ); } $comment_parent = 0; @@ -1423,7 +1423,7 @@ function wp_ajax_edit_comment() { } if ( '' === $_POST['content'] ) { - wp_die( __( 'Error: Please type your comment text.' ) ); + wp_die( __( 'Please type your comment text.' ) ); } if ( isset( $_POST['status'] ) ) { diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php index 12df3d6fcf..87191625c7 100644 --- a/src/wp-admin/options-permalink.php +++ b/src/wp-admin/options-permalink.php @@ -368,7 +368,7 @@ printf( __( 'If you like, you may enter custom structures for your category and writable, so updating it automatically was not possible. This is the URL rewrite rule you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this rule inside of the %5$s element in %1$s file.' ), + __( 'Error: Your %1$s file is not writable, so updating it automatically was not possible. This is the URL rewrite rule you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this rule inside of the %5$s element in %1$s file.' ), 'web.config', __( 'https://wordpress.org/support/article/changing-file-permissions/' ), 'Ctrl + A', @@ -395,7 +395,7 @@ printf( __( 'If you like, you may enter custom structures for your category and writable, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.' ), + __( 'Error: The root directory of your site is not writable, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.' ), __( 'https://wordpress.org/support/article/changing-file-permissions/' ), 'web.config', 'Ctrl + A', @@ -426,7 +426,7 @@ else : writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ), + __( 'Error: Your %1$s file is not writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ), '.htaccess', __( 'https://wordpress.org/support/article/changing-file-permissions/' ), 'Ctrl + A', diff --git a/tests/phpunit/tests/ajax/ReplytoComment.php b/tests/phpunit/tests/ajax/ReplytoComment.php index 5ea9a715c5..e652ede2a3 100644 --- a/tests/phpunit/tests/ajax/ReplytoComment.php +++ b/tests/phpunit/tests/ajax/ReplytoComment.php @@ -186,7 +186,7 @@ class Tests_Ajax_ReplytoComment extends WP_Ajax_UnitTestCase { // Make the request. $this->expectException( 'WPAjaxDieStopException' ); - $this->expectExceptionMessage( 'Error: You cannot reply to a comment on a draft post.' ); + $this->expectExceptionMessage( 'You cannot reply to a comment on a draft post.' ); $this->_handleAjax( 'replyto-comment' ); }