Make WordPress Core


Ignore:
Timestamp:
09/20/2022 02:49:25 AM (21 months 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-admin/includes/ms.php

    r53203 r54240  
    545545
    546546/**
    547  * Synchronizes category and post tag slugs when global terms are enabled.
    548  *
    549  * @since 3.0.0
    550  *
    551  * @param WP_Term|array $term     The term.
    552  * @param string        $taxonomy The taxonomy for `$term`. Should be 'category' or 'post_tag', as these are
    553  *                                the only taxonomies which are processed by this function; anything else
    554  *                                will be returned untouched.
    555  * @return WP_Term|array Returns `$term`, after filtering the 'slug' field with `sanitize_title()`
    556  *                       if `$taxonomy` is 'category' or 'post_tag'.
    557  */
    558 function sync_category_tag_slugs( $term, $taxonomy ) {
    559     if ( global_terms_enabled() && ( 'category' === $taxonomy || 'post_tag' === $taxonomy ) ) {
    560         if ( is_object( $term ) ) {
    561             $term->slug = sanitize_title( $term->name );
    562         } else {
    563             $term['slug'] = sanitize_title( $term['name'] );
    564         }
    565     }
    566     return $term;
    567 }
    568 
    569 /**
    570547 * Displays an access denied message when a user tries to view a site's dashboard they
    571548 * do not have access to.
Note: See TracChangeset for help on using the changeset viewer.