函数描述
返回当前用户 ID,需要在 Init 或之后的 Action 中调用此函数,否则可能获取不到正确的用户 ID.
Usage
$user_ID = get_current_user_id();
return value
返回 int 类型的用户 ID,如果获取不到,返回 0。
We will customize and develop a set of high-quality exclusive WordPress themes for you.
Develop a brand new WordPress plugins with various functions according to your needs.
Optimize your WordPress siten many ways, Make it open in less than 1 second.
Provide you with or help you maintain a server environment optimized for WordPress.
返回当前用户 ID,需要在 Init 或之后的 Action 中调用此函数,否则可能获取不到正确的用户 ID.
$user_ID = get_current_user_id();
返回 int 类型的用户 ID,如果获取不到,返回 0。