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,20 +1,20 @@
<?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
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 3, as
it under the terms of the GNU General Public License, version 3, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
@ -82,9 +82,9 @@ 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">
<form method="post" action="options.php">
<?php settings_fields( 'd12sr_options_group' ); ?>
<?php do_settings_sections( 'd12sr_settings' ); ?>
<input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e(__('Save Options','seeing-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 "<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"' : '';
@ -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' );
?>
?>