Make WordPress Core


Ignore:
Timestamp:
05/24/2010 08:45:59 PM (14 years ago)
Author:
nacin
Message:

Even better, remove all UI for global terms. Add a filter to global_terms_enabled() and also allow the site option to simply be deleted. fixes #12666.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r14777 r14854  
    38303830
    38313831/**
    3832  * are global terms enabled
     3832 * Whether global terms are enabled.
    38333833 *
    38343834 *
     
    38433843
    38443844    static $global_terms = null;
    3845     if ( is_null( $global_terms ) )
    3846         $global_terms = (bool) get_site_option( 'global_terms_enabled' );
     3845    if ( is_null( $global_terms ) ) {
     3846        $filter = apply_filters( 'global_terms_enabled', null );
     3847        if ( ! is_null( $filter ) )
     3848            $global_terms = (bool) $filter;
     3849        else
     3850            $global_terms = (bool) get_site_option( 'global_terms_enabled', false );
     3851    }
    38473852    return $global_terms;
    38483853}
Note: See TracChangeset for help on using the changeset viewer.