Advertisement
geminilabs

[site-reviews] add additional template tags

Jul 6th, 2021
1,180
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement