Skip to:

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2277 closed enhancement (fixed)

Add filter to the located template in bbp_locate_template

Reported by: mzaweb's profile MZAWeb Owned by:
Milestone: 2.3 Priority: low
Severity: minor Version: 2.1
Component: API - Actions/Filters Keywords:
Cc: wordpress@…


While doing I saw there's no easy way to get the full path to the located templates for bbPress.

Attachments (1)

template-functions.php.patch (537 bytes) - added by MZAWeb 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @MZAWeb
11 years ago

Patch added

#2 @MZAWeb
11 years ago

  • Cc wordpress@… added

#3 @johnjamesjacoby
11 years ago

  • Milestone changed from Awaiting Review to Future Release

Ideally, we don't want to have a complete template short-circuit here. People will use it as a brute-force way to overload the template instead of using other, more efficient API's.

Moving to future release, so we can think about other approaches.

#4 @MZAWeb
11 years ago

I'd argue that there are tons of filters that can be misused resulting in broken or weird behavior.

But we can change that filter to a do_action if you prefer, just to inform plugins about the $located selection.

#5 @johnjamesjacoby
11 years ago

  • Keywords has-patch 2nd-opinion removed
  • Milestone changed from Future Release to 2.3

do_action() seems fine.

The reason I don't want a filter here, is to direct developers towards using the template stack API instead.

#6 @johnjamesjacoby
11 years ago

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

(In [4820]) Introduce 'bbp_locate_template' action to bbp_locate_template(), with inline documentation for intended usage. Fixes #2277.

Note: See TracTickets for help on using tickets.