There are several filters you can use to control and customize what the Term Management plugin does.
term_management_tools_term_merged
Action that runs after each selected term has been merged into the target term, and the source term has been deleted. Runs during a Merge operation.
/**
* Action that runs after each selected term has been merged into the target term, and the source term has
* been deleted.
*
* @since 1.1.2
*
* @param \WP_Term $to_term_obj The term into which others are merged.
* @param \WP_Term $old_term The term object before merging. At this point, it has been deleted.
*/
do_action( 'term_management_tools_term_merged', $to_term_obj, $old_term );
term_management_tools_term_changed_taxonomy
Action that runs after the selected terms have had their taxonomy changed. Runs at the very end of a taxonomy change operation.
/**
* Action that runs after the selected terms have had their taxonomy changed.
*
* @since 1.1.4
*
* @param array $term_ids_to_move__csv CSV of term taxonomy IDs of the moved terms. Why CSV? Thats what was there before.
* @param string $taxonomy_to The target taxonomy.
* @param string $taxonomy_from The source taxonomy.
*/
do_action( 'term_management_tools_term_changed_taxonomy', $term_ids_to_move__csv, $taxonomy_to, $taxonomy_from );
term_management_tools_changed_taxonomy__terms_as_supplied
Filter provides access to the term list before any child terms have been found and added. Runs during a taxonomy change operation.
/**
* Filter provides access to the term list before any child terms have been found.
*
* @param array $term_ids_to_move List of term IDs to be moved.
* @param string $taxonomy_to The target taxonomy.
* @param string $taxonomy_from The source taxonomy.
*
* @retun array List of term to be moved.
*
*@since 2.0.0
*
*/
$term_ids = apply_filters( 'term_management_tools_changed_taxonomy__terms_list_as_supplied', $term_ids, $taxonomy_to, $taxonomy_from );
term_management_tools_changed_taxonomy__terms_and_child_terms
Filter provides access to the term list after any child terms have been found and added. Runs during a taxonomy change operation.
/**
* Filter provides access to the complete list of terms to be moved, including all child terms.
*
* @param array $term_ids_to_move List of term IDs to be moved.
* @param string $taxonomy_to The target taxonomy.
* @param string $taxonomy_from The source taxonomy.
*
* @retun array List of term IDs to be moved.
*
*@since 2.0.0
*
*/
$term_ids = apply_filters( 'term_management_tools_changed_taxonomy__terms_list_as_supplied', $term_ids, $taxonomy_to, $taxonomy_from );
term_management_tools_changed_taxonomy__reset_parent_for
Filter provides access to the hierarchical terms for which parentage is to be adjusted after a change in taxonomy. Runs during a taxonomy change operation.
/**
* Filter to provide access to the hierarchical terms for which parentage is to be adjusted after a change
* in taxonomy.
*
* @param array $term_ids_to_move List of term IDs to be moved.
* @param string $taxonomy_from The source taxonomy.
* @param array $terms_to_reset_parentage_for List of term IDs to be moved.
*
* @return array List of term taxonomy IDs of the moved terms.
*
*@since 2.0.0
*
*/
$terms_to_reset_parentage_for = apply_filters( 'term_management_tools_changed_taxonomy__reset_parent_for', $terms_to_reset_parentage_for, $term_ids_to_move, $taxonomy_from );