From dbebcb7d79f279f69a65ca6de1a74d52246a7fcb Mon Sep 17 00:00:00 2001 From: Nirav sherasiya Date: Mon, 16 Feb 2026 13:55:02 +0530 Subject: [PATCH 1/3] Add inline onclick event --- src/wp-admin/admin-footer.php | 2 +- src/wp-admin/options-general.php | 4 ++-- src/wp-admin/options-permalink.php | 2 +- src/wp-admin/options-reading.php | 2 +- src/wp-admin/options-writing.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/admin-footer.php b/src/wp-admin/admin-footer.php index abb020e046459..79ef82abe5796 100644 --- a/src/wp-admin/admin-footer.php +++ b/src/wp-admin/admin-footer.php @@ -34,7 +34,7 @@ WordPress.' ), + __( 'Thank you for creating with WordPress.' ), esc_url( __( 'https://wordpress.org/' ) ) ); diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index 214899d5a11a6..a0375760af7db 100644 --- a/src/wp-admin/options-general.php +++ b/src/wp-admin/options-general.php @@ -250,7 +250,7 @@ class="" want your site home page to be different from your WordPress installation directory.' ), + __( 'Enter the same address here unless you want your site home page to be different from your WordPress installation directory.' ), __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ) ); ?> @@ -547,7 +547,7 @@ class="" '

' . __( 'Preview:' ) . ' ' . date_i18n( get_option( 'time_format' ) ) . '' . "\n" . '

'; - echo "\t

" . __( 'Documentation on date and time formatting.' ) . "

\n"; + echo "\t

" . __( 'Documentation on date and time formatting.' ) . "

\n"; ?> diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php index 2a1b46fba2102..c4153a16bf6d9 100644 --- a/src/wp-admin/options-permalink.php +++ b/src/wp-admin/options-permalink.php @@ -223,7 +223,7 @@ number of tags are available, and here are some examples to get you started.' ), + __( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.' ), __( 'https://wordpress.org/documentation/article/customize-permalinks/' ) ); ?> diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php index d08abc108d669..04772d7d5fc02 100644 --- a/src/wp-admin/options-reading.php +++ b/src/wp-admin/options-reading.php @@ -198,7 +198,7 @@ Learn more about feeds.' ), + __( 'Your theme determines how content is displayed in browsers. Learn more about feeds.' ), __( 'https://developer.wordpress.org/advanced-administration/wordpress/feeds/' ) ); ?> diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php index 6f85b54679327..e77abb32937e6 100644 --- a/src/wp-admin/options-writing.php +++ b/src/wp-admin/options-writing.php @@ -220,7 +220,7 @@ Update Services documentation article. Separate multiple service URLs with line breaks.' ), + __( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see the Update Services documentation article. Separate multiple service URLs with line breaks.' ), __( 'https://developer.wordpress.org/advanced-administration/wordpress/update-services/' ) ); ?> From 17035615893b17c3d95331c691defffd8c75bc20 Mon Sep 17 00:00:00 2001 From: Nirav sherasiya Date: Mon, 16 Feb 2026 14:09:40 +0530 Subject: [PATCH 2/3] Refactor code --- src/wp-admin/admin-footer.php | 6 ++++-- src/wp-admin/options-general.php | 8 +++++--- src/wp-admin/options-permalink.php | 5 +++-- src/wp-admin/options-reading.php | 5 +++-- src/wp-admin/options-writing.php | 5 +++-- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/admin-footer.php b/src/wp-admin/admin-footer.php index 79ef82abe5796..c1703a9a1f226 100644 --- a/src/wp-admin/admin-footer.php +++ b/src/wp-admin/admin-footer.php @@ -34,8 +34,10 @@ WordPress.' ), - esc_url( __( 'https://wordpress.org/' ) ) + __( 'Thank you for creating with WordPress.' ), + esc_url( __( 'https://wordpress.org/' ) ), + /* translators: %s: confirmation message. */ + esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ); /** diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index a0375760af7db..b228876b8a2d1 100644 --- a/src/wp-admin/options-general.php +++ b/src/wp-admin/options-general.php @@ -250,8 +250,10 @@ class="" want your site home page to be different from your WordPress installation directory.' ), - __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ) + __( 'Enter the same address here unless you want your site home page to be different from your WordPress installation directory.' ), + __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ), + /* translators: %s: confirmation message. */ + esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ); ?>

@@ -547,7 +549,7 @@ class="" '

' . __( 'Preview:' ) . ' ' . date_i18n( get_option( 'time_format' ) ) . '' . "\n" . '

'; - echo "\t

" . __( 'Documentation on date and time formatting.' ) . "

\n"; + echo "\t

" . sprintf( __( 'Documentation on date and time formatting.' ), esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ) . "

\n"; ?> diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php index c4153a16bf6d9..f8bc31d936e19 100644 --- a/src/wp-admin/options-permalink.php +++ b/src/wp-admin/options-permalink.php @@ -223,8 +223,9 @@ number of tags are available, and here are some examples to get you started.' ), - __( 'https://wordpress.org/documentation/article/customize-permalinks/' ) + __( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.' ), + __( 'https://wordpress.org/documentation/article/customize-permalinks/' ), + esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ); ?>

diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php index 04772d7d5fc02..1c656f29e0751 100644 --- a/src/wp-admin/options-reading.php +++ b/src/wp-admin/options-reading.php @@ -198,8 +198,9 @@ Learn more about feeds.' ), - __( 'https://developer.wordpress.org/advanced-administration/wordpress/feeds/' ) + __( 'Your theme determines how content is displayed in browsers. Learn more about feeds.' ), + __( 'https://developer.wordpress.org/advanced-administration/wordpress/feeds/' ), + esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ); ?>

diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php index e77abb32937e6..9c1db0ef9c5f1 100644 --- a/src/wp-admin/options-writing.php +++ b/src/wp-admin/options-writing.php @@ -220,8 +220,9 @@ Update Services documentation article. Separate multiple service URLs with line breaks.' ), - __( 'https://developer.wordpress.org/advanced-administration/wordpress/update-services/' ) + __( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see the Update Services documentation article. Separate multiple service URLs with line breaks.' ), + __( 'https://developer.wordpress.org/advanced-administration/wordpress/update-services/' ), + esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ); ?>

From 93f9a845f652fbc84de8ac238f65904eeca1b824 Mon Sep 17 00:00:00 2001 From: Nirav sherasiya Date: Mon, 16 Feb 2026 14:17:27 +0530 Subject: [PATCH 3/3] Fix phpcs errors --- src/wp-admin/admin-footer.php | 5 ++--- src/wp-admin/options-general.php | 4 ++-- src/wp-admin/options-permalink.php | 4 ++-- src/wp-admin/options-reading.php | 4 ++-- src/wp-admin/options-writing.php | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/admin-footer.php b/src/wp-admin/admin-footer.php index c1703a9a1f226..69fa2082a4e52 100644 --- a/src/wp-admin/admin-footer.php +++ b/src/wp-admin/admin-footer.php @@ -33,10 +33,9 @@

want your site home page to be different from your WordPress installation directory.' ), + /* translators: 1: Documentation URL. 2: Confirmation message. */ + __( 'Enter the same address here unless you want your site home page to be different from your WordPress installation directory.' ), __( 'https://developer.wordpress.org/advanced-administration/server/wordpress-in-directory/' ), /* translators: %s: confirmation message. */ esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php index f8bc31d936e19..eb8bfc09253d1 100644 --- a/src/wp-admin/options-permalink.php +++ b/src/wp-admin/options-permalink.php @@ -222,8 +222,8 @@

number of tags are available, and here are some examples to get you started.' ), + /* translators: 1: Documentation URL. 2: Confirmation message. */ + __( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.' ), __( 'https://wordpress.org/documentation/article/customize-permalinks/' ), esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ); diff --git a/src/wp-admin/options-reading.php b/src/wp-admin/options-reading.php index 1c656f29e0751..6274633c2245e 100644 --- a/src/wp-admin/options-reading.php +++ b/src/wp-admin/options-reading.php @@ -197,8 +197,8 @@

Learn more about feeds.' ), + /* translators: 1: Documentation URL. 2: Confirmation message. */ + __( 'Your theme determines how content is displayed in browsers. Learn more about feeds.' ), __( 'https://developer.wordpress.org/advanced-administration/wordpress/feeds/' ), esc_js( __( "Are you sure you want to leave this page?\n 'Cancel' to stay, 'OK' to leave." ) ) ); diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php index 9c1db0ef9c5f1..a549e83d5666e 100644 --- a/src/wp-admin/options-writing.php +++ b/src/wp-admin/options-writing.php @@ -219,8 +219,8 @@