Added purple option

This commit is contained in:
Kenneth John Odle 2021-07-01 18:54:08 -04:00
parent 9d9312019d
commit b4f4830a07
3 changed files with 75 additions and 11 deletions

29
css/chpurple.css Normal file
View File

@ -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;
}

29
css/sopurple.css Normal file
View File

@ -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;
}

View File

@ -1,15 +1,15 @@
<?php
/*
Plugin Name: Seeing Red
Plugin URI: http://www.kjodle.net/wordpress/seeing-red/
Plugin URI: https://www.kjodle.net/wordpress/
Description: Makes "Screen Options" more noticeable
Version: 2.1
Version: 3.0
Author: Kenneth John Odle
Author URI: http://techblog.kjodle.net
Text Domain: seeing-red
Copyright 2015 Kenneth John Odle
© 2015 Kenneth John Odle
Copyright 2021 Kenneth John Odle
© 2021 Kenneth John Odle
Released under the GPL v.3, http://www.gnu.org/copyleft/gpl.html
@ -82,7 +82,7 @@ function d12sr_options_callback(){
?>
<div class="wrap">
<h2>Seeing Red Options</h2>
<p><strong>New!</strong> You now have the option to style the "Screen Options" and "Help" tabs separately.</p>
<p><strong></strong> You have the option to style the "Screen Options" and "Help" tabs separately.</p>
<p>You can also choose from other color schemes besides red.</p>
<form method="post" action="options.php">
<?php settings_fields( 'd12sr_options_group' ); ?>
@ -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 "<select id='d12sr-so' name='d12sr_options[so]'>";
foreach($items as $item) {
$selected = ($options[so]==$item) ? 'selected="selected"' : '';
@ -143,7 +143,7 @@ function so_settings_field(){
// Callback for settings_field for Contextual Help tab
function ch_settings_field(){
$options = get_option( 'd12sr_options' );
$items = array("Red", "Green", "Blue", "Default");
$items = array("Red", "Green", "Blue", "Purple", "Default");
echo "<select id='d12sr-ch' name='d12sr_options[ch]'>";
foreach($items as $item) {
$selected = ($options[ch]==$item) ? 'selected="selected"' : '';
@ -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;
}