Yoast\WP\SEO\Generators\Schema
Website::generate()
Outputs code to allow recognition of the internal search engine.
Метод класса: Website{}
Хуков нет.
Возвращает
Массив
. Website data blob.
Использование
$Website = new Website(); $Website->generate();
Код Website::generate() Website::generate Yoast 24.0
public function generate() { $data = [ '@type' => 'WebSite', '@id' => $this->context->site_url . Schema_IDs::WEBSITE_HASH, 'url' => $this->context->site_url, 'name' => $this->helpers->schema->html->smart_strip_tags( $this->context->site_name ), 'description' => \get_bloginfo( 'description' ), ]; if ( $this->context->site_represents_reference ) { $data['publisher'] = $this->context->site_represents_reference; } $data = $this->add_alternate_name( $data ); $data = $this->internal_search_section( $data ); $data = $this->helpers->schema->language->add_piece_language( $data ); return $data; }