Skip to content

Commit 8cdfecd

Browse files
author
costdev
committed
MS Sites: Use ::get_views_links() in list table.
1 parent 87d2546 commit 8cdfecd

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/wp-admin/includes/class-wp-ms-sites-list-table.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -262,23 +262,19 @@ protected function get_views() {
262262
$url = 'sites.php';
263263

264264
foreach ( $statuses as $status => $label_count ) {
265-
$current_link_attributes = $requested_status === $status || ( '' === $requested_status && 'all' === $status )
266-
? ' class="current" aria-current="page"'
267-
: '';
268265
if ( (int) $counts[ $status ] > 0 ) {
269266
$label = sprintf( translate_nooped_plural( $label_count, $counts[ $status ] ), number_format_i18n( $counts[ $status ] ) );
270267
$full_url = 'all' === $status ? $url : add_query_arg( 'status', $status, $url );
271268

272-
$view_links[ $status ] = sprintf(
273-
'<a href="%1$s"%2$s>%3$s</a>',
274-
esc_url( $full_url ),
275-
$current_link_attributes,
276-
$label
269+
$view_links[ $status ] = array(
270+
'url' => esc_url( $full_url ),
271+
'label' => $label,
272+
'current' => $requested_status === $status || ( '' === $requested_status && 'all' === $status ),
277273
);
278274
}
279275
}
280276

281-
return $view_links;
277+
return $this->get_views_links( $view_links );
282278
}
283279

284280
/**

0 commit comments

Comments
 (0)