Changeset 19129
- Timestamp:
- 11/03/2011 05:06:45 PM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-blogs.php
r18662 r19129 688 688 } 689 689 690 /** 691 * Handler for updating the blog date when a post is published or an already published post is changed. 692 * 693 * @since 3.3.0 694 * 695 * @param string $new_status The new post status 696 * @param string $old_status The old post status 697 * @param object $post Post object 698 */ 699 function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) { 700 $post_type_obj = get_post_type_object( $post->post_type ); 701 if ( ! $post_type_obj->public ) 702 return; 703 704 if ( 'publish' != $new_status && 'publish' != $old_status ) 705 return; 706 707 // Post was freshly published, published post was saved, or published post was unpublished. 708 709 wpmu_update_blogs_date(); 710 } 711 690 712 ?> -
trunk/wp-includes/ms-default-filters.php
r18657 r19129 37 37 add_action( 'publish_post', 'update_posts_count' ); 38 38 add_action( 'delete_post', 'wpmu_update_blogs_date' ); 39 add_action( ' publish_post', 'wpmu_update_blogs_date');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');
Note: See TracChangeset
for help on using the changeset viewer.