Changeset 45926 for trunk/src/wp-admin/includes/update.php
- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update.php
r45881 r45926 210 210 function core_update_footer( $msg = '' ) { 211 211 if ( ! current_user_can( 'update_core' ) ) { 212 /* translators: %s: WordPress version */ 212 213 return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); 213 214 } … … 232 233 switch ( $cur->response ) { 233 234 case 'development': 234 /* translators: 1: WordPress version number, 2: WordPress updates admin screen URL */ 235 return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) ); 235 return sprintf( 236 /* translators: 1: WordPress version number, 2: WordPress updates admin screen URL */ 237 __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), 238 get_bloginfo( 'version', 'display' ), 239 network_admin_url( 'update-core.php' ) 240 ); 236 241 237 242 case 'upgrade': 238 return '<strong><a href="' . network_admin_url( 'update-core.php' ) . '">' . sprintf( __( 'Get Version %s' ), $cur->current ) . '</a></strong>'; 243 return sprintf( 244 '<strong><a href="%s">%s</a></strong>', 245 network_admin_url( 'update-core.php' ), 246 /* translators: %s: WordPress version */ 247 sprintf( __( 'Get Version %s' ), $cur->current ) 248 ); 239 249 240 250 case 'latest': 241 251 default: 252 /* translators: %s: WordPress version */ 242 253 return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); 243 254 } … … 304 315 305 316 if ( isset( $cur->response ) && $cur->response == 'upgrade' ) { 306 $msg .= '<a href="' . network_admin_url( 'update-core.php' ) . '" class="button" aria-describedby="wp-version">' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a> '; 317 $msg .= sprintf( 318 '<a href="%s" class="button" aria-describedby="wp-version">%s</a> ', 319 network_admin_url( 'update-core.php' ), 320 /* translators: %s: WordPress version number, or 'Latest' string */ 321 sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) 322 ); 307 323 } 308 324 } … … 407 423 $notice_type = $compatible_php ? 'notice-warning' : 'notice-error'; 408 424 409 echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $response->slug . '-update' ) . '" data-slug="' . esc_attr( $response->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message notice inline ' . $notice_type . ' notice-alt"><p>'; 425 printf( 426 '<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' . 427 '<td colspan="%s" class="plugin-update colspanchange">' . 428 '<div class="update-message notice inline %s notice-alt"><p>', 429 $active_class, 430 esc_attr( $response->slug . '-update' ), 431 esc_attr( $response->slug ), 432 esc_attr( $file ), 433 esc_attr( $wp_list_table->get_column_count() ), 434 $notice_type 435 ); 410 436 411 437 if ( ! current_user_can( 'update_plugins' ) ) { 412 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */413 438 printf( 439 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */ 414 440 __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ), 415 441 $plugin_name, … … 423 449 ); 424 450 } elseif ( empty( $response->package ) ) { 425 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */426 451 printf( 452 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */ 427 453 __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ), 428 454 $plugin_name, … … 437 463 } else { 438 464 if ( $compatible_php ) { 439 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */440 465 printf( 466 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */ 441 467 __( '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>.' ), 442 468 $plugin_name, … … 456 482 ); 457 483 } else { 458 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number 5: Update PHP page URL */459 484 printf( 485 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number 5: Update PHP page URL */ 460 486 __( 'There is a new version of %1$s available, but it doesn’t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.' ), 461 487 $plugin_name, … … 581 607 $active = $theme->is_allowed( 'network' ) ? ' active' : ''; 582 608 583 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>'; 609 printf( 610 '<tr class="plugin-update-tr%s" id="%s" data-slug="%s">' . 611 '<td colspan="%s" class="plugin-update colspanchange">' . 612 '<div class="update-message notice inline notice-warning notice-alt"><p>', 613 $active, 614 esc_attr( $theme->get_stylesheet() . '-update' ), 615 esc_attr( $theme->get_stylesheet() ), 616 $wp_list_table->get_column_count() 617 ); 618 584 619 if ( ! current_user_can( 'update_themes' ) ) { 585 /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */586 620 printf( 621 /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */ 587 622 __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ), 588 623 $theme['Name'], … … 596 631 ); 597 632 } elseif ( empty( $response['package'] ) ) { 598 /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */599 633 printf( 634 /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */ 600 635 __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ), 601 636 $theme['Name'], … … 609 644 ); 610 645 } else { 611 /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */612 646 printf( 647 /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */ 613 648 __( '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>.' ), 614 649 $theme['Name'], … … 683 718 684 719 if ( current_user_can( 'update_core' ) ) { 685 $msg = sprintf( __( 'An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.' ), 'update-core.php' ); 720 $msg = sprintf( 721 /* translators: %s: URL to WordPress Updates screen */ 722 __( 'An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.' ), 723 'update-core.php' 724 ); 686 725 } else { 687 726 $msg = __( 'An automated WordPress update has failed to complete! Please notify the site administrator.' );
Note: See TracChangeset
for help on using the changeset viewer.