Flush all_page_ids when a page is addded or deleted.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-01-29 19:58:48 +00:00
parent 325a641cac
commit 81908816ab
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;
}