wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



_wp_delete_tax_menu_item › WordPress Function

Da3.0.0
Deprecaton/a
_wp_delete_tax_menu_item ( $object_id, $tt_id, $taxonomy )
Accedi:
  • private
Parametri: (3)
  • (int) $object_id The ID of the original object being trashed.
    Richiesto:
  • (int) $tt_id Term taxonomy ID. Unused.
    Richiesto:
  • (string) $taxonomy Taxonomy slug.
    Richiesto:
Definito a:
Codex:

Serves as a callback for handling a menu item when its original object is deleted.



Sorgenti

function _wp_delete_tax_menu_item( $object_id, $tt_id, $taxonomy ) {
	$object_id = (int) $object_id;

	$menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'taxonomy', $taxonomy );

	foreach ( (array) $menu_item_ids as $menu_item_id ) {
		wp_delete_post( $menu_item_id, true );
	}
}