WPSEO_Admin_Editor_Specific_Replace_Vars::determine_for_post_type()publicYoast 1.0

Determines the page type for a post type.

Метод класса: 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_post_type( $post_type, $fallback );
$post_type(строка) (обязательный)
The name of the post_type.
$fallback(строка)
The page type to fall back to.
По умолчанию: 'custom_post_type'

Код WPSEO_Admin_Editor_Specific_Replace_Vars::determine_for_post_type() Yoast 24.0

public function determine_for_post_type( $post_type, $fallback = 'custom_post_type' ) {
	if ( ! $this->has_for_page_type( $post_type ) ) {
		return $fallback;
	}

	return $post_type;
}