Skip to:
Content

bbPress.org

Opened 17 years ago

Closed 17 years ago

#1080 closed defect (bug) (fixed)

Template function filters should receive relevant ids

Reported by: filosofo Owned by:
Priority: normal Milestone: 1.0
Component: Front-end Version: 1.0-rc-2
Severity: normal Keywords: has-patch
Cc:

Description

In a number of template function filters, the functions receive arguments that include the relevant object's id, but they do not pass on that id to the filter.

This is a problem because:

  • It's inconsistent with how most bbPress filters behave.
  • It forces a filter callback to rely on global variables, which may not be correct in the context in which it's being used.
  • In general, a callback should be able to distinguish among as many situations as can be specified by the filter's parent function arguments.

My patch fixes the problem in a backwards-compatible way, by adding the appropriate id to the filters.

Attachments (1)

specifying_ids_for_filters.1080.diff (4.9 KB ) - added by filosofo 17 years ago.

Download all attachments as: .zip

Change History (2)

#1 @sambauers
17 years ago

  • Resolutionfixed
  • Status newclosed

(In [2094]) Add more args to available template filters. Props filosofo, fixes #1080.

Note: See TracTickets for help on using tickets.