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:543
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
- _deprecated_function()Marks a function as deprecated and inform when it has been used.
- wp_get_current_user()Retrieves the current user object.
- get_current_blog_id()Retrieves the current site ID.
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.
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.0.4 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.