Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/31/2010 05:49:36 PM (16 years ago)
Author:
djpaul
Message:

Hide forum directory from main nav if disabled by admin. Fixes #2541, props boonebgorges

File:
1 edited

Legend:

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

    r3627 r3631  
    985985 * Only show the search form if there are available objects to search for.
    986986 *
    987  * @global array $bp
    988987 * @uses function_exists
    989988 * @uses is_multisite()
     
    991990 */
    992991function bp_search_form_enabled() {
    993         global $bp;
    994 
    995992        if ( bp_is_active( 'xprofile' )
    996993                 || bp_is_active( 'groups' )
    997994                 || ( 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        ) {
    1000997                $search_enabled = true;
    1001998        } else {
     
    10301027                $options['groups'] = __( 'Groups', 'buddypress' );
    10311028
    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() )
    10331030                $options['forums'] = __( 'Forums', 'buddypress' );
    10341031
Note: See TracChangeset for help on using the changeset viewer.