| | |
| | | |
| | | $config = $this->getConfig(); |
| | | |
| | | $class = JVB()->schemaHelper()::classFromConfig($config, $meta); |
| | | $class = SchemaHelper::getInstance()::classFromConfig($config, $meta); |
| | | if (property_exists($class, 'author')) { |
| | | $class->setAuthor(JVB()->seo()->getCreator(true)); |
| | | $class->setAuthor(SchemaOutput::getInstance()->getCreator(true)); |
| | | } |
| | | |
| | | |
| | |
| | | $ID, |
| | | function() use ($ID) { |
| | | $action = BASE.ucfirst($this->slug).'Schema'; |
| | | $config = JVB()->schemaHelper()::schema($action); |
| | | $config = SchemaHelper::getInstance()::schema($action); |
| | | |
| | | if (!array_key_exists('type', $config)) { |
| | | $config['type'] = 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage\CollectionPage'; |
| | |
| | | error_log('No class found for archive schema output: '.$config['type']); |
| | | return []; |
| | | } |
| | | $class = JVB()->schemaHelper()::classFromConfig($config); |
| | | $class = SchemaHelper::getInstance()::classFromConfig($config); |
| | | |
| | | $class->setIsPartOf(get_home_url().'/#website'); |
| | | $itemList = new render\Thing\Intangible\ItemList\ItemList(); |
| | |
| | | if (!empty($override)) { |
| | | return $override; |
| | | } |
| | | $config = JVB()->schemaHelper()->archive($this->slug); |
| | | $config = SchemaHelper::getInstance()->archive($this->slug); |
| | | if (!array_key_exists('type', $config)) { |
| | | $config['type'] = 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage\CollectionPage'; |
| | | } |
| | |
| | | $obj = get_queried_object(); |
| | | $meta = (property_exists($obj, 'taxonomy')) ? Meta::forTerm($obj->term_id) : null; |
| | | |
| | | $class = JVB()->schemaHelper()::classFromConfig($config, $meta); |
| | | $class = SchemaHelper::getInstance()::classFromConfig($config, $meta); |
| | | |
| | | $class->setIsPartOf(get_home_url().'/#website'); |
| | | $itemList = new render\Thing\Intangible\ItemList\ItemList(); |
| | |
| | | $meta = null; |
| | | } |
| | | $config = $this->getConfig(); |
| | | $class = JVB()->schemaHelper()::classFromConfig($config, $meta); |
| | | $class = SchemaHelper::getInstance()::classFromConfig($config, $meta); |
| | | if ($class) { |
| | | $class->delete('about'); |
| | | } |
| | |
| | | error_log('[SEO]Schema::getConfig Invalid type: '.$type); |
| | | return []; |
| | | } |
| | | return JVB()->schemaHelper()::getConfig($this->slug, $type); |
| | | return SchemaHelper::getInstance()::getConfig($this->slug, $type); |
| | | } |
| | | |
| | | public function resolveMeta(array $config, Meta $meta):array |
| | |
| | | $question = SchemaHelper::classFromConfig($question); |
| | | $page->setMainEntity($question); |
| | | |
| | | $page->setAuthor(JVB()->seo()->getCreator(true)); |
| | | $page->setAuthor(SchemaOutput::getInstance()->getCreator(true)); |
| | | return $page->outputSchema(); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | $page->setImage($images); |
| | | $page->setAuthor(JVB()->seo()->getCreator(true)); |
| | | $page->setAuthor(SchemaOutput::getInstance()->getCreator(true)); |
| | | return $page->outputSchema(); |
| | | |
| | | } |