Make WordPress Core

Ticket #35167: 35167.patch

File 35167.patch, 6.2 KB (added by afercia, 6 years ago)
  • src/wp-admin/includes/update.php

     
    231231                return false;
    232232
    233233        if ( current_user_can('update_core') ) {
    234                 $msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) );
     234                $msg = sprintf( __( '<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s" aria-label="Please update WordPress now">Please update now</a>.' ), $cur->current, network_admin_url( 'update-core.php' ) );
    235235        } else {
    236236                $msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
    237237        }
     
    338338                echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
    339339
    340340                if ( ! current_user_can( 'update_plugins' ) ) {
    341                         printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
    342                 } elseif ( empty($r->package) ) {
    343                         printf( __('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 plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
     341                        /* translators: plugin name, 2: details URL, 3: escaped plugin name, 4: version number */
     342                        printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a>.' ),
     343                                $plugin_name,
     344                                esc_url( $details_url ),
     345                                esc_attr( $plugin_name ),
     346                                $r->new_version
     347                        );
     348                } elseif ( empty( $r->package ) ) {
     349                        /* translators: plugin name, 2: details URL, 3: escaped plugin name, 4: version number */
     350                        printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
     351                                $plugin_name,
     352                                esc_url( $details_url ),
     353                                esc_attr( $plugin_name ),
     354                                $r->new_version
     355                        );
    344356                } else {
    345                         printf( __( '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" class="update-link">update now</a>.' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ) );
     357                        /* translators: plugin name, 2: details URL, 3: escaped plugin name, 4: version number, 5: update URL */
     358                        printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="update %3$s now">update now</a>.' ),
     359                                $plugin_name,
     360                                esc_url( $details_url ),
     361                                esc_attr( $plugin_name ),
     362                                $r->new_version,
     363                                wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file )
     364                        );
    346365                }
    347366                /**
    348367                 * Fires at the end of the update message container in each
     
    439458
    440459        echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
    441460        if ( ! current_user_can('update_themes') ) {
    442                 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r->new_version );
     461                /* translators: theme name, 2: details URL, 3: escaped theme name, 4: version number */
     462                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a>.'),
     463                        $theme['Name'],
     464                        esc_url( $details_url ),
     465                        esc_attr( $theme['Name'] ),
     466                        $r->new_version
     467                );
    443468        } elseif ( empty( $r['package'] ) ) {
    444                 printf( __('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>'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'] );
     469                /* translators: theme name, 2: details URL, 3: escaped theme name, 4: version number */
     470                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),
     471                        $theme['Name'],
     472                        esc_url( $details_url ),
     473                        esc_attr( $theme['Name'] ),
     474                        $r['new_version']
     475                );
    445476        } else {
    446                 printf( __('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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url( self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key) );
     477                /* translators: theme name, 2: details URL, 3: escaped theme name, 4: version number, 5: update URL */
     478                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" aria-label="update %3$s now">update now</a>.' ),
     479                        $theme['Name'],
     480                        esc_url( $details_url ),
     481                        esc_attr( $theme['Name'] ),
     482                        $r['new_version'],
     483                        wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key )
     484                );
    447485        }
    448486        /**
    449487         * Fires at the end of the update message container in each