From 6295e19072fb2c93703a57b3a80d938c0270bf1f Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Fri, 18 Dec 2015 23:59:07 +0000 Subject: [PATCH] Accessibility: Remove title attributes from the Theme browser. Also, adds translators comments and removes a no more used variable, see [27748]. Fixes #35140. git-svn-id: https://develop.svn.wordpress.org/trunk@36015 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/theme.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index dda79cbd48..c7a8ce5768 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -163,18 +163,20 @@ function get_theme_update_available( $theme ) { $theme_name = $theme->display('Name'); $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet ); - $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.") ) . '\') ) {return true;}return false;"'; if ( !is_multisite() ) { if ( ! current_user_can('update_themes') ) { - $html = sprintf( '

' . __( 'There is a new version of %1$s available. View version %4$s details.' ) . '

', - $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] ); + /* translators: 1: theme name, 2: theme details URL, 3: theme version number */ + $html = sprintf( '

' . __( 'There is a new version of %1$s available. View version %3$s details.' ) . '

', + $theme_name, esc_url( $details_url ), $update['new_version'] ); } elseif ( empty( $update['package'] ) ) { - $html = sprintf( '

' . __( 'There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.' ) . '

', - $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] ); + /* translators: 1: theme name, 2: theme details URL, 3: theme version number */ + $html = sprintf( '

' . __( 'There is a new version of %1$s available. View version %3$s details. Automatic update is unavailable for this theme.' ) . '

', + $theme_name, esc_url( $details_url ), $update['new_version'] ); } else { - $html = sprintf( '

' . __( 'There is a new version of %1$s available. View version %4$s details or update now.' ) . '

', - $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'], $update_url, $update_onclick ); + /* translators: 1: theme name, 2: theme details URL, 3: theme version number, 4: theme update URL */ + $html = sprintf( '

' . __( 'There is a new version of %1$s available. View version %3$s details or update now.' ) . '

', + $theme_name, esc_url( $details_url ), $update['new_version'], $update_url ); } } }