Changeset 19727 for trunk/wp-includes/post.php
- Timestamp:
- 01/10/2012 10:55:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r19726 r19727 2039 2039 foreach ( (array) $children as $child ) 2040 2040 clean_page_cache($child->ID); 2041 2042 $wp_rewrite->flush_rules(false);2043 2041 } else { 2044 2042 clean_post_cache($postid); … … 4591 4589 4592 4590 /** 4593 * Hook used to prevent page/post cache and rewrite rules from staying dirty. 4594 * 4595 * Does two things. If the post is a page and has a template then it will 4596 * update/add that template to the meta. For both pages and posts, it will clean 4597 * the post cache to make sure that the cache updates to the changes done 4598 * recently. For pages, the rewrite rules of WordPress are flushed to allow for 4599 * any changes. 4600 * 4601 * The $post parameter, only uses 'post_type' property and 'page_template' 4602 * property. 4591 * Hook used to prevent page/post cache from staying dirty when a post is saved. 4603 4592 * 4604 4593 * @since 2.3.0 4605 4594 * @access private 4606 * @uses $wp_rewrite Flushes Rewrite Rules.4607 4595 * 4608 4596 * @param int $post_id The ID in the database table for the $post … … 4612 4600 if ( $post->post_type == 'page' ) { 4613 4601 clean_page_cache($post_id); 4614 // Avoid flushing rules for every post during import.4615 if ( !defined('WP_IMPORTING') ) {4616 global $wp_rewrite;4617 $wp_rewrite->flush_rules(false);4618 }4619 4602 } else { 4620 4603 clean_post_cache($post_id);
Note: See TracChangeset
for help on using the changeset viewer.