From b4f4830a07184223e0e31121d252c3b069a6670e Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Thu, 1 Jul 2021 18:54:08 -0400 Subject: [PATCH] Added purple option --- css/chpurple.css | 29 +++++++++++++++++++++++++++++ css/sopurple.css | 29 +++++++++++++++++++++++++++++ seeing_red.php | 28 +++++++++++++++++----------- 3 files changed, 75 insertions(+), 11 deletions(-) create mode 100644 css/chpurple.css create mode 100644 css/sopurple.css diff --git a/css/chpurple.css b/css/chpurple.css new file mode 100644 index 0000000..ffa97d4 --- /dev/null +++ b/css/chpurple.css @@ -0,0 +1,29 @@ +/* Contextual Help Settings */ +/* BLUE */ +#contextual-help-link-wrap, +#contextual-help-wrap { + border-bottom: 1px solid #7200b2; + border-left: 1px solid #7200b2; + border-right: 1px solid #7200b2; + background: #eadcf5; +} + +#contextual-help-link-wrap { /* Fixes bottom border issue on #contextual-help-wrap */ + border-top: none; + margin-right: 1px; + margin-top: -1px; + } + +a#contextual-help-link { + color: #7200b2; + font-weight: bold; + } +a#contextual-help-link:hover { + color: #00138B; + } + +/* WP 4.4 fix */ +button#contextual-help-link, +button#show-settings-link { + box-shadow: none; +} diff --git a/css/sopurple.css b/css/sopurple.css new file mode 100644 index 0000000..ead6f1d --- /dev/null +++ b/css/sopurple.css @@ -0,0 +1,29 @@ +/* Screen Options Settings */ +/* BLUE */ + +#screen-options-link-wrap, +#screen-options-wrap { + border-bottom: 1px solid #7200b2; + border-left: 1px solid #7200b2; + border-right: 1px solid #7200b2; + background: #eadcf5; +} + +#screen-options-link-wrap { /* Fixes bottom border issue on #screen-options-wrap */ + border-top: none; + margin-top: -1px; + } + +a#show-settings-link { + color: #7200b2; + font-weight: bold; + } +a#show-settings-link:hover { + color: #00138B; + } + +/* WP 4.4 fix */ +button#contextual-help-link, +button#show-settings-link { + box-shadow: none; +} diff --git a/seeing_red.php b/seeing_red.php index 0ff5a04..6081861 100644 --- a/seeing_red.php +++ b/seeing_red.php @@ -1,20 +1,20 @@

Seeing Red Options

-

New! You now have the option to style the "Screen Options" and "Help" tabs separately.

+

You have the option to style the "Screen Options" and "Help" tabs separately.

You can also choose from other color schemes besides red.

-
+ @@ -131,7 +131,7 @@ function so_settings_section() { // Callback for settings_field for Screen Options tab function so_settings_field(){ $options = get_option( 'd12sr_options' ); - $items = array("Red", "Green", "Blue", "Default"); + $items = array("Red", "Green", "Blue", "Purple", "Default"); echo ""; foreach($items as $item) { $selected = ($options[ch]==$item) ? 'selected="selected"' : ''; @@ -154,7 +154,7 @@ function ch_settings_field(){ // Since we are only using drop-downs, we don't need to validate function d12sr_options_validate($input) { - return $input; + return $input; } @@ -171,6 +171,9 @@ function d12so_retrieve() { case "Blue" : wp_register_style( 'd12sr_admin_socss', plugins_url('css/soblue.css', __FILE__), false, '1.0.0' ); break; + case "Purple" : + wp_register_style( 'd12sr_admin_socss', plugins_url('css/sopurple.css', __FILE__), false, '1.0.0' ); + break; default: return; } @@ -192,6 +195,9 @@ function d12ch_retrieve() { case "Blue" : wp_register_style( 'd12sr_admin_chcss', plugins_url('css/chblue.css', __FILE__), false, '1.0.0' ); break; + case "Purple" : + wp_register_style( 'd12sr_admin_chcss', plugins_url('css/chpurple.css', __FILE__), false, '1.0.0' ); + break; default: return; } @@ -199,4 +205,4 @@ function d12ch_retrieve() { } add_action( 'admin_enqueue_scripts', 'd12ch_retrieve' ); -?> \ No newline at end of file +?>