[wp-trac] [WordPress Trac] #30261: Split all existing shared taxonomy terms on WP upgrade
WordPress Trac
noreply at wordpress.org
Wed Aug 12 21:04:11 UTC 2015
#30261: Split all existing shared taxonomy terms on WP upgrade
-------------------------------------+---------------------------
Reporter: boonebgorges | Owner: boonebgorges
Type: enhancement | Status: reopened
Priority: high | Milestone: 4.3
Component: Taxonomy | Version:
Severity: blocker | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------------
Comment (by boonebgorges):
Chouby - I apologize - I'm rereading your comment, and looking more
closely at Polylang, and I see that you are splitting terms yourself. I'm
not sure that I understand the reasoning behind this ("I need to do this
as a term can not be in several translations groups"). It seems to me that
you could probably *not* do this splitting yourself, and let WordPress
handle it during the migration.
In any case,
> For me that would work only if split_all_shared_terms() checks if the
term has not been already splitted (in one of the hooks)
This does happen - `split_all_shared_terms()` will not attempt to split a
term that has already been split. This is determined by a SQL query that
checks for shared terms, *not* by checking the '_split_terms' cached. And
even if it *did* try to split it, `_split_shared_term()` bails with the
original `$term_id` if the term is not, in fact, shared (ie it's already
been split). So I think that Polylang shouldn't have to do the
`update_option__split_terms` trick.
But maybe I'm missing something?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30261#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list