bp_avatar_is_front_edit()
检查是否应该加载化身UI。
描述
返回
(BOOL)如果avatar ui应该加载,则为true,否则为false。
来源
文件:BP-Core / BP-Core-Avatars.php
函数bp_avatar_is_front_edit(){$ retval = false;//如果不支持当前WordPress版本,则无需继续。if(!bp_attachments_is_wp_version_supported()){return $ retval;}如果(bp_is_user_change_avatar()&&'裁剪图像'!== bp_get_avatar_admin_step()){$ retval =!bp_core_get_root_option('bp-disable-avatar-uploads');}如果(bp_is_active('组')){//组创建。if(bp_is_group_create()&& bp_is_group_creation_step('group-avatar')&&'cook-image'!== bp_get_avatar_admin_step()){$ retval =!bp_disable_group_avatar_uploads();//组管理。} elsef(bp_is_group_admin_page()&& bp_is_group_admin_screen('group-avatar')&&'cook-image'!== bp_get_avatar_admin_step()){$ retval =! bp_disable_group_avatar_uploads(); } } /** * Use this filter if you need to : * - Load the avatar UI for a component that is !groups or !user (return true regarding your conditions) * - Completely disable the avatar UI introduced in 2.3 (eg: __return_false()) * * @since BuddyPress 2.3.0 * * @param bool $retval Whether or not to load the Avatar UI. */ return apply_filters( 'bp_avatar_is_front_edit', $retval ); }
变更乐
版本 | 描述 |
---|---|
BuddyPress 2.3.0. | 介绍。 |