WordPress.org

Make WordPress Core

Ticket #39794: 397941.patch

File 397941.patch, 3.3 KB (added by sebastian.pisula, 5 years ago)

previous filter + fix context translation

  • wp-admin/includes/update.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    324324 * @since 2.9.0
    325325 */
    326326function wp_plugin_update_rows() {
    327         if ( !current_user_can('update_plugins' ) )
    328                 return;
    329 
    330327        $plugins = get_site_transient( 'update_plugins' );
    331328        if ( isset($plugins->response) && is_array($plugins->response) ) {
    332329                $plugins = array_keys( $plugins->response );
     
    377374
    378375                if ( ! current_user_can( 'update_plugins' ) ) {
    379376                        /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
    380                         printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ),
     377                        printf( _x( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.', 'plugin' ),
    381378                                $plugin_name,
    382379                                esc_url( $details_url ),
    383380                                sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
     
    399396                        );
    400397                } else {
    401398                        /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
    402                         printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ),
     399                        printf( _x( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.', 'plugin' ),
    403400                                $plugin_name,
    404401                                esc_url( $details_url ),
    405402                                sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
     
    522519        echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
    523520        if ( ! current_user_can( 'update_themes' ) ) {
    524521                /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */
    525                 printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
     522                printf( _x( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.', 'theme'),
    526523                        $theme['Name'],
    527524                        esc_url( $details_url ),
    528525                        sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
     
    544541                );
    545542        } else {
    546543                /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
    547                 printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ),
     544                printf( _x( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.', 'theme' ),
    548545                        $theme['Name'],
    549546                        esc_url( $details_url ),
    550547                        sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',