WPSEO_Metabox::determine_scope()privateYoast 1.0

Determines the scope based on the post type. This can be used by the replacevar plugin to determine if a replacement needs to be executed.

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

Хуков нет.

Возвращает

Строку. String describing the current scope.

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

// private - только в коде основоного (родительского) класса
$result = $this->determine_scope();

Код WPSEO_Metabox::determine_scope() Yoast 22.4

private function determine_scope() {
	if ( $this->get_metabox_post()->post_type === 'page' ) {
		return 'page';
	}

	return 'post';
}