Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_wp_delete_post_menu_item [ WordPress Function ]

_wp_delete_post_menu_item ( $object_id = 0 )
Access:
  • private
Parameters:
  • (int) $object_id The ID of the original object being trashed.
Defined at:



Callback for handling a menu item when its original object is deleted.

Source


<?php
function _wp_delete_post_menu_item$object_id ) {
    
$object_id = (int) $object_id;

    
$menu_item_ids wp_get_associated_nav_menu_items$object_id'post_type' );

    foreach( (array) 
$menu_item_ids as $menu_item_id ) {
        
wp_delete_post$menu_item_idtrue );
    }
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics