Version Description
- Added hooks for inserting your own menu & other navigational elements.
- Fixed z-index errors.
- Fixed background problem with custom theme selection.
- Added "include archives" option to Dropdown-Multi widget.
Download this release
Release Info
Developer | mattsay |
Plugin | Dropdown Menu Widget |
Version | 1.5.6beta |
Comparing to | |
See all releases |
Code changes from version 1.5.6alpha1 to 1.5.6beta
- readme.txt +7 -1
- shailan-dropdown.css +11 -3
- shailan-multi-dropdown.php +63 -69
- shailan.DropDownMenu.php +13 -8
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.
|
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,12 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
|
|
47 |
|
48 |
== Changelog ==
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
= 1.5.6alpha1 =
|
51 |
* Fixed sub menu display errors.
|
52 |
* Added alignment option to template tag support.
|
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.6beta
|
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.6beta =
|
51 |
+
* Added hooks for inserting your own menu & other navigational elements.
|
52 |
+
* Fixed z-index errors.
|
53 |
+
* Fixed background problem with custom theme selection.
|
54 |
+
* Added "include archives" option to Dropdown-Multi widget.
|
55 |
+
|
56 |
= 1.5.6alpha1 =
|
57 |
* Fixed sub menu display errors.
|
58 |
* Added alignment option to template tag support.
|
shailan-dropdown.css
CHANGED
@@ -3,13 +3,21 @@
|
|
3 |
/** Remove list styling */
|
4 |
ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
* html ul.dropdown, * html ul.dropdown li.hover, * html ul.dropdown li:hover { display:inline; zoom:1; } /** Added as IE fix */
|
8 |
ul.dropdown li { float: left; vertical-align: middle; zoom: 1; }
|
9 |
* html ul.dropdown li {display:inline;} /** Added as IE fix */
|
10 |
ul.dropdown li a{ padding: .3em .8em; }
|
11 |
-
ul.dropdown li.hover, ul.dropdown li:hover{
|
12 |
-
ul.dropdown ul {
|
13 |
ul.dropdown ul li { float: none; }
|
14 |
ul.dropdown ul ul { top: 1px; left: 99%; }
|
15 |
|
3 |
/** Remove list styling */
|
4 |
ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
|
5 |
|
6 |
+
/** z-indexes */
|
7 |
+
ul.dropdown { position: relative; /* z-index: 596;*/ }
|
8 |
+
ul.dropdown ul { position:absolute; z-index: 597; }
|
9 |
+
ul.dropdown ul li { position:relative; z-index: 598; }
|
10 |
+
ul.dropdown li.hover,
|
11 |
+
ul.dropdown li:hover{ position: relative; /* z-index: 598; */ }
|
12 |
+
|
13 |
+
/** Basic dropdown */
|
14 |
+
ul.dropdown { /*float: left; display:inline;*/ }
|
15 |
* html ul.dropdown, * html ul.dropdown li.hover, * html ul.dropdown li:hover { display:inline; zoom:1; } /** Added as IE fix */
|
16 |
ul.dropdown li { float: left; vertical-align: middle; zoom: 1; }
|
17 |
* html ul.dropdown li {display:inline;} /** Added as IE fix */
|
18 |
ul.dropdown li a{ padding: .3em .8em; }
|
19 |
+
ul.dropdown li.hover, ul.dropdown li:hover{ cursor: default; }
|
20 |
+
ul.dropdown ul { position: absolute; top: 100%; left: 0; display: none; }
|
21 |
ul.dropdown ul li { float: none; }
|
22 |
ul.dropdown ul ul { top: 1px; left: 99%; }
|
23 |
|
shailan-multi-dropdown.php
CHANGED
@@ -3,67 +3,56 @@
|
|
3 |
class shailan_MultiDropDown extends WP_Widget {
|
4 |
/** constructor */
|
5 |
function shailan_MultiDropDown() {
|
6 |
-
$widget_ops = array('classname' => 'shailan-multi-dropdown', 'description' => __( 'Dropdown page & category menu', 'shailan-dropdown-menu' ) );
|
7 |
$this->WP_Widget('multi-dropdown-menu', __('Dropdown Multi', 'shailan-multi-dropdown'), $widget_ops);
|
8 |
$this->alt_option_name = 'widget_multi_dropdown';
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
}
|
11 |
|
12 |
/** @see WP_Widget::widget */
|
13 |
function widget($args, $instance) {
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
$include_pages = (bool) $instance['pages'];
|
18 |
-
$include_categories = (bool) $instance['categories'];
|
19 |
-
$include_links = (bool) $instance['links'];
|
20 |
-
|
21 |
-
$exclude = $instance['exclude'];
|
22 |
-
|
23 |
-
$inline_style = $instance['style'];
|
24 |
-
|
25 |
-
$home = (bool) $instance['home'];
|
26 |
-
$login = (bool) $instance['login'];
|
27 |
-
$admin = (bool) $instance['admin'];
|
28 |
-
|
29 |
-
$vertical = (bool) $instance['vertical'];
|
30 |
-
|
31 |
-
$align = $instance['align'];
|
32 |
|
33 |
$orientation = ($vertical ? 'dropdown-vertical' : 'dropdown-horizontal');
|
34 |
|
35 |
-
$custom_walkers = (bool) get_option('shailan_dm_customwalkers');
|
36 |
-
|
37 |
|
38 |
?>
|
39 |
<?php echo $before_widget; ?>
|
40 |
|
41 |
-
<div id="shailan-dropdown-wrapper-<?php echo $this->number; ?>"
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
break;
|
47 |
-
case 'center':
|
48 |
-
echo ' align="center"';
|
49 |
-
break;
|
50 |
-
|
51 |
-
case 'left':
|
52 |
-
default:
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
?>>
|
57 |
<table cellpadding="0" cellspacing="0">
|
58 |
<tr><td>
|
59 |
<ul class="dropdown <?php echo $orientation; ?>">
|
60 |
|
|
|
|
|
61 |
<?php if($home){ ?>
|
62 |
<li class="page_item cat-item blogtab <?php if ( is_front_page() && !is_paged() ){ ?>current_page_item current-cat<?php } ?>"><a href="<?php echo get_option('home'); ?>/"><span><?php _e('Home', 'shailan-dropdown-menu'); ?></span></a></li>
|
63 |
<?php } ?>
|
64 |
-
|
65 |
|
66 |
-
<?php if($
|
67 |
|
68 |
<?php if($custom_walkers){
|
69 |
$page_walker = new shailan_PageWalker();
|
@@ -83,7 +72,7 @@ class shailan_MultiDropDown extends WP_Widget {
|
|
83 |
));
|
84 |
} ?>
|
85 |
|
86 |
-
<?php }; if($
|
87 |
|
88 |
<?php
|
89 |
if($custom_walkers){
|
@@ -106,7 +95,7 @@ class shailan_MultiDropDown extends WP_Widget {
|
|
106 |
|
107 |
<?php }; ?>
|
108 |
|
109 |
-
<?php if($
|
110 |
<li> <a href="#"><span>Links</span></a>
|
111 |
<ul>
|
112 |
<?php wp_list_bookmarks('title_li=&category_before=&category_after=&categorize=0'); ?>
|
@@ -114,11 +103,26 @@ class shailan_MultiDropDown extends WP_Widget {
|
|
114 |
</li>
|
115 |
<?php } ?>
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
<?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
|
118 |
|
119 |
</ul></td>
|
120 |
</tr></table>
|
121 |
</div>
|
|
|
|
|
|
|
122 |
</div>
|
123 |
<?php echo $after_widget; ?>
|
124 |
<?php
|
@@ -132,54 +136,44 @@ class shailan_MultiDropDown extends WP_Widget {
|
|
132 |
/** @see WP_Widget::form */
|
133 |
function form($instance) {
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
$
|
138 |
-
$include_categories = (bool) $instance['categories'];
|
139 |
-
$include_links = (bool) $instance['links'];
|
140 |
-
|
141 |
-
$exclude = $instance['exclude'];
|
142 |
-
|
143 |
-
$inline_style = $instance['style'];
|
144 |
-
|
145 |
-
$home = (bool) $instance['home'];
|
146 |
-
$login = (bool) $instance['login'];
|
147 |
-
$admin = (bool) $instance['admin'];
|
148 |
-
|
149 |
-
$vertical = (bool) $instance['vertical'];
|
150 |
-
|
151 |
-
$align = $instance['align'];
|
152 |
|
153 |
?>
|
154 |
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (won\'t be shown):', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
|
155 |
|
156 |
<p> Includes: <br/>
|
157 |
-
|
|
|
|
|
|
|
|
|
158 |
<label for="<?php echo $this->get_field_id('pages'); ?>"><?php _e( 'Pages' , 'shailan-dropdown-menu' ); ?></label><br />
|
159 |
|
160 |
-
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('categories'); ?>" name="<?php echo $this->get_field_name('categories'); ?>"<?php checked( $
|
161 |
<label for="<?php echo $this->get_field_id('categories'); ?>"><?php _e( 'Categories' , 'shailan-dropdown-menu' ); ?></label><br />
|
162 |
|
163 |
-
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('links'); ?>" name="<?php echo $this->get_field_name('links'); ?>"<?php checked( $
|
164 |
<label for="<?php echo $this->get_field_id('links'); ?>"><?php _e( 'Links' , 'shailan-dropdown-menu' ); ?></label><br />
|
165 |
|
166 |
-
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('
|
167 |
-
<label for="<?php echo $this->get_field_id('
|
168 |
-
|
|
|
|
|
169 |
<label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Login/logout' , 'shailan-dropdown-menu' ); ?></label><br />
|
170 |
-
|
|
|
171 |
<label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Register/Site Admin' , 'shailan-dropdown-menu' ); ?></label>
|
172 |
</p>
|
173 |
|
174 |
<p>
|
175 |
-
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( $vertical ); ?> />
|
176 |
<label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu' , 'shailan-dropdown-menu' ); ?></label>
|
177 |
</p>
|
178 |
|
179 |
<p><?php _e('Align:', 'shailan-dropdown-menu'); ?> <label for="left"><input type="radio" id="left" name="<?php echo $this->get_field_name('align'); ?>" value="left" <?php if($align=='left'){ echo 'checked="checked"'; } ?> /> <?php _e('Left', 'shailan-dropdown-menu'); ?></label> <label for="center"><input type="radio" id="center" name="<?php echo $this->get_field_name('align'); ?>" value="center" <?php if($align=='center'){ echo 'checked="checked"'; } ?>/> <?php _e('Center', 'shailan-dropdown-menu'); ?></label> <label for="right"><input type="radio" id="right" name="<?php echo $this->get_field_name('align'); ?>" value="right" <?php if($align=='right'){ echo 'checked="checked"'; } ?>/> <?php _e('Right', 'shailan-dropdown-menu'); ?></label></p>
|
180 |
-
|
181 |
-
<p><label for="<?php echo $this->get_field_id('style'); ?>"><?php _e('Inline Style:', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('style'); ?>" name="<?php echo $this->get_field_name('style'); ?>" type="text" value="<?php echo $inline_style; ?>" /></label><br />
|
182 |
-
<small><?php _e('Applied to menu container <div>.', 'shailan-dropdown-menu'); ?></small></p>
|
183 |
|
184 |
<div class="widget-control-actions alignright">
|
185 |
<p><small><a href="options-general.php?page=dropdown-menu"><?php esc_attr_e('Menu Style', 'shailan-dropdown-menu'); ?></a> | <a href="http://shailan.com/wordpress/plugins/dropdown-menu"><?php esc_attr_e('Visit plugin site', 'shailan-dropdown-menu'); ?></a></small></p>
|
3 |
class shailan_MultiDropDown extends WP_Widget {
|
4 |
/** constructor */
|
5 |
function shailan_MultiDropDown() {
|
6 |
+
$widget_ops = array('classname' => 'shailan-dropdown-menu shailan-multi-dropdown', 'description' => __( 'Dropdown page & category menu', 'shailan-dropdown-menu' ) );
|
7 |
$this->WP_Widget('multi-dropdown-menu', __('Dropdown Multi', 'shailan-multi-dropdown'), $widget_ops);
|
8 |
$this->alt_option_name = 'widget_multi_dropdown';
|
9 |
|
10 |
+
$this->defaults = array(
|
11 |
+
'title' => '',
|
12 |
+
'pages' => false,
|
13 |
+
'categories' => false,
|
14 |
+
'links' => false,
|
15 |
+
'archives' => false,
|
16 |
+
'exclude' => '',
|
17 |
+
'home' => false,
|
18 |
+
'login' => false,
|
19 |
+
'admin' => false,
|
20 |
+
'vertical' => false,
|
21 |
+
'align' => 'left'
|
22 |
+
);
|
23 |
+
|
24 |
}
|
25 |
|
26 |
/** @see WP_Widget::widget */
|
27 |
function widget($args, $instance) {
|
28 |
+
extract( $args );
|
29 |
+
$widget_options = wp_parse_args( $instance, $this->defaults );
|
30 |
+
extract( $widget_options, EXTR_SKIP );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
$orientation = ($vertical ? 'dropdown-vertical' : 'dropdown-horizontal');
|
33 |
|
34 |
+
$custom_walkers = false; //(bool) get_option('shailan_dm_customwalkers');
|
35 |
+
//$custom_walkers = !$custom_walkers;
|
36 |
|
37 |
?>
|
38 |
<?php echo $before_widget; ?>
|
39 |
|
40 |
+
<div id="shailan-dropdown-wrapper-<?php echo $this->number; ?>">
|
41 |
+
|
42 |
+
<?php do_action('dropdown_before');
|
43 |
+
echo '<div align="' . $align . '" class="'.$orientation.'-container dm-align-'.$align.'">';
|
44 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
<table cellpadding="0" cellspacing="0">
|
46 |
<tr><td>
|
47 |
<ul class="dropdown <?php echo $orientation; ?>">
|
48 |
|
49 |
+
<?php do_action('dropdown_list_before'); ?>
|
50 |
+
|
51 |
<?php if($home){ ?>
|
52 |
<li class="page_item cat-item blogtab <?php if ( is_front_page() && !is_paged() ){ ?>current_page_item current-cat<?php } ?>"><a href="<?php echo get_option('home'); ?>/"><span><?php _e('Home', 'shailan-dropdown-menu'); ?></span></a></li>
|
53 |
<?php } ?>
|
|
|
54 |
|
55 |
+
<?php if($pages){ ?>
|
56 |
|
57 |
<?php if($custom_walkers){
|
58 |
$page_walker = new shailan_PageWalker();
|
72 |
));
|
73 |
} ?>
|
74 |
|
75 |
+
<?php }; if($categories){ ?>
|
76 |
|
77 |
<?php
|
78 |
if($custom_walkers){
|
95 |
|
96 |
<?php }; ?>
|
97 |
|
98 |
+
<?php if($links){ ?>
|
99 |
<li> <a href="#"><span>Links</span></a>
|
100 |
<ul>
|
101 |
<?php wp_list_bookmarks('title_li=&category_before=&category_after=&categorize=0'); ?>
|
103 |
</li>
|
104 |
<?php } ?>
|
105 |
|
106 |
+
<?php if($archives){ ?>
|
107 |
+
<li> <a href="#"><span>Archives</span></a>
|
108 |
+
<ul>
|
109 |
+
<?php
|
110 |
+
$args = array();
|
111 |
+
wp_get_archives( $args ); ?>
|
112 |
+
</ul>
|
113 |
+
</li>
|
114 |
+
<?php } ?>
|
115 |
+
|
116 |
+
<?php do_action('dropdown_list_after'); ?>
|
117 |
+
|
118 |
<?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
|
119 |
|
120 |
</ul></td>
|
121 |
</tr></table>
|
122 |
</div>
|
123 |
+
|
124 |
+
<?php do_action('dropdown_after'); ?>
|
125 |
+
|
126 |
</div>
|
127 |
<?php echo $after_widget; ?>
|
128 |
<?php
|
136 |
/** @see WP_Widget::form */
|
137 |
function form($instance) {
|
138 |
|
139 |
+
extract( $instance );
|
140 |
+
$widget_options = wp_parse_args( $instance, $this->defaults );
|
141 |
+
extract( $widget_options, EXTR_SKIP );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
?>
|
144 |
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (won\'t be shown):', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
|
145 |
|
146 |
<p> Includes: <br/>
|
147 |
+
|
148 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('home'); ?>" name="<?php echo $this->get_field_name('home'); ?>"<?php checked( (bool) $home ); ?> />
|
149 |
+
<label for="<?php echo $this->get_field_id('home'); ?>"><?php _e( 'Homepage link' , 'shailan-dropdown-menu' ); ?></label><br />
|
150 |
+
|
151 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('pages'); ?>" name="<?php echo $this->get_field_name('pages'); ?>"<?php checked( (bool) $pages ); ?> />
|
152 |
<label for="<?php echo $this->get_field_id('pages'); ?>"><?php _e( 'Pages' , 'shailan-dropdown-menu' ); ?></label><br />
|
153 |
|
154 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('categories'); ?>" name="<?php echo $this->get_field_name('categories'); ?>"<?php checked( (bool) $categories ); ?> />
|
155 |
<label for="<?php echo $this->get_field_id('categories'); ?>"><?php _e( 'Categories' , 'shailan-dropdown-menu' ); ?></label><br />
|
156 |
|
157 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('links'); ?>" name="<?php echo $this->get_field_name('links'); ?>"<?php checked( (bool) $links ); ?> />
|
158 |
<label for="<?php echo $this->get_field_id('links'); ?>"><?php _e( 'Links' , 'shailan-dropdown-menu' ); ?></label><br />
|
159 |
|
160 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>"<?php checked( (bool) $archives ); ?> />
|
161 |
+
<label for="<?php echo $this->get_field_id('archives'); ?>"><?php _e( 'Archives' , 'shailan-dropdown-menu' ); ?></label><br />
|
162 |
+
|
163 |
+
|
164 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( (bool) $login ); ?> />
|
165 |
<label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Login/logout' , 'shailan-dropdown-menu' ); ?></label><br />
|
166 |
+
|
167 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( (bool) $admin ); ?> />
|
168 |
<label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Register/Site Admin' , 'shailan-dropdown-menu' ); ?></label>
|
169 |
</p>
|
170 |
|
171 |
<p>
|
172 |
+
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( (bool) $vertical ); ?> />
|
173 |
<label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu' , 'shailan-dropdown-menu' ); ?></label>
|
174 |
</p>
|
175 |
|
176 |
<p><?php _e('Align:', 'shailan-dropdown-menu'); ?> <label for="left"><input type="radio" id="left" name="<?php echo $this->get_field_name('align'); ?>" value="left" <?php if($align=='left'){ echo 'checked="checked"'; } ?> /> <?php _e('Left', 'shailan-dropdown-menu'); ?></label> <label for="center"><input type="radio" id="center" name="<?php echo $this->get_field_name('align'); ?>" value="center" <?php if($align=='center'){ echo 'checked="checked"'; } ?>/> <?php _e('Center', 'shailan-dropdown-menu'); ?></label> <label for="right"><input type="radio" id="right" name="<?php echo $this->get_field_name('align'); ?>" value="right" <?php if($align=='right'){ echo 'checked="checked"'; } ?>/> <?php _e('Right', 'shailan-dropdown-menu'); ?></label></p>
|
|
|
|
|
|
|
177 |
|
178 |
<div class="widget-control-actions alignright">
|
179 |
<p><small><a href="options-general.php?page=dropdown-menu"><?php esc_attr_e('Menu Style', 'shailan-dropdown-menu'); ?></a> | <a href="http://shailan.com/wordpress/plugins/dropdown-menu"><?php esc_attr_e('Visit plugin site', 'shailan-dropdown-menu'); ?></a></small></p>
|
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 |
|
@@ -372,7 +372,7 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
372 |
|
373 |
switch ( $type ) {
|
374 |
|
375 |
-
|
376 |
case "pages":
|
377 |
|
378 |
if($custom_walkers){
|
@@ -512,6 +512,7 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
512 |
$theme = get_option('shailan_dm_active_theme');
|
513 |
$allow_multiline = (bool) get_option('shailan_dm_allowmultiline');
|
514 |
// Colors
|
|
|
515 |
$shailan_dm_color_menubg = get_option('shailan_dm_color_menubg');
|
516 |
$shailan_dm_color_lihover = get_option('shailan_dm_color_lihover');
|
517 |
$shailan_dm_color_link = get_option('shailan_dm_color_link');
|
@@ -541,9 +542,11 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
541 |
echo $indent. "ul.dropdown { white-space: nowrap; }";
|
542 |
}
|
543 |
|
|
|
|
|
|
|
544 |
// Overlay support
|
545 |
$overlay = get_option('shailan_dm_overlay');
|
546 |
-
|
547 |
echo $indent . "/* Selected overlay: ". $overlay . " */";
|
548 |
|
549 |
if($overlay!='none' && $theme=='color-scheme' ){
|
@@ -571,7 +574,8 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
571 |
ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover{ background-position:0px <?php echo $posvert; ?>px; }
|
572 |
ul.dropdown li.hover a, ul.dropdown li:hover a{ background-position:0px <?php echo $apos; ?>px; }
|
573 |
<?php } elseif($overlay == 'none') { ?>
|
574 |
-
|
|
|
575 |
<?php } else {/* unidentified overlay */} ?>
|
576 |
|
577 |
.shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
|
@@ -591,12 +595,13 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
591 |
ul.dropdown-vertical li { border-bottom:1px solid <?php echo $shailan_dm_color_lihover; ?>; }
|
592 |
<?php
|
593 |
|
594 |
-
//
|
595 |
-
|
|
|
596 |
$custom_css = stripslashes(get_option('shailan_dm_custom_css'));
|
597 |
if(!empty($custom_css)){ echo $custom_css; }
|
598 |
-
/*}*/
|
599 |
echo "\n</style>";
|
|
|
600 |
/*
|
601 |
echo "\n\t<!--[if lte IE 7]>";
|
602 |
echo "\n\t<style type=\"text/css\" media=\"screen\">";
|
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.6beta
|
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.6beta');
|
14 |
define('SHAILAN_DM_TITLE', 'Dropdown Menu');
|
15 |
define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
|
16 |
|
372 |
|
373 |
switch ( $type ) {
|
374 |
|
375 |
+
/** Pages menu */
|
376 |
case "pages":
|
377 |
|
378 |
if($custom_walkers){
|
512 |
$theme = get_option('shailan_dm_active_theme');
|
513 |
$allow_multiline = (bool) get_option('shailan_dm_allowmultiline');
|
514 |
// Colors
|
515 |
+
$custom_colors = (bool) get_option('shailan_dm_custom_colors');
|
516 |
$shailan_dm_color_menubg = get_option('shailan_dm_color_menubg');
|
517 |
$shailan_dm_color_lihover = get_option('shailan_dm_color_lihover');
|
518 |
$shailan_dm_color_link = get_option('shailan_dm_color_link');
|
542 |
echo $indent. "ul.dropdown { white-space: nowrap; }";
|
543 |
}
|
544 |
|
545 |
+
if($custom_colors){
|
546 |
+
// Custom color scheme is active
|
547 |
+
|
548 |
// Overlay support
|
549 |
$overlay = get_option('shailan_dm_overlay');
|
|
|
550 |
echo $indent . "/* Selected overlay: ". $overlay . " */";
|
551 |
|
552 |
if($overlay!='none' && $theme=='color-scheme' ){
|
574 |
ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover{ background-position:0px <?php echo $posvert; ?>px; }
|
575 |
ul.dropdown li.hover a, ul.dropdown li:hover a{ background-position:0px <?php echo $apos; ?>px; }
|
576 |
<?php } elseif($overlay == 'none') { ?>
|
577 |
+
/* Clear background images */
|
578 |
+
.shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover, ul.dropdown li.hover a, ul.dropdown li:hover a { background-image:none; }
|
579 |
<?php } else {/* unidentified overlay */} ?>
|
580 |
|
581 |
.shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
|
595 |
ul.dropdown-vertical li { border-bottom:1px solid <?php echo $shailan_dm_color_lihover; ?>; }
|
596 |
<?php
|
597 |
|
598 |
+
} // if($custom_colors)
|
599 |
+
|
600 |
+
// Insert Custom CSS last
|
601 |
$custom_css = stripslashes(get_option('shailan_dm_custom_css'));
|
602 |
if(!empty($custom_css)){ echo $custom_css; }
|
|
|
603 |
echo "\n</style>";
|
604 |
+
|
605 |
/*
|
606 |
echo "\n\t<!--[if lte IE 7]>";
|
607 |
echo "\n\t<style type=\"text/css\" media=\"screen\">";
|