mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-03 11:31:39 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user