Dropdown Menu Widget - Version 1.5.4

Version Description

  • Added first-child & last-child selector for styling to dropdown menu. (available when jquery is active only)
  • Fixed IE display errors for shiny black theme.
  • Fixed not saving issues with the plugin options.
Download this release

Release Info

Developer mattsay
Plugin Icon wp plugin Dropdown Menu Widget
Version 1.5.4
Comparing to
See all releases

Code changes from version 1.5.3 to 1.5.4

include.js CHANGED
@@ -7,5 +7,9 @@ jQuery(document).ready(function($) {
7
  }, function(){
8
  $(this).removeClass('hover');
9
  });
 
 
 
 
10
 
11
  });
7
  }, function(){
8
  $(this).removeClass('hover');
9
  });
10
+
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
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- global $pluginname, $shortname, $pluginoptions;
4
 
5
  $i=0;
6
 
@@ -217,14 +217,10 @@ tweetmeme_url = 'http://shailan.com/wordpress/plugins/dropdown-menu/'; tweetmeme
217
  <br class="clear">
218
 
219
  <input type="hidden" name="action" value="save" />
220
- </form>
221
 
222
- <!-- <form method="post">
223
- <p class="submit">
224
- <input name="reset" type="submit" value="Reset Options" />
225
- <input type="hidden" name="action" value="reset" />
226
- </p>
227
- </form> -->
228
 
229
  <p class="aligncenter">
230
  <a href="http://shailan.com/wordpress/plugins/dropdown-menu">Dropdown Menu <?php echo SHAILAN_DM_VERSION; ?></a> by <a href="http://shailan.com">shailan</a> &copy; 2010
1
  <?php
2
 
3
+ global $pluginname, $pluginoptions;
4
 
5
  $i=0;
6
 
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">
226
  <a href="http://shailan.com/wordpress/plugins/dropdown-menu">Dropdown Menu <?php echo SHAILAN_DM_VERSION; ?></a> by <a href="http://shailan.com">shailan</a> &copy; 2010
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
7
- Stable tag: 1.5.3
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,11 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
47
 
48
  == Changelog ==
49
 
 
 
 
 
 
50
  = 1.5.3 =
51
  * Made Custom CSS area available even when a theme is selected. You can now use this area for your theme customizations.
52
  * Fixed `Call undefined function wp_nav_menu on 365` error.
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.4
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.4 =
51
+ * Added first-child & last-child selector for styling to dropdown menu. (available when jquery is active only)
52
+ * Fixed IE display errors for shiny black theme.
53
+ * Fixed not saving issues with the plugin options.
54
+
55
  = 1.5.3 =
56
  * Made Custom CSS area available even when a theme is selected. You can now use this area for your theme customizations.
57
  * Fixed `Call undefined function wp_nav_menu on 365` error.
shailan.DropDownMenu.php CHANGED
@@ -3,13 +3,13 @@
3
  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
- Version: 1.5.3
7
  Author: Matt Say
8
  Author URI: http://shailan.com
9
  Text Domain: shailan-dropdown-menu
10
  */
11
 
12
- define('SHAILAN_DM_VERSION','1.5.3');
13
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
14
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
15
 
@@ -19,7 +19,7 @@ define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
19
  class shailan_DropdownWidget extends WP_Widget {
20
  /** constructor */
21
  function shailan_DropdownWidget() {
22
- global $pluginname, $shortname, $pluginoptions;
23
 
24
  $widget_ops = array('classname' => 'shailan-dropdown-menu', 'description' => __( 'Dropdown page/category menu', 'shailan-dropdown-menu' ) );
25
  $this->WP_Widget('dropdown-menu', __('Dropdown Menu', 'shailan-dropdown-menu'), $widget_ops);
@@ -87,14 +87,14 @@ class shailan_DropdownWidget extends WP_Widget {
87
 
88
  array( "name" => "Dropdown Menu Theme",
89
  "desc" => "Skin for the menu",
90
- "id" => $this->shortname."_active_theme",
91
  "std" => "None",
92
  "options" => $themes,
93
  "type" => "select"),
94
 
95
  array( "name" => "Rename Homepage",
96
  "desc" => "You can change your homepage link here",
97
- "id" => $this->shortname."_home_tag",
98
  "std" => __("Home"),
99
  "type" => "text"),
100
 
@@ -107,38 +107,38 @@ class shailan_DropdownWidget extends WP_Widget {
107
 
108
  array( "name" => "Menu Type",
109
  "desc" => "Dropdown Menu Type",
110
- "id" => $this->shortname."_type",
111
  "std" => "pages",
112
  "options" => $types,
113
  "type" => "select"),
114
 
115
  array( "name" => "Home link",
116
  "desc" => "If checked dropdown menu displays home link",
117
- "id" => $this->shortname."_home",
118
  "std" => true,
119
  "type" => "checkbox"),
120
 
121
  array( "name" => "Login",
122
  "desc" => "If checked dropdown menu displays login link",
123
- "id" => $this->shortname."_login",
124
  "std" => true,
125
  "type" => "checkbox"),
126
 
127
  array( "name" => "Register / Site Admin",
128
  "desc" => "If checked dropdown menu displays register/site admin link.",
129
- "id" => $this->shortname."_login",
130
  "std" => true,
131
  "type" => "checkbox"),
132
 
133
  array( "name" => "Vertical menu",
134
  "desc" => "If checked dropdown menu is displayed vertical.",
135
- "id" => $this->shortname."_vertical",
136
  "std" => true,
137
  "type" => "checkbox"),
138
 
139
  array( "name" => "Exclude Pages",
140
  "desc" => "Excluded page IDs.",
141
- "id" => $this->shortname."_exclude",
142
  "std" => "",
143
  "type" => "text"),
144
 
@@ -151,37 +151,37 @@ class shailan_DropdownWidget extends WP_Widget {
151
 
152
  array( "name" => "Wrap long menu items",
153
  "desc" => "If checked long menu items will wrap",
154
- "id" => $this->shortname."_allowmultiline",
155
  "type" => "checkbox"),
156
 
157
  array( "name" => "Dropdown Menu Font",
158
  "desc" => "Font family for the menu<br />Please leave blank to use your wordpress theme font.",
159
- "id" => $this->shortname."_font",
160
  "std" => '',
161
  "type" => "text"),
162
 
163
  array( "name" => "Dropdown Menu Font Size",
164
  "desc" => "Font size of the menu items (Eg: 12px OR 1em) <br />Please leave blank to use your wordpress theme font-size.",
165
- "id" => $this->shortname."_fontsize",
166
  "std" => '',
167
  "type" => "text"),
168
 
169
  array( "name" => "Custom css",
170
  "desc" => "You can paste your own customization file here.",
171
- "id" => $this->shortname."_custom_css",
172
  "std" => '',
173
  "type" => "textarea"),
174
 
175
  array( "name" => "Show Empty Categories",
176
  "desc" => "If checked categories with no posts will be shown.",
177
- "id" => $this->shortname."_show_empty",
178
  "std" => false,
179
  "type" => "checkbox"),
180
 
181
  /*
182
  array( "name" => "Use custom walkers",
183
  "desc" => "Custom walkers add more functionality for styling. <br />Some themes depend on this option.<br />Note: This option hides link titles.",
184
- "id" => $this->shortname."_customwalkers",
185
  "std" => false,
186
  "type" => "checkbox"),
187
  */
@@ -202,7 +202,7 @@ class shailan_DropdownWidget extends WP_Widget {
202
  );
203
 
204
  $pluginname = $this->pluginname;
205
- $shortname = $this->shortname;
206
  $pluginoptions = $this->admin_options;
207
 
208
  /** Unused options */
@@ -212,7 +212,7 @@ class shailan_DropdownWidget extends WP_Widget {
212
 
213
  // Add settings page
214
  function adminMenu(){
215
- global $pluginname, $shortname, $pluginoptions;
216
 
217
  wp_register_style('dropdownMenuStyles', WP_PLUGIN_URL . '/dropdown-menu-widget/admin.css');
218
 
@@ -240,7 +240,7 @@ class shailan_DropdownWidget extends WP_Widget {
240
  }
241
 
242
  function getOptionsPage(){
243
- global $pluginname, $shortname, $pluginoptions;
244
 
245
  $title = __('Dropdown Menu Options');
246
 
3
  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
+ Version: 1.5.4
7
  Author: Matt Say
8
  Author URI: http://shailan.com
9
  Text Domain: shailan-dropdown-menu
10
  */
11
 
12
+ define('SHAILAN_DM_VERSION','1.5.4');
13
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
14
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
15
 
19
  class shailan_DropdownWidget extends WP_Widget {
20
  /** constructor */
21
  function shailan_DropdownWidget() {
22
+ global $pluginname, $pluginshortname, $pluginoptions;
23
 
24
  $widget_ops = array('classname' => 'shailan-dropdown-menu', 'description' => __( 'Dropdown page/category menu', 'shailan-dropdown-menu' ) );
25
  $this->WP_Widget('dropdown-menu', __('Dropdown Menu', 'shailan-dropdown-menu'), $widget_ops);
87
 
88
  array( "name" => "Dropdown Menu Theme",
89
  "desc" => "Skin for the menu",
90
+ "id" => "shailan_dm_active_theme",
91
  "std" => "None",
92
  "options" => $themes,
93
  "type" => "select"),
94
 
95
  array( "name" => "Rename Homepage",
96
  "desc" => "You can change your homepage link here",
97
+ "id" => "shailan_dm_home_tag",
98
  "std" => __("Home"),
99
  "type" => "text"),
100
 
107
 
108
  array( "name" => "Menu Type",
109
  "desc" => "Dropdown Menu Type",
110
+ "id" => "shailan_dm_type",
111
  "std" => "pages",
112
  "options" => $types,
113
  "type" => "select"),
114
 
115
  array( "name" => "Home link",
116
  "desc" => "If checked dropdown menu displays home link",
117
+ "id" => "shailan_dm_home",
118
  "std" => true,
119
  "type" => "checkbox"),
120
 
121
  array( "name" => "Login",
122
  "desc" => "If checked dropdown menu displays login link",
123
+ "id" => "shailan_dm_login",
124
  "std" => true,
125
  "type" => "checkbox"),
126
 
127
  array( "name" => "Register / Site Admin",
128
  "desc" => "If checked dropdown menu displays register/site admin link.",
129
+ "id" => "shailan_dm_login",
130
  "std" => true,
131
  "type" => "checkbox"),
132
 
133
  array( "name" => "Vertical menu",
134
  "desc" => "If checked dropdown menu is displayed vertical.",
135
+ "id" => "shailan_dm_vertical",
136
  "std" => true,
137
  "type" => "checkbox"),
138
 
139
  array( "name" => "Exclude Pages",
140
  "desc" => "Excluded page IDs.",
141
+ "id" => "shailan_dm_exclude",
142
  "std" => "",
143
  "type" => "text"),
144
 
151
 
152
  array( "name" => "Wrap long menu items",
153
  "desc" => "If checked long menu items will wrap",
154
+ "id" => "shailan_dm_allowmultiline",
155
  "type" => "checkbox"),
156
 
157
  array( "name" => "Dropdown Menu Font",
158
  "desc" => "Font family for the menu<br />Please leave blank to use your wordpress theme font.",
159
+ "id" => "shailan_dm_font",
160
  "std" => '',
161
  "type" => "text"),
162
 
163
  array( "name" => "Dropdown Menu Font Size",
164
  "desc" => "Font size of the menu items (Eg: 12px OR 1em) <br />Please leave blank to use your wordpress theme font-size.",
165
+ "id" => "shailan_dm_fontsize",
166
  "std" => '',
167
  "type" => "text"),
168
 
169
  array( "name" => "Custom css",
170
  "desc" => "You can paste your own customization file here.",
171
+ "id" => "shailan_dm_custom_css",
172
  "std" => '',
173
  "type" => "textarea"),
174
 
175
  array( "name" => "Show Empty Categories",
176
  "desc" => "If checked categories with no posts will be shown.",
177
+ "id" => "shailan_dm_show_empty",
178
  "std" => false,
179
  "type" => "checkbox"),
180
 
181
  /*
182
  array( "name" => "Use custom walkers",
183
  "desc" => "Custom walkers add more functionality for styling. <br />Some themes depend on this option.<br />Note: This option hides link titles.",
184
+ "id" => "shailan_dm_customwalkers",
185
  "std" => false,
186
  "type" => "checkbox"),
187
  */
202
  );
203
 
204
  $pluginname = $this->pluginname;
205
+ $pluginshortname = $this->shortname;
206
  $pluginoptions = $this->admin_options;
207
 
208
  /** Unused options */
212
 
213
  // Add settings page
214
  function adminMenu(){
215
+ global $pluginname, $pluginshortname, $pluginoptions;
216
 
217
  wp_register_style('dropdownMenuStyles', WP_PLUGIN_URL . '/dropdown-menu-widget/admin.css');
218
 
240
  }
241
 
242
  function getOptionsPage(){
243
+ global $pluginname, $pluginshortname, $pluginoptions;
244
 
245
  $title = __('Dropdown Menu Options');
246
 
themes/images/overlay.png ADDED
Binary file
themes/shiny-black.css CHANGED
@@ -1,17 +1,21 @@
1
  @charset "UTF-8";
2
 
3
  /** Container */
4
- .shailan-dropdown-menu .dropdown-horizontal-container{ background:#000 url(images/shiny-black/menu_bg.jpg) repeat-x; height:31px; }
5
 
6
  ul.dropdown{ background-color:transparent;
7
  border-width:0px;
8
- padding:0px; }
9
- ul.dropdown li{ display:block; margin:0px; }
10
- ul.dropdown li a{ margin-left:25px; display:block; height:23px; vertical-align:middle; text-align:center; text-decoration:none; padding:8px 25px 0px 0px; font:normal 11px Tahoma; color: #fff; text-decoration:none; }
11
 
12
  ul.dropdown li.hover, ul.dropdown li:hover { cursor: default; }
13
 
14
  ul.dropdown ul { border-bottom:1px solid #ddd; }
 
 
 
 
15
  ul.dropdown ul ul { top: 1px; left: 99%; }
16
  ul.dropdown-upward ul ul { /* bottom: 1px; */ }
17
 
@@ -19,19 +23,19 @@ ul.dropdown-upward ul ul { /* bottom: 1px; */ }
19
  ul.dropdown-align-right li{ border-width: 0px 0px 0px 1px; }
20
 
21
  /** Hover effect */
22
- ul.dropdown li.hover, ul.dropdown li:hover { background: url(images/shiny-black/button_active.gif) top left no-repeat; color: #7dbbc6; }
23
- ul.dropdown li.hover a, ul.dropdown li:hover a{ background: url(images/shiny-black/button_active2.gif) top right no-repeat; color: #7dbbc6; }
24
  ul.dropdown li.hover ul li a, ul.dropdown li:hover ul li a{ background: transparent; }
25
 
26
  /** Link colors */
27
  ul.dropdown a:link,
28
- ul.dropdown a:visited { color: #7dbbc6; text-decoration: none; display:block; }
29
  ul.dropdown a:hover { color: #7dbbc6; }
30
  ul.dropdown a:active { color: #fff; }
31
 
32
  /** Sub menus */
33
  ul.dropdown ul { margin:0px; padding:0px; background:#fff; border:1px solid #808080; }
34
- ul.dropdown ul li a, ul.dropdown ul li.hover a{ color:#444; border:1px solid #fff; width:auto; min-width:100px; padding:2px; margin:2px; height:auto; }
35
  ul.dropdown li.hover ul li a:hover, ul.dropdown li:hover ul li a:hover{ background-image:none; color:#444; border:1px solid #45ADE4; background-color:#DBF0F9; font:normal 11px Tahoma; text-decoration:none; }
36
  ul.dropdown ul li.hover, ul.dropdown ul li:hover { background: transparent; }
37
 
@@ -53,6 +57,6 @@ li.current-menu-ancestor ul a,li.current-menu-ancestor ul a:visited, li.current-
53
 
54
  /** Vertical menu support */
55
  ul.dropdown-vertical{ min-width:160px; }
56
- ul.dropdown-vertical li { background:#000 url(images/shiny-black/menu_bg.jpg) repeat-x; height:30px; }
57
  ul.dropdown-vertical ul { border-bottom:0px; }
58
 
1
  @charset "UTF-8";
2
 
3
  /** Container */
4
+ .shailan-dropdown-menu .dropdown-horizontal-container{ background:#000 url('images/shiny-black/menu_bg.jpg') repeat-x; height:31px; }
5
 
6
  ul.dropdown{ background-color:transparent;
7
  border-width:0px;
8
+ padding:0px; }
9
+ ul.dropdown li{ margin:0px; display:inline; zoom:1; line-height:30px; }
10
+ ul.dropdown li a{ display:block; margin-left:25px; line-height:30px; vertical-align:middle; text-align:center; text-decoration:none; padding:8px 25px 8px 0px; font:normal 11px Tahoma; color: #fff; text-decoration:none; }
11
 
12
  ul.dropdown li.hover, ul.dropdown li:hover { cursor: default; }
13
 
14
  ul.dropdown ul { border-bottom:1px solid #ddd; }
15
+ *html ul.dropdown ul{width:100px;}
16
+ ul.dropdown ul li{display:block; text-align:left;}
17
+ ul.dropdown ul li a{min-width:100px;}
18
+ *html ul.dropdown ul li a{width:100px;}
19
  ul.dropdown ul ul { top: 1px; left: 99%; }
20
  ul.dropdown-upward ul ul { /* bottom: 1px; */ }
21
 
23
  ul.dropdown-align-right li{ border-width: 0px 0px 0px 1px; }
24
 
25
  /** Hover effect */
26
+ ul.dropdown li.hover, ul.dropdown li:hover { background: url('images/shiny-black/button_active.gif') top left no-repeat; color: #7dbbc6; }
27
+ ul.dropdown li.hover a, ul.dropdown li:hover a{ background: url('images/shiny-black/button_active2.gif') top right no-repeat; color: #7dbbc6; }
28
  ul.dropdown li.hover ul li a, ul.dropdown li:hover ul li a{ background: transparent; }
29
 
30
  /** Link colors */
31
  ul.dropdown a:link,
32
+ ul.dropdown a:visited { color: #7dbbc6; text-decoration: none; }
33
  ul.dropdown a:hover { color: #7dbbc6; }
34
  ul.dropdown a:active { color: #fff; }
35
 
36
  /** Sub menus */
37
  ul.dropdown ul { margin:0px; padding:0px; background:#fff; border:1px solid #808080; }
38
+ ul.dropdown ul li a{ color:#444; border:1px solid #fff; padding:2px; margin:2px; height:auto; }
39
  ul.dropdown li.hover ul li a:hover, ul.dropdown li:hover ul li a:hover{ background-image:none; color:#444; border:1px solid #45ADE4; background-color:#DBF0F9; font:normal 11px Tahoma; text-decoration:none; }
40
  ul.dropdown ul li.hover, ul.dropdown ul li:hover { background: transparent; }
41
 
57
 
58
  /** Vertical menu support */
59
  ul.dropdown-vertical{ min-width:160px; }
60
+ ul.dropdown-vertical li { background:#000 url('images/shiny-black/menu_bg.jpg') repeat-x; height:30px; }
61
  ul.dropdown-vertical ul { border-bottom:0px; }
62