From 955e2c007b34435313e39b49b83949483990d061 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 4 Apr 2022 12:03:03 +0000 Subject: [PATCH] Docs: Consistently document the `$pagenow` global in `WP_Customize_Manage` methods. Follow-up to [41839]. Props jontyravi, bhrugesh12, kebbet. Fixes #55499. Built from https://develop.svn.wordpress.org/trunk@53059 git-svn-id: http://core.svn.wordpress.org/trunk@52648 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 9 +++++++++ wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 816665fa2d..6d7572c535 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -3266,6 +3266,7 @@ final class WP_Customize_Manager { if ( ! $changeset_post_id ) { return; } + $lock = get_post_meta( $changeset_post_id, '_edit_lock', true ); $lock = explode( ':', $lock ); @@ -3283,14 +3284,19 @@ final class WP_Customize_Manager { * Filters heartbeat settings for the Customizer. * * @since 4.9.0 + * + * @global string $pagenow + * * @param array $settings Current settings to filter. * @return array Heartbeat settings. */ public function add_customize_screen_to_heartbeat_settings( $settings ) { global $pagenow; + if ( 'customize.php' === $pagenow ) { $settings['screenId'] = 'customize'; } + return $settings; } @@ -3306,10 +3312,13 @@ final class WP_Customize_Manager { if ( ! $user_id ) { return null; } + $lock_user = get_userdata( $user_id ); + if ( ! $lock_user ) { return null; } + return array( 'id' => $lock_user->ID, 'name' => $lock_user->display_name, diff --git a/wp-includes/version.php b/wp-includes/version.php index 8c57dfd69d..3e815ae5e4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53058'; +$wp_version = '6.0-alpha-53059'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.