WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/29/2010 07:33:56 AM (11 years ago)
Author:
nacin
Message:

When posts/terms are deleted/trashed, update associated menu items. Deleted post = deleted menu item, trashed post = menu item becomes a draft. props filosofo, see #13174

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-filters.php

    r14283 r14295  
    225225add_action( 'transition_post_status',     '_transition_post_status',  5, 3 );
    226226add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce'        );
    227 add_action( 'wp_scheduled_delete',        'wp_scheduled_delete' );
     227add_action( 'wp_scheduled_delete',        'wp_scheduled_delete'            );
     228add_action( 'trash_post',                 '_wp_trash_menu_item'            );
     229add_action( 'untrash_post',               '_wp_untrash_menu_item'          );
     230add_action( 'delete_post',                '_wp_delete_post_menu_item'      );
     231add_action( 'delete_term',                '_wp_delete_tax_menu_item'       );
    228232
    229233// Post Thumbnail CSS class filtering
Note: See TracChangeset for help on using the changeset viewer.