Make WordPress Core


Ignore:
Timestamp:
09/20/2022 02:49:25 AM (2 years ago)
Author:
desrosj
Message:

Networks and Sites: Officially remove global terms.

Global terms was a feature from the WordPress MU days where multisite and single site installs used different code bases.

In WordPress 3.0, WordPress MU was merged into one location and the UI [14854] and “on” switch [14880] for global terms were completely removed.

Even before this merge, global terms was bug infested and unreliable. After [14854]/[14880], the feature was no longer maintained and became increasingly broken as taxonomies progressed without it (term splitting and term meta do not work at all). At this point, the feature has not worked in 12+ years and there’s no hope for saving it.

This deprecates the remaining global terms related code and no-ops the functions.

Global terms, you don’t have to go home, but you can’t stay here.

Props scribu, wonderboymusic, SergeyBiryukov, nacin, pento, desrosj, johnjamesjacoby, johnbillion, dd32.
Fixes #21734.

File:
1 edited

Legend:

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

    r54233 r54240  
    62216221
    62226222/**
    6223  * Determines whether global terms are enabled.
    6224  *
    6225  * @since 3.0.0
    6226  *
    6227  * @return bool True if multisite and global terms enabled.
    6228  */
    6229 function global_terms_enabled() {
    6230     if ( ! is_multisite() ) {
    6231         return false;
    6232     }
    6233 
    6234     static $global_terms = null;
    6235     if ( is_null( $global_terms ) ) {
    6236 
    6237         /**
    6238          * Filters whether global terms are enabled.
    6239          *
    6240          * Returning a non-null value from the filter will effectively short-circuit the function
    6241          * and return the value of the 'global_terms_enabled' site option instead.
    6242          *
    6243          * @since 3.0.0
    6244          *
    6245          * @param null $enabled Whether global terms are enabled.
    6246          */
    6247         $filter = apply_filters( 'global_terms_enabled', null );
    6248         if ( ! is_null( $filter ) ) {
    6249             $global_terms = (bool) $filter;
    6250         } else {
    6251             $global_terms = (bool) get_site_option( 'global_terms_enabled', false );
    6252         }
    6253     }
    6254     return $global_terms;
    6255 }
    6256 
    6257 /**
    62586223 * Determines whether site meta is enabled.
    62596224 *
Note: See TracChangeset for help on using the changeset viewer.