Changeset 44937 for trunk/src/wp-admin/includes/update.php
- Timestamp:
- 03/20/2019 01:43:05 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update.php
r44451 r44937 401 401 } 402 402 403 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-warning notice-alt"><p>'; 403 $compatible_php = ( empty( $response->requires_php ) || version_compare( phpversion(), $response->requires_php, '>=' ) ); 404 $notice_type = $compatible_php ? 'notice-warning' : 'notice-error'; 405 406 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>'; 404 407 405 408 if ( ! current_user_can( 'update_plugins' ) ) { … … 414 417 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ) 415 418 ), 416 $response->new_version419 esc_attr( $response->new_version ) 417 420 ); 418 421 } elseif ( empty( $response->package ) ) { … … 427 430 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ) 428 431 ), 429 $response->new_version432 esc_attr( $response->new_version ) 430 433 ); 431 434 } else { 432 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */ 433 printf( 434 __( '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>.' ), 435 $plugin_name, 436 esc_url( $details_url ), 437 sprintf( 438 'class="thickbox open-plugin-details-modal" aria-label="%s"', 439 /* translators: 1: plugin name, 2: version number */ 440 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ) 441 ), 442 $response->new_version, 443 wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ), 444 sprintf( 445 'class="update-link" aria-label="%s"', 446 /* translators: %s: plugin name */ 447 esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) ) 448 ) 449 ); 435 if ( $compatible_php ) { 436 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */ 437 printf( 438 __( '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>.' ), 439 $plugin_name, 440 esc_url( $details_url ), 441 sprintf( 442 'class="thickbox open-plugin-details-modal" aria-label="%s"', 443 /* translators: 1: plugin name, 2: version number */ 444 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ) 445 ), 446 esc_attr( $response->new_version ), 447 wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ), 448 sprintf( 449 'class="update-link" aria-label="%s"', 450 /* translators: %s: plugin name */ 451 esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) ) 452 ) 453 ); 454 } else { 455 /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number 5: Update PHP page URL */ 456 printf( 457 __( '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>.' ), 458 $plugin_name, 459 esc_url( $details_url ), 460 sprintf( 461 'class="thickbox open-plugin-details-modal" aria-label="%s"', 462 /* translators: 1: plugin name, 2: version number */ 463 esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ) 464 ), 465 esc_attr( $response->new_version ), 466 esc_url( wp_get_update_php_url() ) 467 ); 468 wp_update_php_annotation( '<br><span class="description">', '</span>' ); 469 } 450 470 } 451 471
Note: See TracChangeset
for help on using the changeset viewer.