Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Clear the Hummingbird cache for the page after a review has been created.
- * Paste this in your active theme's functions.php file.
- * @param \GeminiLabs\SiteReviews\Review $review
- * @param \GeminiLabs\SiteReviews\Commands\CreateReview $command
- * @return void
- */
- add_action('site-reviews/review/created', function ($review, $command) {
- if (!empty($command->post_id)) {
- do_action('wphb_clear_page_cache', $command->post_id);
- } else {
- do_action('wphb_clear_page_cache');
- }
- }, 10, 2);
Add Comment
Please, Sign In to add comment