WPSEO_Post_Metabox_Formatter::get_keyword_usage_for_current_post()protectedYoast 1.0

Gets the keyword usage for the current post and the specified keyword.

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

Хуков нет.

Возвращает

Массив. The post IDs which use the passed keyword.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_keyword_usage_for_current_post( $keyword );
$keyword(строка) (обязательный)
The keyword to check the usage of.

Код WPSEO_Post_Metabox_Formatter::get_keyword_usage_for_current_post() Yoast 22.4

protected function get_keyword_usage_for_current_post( $keyword ) {
	return WPSEO_Meta::keyword_usage( $keyword, $this->post->ID );
}