Update WordPress to 5.2
This commit is contained in:
parent
489b5a5914
commit
e00f87f2f5
599 changed files with 119573 additions and 55990 deletions
|
|
@ -400,7 +400,11 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
|||
$active_class = is_plugin_active( $file ) ? ' active' : '';
|
||||
}
|
||||
|
||||
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>';
|
||||
$requires_php = isset( $response->requires_php ) ? $response->requires_php : null;
|
||||
$compatible_php = is_php_version_compatible( $requires_php );
|
||||
$notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
|
||||
|
||||
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>';
|
||||
|
||||
if ( ! current_user_can( 'update_plugins' ) ) {
|
||||
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
|
||||
|
|
@ -413,7 +417,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
|||
/* translators: 1: plugin name, 2: version number */
|
||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||
),
|
||||
$response->new_version
|
||||
esc_attr( $response->new_version )
|
||||
);
|
||||
} elseif ( empty( $response->package ) ) {
|
||||
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
|
||||
|
|
@ -426,27 +430,44 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
|||
/* translators: 1: plugin name, 2: version number */
|
||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||
),
|
||||
$response->new_version
|
||||
esc_attr( $response->new_version )
|
||||
);
|
||||
} else {
|
||||
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
|
||||
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>.' ),
|
||||
$plugin_name,
|
||||
esc_url( $details_url ),
|
||||
sprintf(
|
||||
'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||
/* translators: 1: plugin name, 2: version number */
|
||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||
),
|
||||
$response->new_version,
|
||||
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ),
|
||||
sprintf(
|
||||
'class="update-link" aria-label="%s"',
|
||||
/* translators: %s: plugin name */
|
||||
esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
|
||||
)
|
||||
);
|
||||
if ( $compatible_php ) {
|
||||
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
|
||||
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>.' ),
|
||||
$plugin_name,
|
||||
esc_url( $details_url ),
|
||||
sprintf(
|
||||
'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||
/* translators: 1: plugin name, 2: version number */
|
||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||
),
|
||||
esc_attr( $response->new_version ),
|
||||
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ),
|
||||
sprintf(
|
||||
'class="update-link" aria-label="%s"',
|
||||
/* translators: %s: plugin name */
|
||||
esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
|
||||
)
|
||||
);
|
||||
} else {
|
||||
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number 5: Update PHP page URL */
|
||||
printf(
|
||||
__( '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>.' ),
|
||||
$plugin_name,
|
||||
esc_url( $details_url ),
|
||||
sprintf(
|
||||
'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||
/* translators: 1: plugin name, 2: version number */
|
||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||
),
|
||||
esc_attr( $response->new_version ),
|
||||
esc_url( wp_get_update_php_url() )
|
||||
);
|
||||
wp_update_php_annotation( '<br><em>', '</em>' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -809,3 +830,22 @@ function wp_print_update_row_templates() {
|
|||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a notice when the user is in recovery mode.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*/
|
||||
function wp_recovery_mode_nag() {
|
||||
if ( ! wp_is_recovery_mode() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="notice notice-info">
|
||||
<p>
|
||||
<?php esc_html_e( 'You are in recovery mode. This means there may be an error with a theme or plugin. To exit recovery mode, log out or use the Exit button.' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue