Skip to content

Commit b2f4137

Browse files
author
costdev
committed
Plugins Install: Use ::get_views_links() in list table.
1 parent 0b3a190 commit b2f4137

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,16 @@ protected function get_views() {
310310

311311
$display_tabs = array();
312312
foreach ( (array) $tabs as $action => $text ) {
313-
$current_link_attributes = ( $action === $tab ) ? ' class="current" aria-current="page"' : '';
314-
$href = self_admin_url( 'plugin-install.php?tab=' . $action );
315-
$display_tabs[ 'plugin-install-' . $action ] = "<a href='$href'$current_link_attributes>$text</a>";
313+
$display_tabs[ 'plugin-install-' . $action ] = array(
314+
'url' => self_admin_url( 'plugin-install.php?tab=' . $action ),
315+
'label' => $text,
316+
'current' => $action === $tab,
317+
);
316318
}
317319
// No longer a real tab.
318320
unset( $display_tabs['plugin-install-upload'] );
319321

320-
return $display_tabs;
322+
return $this->get_views_links( $display_tabs );
321323
}
322324

323325
/**

0 commit comments

Comments
 (0)