Title: WP_Plugin_Install_List_Table::get_views
Published: April 25, 2014
Last modified: February 24, 2026

---

# WP_Plugin_Install_List_Table::get_views(): array

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/get_views/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/get_views/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/get_views/?output_format=md#related)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/get_views/?output_format=md#wp--skip-link--target)

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/get_views/?output_format=md#return)󠁿

 array

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/get_views/?output_format=md#source)󠁿

    ```php
    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 );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-plugin-install-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/class-wp-plugin-install-list-table.php#L315)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/class-wp-plugin-install-list-table.php#L315-L330)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/get_views/?output_format=md#related)󠁿

| Uses | Description | 
| [self_admin_url()](https://developer.wordpress.org/reference/functions/self_admin_url/)`wp-includes/link-template.php` |

Retrieves the URL to the admin area for either the current site or the network depending on context.

  |

| Used by | Description | 
| [WP_Plugin_Install_List_Table::views()](https://developer.wordpress.org/reference/classes/wp_plugin_install_list_table/views/)`wp-admin/includes/class-wp-plugin-install-list-table.php` |

Overrides parent views so we can use the filter bar display.

  |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_plugin_install_list_table%2Fget_views%2F)
before being able to contribute a note or feedback.