| | |
| | | $config = $this->getConfig(); |
| | | |
| | | $class = JVB()->schemaHelper()::classFromConfig($config, $meta); |
| | | |
| | | $class->setAuthor(JVB()->seo()->getCreator(true)); |
| | | return $class->outputSchema(); |
| | | } |
| | |
| | | error_log('[SEO]Schema::getConfig Invalid type: '.$type); |
| | | return []; |
| | | } |
| | | jvbDump($this->slug); |
| | | jvbDump($type); |
| | | return JVB()->schemaHelper()::getConfig($this->slug, $type); |
| | | } |
| | | |
| | |
| | | $config['type'] = $this->defaultSchema['type']; |
| | | update_option(BASE.ucfirst($this->slug).'Schema', $config); |
| | | } |
| | | $class = $this->getConfig()['type']; |
| | | $class = $config['type']; |
| | | if (!class_exists($class)) { |
| | | error_log('[SEO]Schema::defineReference Class not found: '.$class); |
| | | return; |
| | |
| | | if (is_singular($based)){ |
| | | $config = $this->getConfig('meta'); |
| | | $meta = Meta::forPost(get_the_ID()); |
| | | $title = Resolver::resolve($config['name']??$config['title'], $meta); |
| | | $title = Resolver::resolve($config['name']??$config['title']??'', $meta); |
| | | } elseif (is_post_type_archive($based) ) { |
| | | $config = $this->getConfig('archive'); |
| | | $title = $config['name']; |