Create a one-to-one relationships between posts and terms and keep them in sync.
Caution
As of 12 April 2024, this project is archived and no longer being actively maintained.
$post_type_name = 'show_pt';
$post_type_options = array();
register_post_type(
$post_type_name, $post_type_options
);$taxonomy_name = 'show_tax';
$taxonomy_options = array();
$post_types = array( 'post' );
register_taxonomy(
$taxonomy_name, $post_types, $taxonomy_options
);\TDS\add_relationship( $post_type_name, $taxonomy_name );Creating a post named "The Tick" in the post type will create a corresponding term named "The Tick" in the taxonomy. The reverse will happen if you create a term in the taxonomy.
TDS has a full suite of unit tests to verify expected behavior. To run them, you'll first need to install the composer dependencies:
composer updateOnce you have those installed, run phpunit:
vendor/bin/phpunitArchived: This project is no longer maintained by 10up. We are no longer responding to Issues or Pull Requests unless they relate to security concerns. We encourage interested developers to fork this project and make it their own!
