Skip to content

Commit f00e957

Browse files
author
costdev
committed
Themes Install: Use ::get_views_links() in list table.
1 parent b2f4137 commit f00e957

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

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

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

187187
$display_tabs = array();
188188
foreach ( (array) $tabs as $action => $text ) {
189-
$current_link_attributes = ( $action === $tab ) ? ' class="current" aria-current="page"' : '';
190-
$href = self_admin_url( 'theme-install.php?tab=' . $action );
191-
$display_tabs[ 'theme-install-' . $action ] = "<a href='$href'$current_link_attributes>$text</a>";
189+
$display_tabs[ 'theme-install-' . $action ] = array(
190+
'url' => self_admin_url( 'theme-install.php?tab=' . $action ),
191+
'label' => $text,
192+
'current' => $action === $tab,
193+
);
192194
}
193195

194-
return $display_tabs;
196+
return $this->get_views_links( $display_tabs );
195197
}
196198

197199
/**

0 commit comments

Comments
 (0)