Changeset 13667 for trunk/wp-includes/user.php
- Timestamp:
- 03/11/2010 06:28:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/user.php
r13617 r13667 269 269 * @param string $option_name User option name. 270 270 * @param mixed $newvalue User option value. 271 * @param bool $global Optional. Whether option name is blog specific.271 * @param bool $global Optional. Whether option name is global or blog specific. Default false (blog specific). 272 272 * @return unknown 273 273 */ … … 278 278 $option_name = $wpdb->prefix . $option_name; 279 279 return update_user_meta( $user_id, $option_name, $newvalue ); 280 } 281 282 /** 283 * Delete user option with global blog capability. 284 * 285 * User options are just like user metadata except that they have support for 286 * global blog options. If the 'global' parameter is false, which it is by default 287 * it will prepend the WordPress table prefix to the option name. 288 * 289 * @since 3.0.0 290 * @uses $wpdb WordPress database object for queries 291 * 292 * @param int $user_id User ID 293 * @param string $option_name User option name. 294 * @param bool $global Optional. Whether option name is global or blog specific. Default false (blog specific). 295 * @return unknown 296 */ 297 function delete_user_option( $user_id, $option_name, $global = false ) { 298 global $wpdb; 299 300 if ( !$global ) 301 $option_name = $wpdb->prefix . $option_name; 302 return delete_user_meta( $user_id, $option_name ); 280 303 } 281 304
Note: See TracChangeset
for help on using the changeset viewer.