WP_Query::rewind_postspublicWP 1.5.0

Rewinds the posts and resets post index.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

global $wp_query;
$wp_query->rewind_posts();

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

С версии 1.5.0 Введена.

Код WP_Query::rewind_posts() WP 6.8.1

public function rewind_posts() {
	$this->current_post = -1;
	if ( $this->post_count > 0 ) {
		$this->post = $this->posts[0];
	}
}