首页 WordPress函数大全 get_user_option()

get_user_option()

2020-05-02 / 1834阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_user_option( string $option, int $user, string $deprecated = '' )

Retrieve user option that can be either per Site or per Network.

描述

If the user ID is not given, then the current user will be used instead. If the user ID is given, then the user data will be retrieved. The filter for the result, will also pass the original option name and finally the user data object as the third parameter.

The option will first check for the per site name and then the per Network name.

参数

$option

(string)
(Required)
User option name.

$user

(int)
(Optional)
User ID.

$deprecated

(string)
(Optional)
Use get_option() to check for an option in the options table.

Default value: ''

返回

(mixed) User option value on success, false on failure.

大家谈论
    我的见解