Skip to:
Content

BuddyPress.org

Changeset 1394


Ignore:
Timestamp:
04/23/2009 09:55:40 AM (18 years ago)
Author:
apeatling
Message:

Added bp_home_blog_url() template tag that will echo the correct blog path depending on whether the buddypress-home theme is being used or not.

Location:
trunk
Files:
2 edited

Legend:

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

    r1386 r1394  
    10201020}
    10211021
     1022function bp_home_blog_url() {
     1023        global $bp;
     1024
     1025        if ( 'buddypress-home' == get_blog_option( BP_ROOT_BLOG, 'template' ) )
     1026                echo $bp->root_domain . '/' . BP_HOME_BLOG_SLUG;
     1027        else
     1028                echo $bp->root_domain;
     1029}
     1030
    10221031
    10231032/* Template functions for fetching globals, without querying the DB again
  • trunk/bp-themes/buddypress-member/header.php

    r1390 r1394  
    4444        <ul id="nav">
    4545                <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>
    46                 <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_HOME_BLOG_SLUG ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>
     46                <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php bp_home_blog_url() ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>
    4747                <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_MEMBERS_SLUG ?>" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a></li>
    4848
Note: See TracChangeset for help on using the changeset viewer.