apply_filters( 'bp_attachments_pre_get_attachment', null|string $value , array $r )
Filters whether or not to handle fetching a BuddyPress image attachment.
Description
If you want to override this function, make sure you return false.
Parameters
- $value
-
If null is returned, proceed with default behaviour. Otherwise, value returned verbatim.
- $r
-
- 'object_dir'
(string) The object dir (eg: members/groups). Defaults to members. - 'item_id'
(int) The object id (eg: a user or a group id). Defaults to current user. - 'type'
(string) The type of the attachment which is also the subdir where files are saved. Defaults to 'cover-image' - 'file'
(string) The name of the file.
- 'object_dir'
Source
Changelog
Version | Description |
---|---|
BuddyPress 2.5.1 | 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.