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.


Top ↑

Parameters Parameters

$value

(null|string) If null is returned, proceed with default behaviour. Otherwise, value returned verbatim.

$r

(array)

  • '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

(string) The requested data url or path.


Source Source

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

View on Trac



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.