mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 01:24:27 +00:00
Site Health: Correct array key for the default tab
Use `reset` to get the label from the first tab entry as the default if no tab is defined. This ensures even if the tab order is changed, or tabs are removed, no warnings will be thrown. Follow-up to [50764]. See #47225. git-svn-id: https://develop.svn.wordpress.org/trunk@50765 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -39,7 +39,7 @@ $wrapper_classes = array(
|
||||
$title = sprintf(
|
||||
// translators: %s: The currently displayed tab.
|
||||
__( 'Site Health %s' ),
|
||||
( isset( $_GET['tab'] ) ? esc_html( $tabs[ $_GET['tab'] ] ) : esc_html( $tabs[0] ) )
|
||||
( isset( $_GET['tab'] ) ? esc_html( $tabs[ $_GET['tab'] ] ) : esc_html( reset( $tabs ) ) )
|
||||
);
|
||||
|
||||
if ( ! current_user_can( 'view_site_health_checks' ) ) {
|
||||
|
||||
Reference in New Issue
Block a user