Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @param string $value
- * @param \GeminiLabs\SiteReviews\Modules\Html\Tags\ReviewAssignedTermsTag $tag
- * @return string
- */
- add_filter('site-reviews/review/value/assigned_terms', function ($value, $tag) {
- $excludedTermIds = [1938, 1996]; // change as needed
- $termIds = array_diff($tag->review->assigned_terms, $excludedTermIds);
- $terms = get_terms(glsr()->taxonomy, ['include' => $termIds]);
- if ($terms) {
- $names = wp_list_pluck($terms, 'name');
- $value = \GeminiLabs\SiteReviews\Helpers\Str::naturalJoin($names);
- return $value;
- }
- return '';
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement