Yoast\WP\SEO\Editors\Framework\Seo\Posts
Keyphrase_Data_Provider::get_keyphrase_usage_for_current_post()
Gets the keyphrase usage for the current post and the specified keyphrase.
Метод класса: Keyphrase_Data_Provider{}
Хуков нет.
Возвращает
Массив<Строку>
. The post IDs which use the passed keyphrase.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_keyphrase_usage_for_current_post( $keyphrase ): array;
- $keyphrase(строка) (обязательный)
- The keyphrase to check the usage of.
Код Keyphrase_Data_Provider::get_keyphrase_usage_for_current_post() Keyphrase Data Provider::get keyphrase usage for current post Yoast 25.0
private function get_keyphrase_usage_for_current_post( string $keyphrase ): array { return WPSEO_Meta::keyword_usage( $keyphrase, $this->post->ID ); }