| | 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 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 ); |
| | 303 | } |
| | 304 | |
| | 305 | /** |