From 5503e197c79304d1b97757b44445ba45db32bedc Mon Sep 17 00:00:00 2001 From: brandonjp Date: Fri, 13 Dec 2024 09:41:53 -0600 Subject: [PATCH] Move Theme select above editor preview fixes #206 for better UX having the theme selector further down the page closer to the Editor Preview to reduce scrolling when previewing themes. RE: https://github.com/codesnippetspro/code-snippets/issues/206 --- src/php/settings/settings-fields.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/php/settings/settings-fields.php b/src/php/settings/settings-fields.php index 5a8d0742..e2008c6c 100644 --- a/src/php/settings/settings-fields.php +++ b/src/php/settings/settings-fields.php @@ -134,14 +134,6 @@ function get_settings_fields(): array { // Code Editor settings section. $fields['editor'] = [ - 'theme' => [ - 'name' => __( 'Theme', 'code-snippets' ), - 'type' => 'select', - 'default' => 'default', - 'options' => get_editor_theme_list(), - 'codemirror' => 'theme', - ], - 'indent_with_tabs' => [ 'name' => __( 'Indent With Tabs', 'code-snippets' ), 'type' => 'checkbox', @@ -217,6 +209,7 @@ function get_settings_fields(): array { 'default' => true, 'codemirror' => 'styleActiveLine', ], + 'keymap' => [ 'name' => __( 'Keymap', 'code-snippets' ), 'type' => 'select', @@ -230,6 +223,14 @@ function get_settings_fields(): array { ], 'codemirror' => 'keyMap', ], + + 'theme' => [ + 'name' => __( 'Theme', 'code-snippets' ), + 'type' => 'select', + 'default' => 'default', + 'options' => get_editor_theme_list(), + 'codemirror' => 'theme', + ], ]; $fields = apply_filters( 'code_snippets_settings_fields', $fields );