Yoast\WP\SEO\Helpers

Indexables_Page_Helper::get_buffer_size()publicYoast 1.0

Устарела с версии 20.4. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Retrieves the size of the buffer for the Indexables lists, in terms of how many times bigger it is from the lists' size. This size is the amount of indexables that are fetched upon page load.

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

Хуки из метода

Возвращает

int. The size of the Indexables lists.

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

$Indexables_Page_Helper = new Indexables_Page_Helper();
$Indexables_Page_Helper->get_buffer_size();

Список изменений

Устарела с 20.4

Код Indexables_Page_Helper::get_buffer_size() Yoast 22.4

public function get_buffer_size() {
	\_deprecated_function( __METHOD__, 'Yoast SEO 20.4' );

	/**
	 * Filter 'wpseo_indexables_buffer_size' - Allow filtering the size of the buffer for the Indexables lists, in terms of how many times bigger it is from the lists' size.
	 *
	 * @param int $buffer_size The size of the buffer for the Indexables lists, in terms of how many times bigger it is from the lists' size.
	 */
	$times = \apply_filters_deprecated( 'wpseo_indexables_buffer_size', [ self::BUFFER_SIZE ], 'Yoast SEO 20.4' );
	if ( $times < 3 ) {
		$times = 3;
	}

	return ( $this->get_indexables_list_size() * \intval( $times ) );
}