Allow plugins to filter the result of get_user_option().
git-svn-id: https://develop.svn.wordpress.org/trunk@7253 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3231f7961b
commit
f4f2b5fc3c
@ -89,11 +89,13 @@ function get_user_option( $option, $user = 0 ) {
|
||||
$user = get_userdata($user);
|
||||
|
||||
if ( isset( $user->{$wpdb->prefix . $option} ) ) // Blog specific
|
||||
return $user->{$wpdb->prefix . $option};
|
||||
$result = $user->{$wpdb->prefix . $option};
|
||||
elseif ( isset( $user->{$option} ) ) // User specific and cross-blog
|
||||
return $user->{$option};
|
||||
$result = $user->{$option};
|
||||
else // Blog global
|
||||
return get_option( $option );
|
||||
$result = get_option( $option );
|
||||
|
||||
return apply_filters("get_user_option_{$option}", $result, $option, $user);
|
||||
}
|
||||
|
||||
function update_user_option( $user_id, $option_name, $newvalue, $global = false ) {
|
||||
|
Loading…
Reference in New Issue
Block a user