Skip to:
Content

BuddyPress.org

Opened 4 years ago

Last modified 2 years 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's profile shawfactor Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Core Keywords: good-first-bug has-patch
Cc:

Description

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 (2)

bp-core-avatars.php (66.6 KB) - added by shawfactor 4 years ago.
New file with the filetr order swapped (it is more logical and useful that way)
8356.patch (2.0 KB) - added by devutpol 2 years ago.
Patch created

Download all attachments as: .zip

Change History (7)

#1 @imath
4 years ago

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

hi @shawfactor

Sure, can you create this patch ?

@shawfactor
4 years ago

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

#2 @shawfactor
4 years 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
4 years 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
4 years ago

  • Keywords good-first-bug added

@devutpol
2 years ago

Patch created

#5 @devutpol
2 years ago

  • Keywords has-patch added; needs-patch removed
Note: See TracTickets for help on using tickets.