get_user_option_(option) filter-hookWP 2.5.0

Filters a specific user option value.

The dynamic portion of the hook name, $option, refers to the user option name.

Usage

add_filter( 'get_user_option_(option)', 'wp_kama_get_user_option_filter', 10, 3 );

/**
 * Function for `get_user_option_(option)` filter-hook.
 * 
 * @param mixed   $result Value for the user's option.
 * @param string  $option Name of the option being retrieved.
 * @param WP_User $user   WP_User object of the user whose option is being retrieved.
 *
 * @return mixed
 */
function wp_kama_get_user_option_filter( $result, $option, $user ){

	// filter...
	return $result;
}
$result(mixed)
Value for the user's option.
$option(string)
Name of the option being retrieved.
$user(WP_User)
WP_User object of the user whose option is being retrieved.

Changelog

Since 2.5.0 Introduced.

Where the hook is called

get_user_option()
get_user_option_(option)
wp-includes/user.php 698
return apply_filters( "get_user_option_{$option}", $result, $option, $user );

Where the hook is used in WordPress

Usage not found.