Yoast\WP\SEO\Abilities\Infrastructure\Global_Setting_Targets

Post_Type_Archive_Target::__construct │ public │ Yoast 1.0

Constructor.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$Post_Type_Archive_Target = new Post_Type_Archive_Target();
$Post_Type_Archive_Target->__construct( $post_type, $post_type_helper, $woocommerce_helper, $is_known_archive );
$post_type(строка) (обязательный)
The post type of the content type.
$post_type_helper(Post_Type_Helper) (обязательный)
The post type helper.
$woocommerce_helper(Woocommerce_Helper) (обязательный)
The WooCommerce helper.
$is_known_archive(true|false)
Whether the post type is already known to have an archive with global settings, so it is not looked up again.
По умолчанию: false

Код Post_Type_Archive_Target::__construct() Yoast 28.9

public function __construct( string $post_type, Post_Type_Helper $post_type_helper, Woocommerce_Helper $woocommerce_helper, bool $is_known_archive = false ) {
	$this->post_type          = $post_type;
	$this->post_type_helper   = $post_type_helper;
	$this->woocommerce_helper = $woocommerce_helper;
	$this->is_known_archive   = $is_known_archive;
}