array( 'href' => true, 'target' => true, 'title' => true, ), 'br' => array(), 'em' => array(), 'strong' => array(), 'code' => array(), ); /** * Prints all settings blocks. * * @param array{ * string: array{ * title: string, * premium_link?: string, * reset_button?: bool * } * } $tabs */ function print_settings_blocks( SettingsData $settings, array $tabs, string $context = 'settings-page' ): void { $settings = $settings->get_all(); foreach ( $settings as $key => $setting ) { if ( 'settings-page' === $context && empty( $setting->option ) ) { continue; } // remove default empty select option, its for the sc dialog only if ( 'settings-page' === $context && ! empty( $setting->options ) ) { $setting->remove_empty_select_option(); } if ( 'hidden' === $setting->ui ) { continue; } option_block( $key, $setting, $tabs ); } } /** * @param array{ * string: array{ * title: string, * premium_link?: string, * reset_button?: bool * } * } $tabs */ function option_block( string $key, SettingValidator $setting, array $tabs ): void { $input_id = 'ngt-option--' . $key; $tab = str_replace( '_', '-', $setting->tab ); ?>
description, DESCRIPTION_ALLOWED_HTML, array( 'https' ) ); ?>
">tab ]['premium_link'] ?? false; ?>