Accessibility: Remove title attributes from the Theme browser.

Also, adds translators comments and removes a no more used variable, see [27748].

Fixes #35140.
Built from https://develop.svn.wordpress.org/trunk@36015


git-svn-id: http://core.svn.wordpress.org/trunk@35980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2015-12-19 00:00:29 +00:00
parent f7f14d94f3
commit 5787972a67
2 changed files with 10 additions and 8 deletions

View File

@ -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( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.' ) . '</strong></p>',
$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( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a>.' ) . '</strong></p>',
$theme_name, esc_url( $details_url ), $update['new_version'] );
} elseif ( empty( $update['package'] ) ) {
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
$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( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
$theme_name, esc_url( $details_url ), $update['new_version'] );
} else {
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.' ) . '</strong></p>',
$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( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a> or <a href="%4$s">update now</a>.' ) . '</strong></p>',
$theme_name, esc_url( $details_url ), $update['new_version'], $update_url );
}
}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36014';
$wp_version = '4.5-alpha-36015';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.