Make WordPress Core


Ignore:
Timestamp:
01/10/2012 10:55:38 PM (13 years ago)
Author:
duck_
Message:

Rewrite rules don't need to be flushed on every page save/delete as they're no longer verbose. Fixes #19636.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r19726 r19727  
    20392039        foreach ( (array) $children as $child )
    20402040            clean_page_cache($child->ID);
    2041 
    2042         $wp_rewrite->flush_rules(false);
    20432041    } else {
    20442042        clean_post_cache($postid);
     
    45914589
    45924590/**
    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.
    46034592 *
    46044593 * @since 2.3.0
    46054594 * @access private
    4606  * @uses $wp_rewrite Flushes Rewrite Rules.
    46074595 *
    46084596 * @param int $post_id The ID in the database table for the $post
     
    46124600    if ( $post->post_type == 'page' ) {
    46134601        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         }
    46194602    } else {
    46204603        clean_post_cache($post_id);
Note: See TracChangeset for help on using the changeset viewer.