WP_Plugin_Install_List_Table::get_views()protectedWP 1.0

Method of the class: WP_Plugin_Install_List_Table{}

No Hooks.

Returns

Array.

Usage

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

Notes

  • Global. Array. $tabs
  • Global. String. $tab

WP_Plugin_Install_List_Table::get_views() code WP 6.8.1

protected function get_views() {
	global $tabs, $tab;

	$display_tabs = array();
	foreach ( (array) $tabs as $action => $text ) {
		$display_tabs[ 'plugin-install-' . $action ] = array(
			'url'     => self_admin_url( 'plugin-install.php?tab=' . $action ),
			'label'   => $text,
			'current' => $action === $tab,
		);
	}
	// No longer a real tab.
	unset( $display_tabs['plugin-install-upload'] );

	return $this->get_views_links( $display_tabs );
}