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:
Ryan Boren 2006-01-29 19:58:48 +00:00
parent b0907797f3
commit ef222cf77c
1 changed files with 4 additions and 1 deletions

View File

@ -196,6 +196,7 @@ function wp_insert_post($postarr = array()) {
spawn_pinger();
}
} else if ($post_status == 'static') {
wp_cache_delete('all_page_ids', 'pages');
$wp_rewrite->flush_rules();
if ( !empty($page_template) )
@ -554,8 +555,10 @@ function wp_delete_post($postid = 0) {
$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();
}
return $post;
}