bp_dd_check_avatar_folder_dir( string $avatar_folder_dir, int $group_id, array $object, string $avatar_dir )
Create dummy path for Group and User
Description
Parameters
- $avatar_folder_dir
-
(Required)
- $group_id
-
(Required)
- $object
-
(Required)
- $avatar_dir
-
(Required)
Return
(string) $avatar_url
Source
File: bp-core/bp-core-filters.php
function bp_dd_check_avatar_folder_dir( $avatar_folder_dir, $group_id, $object, $avatar_dir ) { if ( ! empty( $group_id ) ) { if ( 'group-avatars' == $avatar_dir ) { $avatars = trim( groups_get_groupmeta( $group_id, 'avatars' ) ); if ( ! empty( $avatars ) && ! file_exists( $avatar_folder_dir ) ) { wp_mkdir_p( $avatar_folder_dir ); } } if ( 'avatars' == $avatar_dir ) { $avatars = trim( bp_get_user_meta( $group_id, 'avatars', true ) ); if ( ! empty( $avatars ) && ! file_exists( $avatar_folder_dir ) ) { wp_mkdir_p( $avatar_folder_dir ); } } } return $avatar_folder_dir; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.