'', 'label' => esc_html__( 'General', 'accessibility-checker' ), 'order' => 1, ], ] ); // sort settings tab items. if ( is_array( $edac_settings_tab_items ) ) { usort( $edac_settings_tab_items, function ( $a, $b ) { if ( $a['order'] < $b['order'] ) { return -1; } if ( $a['order'] === $b['order'] ) { return 0; } return 1; } ); } // Null represents the default tab (empty slug) in the navigation logic. $edac_default_tab = null; // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Nonce verification not required for tab display. if ( isset( $_GET['tab'] ) ) { $edac_settings_tab = sanitize_key( wp_unslash( $_GET['tab'] ) ); } else { $edac_settings_tab = $edac_default_tab; } // phpcs:enable WordPress.Security.NonceVerification.Recommended $edac_settings_tab = ( array_search( $edac_settings_tab, array_column( $edac_settings_tab_items, 'slug' ), true ) !== false ) ? $edac_settings_tab : $edac_default_tab; ?>