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:
parent
b8b35c78b7
commit
955e2c007b
|
@ -3266,6 +3266,7 @@ final class WP_Customize_Manager {
|
||||||
if ( ! $changeset_post_id ) {
|
if ( ! $changeset_post_id ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$lock = get_post_meta( $changeset_post_id, '_edit_lock', true );
|
$lock = get_post_meta( $changeset_post_id, '_edit_lock', true );
|
||||||
$lock = explode( ':', $lock );
|
$lock = explode( ':', $lock );
|
||||||
|
|
||||||
|
@ -3283,14 +3284,19 @@ final class WP_Customize_Manager {
|
||||||
* Filters heartbeat settings for the Customizer.
|
* Filters heartbeat settings for the Customizer.
|
||||||
*
|
*
|
||||||
* @since 4.9.0
|
* @since 4.9.0
|
||||||
|
*
|
||||||
|
* @global string $pagenow
|
||||||
|
*
|
||||||
* @param array $settings Current settings to filter.
|
* @param array $settings Current settings to filter.
|
||||||
* @return array Heartbeat settings.
|
* @return array Heartbeat settings.
|
||||||
*/
|
*/
|
||||||
public function add_customize_screen_to_heartbeat_settings( $settings ) {
|
public function add_customize_screen_to_heartbeat_settings( $settings ) {
|
||||||
global $pagenow;
|
global $pagenow;
|
||||||
|
|
||||||
if ( 'customize.php' === $pagenow ) {
|
if ( 'customize.php' === $pagenow ) {
|
||||||
$settings['screenId'] = 'customize';
|
$settings['screenId'] = 'customize';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $settings;
|
return $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3306,10 +3312,13 @@ final class WP_Customize_Manager {
|
||||||
if ( ! $user_id ) {
|
if ( ! $user_id ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$lock_user = get_userdata( $user_id );
|
$lock_user = get_userdata( $user_id );
|
||||||
|
|
||||||
if ( ! $lock_user ) {
|
if ( ! $lock_user ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'id' => $lock_user->ID,
|
'id' => $lock_user->ID,
|
||||||
'name' => $lock_user->display_name,
|
'name' => $lock_user->display_name,
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue