WordPress at Your Fingertips
function is not described

WP_Plugin_Install_List_Table::get_views() protected WP 1.0

{} It's a method of the class: WP_Plugin_Install_List_Table{}

No Hooks.

Return

Array.

Usage

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

Notes

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

Code of WP_Plugin_Install_List_Table::get_views() WP 5.8.2

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

	$display_tabs = array();
	foreach ( (array) $tabs as $action => $text ) {
		$current_link_attributes                     = ( $action === $tab ) ? ' class="current" aria-current="page"' : '';
		$href                                        = self_admin_url( 'plugin-install.php?tab=' . $action );
		$display_tabs[ 'plugin-install-' . $action ] = "<a href='$href'$current_link_attributes>$text</a>";
	}
	// No longer a real tab.
	unset( $display_tabs['plugin-install-upload'] );

	return $display_tabs;
}