WPSEO_Post_Type::filter_attachment_post_type()public staticYoast 1.0

Filters the attachment post type from an array with post_types.

Метод класса: WPSEO_Post_Type{}

Хуков нет.

Возвращает

Массив. The filtered array.

Использование

$result = WPSEO_Post_Type::filter_attachment_post_type( $post_types );
$post_types(массив) (обязательный)
The array to filter the attachment post type from.

Код WPSEO_Post_Type::filter_attachment_post_type() Yoast 22.3

public static function filter_attachment_post_type( array $post_types ) {
	unset( $post_types['attachment'] );

	return $post_types;
}