WPSEO_Admin_Editor_Specific_Replace_Vars::has_for_page_type()protectedYoast 1.0

Returns whether the given page type has editor specific replace vars.

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

Хуков нет.

Возвращает

true|false. True if there are associated editor specific replace vars.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->has_for_page_type( $page_type );
$page_type(строка) (обязательный)
The page type to check.

Код WPSEO_Admin_Editor_Specific_Replace_Vars::has_for_page_type() Yoast 22.3

protected function has_for_page_type( $page_type ) {
	$replacement_variables = $this->get();

	return ( ! empty( $replacement_variables[ $page_type ] ) && is_array( $replacement_variables[ $page_type ] ) );
}