Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Schema_Pieces
Edd_Schema_Piece_Repository::supports
Checks if this repository supports the given post type.
Метод класса: Edd_Schema_Piece_Repository{}
Хуков нет.
Возвращает
true|false. True if this repository can provide schema for the post type.
Использование
$Edd_Schema_Piece_Repository = new Edd_Schema_Piece_Repository(); $Edd_Schema_Piece_Repository->supports( $post_type ): bool;
- $post_type(строка) (обязательный)
- The post type to check.
Код Edd_Schema_Piece_Repository::supports() Edd Schema Piece Repository::supports Yoast 28.3
public function supports( string $post_type ): bool {
return $this->edd_conditional->is_met() && $post_type === 'download';
}