Yoast\WP\SEO\Helpers

Indexables_Page_Helper::get_buffer_size()publicYoast 1.0

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();

Код Indexables_Page_Helper::get_buffer_size() Yoast 19.10

public function get_buffer_size() {
	/**
	 * 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.
	 *
	 * @api int 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( 'wpseo_indexables_buffer_size', self::BUFFER_SIZE );
	if ( $times < 3 ) {
		$times = 3;
	}

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