Skip to:

Opened 22 months ago

Closed 6 months ago

#8185 closed enhancement (fixed)

Inadequate details availabe on bp_attachments_pre_get_attachment

Reported by: sbrajesh Owned by: imath
Milestone: 8.0.0 Priority: normal
Severity: normal Version: 5.0.0
Component: Core Keywords: has-patch
Cc: sbrajesh


The filter


Does not provide anyway to know which piece of data(is it url or path) is being fetched.

That renders the hook useless for most use case.

We should pass the $data too with the hook. Here is a patch attached with the same.

Please let me know if there is a better way to do it.

Attachments (1)

8185.diff (665 bytes) - added by sbrajesh 22 months ago.
Add $data as the 3rd parameter.

Download all attachments as: .zip

Change History (3)

22 months ago

Add $data as the 3rd parameter.

#1 @imath
6 months ago

  • Milestone changed from Awaiting Review to 8.0.0

Thanks for your report, let’s make it happen in 8.0.0

#2 @imath
6 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 12901:

Add a parameter to the bp_attachments_pre_get_attachment filter

Without the $data parameter it was difficult to know what was the requested data to get between the url or path. So it was pretty useless.

It's now possible to get this information as the third parameter of the filter.

Props sbrajesh

Fixes #8185

Note: See TracTickets for help on using tickets.