e type. */ public function generate_schema_article_type() { $additional_type = $this->indexable->schema_article_type; if ( \is_null( $additional_type ) ) { $additional_type = $this->options->get( 'schema-article-type-' . $this->indexable->object_sub_type ); } $type = 'Article'; /* * If `None` is set (either on the indexable or as a default), set type to 'None'. * This simplifies is_needed checks downstream. */ if ( $additional_type === 'None' ) { $type = $additional_type; } if ( $additional_type !== $type ) { $type = [ $type, $additional_type ]; } /** * Filter: 'wpseo_schema_article_type' - Allow changing the Article type. * * @param string|string[] $type The Article type. * @param Indexable $indexable The indexable. */ return \apply_filters( 'wpseo_schema_article_type', $type, $this->indexable ); } /** * Returns the main schema id. * * The main schema id. */ public function generate_main_schema_id() { return $this->canonical . Schema_IDs::WEBPAGE_HASH; } /** * Strips all nested dependencies from the debug info. * * @return array */ public function __debugInfo() { return [ 'indexable' => $this->indexable, 'presentation' => $this->presentation, ]; } /* ********************* DEPRECATED METHODS ********************* */ /** * Generates whether or not breadcrumbs are enabled. * * @codeCoverageIgnore * * @return bool Whether or not breadcrumbs are enabled. * * @deprecated 15.8 */ public function generate_breadcrumbs_enabled() { _deprecated_function( __METHOD__, 'WPSEO 15.8' ); $breadcrumbs_enabled = \current_theme_supports( 'yoast-seo-breadcrumbs' ); if ( ! $breadcrumbs_enabled ) { $breadcrumbs_enabled = $this->options->get( 'breadcrumbs-enable', false ); } if ( ! empty( $this->blocks['yoast-seo/breadcrumbs'] ) ) { $breadcrumbs_enabled = true; } return $breadcrumbs_enabled; } } \class_alias( Meta_Tags_Context::class, 'WPSEO_Schema_Context' );