Advertisement
swte

Untitled

Sep 4th, 2018
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1.             add_action('wp_set_comment_status', function($comment_id, $status){
  2.                   if (in_array($status, array('approve', 'hold'))){
  3.                        $comment = get_comment( $comment_id );
  4.                        Swift_Performance_Cache::clear_post_cache($comment->comment_post_ID);
  5.                   }
  6.             }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement