WP_Posts_List_Table::is_base_request() WordPress Method

The WP_Posts_List_Table::is_base_request() method is used to determine whether the current request is for the posts list table.

WP_Posts_List_Table::is_base_request() #

Determine if the current view is the “All” view.


Return

(bool) Whether the current view is the "All" view.


Top ↑

Source

File: wp-admin/includes/class-wp-posts-list-table.php

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


Top ↑

Changelog

Changelog
VersionDescription
4.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.