Changeset 55015
- Timestamp:
- 12/24/2022 02:31:08 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r54953 r55015 692 692 * 693 693 * User options are just like user metadata except that they have support for 694 * global blog options. If the ' global' parameter is false, which it is by default694 * global blog options. If the 'is_global' parameter is false, which it is by default, 695 695 * it will prepend the WordPress table prefix to the option name. 696 696 * … … 704 704 * @param string $option_name User option name. 705 705 * @param mixed $newvalue User option value. 706 * @param bool $ globalOptional. Whether option name is global or blog specific.706 * @param bool $is_global Optional. Whether option name is global or blog specific. 707 707 * Default false (blog specific). 708 708 * @return int|bool User meta ID if the option didn't exist, true on successful update, 709 709 * false on failure. 710 710 */ 711 function update_user_option( $user_id, $option_name, $newvalue, $ global = false ) {711 function update_user_option( $user_id, $option_name, $newvalue, $is_global = false ) { 712 712 global $wpdb; 713 713 714 if ( ! $ global ) {714 if ( ! $is_global ) { 715 715 $option_name = $wpdb->get_blog_prefix() . $option_name; 716 716 } … … 723 723 * 724 724 * User options are just like user metadata except that they have support for 725 * global blog options. If the ' global' parameter is false, which it is by default725 * global blog options. If the 'is_global' parameter is false, which it is by default, 726 726 * it will prepend the WordPress table prefix to the option name. 727 727 * … … 732 732 * @param int $user_id User ID 733 733 * @param string $option_name User option name. 734 * @param bool $ globalOptional. Whether option name is global or blog specific.734 * @param bool $is_global Optional. Whether option name is global or blog specific. 735 735 * Default false (blog specific). 736 736 * @return bool True on success, false on failure. 737 737 */ 738 function delete_user_option( $user_id, $option_name, $ global = false ) {738 function delete_user_option( $user_id, $option_name, $is_global = false ) { 739 739 global $wpdb; 740 740 741 if ( ! $ global ) {741 if ( ! $is_global ) { 742 742 $option_name = $wpdb->get_blog_prefix() . $option_name; 743 743 } 744 744 745 return delete_user_meta( $user_id, $option_name ); 745 746 }
Note: See TracChangeset
for help on using the changeset viewer.