Yoast\WP\SEO\Abilities\Infrastructure\Global_Setting_Targets

Post_Type_Archive_Target::get_identifiers │ public │ Yoast 1.0

Returns the name of the target, the post type and the name of the content type.

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

Хуков нет.

Возвращает

array<string, string>. The identifiers, keyed by input name.

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

$Post_Type_Archive_Target = new Post_Type_Archive_Target();
$Post_Type_Archive_Target->get_identifiers(): array;

Код Post_Type_Archive_Target::get_identifiers() Yoast 28.9

public function get_identifiers(): array {
	$post_type_object = \get_post_type_object( $this->post_type );

	return [
		'target'    => self::NAME,
		'post_type' => $this->post_type,
		'label'     => ( $post_type_object instanceof WP_Post_Type ) ? $post_type_object->label : $this->post_type,
	];
}