| | |
| | | $config = $this->getConfig(); |
| | | |
| | | $class = JVB()->schemaHelper()::classFromConfig($config, $meta); |
| | | $class->setAuthor(JVB()->seo()->getCreator(true)); |
| | | if (property_exists($class, 'author')) { |
| | | $class->setAuthor(JVB()->seo()->getCreator(true)); |
| | | } |
| | | |
| | | |
| | | $class = apply_filters('jvb_single_'.$this->slug.'_schema_output', $class, $ID); |
| | | return $class->outputSchema(); |
| | |
| | | if (JVB_TESTING){ |
| | | $this->archiveCache->flush(); |
| | | } |
| | | |
| | | $this->archiveCache->flush(); |
| | | return $this->archiveCache->remember( |
| | | $this->slug, |
| | | function() { |
| | | |
| | | $action = BASE.ucfirst($this->slug).'Archive'; |
| | | $override = apply_filters($action.'Override', []); |
| | | if (!empty($override)) { |
| | | return $override; |
| | | } |
| | | $config = JVB()->schemaHelper()->archive($this->slug); |
| | | if (!array_key_exists('type', $config)) { |
| | | $config['type'] = 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage\CollectionPage'; |
| | |
| | | ]; |
| | | $question = SchemaHelper::classFromConfig($question); |
| | | $page->setMainEntity($question); |
| | | |
| | | $page->setAuthor(JVB()->seo()->getCreator(true)); |
| | | return $page->outputSchema(); |
| | | |