On this page
WP_Customize_Manager::get_lock_user_data( int $user_id ): array|null
Gets lock user data.
Parameters
$user_idint Required-
User ID.
Return
array|null User data formatted for client.
Source
File: wp-includes/class-wp-customize-manager.php. View all references
protected function get_lock_user_data( $user_id ) {
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,
'avatar' => get_avatar_url( $lock_user->ID, array( 'size' => 128 ) ),
);
}
Related
Uses
| Uses | Description |
|---|---|
| get_avatar_url() wp-includes/link-template.php | Retrieves the avatar URL. |
| get_userdata() wp-includes/pluggable.php | Retrieves user info by user ID. |
Used By
| Used By | Description |
|---|---|
| WP_Customize_Manager::check_changeset_lock_with_heartbeat() wp-includes/class-wp-customize-manager.php | Checks locked changeset with heartbeat API. |
| WP_Customize_Manager::handle_changeset_trash_request() wp-includes/class-wp-customize-manager.php | Handles request to trash a changeset. |
| WP_Customize_Manager::customize_pane_settings() wp-includes/class-wp-customize-manager.php | Prints JavaScript settings for parent window. |
| WP_Customize_Manager::save() wp-includes/class-wp-customize-manager.php | Handles customize_save WP Ajax request to save/update a changeset. |
Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_manager/get_lock_user_data