WordPress.org

Make WordPress Core

Changeset 9101


Ignore:
Timestamp:
10/08/08 22:16:35 (6 years ago)
Author:
ryan
Message:

Don't flush rules for every post imported. see #7193

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin.php

    r8691 r9101  
    121121    include(ABSPATH . 'wp-admin/admin-footer.php'); 
    122122 
     123    // Make sure rules are flushed 
     124    global $wp_rewrite; 
     125    $wp_rewrite->flush_rules(); 
     126 
    123127    exit(); 
    124128} else { 
  • trunk/wp-includes/post.php

    r9100 r9101  
    31133113    if ( $post->post_type == 'page' ) { 
    31143114        clean_page_cache($post_id); 
    3115         global $wp_rewrite; 
    3116         $wp_rewrite->flush_rules(); 
     3115        // Avoid flushing rules for every post during import. 
     3116        if ( !defined('WP_IMPORTING') ) { 
     3117            global $wp_rewrite; 
     3118            $wp_rewrite->flush_rules(); 
     3119        } 
    31173120    } else { 
    31183121        clean_post_cache($post_id); 
Note: See TracChangeset for help on using the changeset viewer.