Update WordPress to 5.2

This commit is contained in:
Oliver Davies 2019-05-08 08:05:39 +01:00
parent 489b5a5914
commit e00f87f2f5
599 changed files with 119573 additions and 55990 deletions

View file

@ -294,6 +294,25 @@ function list_plugin_updates() {
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version );
}
}
$requires_php = isset( $plugin_data->update->requires_php ) ? $plugin_data->update->requires_php : null;
$compatible_php = is_php_version_compatible( $requires_php );
if ( ! $compatible_php && current_user_can( 'update_php' ) ) {
$compat .= '<br>' . __( 'This update doesn&#8217;t work with your version of PHP.' ) . '&nbsp;';
/* translators: %s: Update PHP page URL */
$compat .= sprintf(
__( '<a href="%s">Learn more about updating PHP</a>.' ),
esc_url( wp_get_update_php_url() )
);
$annotation = wp_get_update_php_annotation();
if ( $annotation ) {
$compat .= '</p><p><em>' . $annotation . '</em>';
}
}
// Get the upgrade notice for the new plugin version.
if ( isset( $plugin_data->update->upgrade_notice ) ) {
$upgrade_notice = '<br />' . strip_tags( $plugin_data->update->upgrade_notice );
@ -315,6 +334,7 @@ function list_plugin_updates() {
?>
<tr>
<td class="check-column">
<?php if ( $compatible_php ) : ?>
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
<label for="<?php echo $checkbox_id; ?>" class="screen-reader-text">
<?php
@ -325,9 +345,10 @@ function list_plugin_updates() {
);
?>
</label>
<?php endif; ?>
</td>
<td class="plugin-title"><p>
<?php echo $icon; ?>
<?php echo $icon; ?>
<strong><?php echo $plugin_data->Name; ?></strong>
<?php
/* translators: 1: plugin version, 2: new version */
@ -336,11 +357,11 @@ function list_plugin_updates() {
$plugin_data->Version,
$plugin_data->update->new_version
);
echo ' ' . $details . $compat . $upgrade_notice;
echo ' ' . $details . $compat . $upgrade_notice;
?>
</p></td>
</tr>
<?php
<?php
}
?>
</tbody>
@ -372,7 +393,15 @@ function list_theme_updates() {
?>
<h2><?php _e( 'Themes' ); ?></h2>
<p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click &#8220;Update Themes&#8221;.' ); ?></p>
<p><?php printf( __( '<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ); ?></p>
<p>
<?php
printf(
/* translators: %s: link to documentation on child themes */
__( '<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.' ),
__( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' )
);
?>
</p>
<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade">
<?php wp_nonce_field( 'upgrade-core' ); ?>
<p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e( 'Update Themes' ); ?>" name="upgrade" /></p>
@ -618,7 +647,7 @@ get_current_screen()->add_help_tab(
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Updates_Screen">Documentation on Updating WordPress</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
);
if ( 'upgrade-core' == $action ) {