'.apply_filters('the_content', $review['review']); if ($review['name'] !== '' || $review['rating'] !== 'none') { $date = $aOpen = $aClose = ''; if ($review['url']) { $aOpen = ''; $aClose = ''; } if ($review['date'] !== '') { $date = new Date('M j, Y', strtotime($review['date'])); } $out .= ''; if ($review['rating'] !== 'none') { $out .= jvbFormatStarRating($review['rating']); } if ($review['name'] !== '') { $out .= $aOpen.$review['name'].$aClose; } if ($date !== '') { $out .= $date; } $out .= ''; } $out .= '
Drag here to create new group!
Alt text helps the visually impaired, as well as some benefits for SEO.
These will be automatically generated if left blank.
'; } function jvbLocationLinks(array $location): string { if (empty($location['address'])) { return ''; } $cache = new \JVBase\managers\CacheManager('location'); $key = $cache->generateKey($location); $cached = false; if ($cached) { return $cached; } $firstPart = [ $location['street'], $location['city'], $location['province'], $location['postal_code'], $location['country'], ]; $address = implode(', ',$firstPart); $coords = $location['lat'].','.$location['lng']; $googleAddress = urlencode($coords.','.$address); $appAddress = urlencode($address); $google_url = "https://www.google.com/maps/dir/?api=1&destination={$googleAddress}"; $apple_url = "https://maps.apple.com/?daddr={$appAddress}"; $apple = sprintf( '%s', $apple_url, jvbIcon('apple-logo') ); $google = sprintf( '%s', $google_url, jvbIcon('google-logo') ); $cached = ''.jvbIcon('map-pin').'Find us here: '.$google.$apple.'
'; $cache->set($key, $cached); return $cached; } add_action('jvbRenderFormField', 'jvbFormFields', 10, 3); function jvbFormFields(string $name, array $config, mixed $value):void { switch ($name) { case 'hours': echo jvbCopyHoursTemplate(); break; } }