Skip to:
Content

bbPress.org

Changeset 3173


Ignore:
Timestamp:
05/19/2011 04:15:44 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Switch bbp_template_include action into a filter, and move it down into the filters section of bbp-core-hooks.php. Also add more verbose descriptions to bbp_template_include and bbp_request_feed_trap filters. Fixes #1524. Props greenshady.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-core-hooks.php

    r3171 r3173  
    3636add_action( 'generate_rewrite_rules', 'bbp_generate_rewrite_rules', 12 );
    3737add_action( 'after_setup_theme',      'bbp_setup_theme_compat',     12 );
    38 add_action( 'template_include',       'bbp_template_include',       10 );
    3938
    4039/**
     
    210209/** FILTERS *******************************************************************/
    211210
    212 // Feeds
     211/**
     212 * Template Compatibility
     213 *
     214 * If you want to completely bypass this and manage your own custom bbPress
     215 * template hierarchy, start here by removing this filter, then look at how
     216 * bbp_template_include() works and do something similar. :)
     217 */
     218add_filter( 'template_include', 'bbp_template_include' );
     219
     220/**
     221 * Feeds
     222 *
     223 * bbPress comes with a number of custom RSS2 feeds that get handled outside
     224 * the normal scope of feeds that WordPress would normally serve. To do this,
     225 * we filter every page request, listen for a feed request, and trap it.
     226 */
    213227add_filter( 'request', 'bbp_request_feed_trap' );
    214228
Note: See TracChangeset for help on using the changeset viewer.