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

@ -744,6 +744,12 @@ function switch_theme( $stylesheet ) {
$new_theme = wp_get_theme( $stylesheet );
$template = $new_theme->get_template();
if ( wp_is_recovery_mode() ) {
$paused_themes = wp_paused_themes();
$paused_themes->delete( $old_theme->get_stylesheet() );
$paused_themes->delete( $old_theme->get_template() );
}
update_option( 'template', $template );
update_option( 'stylesheet', $stylesheet );
@ -2634,7 +2640,7 @@ function _custom_logo_header_styles() {
*
* @global array $_wp_theme_features
*
* @param string $feature the feature to check
* @param string $feature The feature to check.
* @return mixed The array of extra arguments or the value for the registered feature.
*/
function get_theme_support( $feature ) {
@ -2670,7 +2676,7 @@ function get_theme_support( $feature ) {
*
* @since 3.0.0
* @see add_theme_support()
* @param string $feature the feature being added
* @param string $feature The feature being removed.
* @return bool|void Whether feature was removed.
*/
function remove_theme_support( $feature ) {
@ -2730,7 +2736,9 @@ function _remove_theme_support( $feature ) {
break;
}
$support = get_theme_support( 'custom-background' );
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
if ( isset( $support[0]['wp-head-callback'] ) ) {
remove_action( 'wp_head', $support[0]['wp-head-callback'] );
}
remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
unset( $GLOBALS['custom_background'] );
break;
@ -2741,14 +2749,14 @@ function _remove_theme_support( $feature ) {
}
/**
* Checks a theme's support for a given feature
* Checks a theme's support for a given feature.
*
* @since 2.9.0
*
* @global array $_wp_theme_features
*
* @param string $feature the feature being checked
* @return bool
* @param string $feature The feature being checked.
* @return bool True if the current theme supports the feature, false otherwise.
*/
function current_theme_supports( $feature ) {
global $_wp_theme_features;
@ -3057,7 +3065,7 @@ function _wp_customize_publish_changeset( $new_status, $old_status, $changeset_p
* Trash the changeset post if revisions are not enabled. Unpublished
* changesets by default get garbage collected due to the auto-draft status.
* When a changeset post is published, however, it would no longer get cleaned
* out. Ths is a problem when the changeset posts are never displayed anywhere,
* out. This is a problem when the changeset posts are never displayed anywhere,
* since they would just be endlessly piling up. So here we use the revisions
* feature to indicate whether or not a published changeset should get trashed
* and thus garbage collected.
@ -3277,7 +3285,7 @@ function _wp_keep_alive_customize_changeset_dependent_auto_drafts( $new_status,
* it is now a persistent changeset, a long-lived draft, and so any
* associated auto-draft posts should likewise transition into having a draft
* status. These drafts will be treated differently than regular drafts in
* that they will be tied to the given changeset. The publish metabox is
* that they will be tied to the given changeset. The publish meta box is
* replaced with a notice about how the post is part of a set of customized changes
* which will be published when the changeset is published.
*/