Yoast\WP\SEO\Schema_Aggregator\Application\Filtering
Default_Filter::get_property_filter
Gets a property filter instance for the given type.
Метод класса: Default_Filter{}
Хуков нет.
Возвращает
Schema_Node_Property_Filter_Interface|null. The filter instance or null if not found.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_property_filter( $type ): ?Schema_Node_Property_Filter_Interface;
- $type(строка) (обязательный)
- The schema type.
Код Default_Filter::get_property_filter() Default Filter::get property filter Yoast 27.7
private function get_property_filter( string $type ): ?Schema_Node_Property_Filter_Interface {
$filter_class = self::PROPERTY_FILTER_NAMESPACE . $type . self::PROPERTY_FILTER_SUFFIX;
if ( \class_exists( $filter_class ) && \is_a( $filter_class, Schema_Node_Property_Filter_Interface::class, true ) ) {
return new $filter_class();
}
return null;
}