Inventory_Presser_Taxonomies::delete_term_data()
delete_term_data
Contents
Description Description
Removes all terms in all our taxonomies. Used when uninstalling the plugin.
Return Return
(void)
Source Source
File: includes/class-taxonomies.php
function delete_term_data() { // remove the terms in taxonomies $taxonomy_data = self::taxonomy_data(); for ( $i = 0; $i < sizeof( $taxonomy_data ); $i++ ) { $tax = $taxonomy_data[ $i ]['args']['label']; $terms = get_terms( $tax, array( 'fields' => 'ids', 'hide_empty' => false, ) ); foreach ( $terms as $value ) { wp_delete_term( $value, $tax ); } } }
Expand full source code Collapse full source code View on Github