WordPress at Your Fingertips
function is not described

WP_Customize_Manager::get_lock_user_data() protected WP 4.9.0

Get lock user data.

{} It's a method of the class: WP_Customize_Manager{}

No Hooks.

Return

Array|null. User data formatted for client.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_lock_user_data( $user_id );
$user_id(int) (required)
User ID.

Changelog

Since 4.9.0 Introduced.

Code of WP_Customize_Manager::get_lock_user_data() WP 5.8.1

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 ) ),
	);
}