delete_term.php 316 Bytes
Newer Older
imac's avatar
imac committed
1 2 3 4 5 6 7 8 9 10 11 12
<?php 

function pmxi_delete_term($term, $tt_id, $taxonomy, $deleted_term, $object_ids) {
	if (is_numeric($term)){
		$post = new PMXI_Post_Record();
        $post->getBy(array(
            'post_id' => $term,
            'product_key' => 'taxonomy_term',
        ));
        $post->isEmpty() or $post->delete();
	}
}