bp_core_signup_avatar_upload_dir()
Get the avatar storage directory for use during registration.
Description
Return
(string|bool) Directory path on success, false on failure.
Source
File: bp-members/bp-members-functions.php
2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 | function bp_core_signup_avatar_upload_dir() { $bp = buddypress(); if ( empty ( $bp ->signup->avatar_dir ) ) { return false; } $directory = 'avatars/signups' ; $path = bp_core_avatar_upload_path() . '/' . $directory . '/' . $bp ->signup->avatar_dir; $newbdir = $path ; $newurl = bp_core_avatar_url() . '/' . $directory . '/' . $bp ->signup->avatar_dir; $newburl = $newurl ; $newsubdir = '/' . $directory . '/' . $bp ->signup->avatar_dir; /** * Filters the avatar storage directory for use during registration. * * @since BuddyPress 1.1.1 * * @param array $value Array of path and URL values for created storage directory. */ return apply_filters( 'bp_core_signup_avatar_upload_dir' , array ( 'path' => $path , 'url' => $newurl , 'subdir' => $newsubdir , 'basedir' => $newbdir , 'baseurl' => $newburl , 'error' => false ) ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.1.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.