WP_Posts_List_Table::is_base_request()protectedWP 4.2.0

Determines if the current view is the "All" view.

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

Хуков нет.

Возвращает

true|false. Whether the current view is the "All" view.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->is_base_request();

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

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

Код WP_Posts_List_Table::is_base_request() WP 6.5.2

protected function is_base_request() {
	$vars = $_GET;
	unset( $vars['paged'] );

	if ( empty( $vars ) ) {
		return true;
	} elseif ( 1 === count( $vars ) && ! empty( $vars['post_type'] ) ) {
		return $this->screen->post_type === $vars['post_type'];
	}

	return 1 === count( $vars ) && ! empty( $vars['mode'] );
}