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