mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
Don't flush rules for every post imported. see #7193
git-svn-id: https://develop.svn.wordpress.org/trunk@9101 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3112,8 +3112,11 @@ function _publish_post_hook($post_id) {
|
||||
function _save_post_hook($post_id, $post) {
|
||||
if ( $post->post_type == 'page' ) {
|
||||
clean_page_cache($post_id);
|
||||
global $wp_rewrite;
|
||||
$wp_rewrite->flush_rules();
|
||||
// Avoid flushing rules for every post during import.
|
||||
if ( !defined('WP_IMPORTING') ) {
|
||||
global $wp_rewrite;
|
||||
$wp_rewrite->flush_rules();
|
||||
}
|
||||
} else {
|
||||
clean_post_cache($post_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user