首页 WordPress函数大全 get_user_locale()

get_user_locale()

2020-05-02 / 2576阅 / 悠然

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

get_user_locale( int|WP_User $user_id )

Retrieves the locale of a user.

描述

If the user has a locale set to a non-empty string then it will be returned. Otherwise it returns the locale of get_locale().

参数

$user_id

(int|WP_User)
(Required)
User's ID or a WP_User object. Defaults to current user.

返回

(string) The locale of the user.

大家谈论
    我的见解