Ticket #20433: 20433.2.patch
File 20433.2.patch, 1.4 KB (added by , 13 years ago) |
---|
-
wp-includes/ms-blogs.php
710 710 711 711 wpmu_update_blogs_date(); 712 712 } 713 714 /** 715 * Handler for updating the blog date when a published post is deleted. 716 * 717 * @since 3.4.0 718 * 719 * @param int $post_id Post ID 720 */ 721 function _update_blog_date_on_post_delete( $post_id ) { 722 $post = get_post( $post_id ); 723 724 $post_type_obj = get_post_type_object( $post->post_type ); 725 if ( ! $post_type_obj->public ) 726 return; 727 728 if ( 'publish' != $post->post_status ) 729 return; 730 731 wpmu_update_blogs_date(); 732 } 733 -
wp-includes/ms-default-filters.php
35 35 // Administration 36 36 add_filter( 'term_id_filter', 'global_terms', 10, 2 ); 37 37 add_action( 'publish_post', 'update_posts_count' ); 38 add_action( 'delete_post', ' wpmu_update_blogs_date' );38 add_action( 'delete_post', '_update_blog_date_on_post_delete' ); 39 39 add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 ); 40 40 add_action( 'admin_init', 'wp_schedule_update_network_counts'); 41 41 add_action( 'update_network_counts', 'wp_update_network_counts');