WP_Plugin_Install_List_Table::get_views()protectedWP 1.0

Метод класса: WP_Plugin_Install_List_Table{}

Хуков нет.

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_views();

Заметки

  • Global. Массив. $tabs
  • Global. Строка. $tab

Код WP_Plugin_Install_List_Table::get_views() WP 6.4.3

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