get_user_option [ WordPress Function ]
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Retrieve user option that can be either per Site or per Network.
If the user ID is not given, then the current user will be used instead. If the user ID is given, then the user data will be retrieved. The filter for the result, will also pass the original option name and finally the user data object as the third parameter.
The option will first check for the per site name and then the per Network name.
Source
<?php
function get_user_option( $option, $user = 0, $deprecated = '' ) {
global $wpdb;
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '3.0' );
if ( empty( $user ) )
$user = wp_get_current_user();
else
$user = new WP_User( $user );
if ( ! $user->exists() )
return false;
if ( $user->has_prop( $wpdb->prefix . $option ) ) // Blog specific
$result = $user->get( $wpdb->prefix . $option );
elseif ( $user->has_prop( $option ) ) // User specific and cross-blog
$result = $user->get( $option );
else
$result = false;
return apply_filters("get_user_option_{$option}", $result, $option, $user);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/get user option « WordPress Codex
Description. Retrieve user option that can be either global, user, or blog. If the user ID is not given, then the current user will be used instead. If the user ID is ...
codex.wordpress.org - WordPress › Support » Tags — get_user_option
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » get_user_option. Tag: get_user_option Add New » ...
wordpress.org - PHPXRef 0.7 : WordPress : Function Reference: get_user_option()
Function and Method Cross Reference. get_user_option(). Defined at: /wp- includes/user.php -> line 231. Referenced 28 times: ...
phpxref.ftwr.co.uk - get_user_option | A HitchHackers guide through WordPress
Feb 12, 2011 ... function get_user_option( $option, $user = 0, $deprecated = '' ) { global $wpdb; if ( !empty( $deprecated ) ) _deprecated_argument( ...
hitchhackerguide.com
Gebruikersdiscussies [ wordpress.org ]
- roughkut on "[Plugin: Register Plus] making an all authors page"
- nex2nun on "[Plugin: Register Plus] making an all authors page"
- temi2004 on "[Plugin: Register Plus] making an all authors page"
- realsol on "Reading and writting to User Profile (currentuserinfo)"
- Ovidiu on "[Plugin: Register Plus] making an all authors page"
- Ovidiu on "[Plugin: Register Plus] making an all authors page"
- Haloscope on "[Plugin: Register Plus] making an all authors page"
- lorenzo on "[Plugin: Register Plus] making an all authors page"
- Ovidiu on "[Plugin: Register Plus] making an all authors page"
- Haloscope on "[Plugin: Register Plus] making an all authors page"