Docs: Consistently document the $pagenow global in WP_Customize_Manage methods.

Follow-up to [41839].

Props jontyravi, bhrugesh12, kebbet.
Fixes #55499.

git-svn-id: https://develop.svn.wordpress.org/trunk@53059 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-04-04 12:02:00 +00:00
parent 3cd1a741a0
commit 74f4d6b441

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,