Global terms is an old feature from the MU days of WordPress when multisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site and single site installs had separate code bases. It has been abandoned and unmaintained for a significant amount of time, and in WordPress 6.1, it has finally and officially been removed.
Here’s a brief timeline of events leading up to this change.
WordPress 3.0 (2010): Phase 1
The first phase of removing global terms was in WordPress 3.0.
- The user interface for global terms was completely removed in .
- The “on” switch in Core Core is the set of software required to run WordPress. The Core Development Team builds WordPress. was removed in , though plugins were free to call
install_global_terms() directly, if they dared.
- A Global Terms plugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party was created and released with the goal of moving the code there from Core. The plugin broke with the release of WordPress 3.5 and has not been updated.
- With the introduction of term splitting in WordPress 4.2, the feature became even more broken and bug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.-ridden.
- When term meta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. was introduced in WordPress 4.4 (see #10142), the affects on global terms were (rightfully) not considered. I haven’t actually tested, but it’s safe to say that term meta does not work with global terms, and would cause a number of issues.
- Searches of the plugin directory show no meaningful usage of the global terms related functions with the exception of
global_terms_enabled() (more on this below).
WordPress 6.1 (2022): Phase 2
This release will mark the completion of the second and final phase of removing global terms.
- All global term related functions have been officially deprecated and will now throw proper deprecated notices (see ).
- The functions have also been no-opped (no operationed) and calling them will have no effect, except for triggering a deprecated notice. There are a two exceptions which are detailed below.
This function used to be hooked to the
term_id_filter filter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output.. This is no longer the case. However, the function will continue to return the
$term_id value passed to it in case it’s being called directly in the wild.
This function previously returned a boolean indicating whether global terms were enabled or not. Even though there is almost no usage of this function in the plugin directory, it’s the function with the highest probability of being used.
global_terms_enabled() will always return
sitecategories database table
Sites that had global terms enabled at one point in time will likely have a
sitecategories table in their database. This table will not be touched with these changes. Most sites should be able to safely remove this table.
For more information on this change, see #21734 on Trac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress..
Props @davidbaumwald for reviewing.