WordPress.org

Codex

vi:Tham Khảo Các Hàm/update user option

Bản Nháp

Trang này được đánh dấu là bản nháp. Bạn có thể giúp đỡ WordPressVN bằng cách hoàn thiện trang này.

Contents

Description

Update user option with global blog capability.

User options are just like user metadata except that they have support for global blog options. If the 'global' parameter is false, which it is by false it will prepend the WordPress table prefix to the option name.

Usage

<?php update_user_option$user_id$option_name$newvalue$global ?>

Parameters

$user_id
(integer) (required) User ID
Default: None
$option_name
(string) (required) User option name.
Default: None
$newvalue
(mixed) (required) User option value.
Default: None
$global
(boolean) (optional) Whether option name is blog specific or not.
Default: false

Return Values

(unknown) 

Examples

Notes

  • Uses global: (object) $wpdb WordPress database object for queries.

Change Log

Since: 2.0.0

Source File

update_user_option() is located in wp-includes/user.php.

Related