From a27e6a8ecd5279a45e47ef88d048643740d07b5a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 13 Nov 2024 12:25:43 +0000 Subject: [PATCH] Coding Standards: Consistently escape URLs in `wp-admin/themes.php`. Includes: * Wrapping long lines for better readability. * Bringing some consistency to the placement of `href` and `aria-label` attributes. * Adding missing `aria-label` attributes for Live Preview links. Follow-up to [26726], [52020], [51083]. Props patelketan, sainathpoojary, SergeyBiryukov. Fixes #62405. git-svn-id: https://develop.svn.wordpress.org/trunk@59400 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/themes.php | 122 +++++++++++++++++++++++++++++++--------- 1 file changed, 95 insertions(+), 27 deletions(-) diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index d7ebd5c646c42..4c814dd42b6d1 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -583,7 +583,9 @@ /* translators: %s: Theme name. */ $details_aria_label = sprintf( _x( 'View Theme Details for %s', 'theme' ), $theme['name'] ); ?> - +
- + - + + - + - - - + + + + @@ -954,7 +975,9 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $details_aria_label = sprintf( _x( 'View Theme Details for %s', 'theme' ), '{{ data.name }}' ); ?> - +
- + <# } #> <# } else { #> <# if ( data.compatibleWP && data.compatiblePHP ) { #> @@ -986,20 +1012,36 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> - + + - + <# } else { #> - + + <# if ( ! data.blockTheme ) { #> - + + <# } #> <# } #> <# } #> @@ -1211,31 +1253,54 @@ function wp_theme_auto_update_setting_template() {
- +
+
<# if ( data.compatibleWP && data.compatiblePHP ) { #> - <# if ( ! data.blockTheme ) { #> - + + <# } #> + <# if ( data.actions.activate ) { #> - + + <# } #> <# } else { #> - <# if ( ! data.blockTheme ) { #> - + + <# } #> + <# if ( data.actions.activate ) { #> - + + <# } #> <# } #>
@@ -1245,7 +1310,10 @@ function wp_theme_auto_update_setting_template() { /* translators: %s: Theme name. */ $aria_label = sprintf( _x( 'Delete %s', 'theme' ), '{{ data.name }}' ); ?> - + <# } #>