Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @param \GeminiLabs\SiteReviews\Modules\Html\Tags\Tag $tag
- * @return string
- */
- add_filter('site-reviews/review/value/author', function (string $name, $tag) {
- $user = $tag->review->user()
- if (empty($user)) {
- return $value;
- }
- if (!function_exists('um_user_profile_url')) {
- return $value;
- }
- if ($url = um_user_profile_url($user->ID)) {
- return sprintf('<a href="%s">%s</a>', $url, $value);
- }
- return $value;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement