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-includes/class-wpdb.php

    r54133 r54240  
    341341        'site',
    342342        'sitemeta',
    343         'sitecategories',
    344343        'registration_log',
    345344    );
     345
     346    /**
     347     * List of deprecated WordPress Multisite global tables.
     348     *
     349     * @since 6.1.0
     350     *
     351     * @see wpdb::tables()
     352     * @var string[]
     353     */
     354    public $old_ms_global_tables = array( 'sitecategories' );
    346355
    347356    /**
     
    11241133     *
    11251134     * @since 3.0.0
     1135     * @since 6.1.0 `old` now includes deprecated multisite global tables only on multisite.
    11261136     *
    11271137     * @uses wpdb::$tables
     
    11291139     * @uses wpdb::$global_tables
    11301140     * @uses wpdb::$ms_global_tables
     1141     * @uses wpdb::$old_ms_global_tables
    11311142     *
    11321143     * @param string $scope   Optional. Possible values include 'all', 'global', 'ms_global', 'blog',
     
    11601171            case 'old':
    11611172                $tables = $this->old_tables;
     1173                if ( is_multisite() ) {
     1174                    $tables = array_merge( $tables, $this->old_ms_global_tables );
     1175                }
    11621176                break;
    11631177            default:
Note: See TracChangeset for help on using the changeset viewer.