wppaste
WordPress

is_user_option_local( string $key, int $user_id = 0, int $blog_id = 0 ): bool

Since
MU (3.0.0)
Source
wp-includes/ms-deprecated.php:546
Check whether a usermeta key has to do with the current blog.

Parameters

$keystring
$user_idintoptional
Defaults to current user.Default: 0
$blog_idintoptional
Defaults to current blog.Default: 0

Return

bool

Uses · 3

Source

function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {	global $wpdb; 	_deprecated_function( __FUNCTION__, '4.9.0' ); 	$current_user = wp_get_current_user();	if ( $blog_id == 0 ) {		$blog_id = get_current_blog_id();	}	$local_key = $wpdb->get_blog_prefix( $blog_id ) . $key; 	return isset( $current_user->$local_key );}

History

Introduced in MU (3.0.0). Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

4.9.0
Deprecated.from the docblock
MU (3.0.0)
MU (3.0.0)from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/ms-deprecated.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.