Making WordPress.org


Ignore:
Timestamp:
09/13/2017 10:13:18 PM (7 years ago)
Author:
johnjamesjacoby
Message:

BuddyPress/bbPress (bb-base theme): Make sure correct styling is enqueued on the front-page.

This filter is necessary because we hard-code our own query to display 5 recent topics on the front-page, which is not a page recognized by is_bbpress().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/functions.php

    r4911 r5921  
    538538}
    539539add_filter( 'embed_defaults', 'bb_base_embed_defaults' );
     540
     541/**
     542 * Make sure bbPress core styling is enqueued on the front page
     543 */
     544function bb_base_filter_is_bbpress( $in_bbpress = false ) {
     545
     546    if ( is_front_page() ) {
     547        $in_bbpress = true;
     548    }
     549
     550    return $in_bbpress;
     551}
     552add_filter( 'is_bbpress', 'bb_base_filter_is_bbpress' );
Note: See TracChangeset for help on using the changeset viewer.