apply_filters( 'bp_attachments_pre_get_attachment', null|string $value, array $r, string $data )

Filters whether or not to handle fetching a BuddyPress image attachment.


Description Description

If you want to override this function, make sure you return false.


Parameters 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.

$data

The requested data url or path.


Top ↑

Source Source

File: bp-core/bp-core-attachments.php


Top ↑

Changelog Changelog

Changelog
Version Description
2.5.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.