Permalink
Browse files

Flush cache whenever creating or deleting ad code

  • Loading branch information...
1 parent 2039195 commit 0d6bd5f5fc0711f1adee8753bf42038749a3bfa0 @rinatkhaziev rinatkhaziev committed May 9, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 ad-code-manager.php
View
@@ -412,6 +412,7 @@ function create_ad_code( $ad_code = array() ) {
update_post_meta( $acm_inserted_post_id, $slug, $ad_code[$slug] );
}
update_post_meta( $acm_inserted_post_id, 'priority', $ad_code['priority'] );
+ $this->flush_cache();
return $acm_inserted_post_id;
}
return false;
@@ -444,6 +445,7 @@ function edit_ad_code( $ad_code_id, $ad_code = array()) {
function delete_ad_code( $ad_code_id ) {
if ( 0 !== $ad_code_id ) {
wp_delete_post( $ad_code_id , true ); //force delete post
+ $this->flush_cache();
return true;
}
return;

0 comments on commit 0d6bd5f

Please sign in to comment.