WordPress.org

Making WordPress.org

Changeset 5921


Ignore:
Timestamp:
09/13/2017 10:13:18 PM (8 months 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().

Location:
sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base
Files:
2 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' );
  • sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/sidebar.php

    r1644 r5921  
    22<div class="sidebar">
    33
    4     <?php if ( function_exists( 'is_bbpress' ) && ( is_bbpress() ) || is_page( 'new-topic' ) ) : ?>
     4    <?php if ( ( function_exists( 'is_bbpress' ) && is_bbpress() && ! is_front_page() ) || is_page( 'new-topic' ) ) : ?>
    55
    66        <?php if ( bbp_is_single_forum() || bb_base_topic_search_query( false ) ) : ?>
Note: See TracChangeset for help on using the changeset viewer.