Ticket #36048: 36048.patch
File 36048.patch, 7.6 KB (added by , 9 years ago) |
---|
-
wp-admin/includes/update.php
316 316 */ 317 317 function wp_plugin_update_row( $file, $plugin_data ) { 318 318 $current = get_site_transient( 'update_plugins' ); 319 319 320 if ( !isset( $current->response[ $file ] ) ) 320 321 return false; 321 322 … … 322 323 $r = $current->response[ $file ]; 323 324 324 325 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); 326 325 327 $plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags ); 326 328 327 329 $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '§ion=changelog&TB_iframe=true&width=600&height=800'); … … 338 340 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">'; 339 341 340 342 if ( ! current_user_can( 'update_plugins' ) ) { 341 /* translators: 1: 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 /* translators: 1: plugin name, 2: details URL, 3: aria-label text, 4: version number */ 344 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>.' ), 343 345 $plugin_name, 344 346 esc_url( $details_url ), 345 esc_attr( $plugin_name),347 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $r->new_version ) ), 346 348 $r->new_version 347 349 ); 348 350 } elseif ( empty( $r->package ) ) { 349 /* translators: 1: 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 /* translators: 1: plugin name, 2: details URL, 3: aria-label text, 4: version number */ 352 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ), 351 353 $plugin_name, 352 354 esc_url( $details_url ), 353 esc_attr( $plugin_name),355 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $r->new_version ) ), 354 356 $r->new_version 355 357 ); 356 358 } else { 357 /* translators: 1: 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 /* translators: 1: plugin name, 2: details URL, 3: aria-label text, 4: version number, 5: update URL, 6: aria-label text */ 360 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ), 359 361 $plugin_name, 360 362 esc_url( $details_url ), 361 esc_attr( $plugin_name),363 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $r->new_version ) ), 362 364 $r->new_version, 363 wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ) 365 wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ), 366 esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) ) 364 367 ); 365 368 } 366 369 /** … … 450 453 $current = get_site_transient( 'update_themes' ); 451 454 if ( !isset( $current->response[ $theme_key ] ) ) 452 455 return false; 456 453 457 $r = $current->response[ $theme_key ]; 454 458 459 $theme_name = $theme['Name']; 460 455 461 $details_url = add_query_arg( array( 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800 ), $current->response[ $theme_key ]['url'] ); 456 462 457 463 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); … … 460 466 461 467 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">'; 462 468 if ( ! current_user_can('update_themes') ) { 463 /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number */464 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>.'),465 $theme ['Name'],469 /* translators: 1: theme name, 2: details URL, 3: aria-label text, 4: version number */ 470 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>.'), 471 $theme_name, 466 472 esc_url( $details_url ), 467 esc_attr( $theme['Name']),468 $r ->new_version473 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $r['new_version'] ) ), 474 $r['new_version'] 469 475 ); 470 476 } elseif ( empty( $r['package'] ) ) { 471 /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number */472 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>' ),473 $theme ['Name'],477 /* translators: 1: theme name, 2: details URL, 3: aria-label text, 4: version number */ 478 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ), 479 $theme_name, 474 480 esc_url( $details_url ), 475 esc_attr( $theme['Name']),481 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $r['new_version'] ) ), 476 482 $r['new_version'] 477 483 ); 478 484 } else { 479 /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number, 5: update URL*/480 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>.' ),481 $theme ['Name'],485 /* translators: 1: theme name, 2: details URL, 3: aria-label text, 4: version number, 5: update URL, 6: aria-label text */ 486 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ), 487 $theme_name, 482 488 esc_url( $details_url ), 483 esc_attr( $theme['Name']),489 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $r['new_version'] ) ), 484 490 $r['new_version'], 485 wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key ) 491 wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key ), 492 esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) ) 486 493 ); 487 494 } 488 495 /**