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
This commit is contained in:
Sergey Biryukov 2022-04-04 12:03:03 +00:00
parent b8b35c78b7
commit 955e2c007b
2 changed files with 10 additions and 1 deletions

View File

@ -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,

View File

@ -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.