[wp-trac] [WordPress Trac] #21734: Completely remove global terms
WordPress Trac
noreply at wordpress.org
Tue Aug 9 16:37:23 UTC 2022
#21734: Completely remove global terms
--------------------------------------------------+------------------------
Reporter: scribu | Owner: (none)
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.1
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion needs-dev-note | Focuses: multisite
--------------------------------------------------+------------------------
Changes (by desrosj):
* keywords: has-patch => has-patch 2nd-opinion needs-dev-note
* milestone: Future Release => 6.1
Comment:
I think it's time to revisit this and follow through. A summary of some
fact finding:
- The UI was completely removed in [14854]. (WordPress 3.0)
- The "on" switch was removed from Core in [14880]. A plugin was then
required to trigger `install_global_terms()`. (WordPress 3.0)
- The [https://wordpress.org/plugins/global-terms/ Global Terms plugin]
that was created to push folks using the feature to does not work, and
[https://wordpress.org/support/topic/wp-35-rc1-global-terms-10-not-work/
appears to have been broken since WordPress 3.5].
- After term splitting, there are lots of strange behaviors, problems, and
broken-ness when changing terms that exist on multiple sites in my limited
testing.
- The concept of term meta now exists, but is not a thing in the context
of global terms. There are likely lots of problems here as well.
- Searches of the plugin directory confirm that
[https://wpdirectory.net/search/01GA1N2136R48E66T71NVN0CVK no one] is
[https://wpdirectory.net/search/01GA1HRPDEC5ZXDWJKHPN3BA1X actually]
[https://wpdirectory.net/search/01GA1HQ4ZS72JAC3JP7V167NAN using] the
[https://wpdirectory.net/search/01GA1HJPJD63VK95CXNND0DJEZ feature]. Most
matches are plugins defensively using `global_terms_enabled()`, or false
positives.
I've created a PR to further deprecate and remove global terms. The PR:
- Removes `global_terms_enabled()` calls within conditional logic making
the assumption that global terms will never be enabled.
- Moves all related functions to `ms-deprecated.php`.
- Removes all default filter and action hooks calling these deprecated
functions.
- Introduces the concept of "old multisite global tables" mirroring "old
tables" in WPDB and moves `sitecategories` into that list.
One thing I was uncertain of was how to properly deprecate a pluggable
function. I couldn't find any examples searching through the code base. If
the function is moved to `ms-deprecated.php`, then I believe that it's
technically no longer "pluggable" because of the file loading order (and
the [https://github.com/WordPress/wordpress-
develop/runs/7750333189?check_suite_focus=true#step:20:272 unit tests
demonstrated this]). But leaving it in `pluggable.php` also felt wrong.
If there's agreement this can happen, I'll close out global term related
bug reports as `wontfix`. Also marking as `needs-dev-note`. One should be
published as a courtesy to summarize this decision just in case there are
sites still utilizing this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21734#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list