daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Nov 4th, 2014 259 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $hooks = array( 'save_post', 'deleted_post', 'create_term', 'edit_term', 'delete_term' );
  2. foreach( $hook as $hook ) {
  3.         add_action( $hook, 'baw_delete_transient' );
  4. }
  5. function baw_delete_transient() {
  6.         // Quelques variables à modifier
  7.         $taxonomy = 'category';
  8.         $post_type = 'post';
  9.          
  10.         // nom du transient
  11.         $transient_name = 'content-archive-'.$post_type.'-'.$taxonomy; 
  12.  
  13.         delete_transient( $transient_name );
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top