Changeset 2695 for trunk/bp-core/bp-core-templatetags.php
- Timestamp:
- 02/12/2010 12:31:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r2690 r2695 393 393 </form> 394 394 <?php 395 }396 397 function bp_home_blog_url() {398 global $bp, $current_blog;399 400 if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) {401 $blog_id = $current_blog->blog_id;402 } else {403 $blog_id = BP_ROOT_BLOG;404 }405 406 if ( 'bphome' == get_blog_option( $blog_id, 'template' ) )407 echo $bp->root_domain . '/' . BP_HOME_BLOG_SLUG;408 else409 echo $bp->root_domain;410 395 } 411 396 … … 475 460 echo apply_filters( 'bp_logout_nav_link', $logout_link ); 476 461 } 477 /* DEPRECATED - use bp_get_loggedin_user_nav() */478 function bp_get_nav() { bp_get_loggedin_user_nav(); }479 462 480 463 /** … … 508 491 } 509 492 } 510 /* DEPRECATED - use bp_get_displayed_user_nav() */511 function bp_get_user_nav() { bp_get_displayed_user_nav(); }512 493 513 494 /** … … 874 855 global $bp, $is_member_page, $wp_query; 875 856 876 if ( $bp->current_component == BP_HOME_BLOG_SLUG )877 return true;878 879 857 if ( $wp_query->is_home && !$bp->is_directory ) 880 858 return true; … … 1001 979 } 1002 980 1003 if ( function_exists( 'bp_forums_setup' ) && !(int) get_site_option( 'bp-disable-forum-directory' )) {981 if ( function_exists( 'bp_forums_setup' ) && !(int) $bp->site_options['bp-disable-forum-directory'] ) { 1004 982 $selection_box .= '<option value="forums">' . __( 'Forums', 'buddypress' ) . '</option>'; 1005 983 } … … 1036 1014 1037 1015 echo apply_filters( 'bp_logout_link', $logout_link ); 1038 }1039 1040 function bp_nav_items() {1041 global $bp;1042 // This is deprecated, you should put these navigation items in your template header.php for easy editing.1043 ?>1044 <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>1045 <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>1046 <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>1047 1048 <?php if ( function_exists( 'groups_install' ) ) { ?>1049 <li<?php if ( bp_is_page( $bp->groups->slug ) ) {?> 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>1050 <?php } ?>1051 1052 <?php if ( function_exists( 'bp_blogs_install' ) ) { ?>1053 <li<?php if ( bp_is_page( $bp->blogs->slug ) ) {?> 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>1054 <?php } ?>1055 <?php1056 do_action( 'bp_nav_items' );1057 1016 } 1058 1017 … … 1240 1199 } 1241 1200 function bp_get_signup_allowed() { 1201 global $bp; 1202 1242 1203 if ( bp_core_is_multisite() ) { 1243 if ( in_array( get_site_option( 'registration' ), array( 'all', 'user' ) ) )1204 if ( in_array( $bp->site_options['registration'], array( 'all', 'user' ) ) ) 1244 1205 return true; 1245 1206 } else { … … 1254 1215 } 1255 1216 function bp_get_blog_signup_allowed() { 1217 global $bp; 1218 1256 1219 if ( !bp_core_is_multisite() ) 1257 1220 return false; 1258 1221 1259 $status = get_site_option( 'registration' );1222 $status = $bp->site_options['registration']; 1260 1223 if ( 'none' != $status && 'user' != $status ) 1261 1224 return true; … … 1284 1247 } 1285 1248 1249 function bp_get_option( $option_name ) { 1250 global $bp; 1251 1252 return apply_filters( 'bp_get_option', $bp->site_options[$option_name] ); 1253 } 1286 1254 1287 1255 /*** CUSTOM LOOP TEMPLATE CLASSES *******************/
Note: See TracChangeset
for help on using the changeset viewer.