Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/29/2009 02:02:02 AM (17 years ago)
Author:
apeatling
Message:

Changed "News" on home theme to "Blog".
Fixed up issues with pages on home theme blog
Added functions to make a component a root component from within the actual plugin.
Style updates to the home theme.
Added max_items fallback on activity widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r937 r954  
    374374        global $bp, $is_member_page;
    375375       
    376         $root_components = explode( ',', BP_CORE_ROOT_COMPONENTS );
    377        
    378376        if ( $bp['current_component'] == NEWS_SLUG )
    379377                return true;
    380378               
    381         if ( !$is_member_page && !in_array( $bp['current_component'], $root_components ) )
     379        if ( !$is_member_page && !in_array( $bp['current_component'], $bp['root_components'] ) )
    382380                return true;
    383381       
     
    539537}
    540538
     539function bp_nav_items() {
     540        global $bp;
     541?>
     542        <li<?php if(bp_is_page('home')) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a></li>
     543        <li<?php if(bp_is_page('news')) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo HOME_BLOG_SLUG ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>
     544        <li<?php if(bp_is_page(MEMBERS_SLUG)) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo MEMBERS_SLUG ?>" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a></li>
     545       
     546        <?php if ( function_exists('groups_install') ) { ?>
     547                <li<?php if(bp_is_page('groups')) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo $bp['groups']['slug'] ?>" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a></li>
     548        <?php } ?>
     549       
     550        <?php if ( function_exists('bp_blogs_install') ) { ?>
     551                <li<?php if(bp_is_page('blogs')) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo $bp['blogs']['slug'] ?>" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a></li>
     552        <?php } ?>
     553<?php
     554        do_action( 'bp_nav_items' );
     555}
     556
    541557function bp_custom_profile_boxes() {
    542558        do_action( 'bp_custom_profile_boxes' );
Note: See TracChangeset for help on using the changeset viewer.