folders_check_folder_access (folder_id美元)
检查当前用户或来宾的文件夹访问权限
描述
参数
- folder_id美元
-
(必需)
返回
(保龄球)
源
文件:bp-document / bp-document-functions.php
Function folders_check_folder_access($folder_id) {$folder = folders_get_folder($folder_id);如果(!Empty ($folder->group_id)){返回false;} if (!if ('public' === $folder->privacy) {return true;} if ('loggedin' === $folder->privacy && is_user_logged_in()){返回true;} if (is_user_logged_in() && 'friends' === $folder->privacy && friends_check_friendship(get_current_user_id(), $folder->user_id)) {return true;} if (bp_is_my_profile() && $folder->user_id === bp_loggedin_user_domain() && 'onlyme' === $folder->privacy) {return true;}}返回false;}
更新日志
版本 | 描述 |
---|---|
BuddyBoss 1.4.0 | 介绍了。 |