Flush all_page_ids when a page is addded or deleted.
git-svn-id: https://develop.svn.wordpress.org/trunk@3496 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b0907797f3
commit
ef222cf77c
|
@ -196,6 +196,7 @@ function wp_insert_post($postarr = array()) {
|
||||||
spawn_pinger();
|
spawn_pinger();
|
||||||
}
|
}
|
||||||
} else if ($post_status == 'static') {
|
} else if ($post_status == 'static') {
|
||||||
|
wp_cache_delete('all_page_ids', 'pages');
|
||||||
$wp_rewrite->flush_rules();
|
$wp_rewrite->flush_rules();
|
||||||
|
|
||||||
if ( !empty($page_template) )
|
if ( !empty($page_template) )
|
||||||
|
@ -554,8 +555,10 @@ function wp_delete_post($postid = 0) {
|
||||||
|
|
||||||
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = $postid");
|
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = $postid");
|
||||||
|
|
||||||
if ( 'static' == $post->post_status )
|
if ( 'static' == $post->post_status ) {
|
||||||
|
wp_cache_delete('all_page_ids', 'pages');
|
||||||
$wp_rewrite->flush_rules();
|
$wp_rewrite->flush_rules();
|
||||||
|
}
|
||||||
|
|
||||||
return $post;
|
return $post;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue