Version Description
- Fixed options page saving error.
- Added a brand new color selection interface for custom "Color Scheme" (beta). Now you can easily select your own colors & plus overlays!
Download this release
Release Info
Developer | mattsay |
Plugin | Dropdown Menu Widget |
Version | 1.5.6alpha |
Comparing to | |
See all releases |
Code changes from version 1.5.5 to 1.5.6alpha
- admin.css +10 -1
- js/admin.js +59 -0
- include.js → js/include.js +1 -1
- options-page.php +12 -6
- readme.txt +6 -2
- shailan.DropDownMenu.php +131 -17
- themes/color-scheme.css +54 -0
admin.css
CHANGED
@@ -14,6 +14,15 @@
|
|
14 |
|
15 |
#widgets-right .widgets-sortables{ min-height:0px; }
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
.sidebar-name{overflow:auto; display:block;}
|
18 |
.sidebar-name h3{float:left;}
|
19 |
-
.sidebar-name span{float:right;}
|
|
|
|
|
|
14 |
|
15 |
#widgets-right .widgets-sortables{ min-height:0px; }
|
16 |
|
17 |
+
.widget-holder{position:relative; zoom:1;}
|
18 |
+
|
19 |
+
#picker{ position:absolute; top:10px; right:10px; }
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
.sidebar-name{overflow:auto; display:block;}
|
24 |
.sidebar-name h3{float:left;}
|
25 |
+
.sidebar-name span{float:right;}
|
26 |
+
|
27 |
+
input.selected{border:1px solid #f93}
|
28 |
+
input.color-error{border:1px solid #f00;}
|
js/admin.js
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*var farbtastic; */
|
2 |
+
|
3 |
+
function pickColor(obj, color) {
|
4 |
+
farbtastic.setColor(color);
|
5 |
+
jQuery("#" + obj).val(color);
|
6 |
+
}
|
7 |
+
|
8 |
+
jQuery(document).ready(function() {
|
9 |
+
|
10 |
+
var f = jQuery.farbtastic('#picker');
|
11 |
+
var p = jQuery('#picker').fadeOut();
|
12 |
+
var selected;
|
13 |
+
|
14 |
+
// Color selector areas:
|
15 |
+
var pickers = ["shailan_dm_color_lihover", "shailan_dm_color_menubg", "shailan_dm_color_link", "shailan_dm_color_hoverlink"];
|
16 |
+
|
17 |
+
jQuery.each(pickers, function() {
|
18 |
+
|
19 |
+
f.linkTo(this);
|
20 |
+
|
21 |
+
jQuery("#" + this).css('background-color', jQuery("#" + this).val());
|
22 |
+
|
23 |
+
jQuery("#" + this).focus(function(){
|
24 |
+
if (selected) {
|
25 |
+
jQuery(selected).removeClass('selected');
|
26 |
+
}
|
27 |
+
f.linkTo(this);
|
28 |
+
p.fadeIn(2);
|
29 |
+
jQuery(selected = this).addClass('selected');
|
30 |
+
//jQuery('#picker').show();
|
31 |
+
});
|
32 |
+
|
33 |
+
jQuery("#" + this).keyup(function() {
|
34 |
+
f.linkTo(this);
|
35 |
+
p.fadeIn(2);
|
36 |
+
var _hex = jQuery(this).val(), hex = _hex;
|
37 |
+
if ( hex[0] != '#' )
|
38 |
+
hex = '#' + hex;
|
39 |
+
hex = hex.replace(/[^#a-fA-F0-9]+/, '');
|
40 |
+
if ( hex != _hex )
|
41 |
+
jQuery(this).val(hex);
|
42 |
+
if ( hex.length == 4 || hex.length == 7 ){
|
43 |
+
jQuery(this).removeClass('color-error');
|
44 |
+
pickColor( this, hex );
|
45 |
+
} else {
|
46 |
+
jQuery(this).addClass('color-error');
|
47 |
+
}
|
48 |
+
});
|
49 |
+
|
50 |
+
});
|
51 |
+
|
52 |
+
jQuery(document).mousedown(function(){
|
53 |
+
jQuery('#picker').each(function(){
|
54 |
+
var display = jQuery(this).css('display');
|
55 |
+
if ( display == 'block' )
|
56 |
+
jQuery(this).fadeOut(10);
|
57 |
+
});
|
58 |
+
});
|
59 |
+
});
|
include.js → js/include.js
RENAMED
@@ -11,5 +11,5 @@ jQuery(document).ready(function($) {
|
|
11 |
// Add child classes to lists
|
12 |
$('ul li:first-child').addClass('first-child');
|
13 |
$('ul li:last-child').addClass('last-child');
|
14 |
-
|
15 |
});
|
11 |
// Add child classes to lists
|
12 |
$('ul li:first-child').addClass('first-child');
|
13 |
$('ul li:last-child').addClass('last-child');
|
14 |
+
|
15 |
});
|
options-page.php
CHANGED
@@ -36,7 +36,11 @@ case "open":
|
|
36 |
|
37 |
case "close":
|
38 |
?>
|
39 |
-
|
|
|
|
|
|
|
|
|
40 |
<br class="clear">
|
41 |
</div>
|
42 |
</div>
|
@@ -50,7 +54,12 @@ case "title":
|
|
50 |
|
51 |
|
52 |
<?php break;
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
54 |
case 'text':
|
55 |
?>
|
56 |
|
@@ -117,8 +126,7 @@ $i++;
|
|
117 |
|
118 |
<div id="available-widgets" class="widgets-holder-wrap">
|
119 |
|
120 |
-
<div class="sidebar-name"><h3><?php echo $value['name']; ?></h3> <span style="float:right;"><
|
121 |
-
</span><br class="clear" /></div>
|
122 |
<div class="widget-holder">
|
123 |
|
124 |
|
@@ -217,9 +225,7 @@ tweetmeme_url = 'http://shailan.com/wordpress/plugins/dropdown-menu/'; tweetmeme
|
|
217 |
<br class="clear">
|
218 |
|
219 |
<input type="hidden" name="action" value="save" />
|
220 |
-
|
221 |
<input name="save99" type="submit" class="button-primary menu-save" value="Save changes" />
|
222 |
-
|
223 |
</form>
|
224 |
|
225 |
<p class="aligncenter">
|
36 |
|
37 |
case "close":
|
38 |
?>
|
39 |
+
|
40 |
+
<div class="shailan_dm_input alignright">
|
41 |
+
<input type="hidden" name="action" value="save" />
|
42 |
+
<input name="save99" type="submit" class="button-primary menu-save" value="Save changes" />
|
43 |
+
</div>
|
44 |
<br class="clear">
|
45 |
</div>
|
46 |
</div>
|
54 |
|
55 |
|
56 |
<?php break;
|
57 |
+
|
58 |
+
case 'picker':
|
59 |
+
?>
|
60 |
+
<div id="picker"></div>
|
61 |
+
|
62 |
+
<?php break;
|
63 |
case 'text':
|
64 |
?>
|
65 |
|
126 |
|
127 |
<div id="available-widgets" class="widgets-holder-wrap">
|
128 |
|
129 |
+
<div class="sidebar-name"><h3><?php echo $value['name']; ?></h3> <span style="float:right;"></span><br class="clear" /></div>
|
|
|
130 |
<div class="widget-holder">
|
131 |
|
132 |
|
225 |
<br class="clear">
|
226 |
|
227 |
<input type="hidden" name="action" value="save" />
|
|
|
228 |
<input name="save99" type="submit" class="button-primary menu-save" value="Save changes" />
|
|
|
229 |
</form>
|
230 |
|
231 |
<p class="aligncenter">
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mattsay
|
|
3 |
Donate link: http://shailan.com/donate
|
4 |
Tags: css, dropdown, menu, widget, pages, categories, multi
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 3.0
|
7 |
-
Stable tag: 1.5.
|
8 |
|
9 |
This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
|
10 |
|
@@ -47,6 +47,10 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
|
|
47 |
|
48 |
== Changelog ==
|
49 |
|
|
|
|
|
|
|
|
|
50 |
= 1.5.5 =
|
51 |
* New theme! Hulu style theme.
|
52 |
* Added new action hooks to insert your items to the dropdown menu.
|
3 |
Donate link: http://shailan.com/donate
|
4 |
Tags: css, dropdown, menu, widget, pages, categories, multi
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 3.0.1
|
7 |
+
Stable tag: 1.5.6alpha
|
8 |
|
9 |
This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
|
10 |
|
47 |
|
48 |
== Changelog ==
|
49 |
|
50 |
+
= 1.5.6alpha =
|
51 |
+
* Fixed options page saving error.
|
52 |
+
* Added a brand new color selection interface for custom "Color Scheme" (beta). Now you can easily select your own colors & plus overlays!
|
53 |
+
|
54 |
= 1.5.5 =
|
55 |
* New theme! Hulu style theme.
|
56 |
* Added new action hooks to insert your items to the dropdown menu.
|
shailan.DropDownMenu.php
CHANGED
@@ -4,13 +4,13 @@ Plugin Name: Dropdown Menu Widget
|
|
4 |
Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
|
5 |
Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
|
6 |
Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme
|
7 |
-
Version: 1.5.
|
8 |
Author: Matt Say
|
9 |
Author URI: http://shailan.com
|
10 |
Text Domain: shailan-dropdown-menu
|
11 |
*/
|
12 |
|
13 |
-
define('SHAILAN_DM_VERSION','1.5.
|
14 |
define('SHAILAN_DM_TITLE', 'Dropdown Menu');
|
15 |
define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
|
16 |
|
@@ -31,11 +31,14 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
31 |
|
32 |
// Hook up styles
|
33 |
add_action( 'wp_head', array(&$this, 'styles') );
|
|
|
|
|
34 |
|
35 |
// Define themes
|
36 |
$available_themes = array(
|
37 |
'None'=>'NONE',
|
38 |
'Custom CSS' => 'custom',
|
|
|
39 |
'Simple White'=>'simple',
|
40 |
'Wordpress Default'=>'wpdefault',
|
41 |
'Grayscale'=>'grayscale',
|
@@ -53,6 +56,14 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
53 |
$themes = array();
|
54 |
while(list($Key,$Val) = each($available_themes))
|
55 |
$themes[$Val] = $Key;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
$types = array('pages'=>'Pages', 'categories'=>'Categories');
|
58 |
|
@@ -101,6 +112,52 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
101 |
|
102 |
array( "type" => "close" ),
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
array(
|
105 |
"name" => "Template Tag Options",
|
106 |
"type" => "section"
|
@@ -215,10 +272,18 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
215 |
function adminMenu(){
|
216 |
global $pluginname, $pluginshortname, $pluginoptions;
|
217 |
|
218 |
-
|
|
|
|
|
|
|
|
|
219 |
|
220 |
if ( @$_GET['page'] == 'dropdown-menu' ) {
|
221 |
|
|
|
|
|
|
|
|
|
222 |
if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
|
223 |
|
224 |
foreach ($pluginoptions as $value) {
|
@@ -244,9 +309,7 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
244 |
global $pluginname, $pluginshortname, $pluginoptions;
|
245 |
|
246 |
$title = __('Dropdown Menu Options');
|
247 |
-
|
248 |
include_once('options-page.php');
|
249 |
-
|
250 |
}
|
251 |
|
252 |
/** @see WP_Widget::widget */
|
@@ -261,16 +324,12 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
261 |
|
262 |
?>
|
263 |
<?php echo $args['before_widget']; ?>
|
264 |
-
<?php /*if ( $title )
|
265 |
-
echo $before_title . $title . $after_title;*/ // Title is disabled for this widget
|
266 |
-
?>
|
267 |
-
|
268 |
|
269 |
<?php
|
270 |
|
271 |
$dropdown_wrapper_open = '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
|
272 |
|
273 |
-
$dropdown_open = '<div
|
274 |
$list_open = '<ul class="dropdown '. $orientation . ' dropdown-align-'.$align.'">';
|
275 |
|
276 |
if($home && ($type == 'pages' || $type == 'categories')){
|
@@ -439,21 +498,23 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
439 |
}
|
440 |
|
441 |
function styles($instance){
|
442 |
-
|
443 |
if(!is_admin()){
|
444 |
-
|
445 |
$theme = get_option('shailan_dm_active_theme');
|
446 |
$allow_multiline = (bool) get_option('shailan_dm_allowmultiline');
|
|
|
|
|
|
|
|
|
|
|
447 |
|
448 |
echo "\n<!-- Start of Dropdown Menu Widget Styles by shailan (http://shailan.com) -->";
|
449 |
-
|
450 |
echo "\n\t<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/shailan-dropdown.css\" type=\"text/css\" />";
|
451 |
|
452 |
if($theme!='NONE' || $theme != 'Custom'){
|
453 |
echo "\n\t<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/themes/".$theme.".css\" type=\"text/css\" />";
|
454 |
}
|
455 |
|
456 |
-
|
457 |
echo "\n\t<style type=\"text/css\" media=\"all\">";
|
458 |
|
459 |
// Font family and font size
|
@@ -468,6 +529,62 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
468 |
if(!$allow_multiline){
|
469 |
echo "\n\t\tul.dropdown { white-space: nowrap; }\n";
|
470 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
|
472 |
// Custom css support
|
473 |
/* if($theme == 'custom'){ */
|
@@ -507,9 +624,6 @@ load_plugin_textdomain( 'shailan-dropdown-menu', false, $plugin_dir . '/lang');
|
|
507 |
// add admin menu
|
508 |
add_action('admin_menu', array('shailan_DropdownWidget', 'adminMenu'));
|
509 |
|
510 |
-
if(is_admin()){ wp_admin_css( 'widgets' ); wp_enqueue_script('admin-widgets'); };
|
511 |
-
wp_enqueue_script( 'dropdown-ie-support', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/include.js', array('jquery') );
|
512 |
-
|
513 |
/* Includes */
|
514 |
include('shailan-page-walker.php'); // Load custom page walker
|
515 |
include('shailan-category-walker.php'); // Load custom category walker
|
4 |
Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
|
5 |
Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
|
6 |
Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme
|
7 |
+
Version: 1.5.6alpha
|
8 |
Author: Matt Say
|
9 |
Author URI: http://shailan.com
|
10 |
Text Domain: shailan-dropdown-menu
|
11 |
*/
|
12 |
|
13 |
+
define('SHAILAN_DM_VERSION','1.5.6alpha');
|
14 |
define('SHAILAN_DM_TITLE', 'Dropdown Menu');
|
15 |
define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
|
16 |
|
31 |
|
32 |
// Hook up styles
|
33 |
add_action( 'wp_head', array(&$this, 'styles') );
|
34 |
+
|
35 |
+
if(!is_admin()){ wp_enqueue_script( 'dropdown-ie-support', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/include.js', array('jquery') ); }
|
36 |
|
37 |
// Define themes
|
38 |
$available_themes = array(
|
39 |
'None'=>'NONE',
|
40 |
'Custom CSS' => 'custom',
|
41 |
+
'Color Scheme' => 'color-scheme',
|
42 |
'Simple White'=>'simple',
|
43 |
'Wordpress Default'=>'wpdefault',
|
44 |
'Grayscale'=>'grayscale',
|
56 |
$themes = array();
|
57 |
while(list($Key,$Val) = each($available_themes))
|
58 |
$themes[$Val] = $Key;
|
59 |
+
|
60 |
+
$overlays = array(
|
61 |
+
'none'=>'none',
|
62 |
+
'glassy'=>'glassy',
|
63 |
+
'flat'=>'flat',
|
64 |
+
'shadow'=>'shadow',
|
65 |
+
'soft' =>'soft'
|
66 |
+
);
|
67 |
|
68 |
$types = array('pages'=>'Pages', 'categories'=>'Categories');
|
69 |
|
112 |
|
113 |
array( "type" => "close" ),
|
114 |
|
115 |
+
array(
|
116 |
+
"name" => "Color Scheme (beta)",
|
117 |
+
"type" => "section"
|
118 |
+
),
|
119 |
+
|
120 |
+
array( "name" => "Use custom colors",
|
121 |
+
"desc" => "If not checked custom colors won't work.",
|
122 |
+
"id" => "shailan_dm_custom_colors",
|
123 |
+
"std" => true,
|
124 |
+
"type" => "checkbox"),
|
125 |
+
|
126 |
+
array("type"=>"picker"),
|
127 |
+
|
128 |
+
array( "name" => "Menu Background Color",
|
129 |
+
"desc" => "Background color of the dropdown menu",
|
130 |
+
"id" => "shailan_dm_color_menubg",
|
131 |
+
"std" => '#000000',
|
132 |
+
"type" => "text"),
|
133 |
+
|
134 |
+
array( "name" => "Hover Background Color",
|
135 |
+
"desc" => "Background color of list item link.",
|
136 |
+
"id" => "shailan_dm_color_lihover",
|
137 |
+
"std" => '#333333',
|
138 |
+
"type" => "text"),
|
139 |
+
|
140 |
+
array( "name" => "Link Text Color",
|
141 |
+
"desc" => "Default link color",
|
142 |
+
"id" => "shailan_dm_color_link",
|
143 |
+
"std" => '#FFFFFF',
|
144 |
+
"type" => "text"),
|
145 |
+
|
146 |
+
array( "name" => "Link Text Color on mouse over",
|
147 |
+
"desc" => "Secondary link color",
|
148 |
+
"id" => "shailan_dm_color_hoverlink",
|
149 |
+
"std" => '#FFFFFF',
|
150 |
+
"type" => "text"),
|
151 |
+
|
152 |
+
array( "name" => "Overlay",
|
153 |
+
"desc" => "Menu overlay (Works on browsers that support png transparency only.)",
|
154 |
+
"id" => "shailan_dm_overlay",
|
155 |
+
"std" => "glass",
|
156 |
+
"type" => "select",
|
157 |
+
"options" => $overlays ),
|
158 |
+
|
159 |
+
array( "type" => "close" ),
|
160 |
+
|
161 |
array(
|
162 |
"name" => "Template Tag Options",
|
163 |
"type" => "section"
|
272 |
function adminMenu(){
|
273 |
global $pluginname, $pluginshortname, $pluginoptions;
|
274 |
|
275 |
+
if(is_admin()){
|
276 |
+
wp_admin_css( 'widgets' );
|
277 |
+
wp_enqueue_script('admin-widgets');
|
278 |
+
wp_register_style('dropdownMenuStyles', WP_PLUGIN_URL . '/dropdown-menu-widget/admin.css');
|
279 |
+
};
|
280 |
|
281 |
if ( @$_GET['page'] == 'dropdown-menu' ) {
|
282 |
|
283 |
+
wp_enqueue_style('farbtastic');
|
284 |
+
wp_enqueue_script('farbtastic');
|
285 |
+
wp_enqueue_script( 'dropdown-colorpick', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/admin.js', array('jquery') );
|
286 |
+
|
287 |
if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
|
288 |
|
289 |
foreach ($pluginoptions as $value) {
|
309 |
global $pluginname, $pluginshortname, $pluginoptions;
|
310 |
|
311 |
$title = __('Dropdown Menu Options');
|
|
|
312 |
include_once('options-page.php');
|
|
|
313 |
}
|
314 |
|
315 |
/** @see WP_Widget::widget */
|
324 |
|
325 |
?>
|
326 |
<?php echo $args['before_widget']; ?>
|
|
|
|
|
|
|
|
|
327 |
|
328 |
<?php
|
329 |
|
330 |
$dropdown_wrapper_open = '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
|
331 |
|
332 |
+
$dropdown_open = '<div align="' . $align . '" class="'.$orientation.'-container dm-align-'.$align.'"><table cellpadding="0" cellspacing="0"><tr><td>';
|
333 |
$list_open = '<ul class="dropdown '. $orientation . ' dropdown-align-'.$align.'">';
|
334 |
|
335 |
if($home && ($type == 'pages' || $type == 'categories')){
|
498 |
}
|
499 |
|
500 |
function styles($instance){
|
501 |
+
global $pluginname, $pluginshortname, $pluginoptions;
|
502 |
if(!is_admin()){
|
|
|
503 |
$theme = get_option('shailan_dm_active_theme');
|
504 |
$allow_multiline = (bool) get_option('shailan_dm_allowmultiline');
|
505 |
+
// Colors
|
506 |
+
$shailan_dm_color_menubg = get_option('shailan_dm_color_menubg');
|
507 |
+
$shailan_dm_color_lihover = get_option('shailan_dm_color_lihover');
|
508 |
+
$shailan_dm_color_link = get_option('shailan_dm_color_link');
|
509 |
+
$shailan_dm_color_hoverlink = get_option('shailan_dm_color_hoverlink');
|
510 |
|
511 |
echo "\n<!-- Start of Dropdown Menu Widget Styles by shailan (http://shailan.com) -->";
|
|
|
512 |
echo "\n\t<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/shailan-dropdown.css\" type=\"text/css\" />";
|
513 |
|
514 |
if($theme!='NONE' || $theme != 'Custom'){
|
515 |
echo "\n\t<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/themes/".$theme.".css\" type=\"text/css\" />";
|
516 |
}
|
517 |
|
|
|
518 |
echo "\n\t<style type=\"text/css\" media=\"all\">";
|
519 |
|
520 |
// Font family and font size
|
529 |
if(!$allow_multiline){
|
530 |
echo "\n\t\tul.dropdown { white-space: nowrap; }\n";
|
531 |
}
|
532 |
+
|
533 |
+
// Overlay support
|
534 |
+
$overlay = get_option('shailan_dm_overlay');
|
535 |
+
|
536 |
+
echo "/** Overlay: ". $overlay . " */";
|
537 |
+
|
538 |
+
if($overlay!='none' && $theme=='color-scheme' ){
|
539 |
+
$posvert = 0;
|
540 |
+
switch ( $overlay ) {
|
541 |
+
case "glass":
|
542 |
+
$posvert = 0;
|
543 |
+
break;
|
544 |
+
case "flat":
|
545 |
+
$posvert = -100;
|
546 |
+
break;
|
547 |
+
case "shadow":
|
548 |
+
$posvert = -200;
|
549 |
+
break;
|
550 |
+
case "soft":
|
551 |
+
$posvert = -300;
|
552 |
+
break;
|
553 |
+
}
|
554 |
+
|
555 |
+
?>
|
556 |
+
|
557 |
+
.shailan-dropdown-menu .dropdown-horizontal-container,
|
558 |
+
ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover,
|
559 |
+
ul.dropdown li.hover a, ul.dropdown li:hover a{ background-position:0px <?php echo $posvert; ?>px; }
|
560 |
+
|
561 |
+
<?php } elseif($overlay == 'none') { ?>
|
562 |
+
|
563 |
+
.shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover { background-image:none; }
|
564 |
+
|
565 |
+
<?php } else {}
|
566 |
+
|
567 |
+
// Custom colors support !! Use with caution !!
|
568 |
+
?>
|
569 |
+
|
570 |
+
.shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
|
571 |
+
ul.dropdown a:link,
|
572 |
+
ul.dropdown a:visited { color: <?php echo $shailan_dm_color_link; ?>; }
|
573 |
+
ul.dropdown a:hover { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
|
574 |
+
ul.dropdown a:active { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
|
575 |
+
|
576 |
+
ul.dropdown li.hover a, ul.dropdown li:hover a{ background-color: <?php echo $shailan_dm_color_lihover; ?>;
|
577 |
+
color: <?php echo $shailan_dm_color_hoverlink; ?>; }
|
578 |
+
ul.dropdown li.hover ul li, ul.dropdown li:hover ul li{ background-color: <?php echo $shailan_dm_color_menubg; ?>;
|
579 |
+
color: <?php echo $shailan_dm_color_link; ?>; }
|
580 |
+
|
581 |
+
ul.dropdown li.hover ul li.hover, ul.dropdown li:hover ul li:hover { background-image: none; }
|
582 |
+
ul.dropdown li.hover ul li.hover a, ul.dropdown li:hover ul li:hover a { background-color: <?php echo $shailan_dm_color_lihover; ?>; }
|
583 |
+
|
584 |
+
ul.dropdown ul{ background-image:none; background-color:<?php echo $shailan_dm_color_menubg; ?>; border:1px solid <?php echo $shailan_dm_color_menubg; ?>; }
|
585 |
+
ul.dropdown-vertical li { border-bottom:1px solid <?php echo $shailan_dm_color_lihover; ?>; }
|
586 |
+
|
587 |
+
<?php
|
588 |
|
589 |
// Custom css support
|
590 |
/* if($theme == 'custom'){ */
|
624 |
// add admin menu
|
625 |
add_action('admin_menu', array('shailan_DropdownWidget', 'adminMenu'));
|
626 |
|
|
|
|
|
|
|
627 |
/* Includes */
|
628 |
include('shailan-page-walker.php'); // Load custom page walker
|
629 |
include('shailan-category-walker.php'); // Load custom category walker
|
themes/color-scheme.css
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "UTF-8";
|
2 |
+
|
3 |
+
.shailan-dropdown-menu .dropdown-horizontal-container{ background-image:url('images/overlay.png'); }
|
4 |
+
|
5 |
+
ul.dropdown li a{padding:6px 12px;}
|
6 |
+
ul.dropdown li.hover, ul.dropdown li:hover { cursor: default; }
|
7 |
+
ul.dropdown ul { border:0 }
|
8 |
+
ul.dropdown ul ul { top: 1px; left: 100%; }
|
9 |
+
ul.dropdown-upward ul ul { /* bottom: 1px; */ }
|
10 |
+
ul.dropdown li { border:0; background-image:url('images/overlay.png'); background-color: transparent; text-align:center; }
|
11 |
+
|
12 |
+
/** Right align fix */
|
13 |
+
ul.dropdown-align-right li{ border-width: 0px 0px 0px 1px; }
|
14 |
+
|
15 |
+
/** Hover effect */
|
16 |
+
ul.dropdown li.hover, ul.dropdown li:hover { background-image:url('images/overlay.png'); }
|
17 |
+
ul.dropdown li.hover a, ul.dropdown li:hover a { background-image:url('images/overlay.png'); }
|
18 |
+
ul.dropdown li.hover ul li a, ul.dropdown li:hover ul li a{ background: transparent; }
|
19 |
+
|
20 |
+
/** Link colors */
|
21 |
+
ul.dropdown a:link,
|
22 |
+
ul.dropdown a:visited { color: #000; text-decoration: none; display:block; }
|
23 |
+
ul.dropdown a:hover { color: #000; }
|
24 |
+
ul.dropdown a:active { color: #ed008c; }
|
25 |
+
|
26 |
+
/** Sub menus */
|
27 |
+
ul.dropdown ul { margin-top: 0px; margin-left:-1px; border:none; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.496094); -moz-box-shadow:0 2px 5px rgba(40, 40, 40, 0.8) }
|
28 |
+
ul.dropdown ul li { text-align: left; border:none; }
|
29 |
+
ul.dropdown ul { margin:0px; padding:0px; }
|
30 |
+
ul.dropdown ul li a{ margin:2px; height:auto; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
|
31 |
+
ul.dropdown li.hover ul li a:hover, ul.dropdown li:hover ul li a:hover{ background-image:none; text-decoration:none; }
|
32 |
+
ul.dropdown ul li{ background-image: none; }
|
33 |
+
|
34 |
+
/** Current menu item */
|
35 |
+
li.current-cat a, li.current_page_item a, li.current-menu-item a,
|
36 |
+
li.current-cat a:link, li.current_page_item a:link, li.current-menu-item a:link,
|
37 |
+
li.current-cat a:visited, li.current_page_item a:visited, li.current-menu-item a:visited{ color: #ed008c; }
|
38 |
+
|
39 |
+
/** Not current fix */
|
40 |
+
li.current_page_item ul a, li.current_page_item ul a:visited, li.current_page_item ul a:link { color: #000; }
|
41 |
+
|
42 |
+
/** Ancestor */
|
43 |
+
li.current_page_ancestor a,li.current_page_ancestor a:visited, li.current_page_ancestor a:link {text-decoration:underline;}
|
44 |
+
li.current-menu-ancestor a,li.current-menu-ancestor a:visited, li.current-menu-ancestor a:link {text-decoration:underline;}
|
45 |
+
|
46 |
+
/** Not ancestor fix */
|
47 |
+
li.current_page_ancestor ul a, li.current_page_ancestor ul a:visited, li.current_page_ancestor ul a:link {text-decoration:none;}
|
48 |
+
li.current-menu-ancestor ul a,li.current-menu-ancestor ul a:visited, li.current-menu-ancestor ul a:link {text-decoration:none;}
|
49 |
+
|
50 |
+
/** Vertical menu support */
|
51 |
+
ul.dropdown-vertical{ min-width:160px; }
|
52 |
+
*html ul.dropdown-vertical{ width:160px; }
|
53 |
+
ul.dropdown-vertical li { border-bottom:1px solid #ddd; }
|
54 |
+
ul.dropdown-vertical ul { border-bottom:0px; }
|