Changeset 3631
- Timestamp:
- 12/31/2010 05:49:36 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r3627 r3631 985 985 * Only show the search form if there are available objects to search for. 986 986 * 987 * @global array $bp988 987 * @uses function_exists 989 988 * @uses is_multisite() … … 991 990 */ 992 991 function bp_search_form_enabled() { 993 global $bp;994 995 992 if ( bp_is_active( 'xprofile' ) 996 993 || bp_is_active( 'groups' ) 997 994 || ( bp_is_active( 'blogs' ) && is_multisite() ) 998 || ( function_exists( 'bp_forums_setup' ) && !(int)$bp->site_options['bp-disable-forum-directory'])999 995 || ( bp_is_active( 'forums' ) && !bp_forum_directory_is_disabled() ) 996 ) { 1000 997 $search_enabled = true; 1001 998 } else { … … 1030 1027 $options['groups'] = __( 'Groups', 'buddypress' ); 1031 1028 1032 if ( function_exists( 'bp_forums_is_installed_correctly' ) && bp_forums_is_installed_correctly() && !isset( $bp->site_options['bp-disable-forum-directory']) )1029 if ( bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() && !bp_forum_directory_is_disabled() ) 1033 1030 $options['forums'] = __( 'Forums', 'buddypress' ); 1034 1031 -
trunk/bp-forums.php
r3627 r3631 51 51 } 52 52 53 /** 54 * Convenience function to determine if the forum directory has been disabled 55 * by the site admin. 56 * 57 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 58 * @return bool True if forum is disabled 59 * @since 1.3 60 */ 61 function bp_forum_directory_is_disabled() { 62 global $bp; 63 64 return !empty( $bp->site_options['bp-disable-forum-directory'] ); 65 } 66 53 67 function bp_forums_directory_forums_setup() { 54 68 global $bp; 55 69 56 70 if ( $bp->current_component == $bp->forums->slug ) { 57 if ( (int) $bp->site_options['bp-disable-forum-directory']|| !bp_is_active( 'groups' ) )71 if ( bp_forum_directory_is_disabled() || !bp_is_active( 'groups' ) ) 58 72 return false; 59 73 -
trunk/bp-themes/bp-default/functions.php
r3626 r3631 468 468 add_action( 'admin_notices', 'bp_dtheme_show_notice' ); 469 469 470 if ( !function_exists( 'bp_dtheme_main_nav' ) ) : 470 471 /** 471 472 * wp_nav_menu() callback from the main navigation in header.php … … 478 479 * @since 1.3 479 480 */ 480 function bp_dtheme_main_nav( $args ) { ?> 481 function bp_dtheme_main_nav( $args ) { 482 global $bp; 483 484 $pages_args = array( 485 'title_li' => '', 486 'depth' => '0', 487 'exclude' => bp_dtheme_page_on_front() 488 ); 489 490 if ( bp_forum_directory_is_disabled() ) { 491 if ( !empty( $pages_args['exclude'] ) ) 492 $pages_args['exclude'] .= ','; 493 494 $pages_args['exclude'] .= $bp->pages->forums->id; 495 } 496 ?> 481 497 <ul id="nav"> 482 498 <li<?php if ( is_front_page() ) : ?> class="selected"<?php endif; ?>> … … 484 500 </li> 485 501 486 <?php wp_list_pages( 'title_li=&depth=0&exclude=' . bp_dtheme_page_on_front() );?>487 <?php do_action( 'bp_nav_items' ) ;?>502 <?php wp_list_pages( $pages_args ) ?> 503 <?php do_action( 'bp_nav_items' ) ?> 488 504 </ul><!-- #nav --> 489 505 <?php 490 506 } 507 endif; 491 508 492 509 /** -
trunk/bp-themes/bp-default/groups/single/forum/topic.php
r3537 r3631 19 19 <div id="topic-meta"> 20 20 <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3> 21 <a class="button" href="<?php bp_forum_permalink() ?>/">← <?php _e( 'Group Forum', 'buddypress' ) ?></a> < a class="button" href="<?php bp_forum_directory_permalink() ?>/"><?php _e( 'Group Forum Directory', 'buddypress') ?></a>21 <a class="button" href="<?php bp_forum_permalink() ?>/">← <?php _e( 'Group Forum', 'buddypress' ) ?></a> <?php if ( !bp_forum_directory_is_disabled() ) : ?><a class="button" href="<?php bp_forum_directory_permalink() ?>/"><?php _e( 'Group Forum Directory', 'buddypress') ?></a><?php endif; ?> 22 22 23 23 <div class="admin-links">
Note: See TracChangeset
for help on using the changeset viewer.