'', 'label' => 'General', 'order' => 1, ), array( 'slug' => 'system_info', 'label' => 'System Info', 'order' => 4, ), ); // filter settings tab items. if ( has_filter( 'edac_filter_settings_tab_items' ) ) { $settings_tab_items = apply_filters( 'edac_filter_settings_tab_items', $settings_tab_items ); } // sort settings tab items. if ( is_array( $settings_tab_items ) ) { usort( $settings_tab_items, function( $a, $b ) { return strcmp($b['order'], $a['order']); } ); } // Get the active tab from the $_GET param. $default_tab = null; $settings_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $default_tab; $settings_tab = ( array_search( $settings_tab, array_column( $settings_tab_items, 'slug' ) ) !== false ) ? $settings_tab : $default_tab; ?>