This presentation tells the story of the new Term Meta feature in WordPress 4.4, and provides a view of the human and technical story behind this new feature.
wp_terms wp_term_taxonomy < 4.2 wp_term_relationships what unique terms exist? term slugs unique what terms are in what taxonomies? what taxonomy terms are associated with which posts
wp_terms wp_term_taxonomy < 4.2 wp_term_relationships what unique terms exist? term slugs unique what terms are in what taxonomies? what taxonomy terms are associated with which posts
The Plan • Stop making things worse (don’t make any new shared terms) • Start to fix shared terms on update • Split all remaining shared terms, establishing a one-to- one correspondence between rows in wp_terms and wp_term_taxonomy • introduce term_meta • combine wp_terms and wp_taxonomy_terms tables
The Plan • Stop making things worse (don’t make any new shared terms) [4.1] • Start to fix shared terms on update • Split all remaining shared terms, establishing a one-to- one correspondence between rows in wp_terms and wp_term_taxonomy • introduce term_meta • combine wp_terms and wp_taxonomy_terms tables
The Plan • Stop making things worse (don’t make any new shared terms) [4.1] • Start to fix shared terms on update [4.2] • Split all remaining shared terms, establishing a one-to- one correspondence between rows in wp_terms and wp_term_taxonomy • introduce term_meta • combine wp_terms and wp_taxonomy_terms tables
The Plan • Stop making things worse (don’t make any new shared terms) [4.1] • Start to fix shared terms on update [4.2] • Split all remaining shared terms, establishing a one-to- one correspondence between rows in wp_terms and wp_term_taxonomy [4.3] • introduce term_meta • combine wp_terms and wp_taxonomy_terms tables
The Plan • Stop making things worse (don’t make any new shared terms) [4.1] • Start to fix shared terms on update [4.2] • Split all remaining shared terms, establishing a one-to- one correspondence between rows in wp_terms and wp_term_taxonomy [4.3] • introduce term_meta [4.4] • combine wp_terms and wp_taxonomy_terms tables
The Plan • Stop making things worse (don’t make any new shared terms) [4.1] • Start to fix shared terms on update [4.2] • Split all remaining shared terms, establishing a one-to- one correspondence between rows in wp_terms and wp_term_taxonomy [4.3] • introduce term_meta [4.4] • combine wp_terms and wp_taxonomy_terms tables [?]
• add_term_meta, update_term_meta, get_term_meta, delete_term_meta • same underlying API (ie: get_metadata) • meta_query argument for get_terms • cache priming for functions that fetch terms (can be turned off via a filter)