global_terms_enabled

The timeline below displays how wordpress function global_terms_enabled has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Determines whether global terms are enabled.
 *
 * @since 3.0.0
 * @since 6.1.0 This function now always returns false.
 * @deprecated 6.1.0
 *
 * @return bool Always returns false.
 */
function global_terms_enabled()
{
    _deprecated_function(__FUNCTION__, '6.1.0');
    return false;
}

WordPress Version: 5.5

/**
 * Determine whether global terms are enabled.
 *
 * @since 3.0.0
 *
 * @return bool True if multisite and global terms enabled.
 */
function global_terms_enabled()
{
    if (!is_multisite()) {
        return false;
    }
    static $global_terms = null;
    if (is_null($global_terms)) {
        /**
         * Filters whether global terms are enabled.
         *
         * Returning a non-null value from the filter will effectively short-circuit the function
         * and return the value of the 'global_terms_enabled' site option instead.
         *
         * @since 3.0.0
         *
         * @param null $enabled Whether global terms are enabled.
         */
        $filter = apply_filters('global_terms_enabled', null);
        if (!is_null($filter)) {
            $global_terms = (bool) $filter;
        } else {
            $global_terms = (bool) get_site_option('global_terms_enabled', false);
        }
    }
    return $global_terms;
}

WordPress Version: 4.6

/**
 * Determine whether global terms are enabled.
 *
 * @since 3.0.0
 *
 * @staticvar bool $global_terms
 *
 * @return bool True if multisite and global terms enabled.
 */
function global_terms_enabled()
{
    if (!is_multisite()) {
        return false;
    }
    static $global_terms = null;
    if (is_null($global_terms)) {
        /**
         * Filters whether global terms are enabled.
         *
         * Passing a non-null value to the filter will effectively short-circuit the function,
         * returning the value of the 'global_terms_enabled' site option instead.
         *
         * @since 3.0.0
         *
         * @param null $enabled Whether global terms are enabled.
         */
        $filter = apply_filters('global_terms_enabled', null);
        if (!is_null($filter)) {
            $global_terms = (bool) $filter;
        } else {
            $global_terms = (bool) get_site_option('global_terms_enabled', false);
        }
    }
    return $global_terms;
}

WordPress Version: 4.3

/**
 * Determine whether global terms are enabled.
 *
 * @since 3.0.0
 *
 * @staticvar bool $global_terms
 *
 * @return bool True if multisite and global terms enabled.
 */
function global_terms_enabled()
{
    if (!is_multisite()) {
        return false;
    }
    static $global_terms = null;
    if (is_null($global_terms)) {
        /**
         * Filter whether global terms are enabled.
         *
         * Passing a non-null value to the filter will effectively short-circuit the function,
         * returning the value of the 'global_terms_enabled' site option instead.
         *
         * @since 3.0.0
         *
         * @param null $enabled Whether global terms are enabled.
         */
        $filter = apply_filters('global_terms_enabled', null);
        if (!is_null($filter)) {
            $global_terms = (bool) $filter;
        } else {
            $global_terms = (bool) get_site_option('global_terms_enabled', false);
        }
    }
    return $global_terms;
}

WordPress Version: 4.0

/**
 * Determine whether global terms are enabled.
 *
 * @since 3.0.0
 *
 * @return bool True if multisite and global terms enabled.
 */
function global_terms_enabled()
{
    if (!is_multisite()) {
        return false;
    }
    static $global_terms = null;
    if (is_null($global_terms)) {
        /**
         * Filter whether global terms are enabled.
         *
         * Passing a non-null value to the filter will effectively short-circuit the function,
         * returning the value of the 'global_terms_enabled' site option instead.
         *
         * @since 3.0.0
         *
         * @param null $anbled Whether global terms are enabled.
         */
        $filter = apply_filters('global_terms_enabled', null);
        if (!is_null($filter)) {
            $global_terms = (bool) $filter;
        } else {
            $global_terms = (bool) get_site_option('global_terms_enabled', false);
        }
    }
    return $global_terms;
}

WordPress Version: 3.9

/**
 * Whether global terms are enabled.
 *
 *
 * @since 3.0.0
 *
 * @return bool True if multisite and global terms enabled
 */
function global_terms_enabled()
{
    if (!is_multisite()) {
        return false;
    }
    static $global_terms = null;
    if (is_null($global_terms)) {
        /**
         * Filter whether global terms are enabled.
         *
         * Passing a non-null value to the filter will effectively short-circuit the function,
         * returning the value of the 'global_terms_enabled' site option instead.
         *
         * @since 3.0.0
         *
         * @param null $anbled Whether global terms are enabled.
         */
        $filter = apply_filters('global_terms_enabled', null);
        if (!is_null($filter)) {
            $global_terms = (bool) $filter;
        } else {
            $global_terms = (bool) get_site_option('global_terms_enabled', false);
        }
    }
    return $global_terms;
}

WordPress Version: 3.7

/**
 * Whether global terms are enabled.
 *
 *
 * @since 3.0.0
 * @package WordPress
 *
 * @return bool True if multisite and global terms enabled
 */
function global_terms_enabled()
{
    if (!is_multisite()) {
        return false;
    }
    static $global_terms = null;
    if (is_null($global_terms)) {
        $filter = apply_filters('global_terms_enabled', null);
        if (!is_null($filter)) {
            $global_terms = (bool) $filter;
        } else {
            $global_terms = (bool) get_site_option('global_terms_enabled', false);
        }
    }
    return $global_terms;
}