admin管理员组

文章数量:1404460

The WP_Term::get_instance() method, used by get_term() and presumably other core API functions, accepts an optional $taxonomy arg that is "only used for disambiguating potentially shared terms."

What is the use case for sharing terms like this? Is it possible to share a term between taxonomies with base WordPress functionality alone, without implementing custom hooks?

The WP_Term::get_instance() method, used by get_term() and presumably other core API functions, accepts an optional $taxonomy arg that is "only used for disambiguating potentially shared terms."

What is the use case for sharing terms like this? Is it possible to share a term between taxonomies with base WordPress functionality alone, without implementing custom hooks?

Share Improve this question asked Jan 26, 2020 at 18:29 acobsteracobster 1231 silver badge10 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The helpful folks on WordPress IRC pointed me to this article, which answered my question:

https://make.wordpress/core/2015/02/16/taxonomy-term-splitting-in-4-2-a-developer-guide/

In WordPress 4.2, shared taxonomy terms – those items in the wp_terms table that are shared between multiple taxonomies – will be split into separate terms when one of the shared terms is updated. This change (31418) fixes one of WordPress’s most irksome bugs, and is a critical step in our ongoing taxonomy roadmap.

Furthermore:

The vast majority of terms are not shared between taxonomies; shared terms themselves are an odd edge case.

So basically, this use-case has not been supported for a long time, and was rare to begin with.

本文标签: taxonomyWhat is the use case for sharing a term between multiple taxonomies