Skip to:

Opened 16 years ago

Closed 16 years ago

Last modified 2 years ago

#173 closed defect (bug) (no action required)

Namespace issues with filter naming convention

Reported by: dfa327's profile dfa327 Owned by:
Milestone: Priority: major
Severity: Version: 1.0
Component: Keywords: filter namespace



I was trying to run bp-core and ran in to how the add_filter names did not have a namespace associated with them. This caused some other filters with the same name to crash the site. I'd suggest adding at least a bp_ before each filter name.

Example Problem: bp-core-catchuri.php
add_filter( 'template', 'bp_core_force_buddypress_theme' );

Proposed Solution:
add_filter( 'bp_template', 'bp_core_force_buddypress_theme' );

Change History (1)

#1 @apeatling
16 years ago

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

add_filter() is accessing a filter, not defining. This is a filter already set by WordPress.

If it was doing apply_filter( 'template' ... then it would be a problem.

Note: See TracTickets for help on using tickets.