WP_Plugin_Install_List_Table::get_views() WordPress Method

The WP_Plugin_Install_List_Table::get_views() method is used to get the list of available views for a plugin install list table. The available views are 'all', 'installed', 'update', 'search', and 'favorites'.

WP_Plugin_Install_List_Table::get_views() #


Return

(array)


Top ↑

Source

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

	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;
	}

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.