Advertisement
geminilabs

[site-reviews] add additional template tags

Jul 6th, 2021
1,426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. /**
  2.  * @param array $tags
  3.  * @param \GeminiLabs\SiteReviews\Review $review
  4.  * @return array
  5.  */
  6. add_filter('site-reviews/review/build/after', function ($tags, $review) {
  7.     $tags['rating_number'] = $review->rating;
  8.     return $tags;
  9. }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement