| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/KnowledgeBase/wp-content/plugins/wp-seopress-pro/src/JsonSchemas/ |
Upload File : |
<?php
namespace SEOPressPro\JsonSchemas;
if ( ! defined('ABSPATH')) {
exit;
}
use SEOPress\Helpers\RichSnippetType;
use SEOPress\Models\GetJsonData;
use SEOPressPro\Models\JsonSchemaValue;
class Place extends JsonSchemaValue implements GetJsonData {
const NAME = 'place';
protected function getName() {
return self::NAME;
}
/**
* @since 4.6.0
*
* @param array $context
*
* @return array
*/
public function getJsonData($context = null) {
$data = $this->getArrayJson();
$typeSchema = isset($context['type']) ? $context['type'] : RichSnippetType::DEFAULT_SNIPPET;
$schema = seopress_get_service('JsonSchemaGenerator')->getJsonFromSchema(PostalAddress::NAME, $context, ['remove_empty'=> true]);
if (count($schema) > 1) {
$data['address'] = $schema;
}
return apply_filters('seopress_pro_get_json_data_place', $data, $context);
}
}