WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта
функция не описана

Yoast\WP\SEO\Presentations

Indexable_Presentation::generate_estimated_reading_time_minutes() public Yoast 1.0

Generates the estimated reading time.

{} Это метод класса: Indexable_Presentation{}

Хуков нет.

Возвращает

int|null. The estimated reading time.

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

$Indexable_Presentation = new Indexable_Presentation();
$Indexable_Presentation->generate_estimated_reading_time_minutes();

Код Indexable_Presentation::generate_estimated_reading_time_minutes() Yoast 16.8

<?php
public function generate_estimated_reading_time_minutes() {
	if ( $this->model->estimated_reading_time_minutes !== null ) {
		return $this->model->estimated_reading_time_minutes;
	}

	if ( $this->context->post === null ) {
		return null;
	}

	// 200 is the approximate estimated words per minute across languages.
	$words_per_minute = 200;
	$words            = \str_word_count( \wp_strip_all_tags( $this->context->post->post_content ) );
	return (int) \round( $words / $words_per_minute );
}