mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Don't write to htaccess every time page is saved. Add hard/soft flush flag to flush_rules(). Make sure fopen is successful and silence errors. Props Viper007Bond. fixes #10181 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@11578 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1192,7 +1192,7 @@ function wp_delete_post($postid = 0) {
|
||||
foreach ( (array) $children as $child )
|
||||
clean_page_cache($child->ID);
|
||||
|
||||
$wp_rewrite->flush_rules();
|
||||
$wp_rewrite->flush_rules(false);
|
||||
} else {
|
||||
clean_post_cache($postid);
|
||||
}
|
||||
@@ -3354,7 +3354,7 @@ function _save_post_hook($post_id, $post) {
|
||||
// Avoid flushing rules for every post during import.
|
||||
if ( !defined('WP_IMPORTING') ) {
|
||||
global $wp_rewrite;
|
||||
$wp_rewrite->flush_rules();
|
||||
$wp_rewrite->flush_rules(false);
|
||||
}
|
||||
} else {
|
||||
clean_post_cache($post_id);
|
||||
|
||||
Reference in New Issue
Block a user