Skip to content

Commit

Permalink
Merge pull request #599 from tomusborne/fix/add-id-to-tabs
Browse files Browse the repository at this point in the history
Add id attribute to tab links
  • Loading branch information
dgwyer authored Mar 6, 2024
2 parents f0227eb + db5bfea commit 1eac68b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inc/class-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ public static function navigation() {
<?php
foreach ( $tabs as $tab ) {
printf(
'<a href="%1$s" class="%2$s"%4$s>%3$s</a>',
'<a href="%1$s" class="%2$s"%4$s%5$s>%3$s</a>',
esc_url( $tab['url'] ),
esc_attr( $tab['class'] ),
esc_html( $tab['name'] ),
! empty( $tab['external'] ) ? 'target="_blank" rel="noreferrer noopener"' : ''
! empty( $tab['external'] ) ? 'target="_blank" rel="noreferrer noopener"' : '',
esc_attr( ! empty( $tab['id'] ) ? 'id=' . $tab['id'] : '' )
);
}
?>
Expand Down

0 comments on commit 1eac68b

Please sign in to comment.