mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-06 21:54:28 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54240 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -340,10 +340,19 @@ class wpdb {
|
||||
'signups',
|
||||
'site',
|
||||
'sitemeta',
|
||||
'sitecategories',
|
||||
'registration_log',
|
||||
);
|
||||
|
||||
/**
|
||||
* List of deprecated WordPress Multisite global tables.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @see wpdb::tables()
|
||||
* @var string[]
|
||||
*/
|
||||
public $old_ms_global_tables = array( 'sitecategories' );
|
||||
|
||||
/**
|
||||
* WordPress Comments table.
|
||||
*
|
||||
@@ -1123,11 +1132,13 @@ class wpdb {
|
||||
* - 'old' - returns tables which are deprecated.
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @since 6.1.0 `old` now includes deprecated multisite global tables only on multisite.
|
||||
*
|
||||
* @uses wpdb::$tables
|
||||
* @uses wpdb::$old_tables
|
||||
* @uses wpdb::$global_tables
|
||||
* @uses wpdb::$ms_global_tables
|
||||
* @uses wpdb::$old_ms_global_tables
|
||||
*
|
||||
* @param string $scope Optional. Possible values include 'all', 'global', 'ms_global', 'blog',
|
||||
* or 'old' tables. Default 'all'.
|
||||
@@ -1159,6 +1170,9 @@ class wpdb {
|
||||
break;
|
||||
case 'old':
|
||||
$tables = $this->old_tables;
|
||||
if ( is_multisite() ) {
|
||||
$tables = array_merge( $tables, $this->old_ms_global_tables );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return array();
|
||||
|
||||
Reference in New Issue
Block a user