Skip to:

Opened 13 months ago

Last modified 13 months ago

#8356 new defect (bug)

swap the order to the two filters bp_core_avatar_folder_url and bp_core_avatar_folder_dir in bp_core_fetch_avatar

Reported by: shawfactor Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Core Keywords: needs-patch good-first-bug


The order of these two filters is illogical as it makes it difficult to conditionally filter both of these

The common use case is to check if a file exists in a directory and then if it does change the directory and the the url. But this is difficult as riht now the url filter is run first.

Th patch is simple, just swap the order of the two cases of apply_filters.

Attachments (1)

bp-core-avatars.php (66.6 KB) - added by shawfactor 13 months ago.
New file with the filetr order swapped (it is more logical and useful that way)

Download all attachments as: .zip

Change History (5)

#1 @imath
13 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Awaiting Contributions

hi @shawfactor

Sure, can you create this patch ?

13 months ago

New file with the filetr order swapped (it is more logical and useful that way)

#2 @shawfactor
13 months ago

Sure here it is, as I said it is very simple I am just swapping the order of the filters. If my reasons are unclear or you need further explanation on why it is more logical thay way please let me know. Is this what you mean by create the patch?

#3 @imath
13 months ago

Thanks I was more thinking about a patch format. We've just published a documentation page on our codex about how to generate a patch, could you have a look and try to use a patch instead of the full file ?

#4 @imath
13 months ago

  • Keywords good-first-bug added
Note: See TracTickets for help on using tickets.