WPSEO_Admin_Editor_Specific_Replace_Vars::determine_for_archive()publicYoast 1.0

Determines the page type for an archive page.

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

Хуков нет.

Возвращает

Строку. The page type.

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

$WPSEO_Admin_Editor_Specific_Replace_Vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
$WPSEO_Admin_Editor_Specific_Replace_Vars->determine_for_archive( $name, $fallback );
$name(строка) (обязательный)
The name of the archive.
$fallback(строка)
The page type to fall back to.
По умолчанию: 'custom-post-type_archive'

Код WPSEO_Admin_Editor_Specific_Replace_Vars::determine_for_archive() Yoast 22.3

public function determine_for_archive( $name, $fallback = 'custom-post-type_archive' ) {
	$page_type = $name . '_archive';

	if ( ! $this->has_for_page_type( $page_type ) ) {
		return $fallback;
	}

	return $page_type;
}