Skip to:
Content

bbPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2277 closed enhancement (fixed)

Add filter to the located template in bbp_locate_template

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

Description

While doing https://github.com/MZAWeb/debug-bar-bbpress 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 9 years ago.

Download all attachments as: .zip

Change History (8)

#1 @MZAWeb
9 years ago

Patch added

#2 @MZAWeb
9 years ago

  • Cc wordpress@… added

#3 @johnjamesjacoby
9 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
9 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
9 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
9 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.

#7 @johnjamesjacoby
9 years ago

(In [4821]) Typo. See #2277.

Note: See TracTickets for help on using tickets.