Make WordPress Core

Changeset 36015


Ignore:
Timestamp:
12/18/2015 11:59:07 PM (8 years ago)
Author:
afercia
Message:

Accessibility: Remove title attributes from the Theme browser.

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

Fixes #35140.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/theme.php

    r35729 r36015  
    164164        $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.
    165165        $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet );
    166         $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;"';
    167166
    168167        if ( !is_multisite() ) {
    169168            if ( ! current_user_can('update_themes') ) {
    170                 $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>',
    171                     $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] );
     169                /* translators: 1: theme name, 2: theme details URL, 3: theme version number */
     170                $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>',
     171                    $theme_name, esc_url( $details_url ), $update['new_version'] );
    172172            } elseif ( empty( $update['package'] ) ) {
    173                 $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>',
    174                     $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'] );
     173                /* translators: 1: theme name, 2: theme details URL, 3: theme version number */
     174                $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>',
     175                    $theme_name, esc_url( $details_url ), $update['new_version'] );
    175176            } else {
    176                 $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>',
    177                     $theme_name, esc_url( $details_url ), esc_attr( $theme['Name'] ), $update['new_version'], $update_url, $update_onclick );
     177                /* translators: 1: theme name, 2: theme details URL, 3: theme version number, 4: theme update URL */
     178                $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>',
     179                    $theme_name, esc_url( $details_url ), $update['new_version'], $update_url );
    178180            }
    179181        }
Note: See TracChangeset for help on using the changeset viewer.