Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/30/2009 04:01:03 PM (17 years ago)
Author:
sambauers
Message:

Rename some template functions in preparation for front controller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/defaults.bb-filters.php

    r1906 r1935  
    6666add_filter('post_text', 'do_shortcode');
    6767
    68 if ( is_bb_search() )
    69     add_filter('get_post_text', 'bb_post_text_context');
     68function bb_contextualise_search_post_text()
     69{
     70    if ( bb_is_search() ) {
     71        add_filter( 'get_post_text', 'bb_post_text_context' );
     72    }
     73}
     74add_action( 'bb_init', 'bb_contextualise_search_post_text' );
    7075
    7176add_filter('post_text', 'make_clickable');
     
    108113// Feed Stuff
    109114
    110 if ( is_bb_feed() ) {
    111     add_filter( 'bb_title_rss', 'ent2ncr' );
    112     add_filter( 'topic_title', 'ent2ncr' );
    113     add_filter( 'post_link', 'wp_specialchars' );
    114     add_filter( 'post_text', 'htmlspecialchars' ); // encode_bad should not be overruled by wp_specialchars
    115     add_filter( 'post_text', 'ent2ncr' );
     115function bb_filter_feed_content()
     116{
     117    if ( bb_is_feed() ) {
     118        add_filter( 'bb_title_rss', 'ent2ncr' );
     119        add_filter( 'topic_title', 'ent2ncr' );
     120        add_filter( 'post_link', 'wp_specialchars' );
     121        add_filter( 'post_text', 'htmlspecialchars' ); // encode_bad should not be overruled by wp_specialchars
     122        add_filter( 'post_text', 'ent2ncr' );
     123    }
    116124}
     125add_action( 'bb_init', 'bb_filter_feed_content' );
    117126
    118127add_filter( 'init_roles', 'bb_init_roles' );
Note: See TracChangeset for help on using the changeset viewer.