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