WP_Posts_List_Table::is_base_request()protectedWP 4.2.0

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

Method of the class: WP_Posts_List_Table{}

No Hooks.

Return

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

Usage

// protected - for code of main (parent) or child class
$result = $this->is_base_request();

Changelog

Since 4.2.0 Introduced.

WP_Posts_List_Table::is_base_request() code WP 6.4.3

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'] );
}