Changeset 9871 for trunk/wp-includes/user.php
- Timestamp:
- 11/25/2008 06:33:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/user.php
r9716 r9871 169 169 * @param string $option User option name. 170 170 * @param int $user Optional. User ID. 171 * @param bool $check_global Whether to check for a global option if a per-user option does not exist. Default is true. 171 172 * @return mixed 172 173 */ 173 function get_user_option( $option, $user = 0 ) {174 function get_user_option( $option, $user = 0, $check_global = true ) { 174 175 global $wpdb; 175 176 … … 184 185 elseif ( isset( $user->{$option} ) ) // User specific and cross-blog 185 186 $result = $user->{$option}; 186 else // Blog global187 elseif ( $check_global ) // Blog global 187 188 $result = get_option( $option ); 189 else 190 $result = false; 188 191 189 192 return apply_filters("get_user_option_{$option}", $result, $option, $user);
Note: See TracChangeset
for help on using the changeset viewer.