Dropdown Menu Widget - Version 1.0.0

Version Description

Download this release

Release Info

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

Code changes from version 0.4.3 to 1.0.0

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://shailan.com/donate
4
  Tags: css, dropdown, menu, widget, pages, categories
5
  Requires at least: 2.5
6
  Tested up to: 2.8.6
7
- Stable tag: 0.4.3
8
 
9
  This widget adds a beatiful, CSS only dropdown menu of pages OR categories of your blog.
10
 
@@ -30,9 +30,16 @@ This widget is intented for *wide header widget areas*, not regular sidebars. Yo
30
 
31
  == Changelog ==
32
 
 
 
 
 
 
 
 
33
  = 0.4.3 =
34
  * New grayscale theme.
35
- * Template tag shailan_dropdown_menu() is available now. See usage for more info.
36
  * Template tag options added.
37
 
38
  = 0.4.2 =
4
  Tags: css, dropdown, menu, widget, pages, categories
5
  Requires at least: 2.5
6
  Tested up to: 2.8.6
7
+ Stable tag: 1.0.0
8
 
9
  This widget adds a beatiful, CSS only dropdown menu of pages OR categories of your blog.
10
 
30
 
31
  == Changelog ==
32
 
33
+ = 1.0 =
34
+ * Added vertical dropdown menu functionality.
35
+ * Fixed widget code.
36
+ * Changed dropdown widget classname to : shailan-dropdown-menu
37
+ * Changed wrapper div classname to : shailan-dropdown-wrapper
38
+ * Moved li item paddings to anchor elements.
39
+
40
  = 0.4.3 =
41
  * New grayscale theme.
42
+ * Template tag `shailan_dropdown_menu()` is available now. See usage for more info.
43
  * Template tag options added.
44
 
45
  = 0.4.2 =
shailan.DropDownMenu.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Shailan 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 and categories. This widget is best used in <a href="http://shailan.com">Shailan.com</a> themes. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
- Version: 0.4.3
7
  Author: Matt Say
8
  Author URI: http://shailan.com
9
  */
10
 
11
- define('SHAILAN_DM_VERSION','0.4.3');
12
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
13
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
14
 
@@ -18,7 +18,7 @@ define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
18
  class shailan_DropdownWidget extends WP_Widget {
19
  /** constructor */
20
  function shailan_DropdownWidget() {
21
- $widget_ops = array('classname' => 'shailan_DropdownWidget', 'description' => __( 'Dropdown page/category menu' ) );
22
  $this->WP_Widget('dropdown-menu', __('Dropdown Menu'), $widget_ops);
23
  $this->alt_option_name = 'widget_dropdown_menu';
24
 
@@ -42,7 +42,8 @@ class shailan_DropdownWidget extends WP_Widget {
42
  $inline_style_tag = 'shailan_dm_style';
43
  $login_tag = 'shailan_dm_login';
44
  $admin_tag = 'shailan_dm_admin';
45
-
 
46
 
47
  // Read options
48
  $theme = get_option($theme_tag);
@@ -52,6 +53,8 @@ class shailan_DropdownWidget extends WP_Widget {
52
  $inline_style = get_option($inline_style_tag);
53
  $login = (bool) get_option($login_tag);
54
  $admin = (bool) get_option($admin_tag);
 
 
55
 
56
  if(wp_verify_nonce($_POST['_wpnonce'])){ // Form submitted. Save settings.
57
 
@@ -62,6 +65,8 @@ class shailan_DropdownWidget extends WP_Widget {
62
  $inline_style = $_POST[$inline_style_tag];
63
  $login = (bool) $_POST[$login_tag];
64
  $admin = (bool) $_POST[$admin_tag];
 
 
65
 
66
  update_option($theme_tag, $theme);
67
  update_option($type_tag, $type);
@@ -69,6 +74,8 @@ class shailan_DropdownWidget extends WP_Widget {
69
  update_option($inline_style_tag, $inline_style);
70
  update_option($login_tag, $login);
71
  update_option($admin_tag, $admin);
 
 
72
 
73
  ?>
74
  <div class="updated"><p><strong><?php _e('Options saved.', 'shailanDropdownMenu_domain'); ?></strong></p></div>
@@ -81,10 +88,10 @@ class shailan_DropdownWidget extends WP_Widget {
81
  'Simple White'=>'simple',
82
  'Wordpress Default'=>'wpdefault',
83
  'Grayscale'=>'grayscale',
84
- 'Flickr theme'=>'flickr.com/default',
85
  'Nvidia theme'=>'nvidia.com/default.advanced',
86
  'Adobe theme'=>'adobe.com/default.advanced',
87
- 'MTV theme'=>'mtv.com/default.advanced'
88
  );
89
 
90
  ?>
@@ -92,6 +99,16 @@ class shailan_DropdownWidget extends WP_Widget {
92
  <div class="wrap">
93
  <h2><?php echo esc_html( SHAILAN_DM_TITLE . ' ' . SHAILAN_DM_VERSION ); ?></h2>
94
 
 
 
 
 
 
 
 
 
 
 
95
  <p>Dropdown menu creates a beautiful CSS only dropdown menu from your wordpress pages or categories. You can customize dropdown menu theme and settings here: </p>
96
 
97
  <form method="post" action="">
@@ -108,17 +125,18 @@ class shailan_DropdownWidget extends WP_Widget {
108
  echo '<option value="'.$path.'" '.$selected.'>'.$name.'</option>';
109
  } ?>
110
 
111
- </select><span class="description"><?php _e('You can choose a theme for your dropdown menu here.') ?></span></td>
112
- </tr>
113
  </table>
114
 
 
115
  <h2>Template tag options</h2>
116
  <p>You can use following template tag in your themes to display the dropdown menu. <br />
117
- <blockquote><code>&lt;?php if(function_exists('shailan_dropdown_menu'){ shailan_dropdown_menu(); } ?&gt;</code></blockquote>
118
  Here you can set template tag options:
119
  </p>
120
-
121
- <p><label for="<?php echo $title_tag; ?>"><?php _e('Title (won\'t be shown):'); ?> <input class="widefat" id="<?php echo $title_tag; ?>" name="<?php echo $title_tag; ?>" type="text" value="<?php echo $title; ?>" /></label></p>
122
 
123
  <p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $type_tag; ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $type_tag; ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories'); ?></label></p>
124
 
@@ -129,13 +147,17 @@ Here you can set template tag options:
129
  <input type="checkbox" class="checkbox" id="<?php echo $login_tag; ?>" name="<?php echo $login_tag; ?>"<?php checked( $login ); ?> />
130
  <label for="<?php echo $login_tag; ?>"><?php _e( 'Add login/logout' ); ?></label><br />
131
  <input type="checkbox" class="checkbox" id="<?php echo $admin_tag; ?>" name="<?php echo $admin_tag; ?>"<?php checked( $admin ); ?> />
132
- <label for="<?php echo $admin_tag; ?>"><?php _e( 'Add Register/Site Admin' ); ?></label>
 
 
133
  </p>
134
 
135
  <p><label for="<?php echo $inline_style_tag; ?>"><?php _e('Inline Style:'); ?> <input class="widefat" id="<?php echo $inline_style_tag; ?>" name="<?php echo $inline_style_tag; ?>" type="text" value="<?php echo $inline_style; ?>" /></label><br />
136
  <small>Applied to menu container &lt;div&gt;.</small></p>
137
 
138
  <p><small>NOTE: Widgets have their own options. Those options won't affect widgets.</small></p>
 
 
139
 
140
  <p>NOTE : Onscreen theme edit will be available soon. Be sure to check <a href="http://shailan.com">shailan.com</a> regularly for updates.</p>
141
  </div>
@@ -160,41 +182,32 @@ Here you can set template tag options:
160
  $inline_style = $instance['style'];
161
  $login = (bool) $instance['login'];
162
  $admin = (bool) $instance['admin'];
 
 
 
163
 
164
  ?>
165
  <?php echo $before_widget; ?>
166
  <?php /*if ( $title )
167
  echo $before_title . $title . $after_title;*/ // Title is disabled for this widget
168
  ?>
169
-
170
- <?php if($type == 'Pages'){ ?>
171
- <div id="shailan-dropdown-menu-<?php echo $this->number; ?>" style="<?php echo $inline_style; ?>">
172
- <div>
173
- <table cellpadding="0" cellspacing="0">
174
- <tr><td>
175
- <ul class="dropdown dropdown-horizontal dropdown-upward">
176
-
177
- <li class="<?php if ( is_front_page() && !is_paged() ): ?>current_page_item<?php else: ?>page_item<?php endif; ?> blogtab"><a href="<?php echo get_option('home'); ?>/"><?php _e('Home'); ?></a></li>
178
- <?php wp_list_pages('sort_column=menu_order&depth=4&title_li=&exclude='.$exclude); ?>
179
- <?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
180
- </ul></td>
181
- </tr></table>
182
- </div>
183
- </div>
184
- <?php } else { ?>
185
- <div id="shailan-dropdown-menu<?php echo $this->number; ?>" style="<?php echo $inline_style; ?>">
186
  <div>
187
  <table cellpadding="0" cellspacing="0">
188
  <tr><td>
189
- <ul class="dropdown dropdown-horizontal dropdown-upward">
190
- <?php wp_list_categories('order_by=name&depth=4&title_li=&exclude='.$exclude); ?>
191
- <?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
192
- </ul></td>
 
 
 
 
 
193
  </tr></table>
194
  </div>
195
  </div>
196
- <?php } ?>
197
-
198
  <?php echo $after_widget; ?>
199
  <?php
200
  }
@@ -212,6 +225,7 @@ Here you can set template tag options:
212
  $inline_style = $instance['style'];
213
  $login = (bool) $instance['login'];
214
  $admin = (bool) $instance['admin'];
 
215
 
216
  ?>
217
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (won\'t be shown):'); ?> <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>
@@ -225,7 +239,9 @@ Here you can set template tag options:
225
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( $login ); ?> />
226
  <label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Add login/logout' ); ?></label><br />
227
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( $admin ); ?> />
228
- <label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Add Register/Site Admin' ); ?></label>
 
 
229
  </p>
230
 
231
  <p><label for="<?php echo $this->get_field_id('style'); ?>"><?php _e('Inline Style:'); ?> <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 />
@@ -241,17 +257,19 @@ Here you can set template tag options:
241
  function styles($instance){
242
  $theme = get_option('theme');
243
 
244
- $font_family = '"Segoe UI",Calibri,"Myriad Pro",Myriad,"Trebuchet MS",Helvetica,Arial,sans-serif';
245
- $font_size = '12px';
246
-
247
  echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.SHAILAN_DM_FOLDER.'/shailan.DropdownStyles.css" type="text/css" />';
248
 
249
  if($theme!='NONE'){
250
  echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.SHAILAN_DM_FOLDER.'/themes/'.$theme.'.css" type="text/css" />';
251
  }
 
 
 
 
252
  echo '<style type="text/css" media="all">';
253
  echo ' ul.dropdown {font-family: '.$font_family.' font-size:'.$font_size.'; }';
254
  echo '</style>';
 
255
  }
256
 
257
  } // class shailan_DropdownWidget
@@ -266,13 +284,15 @@ function shailan_dropdown_menu(){
266
  $inline_style = get_option('shailan_dm_style');
267
  $login = (bool) get_option('shailan_dm_login');
268
  $admin = (bool) get_option('shailan_dm_admin');
 
269
 
270
  $args = array(
271
  'type' => $type,
272
  'exclude' => $exclude,
273
  'style' => $inline_style,
274
  'login' => $login,
275
- 'admin' => $admin
 
276
  );
277
 
278
  the_widget('shailan_DropdownWidget', $args);
3
  Plugin Name: Shailan 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 and categories. This widget is best used in <a href="http://shailan.com">Shailan.com</a> themes. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
+ Version: 1.0.0
7
  Author: Matt Say
8
  Author URI: http://shailan.com
9
  */
10
 
11
+ define('SHAILAN_DM_VERSION','1.0.0');
12
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
13
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
14
 
18
  class shailan_DropdownWidget extends WP_Widget {
19
  /** constructor */
20
  function shailan_DropdownWidget() {
21
+ $widget_ops = array('classname' => 'shailan-dropdown-menu', 'description' => __( 'Dropdown page/category menu' ) );
22
  $this->WP_Widget('dropdown-menu', __('Dropdown Menu'), $widget_ops);
23
  $this->alt_option_name = 'widget_dropdown_menu';
24
 
42
  $inline_style_tag = 'shailan_dm_style';
43
  $login_tag = 'shailan_dm_login';
44
  $admin_tag = 'shailan_dm_admin';
45
+ $vertical_tag = 'shailan_dm_vertical';
46
+ $width_tag = 'shailan_dm_width';
47
 
48
  // Read options
49
  $theme = get_option($theme_tag);
53
  $inline_style = get_option($inline_style_tag);
54
  $login = (bool) get_option($login_tag);
55
  $admin = (bool) get_option($admin_tag);
56
+ $vertical = (bool) get_option($vertical_tag);
57
+ $width = (int) get_option($width_tag);
58
 
59
  if(wp_verify_nonce($_POST['_wpnonce'])){ // Form submitted. Save settings.
60
 
65
  $inline_style = $_POST[$inline_style_tag];
66
  $login = (bool) $_POST[$login_tag];
67
  $admin = (bool) $_POST[$admin_tag];
68
+ $vertical = (bool) $_POST[$vertical_tag];
69
+ $width = (int) $_POST[$width];
70
 
71
  update_option($theme_tag, $theme);
72
  update_option($type_tag, $type);
74
  update_option($inline_style_tag, $inline_style);
75
  update_option($login_tag, $login);
76
  update_option($admin_tag, $admin);
77
+ update_option($vertical_tag, $vertical);
78
+ update_option($width_tag, $width);
79
 
80
  ?>
81
  <div class="updated"><p><strong><?php _e('Options saved.', 'shailanDropdownMenu_domain'); ?></strong></p></div>
88
  'Simple White'=>'simple',
89
  'Wordpress Default'=>'wpdefault',
90
  'Grayscale'=>'grayscale',
91
+ 'Flickr theme'=>'flickr.com/default.ultimate',
92
  'Nvidia theme'=>'nvidia.com/default.advanced',
93
  'Adobe theme'=>'adobe.com/default.advanced',
94
+ 'MTV theme'=>'mtv.com/default.ultimate'
95
  );
96
 
97
  ?>
99
  <div class="wrap">
100
  <h2><?php echo esc_html( SHAILAN_DM_TITLE . ' ' . SHAILAN_DM_VERSION ); ?></h2>
101
 
102
+ <div style="width:140px; padding:10px; border:1px solid #ddd; float:right;">
103
+ Please support if you like this plugin:
104
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
105
+ <input type="hidden" name="cmd" value="_s-xclick">
106
+ <input type="hidden" name="hosted_button_id" value="10214058">
107
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
108
+ <img alt="" border="0" src="https://www.paypal.com/tr_TR/i/scr/pixel.gif" width="1" height="1">
109
+ </form>
110
+ </div>
111
+
112
  <p>Dropdown menu creates a beautiful CSS only dropdown menu from your wordpress pages or categories. You can customize dropdown menu theme and settings here: </p>
113
 
114
  <form method="post" action="">
125
  echo '<option value="'.$path.'" '.$selected.'>'.$name.'</option>';
126
  } ?>
127
 
128
+ </select> <span class="description"><?php _e('You can choose a theme for your dropdown menu here.') ?></span></td>
129
+ </tr>
130
  </table>
131
 
132
+ <fieldset width="400">
133
  <h2>Template tag options</h2>
134
  <p>You can use following template tag in your themes to display the dropdown menu. <br />
135
+ <blockquote><code>&lt;?php if(function_exists('shailan_dropdown_menu')){ shailan_dropdown_menu(); } ?&gt;</code></blockquote>
136
  Here you can set template tag options:
137
  </p>
138
+ <div style="padding:10px; border:1px solid #ddd; width:275px; ">
139
+ <!-- <p><label for="<?php echo $title_tag; ?>"><?php _e('Title (won\'t be shown):'); ?> <input class="widefat" id="<?php echo $title_tag; ?>" name="<?php echo $title_tag; ?>" type="text" value="<?php echo $title; ?>" /></label></p> -->
140
 
141
  <p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $type_tag; ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $type_tag; ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories'); ?></label></p>
142
 
147
  <input type="checkbox" class="checkbox" id="<?php echo $login_tag; ?>" name="<?php echo $login_tag; ?>"<?php checked( $login ); ?> />
148
  <label for="<?php echo $login_tag; ?>"><?php _e( 'Add login/logout' ); ?></label><br />
149
  <input type="checkbox" class="checkbox" id="<?php echo $admin_tag; ?>" name="<?php echo $admin_tag; ?>"<?php checked( $admin ); ?> />
150
+ <label for="<?php echo $admin_tag; ?>"><?php _e( 'Add Register/Site Admin' ); ?></label><br />
151
+ <input type="checkbox" class="checkbox" id="<?php echo $vertical_tag; ?>" name="<?php echo $vertical_tag; ?>"<?php checked( $vertical ); ?> />
152
+ <label for="<?php echo $vertical_tag; ?>"><?php _e( 'Vertical menu' ); ?></label>
153
  </p>
154
 
155
  <p><label for="<?php echo $inline_style_tag; ?>"><?php _e('Inline Style:'); ?> <input class="widefat" id="<?php echo $inline_style_tag; ?>" name="<?php echo $inline_style_tag; ?>" type="text" value="<?php echo $inline_style; ?>" /></label><br />
156
  <small>Applied to menu container &lt;div&gt;.</small></p>
157
 
158
  <p><small>NOTE: Widgets have their own options. Those options won't affect widgets.</small></p>
159
+ </div>
160
+ </fieldset>
161
 
162
  <p>NOTE : Onscreen theme edit will be available soon. Be sure to check <a href="http://shailan.com">shailan.com</a> regularly for updates.</p>
163
  </div>
182
  $inline_style = $instance['style'];
183
  $login = (bool) $instance['login'];
184
  $admin = (bool) $instance['admin'];
185
+ $vertical = (bool) $instance['vertical'];
186
+
187
+ $orientation = ($vertical ? 'dropdown-vertical' : 'dropdown-horizontal');
188
 
189
  ?>
190
  <?php echo $before_widget; ?>
191
  <?php /*if ( $title )
192
  echo $before_title . $title . $after_title;*/ // Title is disabled for this widget
193
  ?>
194
+
195
+ <div id="shailan-dropdown-wrapper-<?php echo $this->number; ?>" style="<?php echo $inline_style; ?>">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  <div>
197
  <table cellpadding="0" cellspacing="0">
198
  <tr><td>
199
+ <ul class="dropdown <?php echo $orientation; ?>">
200
+ <?php if($type == 'Pages'){ ?>
201
+ <li class="<?php if ( is_front_page() && !is_paged() ): ?>current_page_item<?php else: ?>page_item<?php endif; ?> blogtab"><a href="<?php echo get_option('home'); ?>/"><?php _e('Home'); ?></a></li>
202
+ <?php wp_list_pages('sort_column=menu_order&depth=4&title_li=&exclude='.$exclude); ?>
203
+ <?php } else { ?>
204
+ <?php wp_list_categories('order_by=name&depth=4&title_li=&exclude='.$exclude); ?>
205
+ <?php } ?>
206
+ <?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
207
+ </ul></td>
208
  </tr></table>
209
  </div>
210
  </div>
 
 
211
  <?php echo $after_widget; ?>
212
  <?php
213
  }
225
  $inline_style = $instance['style'];
226
  $login = (bool) $instance['login'];
227
  $admin = (bool) $instance['admin'];
228
+ $vertical = (bool) $instance['vertical'];
229
 
230
  ?>
231
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (won\'t be shown):'); ?> <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>
239
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( $login ); ?> />
240
  <label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Add login/logout' ); ?></label><br />
241
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( $admin ); ?> />
242
+ <label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Add Register/Site Admin' ); ?></label><br />
243
+ <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( $vertical ); ?> />
244
+ <label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu ' ); ?></label>
245
  </p>
246
 
247
  <p><label for="<?php echo $this->get_field_id('style'); ?>"><?php _e('Inline Style:'); ?> <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 />
257
  function styles($instance){
258
  $theme = get_option('theme');
259
 
 
 
 
260
  echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.SHAILAN_DM_FOLDER.'/shailan.DropdownStyles.css" type="text/css" />';
261
 
262
  if($theme!='NONE'){
263
  echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.SHAILAN_DM_FOLDER.'/themes/'.$theme.'.css" type="text/css" />';
264
  }
265
+
266
+ // Font family and font size
267
+ $font_family = '"Segoe UI",Calibri,"Myriad Pro",Myriad,"Trebuchet MS",Helvetica,Arial,sans-serif';
268
+ $font_size = '12px';
269
  echo '<style type="text/css" media="all">';
270
  echo ' ul.dropdown {font-family: '.$font_family.' font-size:'.$font_size.'; }';
271
  echo '</style>';
272
+
273
  }
274
 
275
  } // class shailan_DropdownWidget
284
  $inline_style = get_option('shailan_dm_style');
285
  $login = (bool) get_option('shailan_dm_login');
286
  $admin = (bool) get_option('shailan_dm_admin');
287
+ $vertical = (bool) get_option('shailan_dm_vertical');
288
 
289
  $args = array(
290
  'type' => $type,
291
  'exclude' => $exclude,
292
  'style' => $inline_style,
293
  'login' => $login,
294
+ 'admin' => $admin,
295
+ 'vertical' => $vertical
296
  );
297
 
298
  the_widget('shailan_DropdownWidget', $args);
shailan.DropdownStyles.css CHANGED
@@ -62,8 +62,9 @@ ul.dropdown ul ul {
62
  left: 99%;
63
  }
64
 
65
- ul.dropdown li:hover > ul {
66
- visibility: visible;
67
- }
68
-
69
 
 
 
 
 
62
  left: 99%;
63
  }
64
 
65
+ ul.dropdown li:hover > ul { visibility: visible; }
 
 
 
66
 
67
+ /* Vertical menu support */
68
+ ul.dropdown-vertical { /*width: 200px;*/ }
69
+ ul.dropdown-vertical ul { top: 1px; left: 99%; }
70
+ ul.dropdown-vertical li { float: none; }
themes/adobe.com/default.css CHANGED
@@ -136,4 +136,4 @@ ul.dropdown-vertical-rtl *.dir {
136
  background-position: 0 50%;
137
  }
138
 
139
- .shailan_DropdownWidget{background-color:#000;}
136
  background-position: 0 50%;
137
  }
138
 
139
+ .shailan-dropdown-menu{background-color:#000;}
themes/grayscale.css CHANGED
@@ -1,8 +1,10 @@
1
  @charset "UTF-8";
 
2
 
3
  ul.dropdown li {
4
- padding: 7px 20px;
5
- border-right: 1px solid #999;
 
6
  color: #333;
7
  text-align:center;
8
  background:#c2c2c2 url('images/default1_g.jpg') repeat-x bottom;
@@ -11,10 +13,14 @@ ul.dropdown li {
11
  font-weight:bold;
12
  text-transform:uppercase;
13
  }
 
 
 
14
  ul.dropdown li.hover,
15
  ul.dropdown li:hover {
16
- background:#b1b1b1 url('images/default2_g.jpg') repeat-x bottom;
17
- border-bottom:#999;
 
18
  }
19
  ul.dropdown a:link,
20
  ul.dropdown a:visited { color: #333; text-decoration: none; display:block; }
@@ -24,7 +30,7 @@ ul.dropdown a:active { color: #fff; }
24
  ul.dropdown ul {
25
  margin-top: 0px;
26
  margin-left:-1px;
27
- border-bottom:1px solid #999;
28
  font-size:0.8em;
29
  }
30
  ul.dropdown ul li {
@@ -45,4 +51,4 @@ ul.dropdown li.current_page_item ul a,ul.dropdown li.current_page_item ul a:visi
45
  ul.dropdown li.current_page_ancestor a,ul.dropdown li.current_page_ancestor a:visited,ul.dropdown li.current_page_ancestor a:link { text-decoration:underline; }
46
  ul.dropdown li.current_page_ancestor ul a,ul.dropdown li.current_page_ancestor ul a:visited,ul.dropdown li.current_page_ancestor ul a:link {text-decoration:none;}
47
 
48
- .shailan_DropdownWidget{ background:#c2c2c2 url('images/default1_g.jpg') repeat-x bottom; }
1
  @charset "UTF-8";
2
+ /* colors : #a0a0a0; #929292; #838383; */
3
 
4
  ul.dropdown li {
5
+ border-top: 1px solid #a0a0a0;
6
+ border-right: 1px solid #929292;
7
+ border-bottom: 1px solid #838383;
8
  color: #333;
9
  text-align:center;
10
  background:#c2c2c2 url('images/default1_g.jpg') repeat-x bottom;
13
  font-weight:bold;
14
  text-transform:uppercase;
15
  }
16
+ ul.dropdown li a{
17
+ padding: 7px 20px;
18
+ }
19
  ul.dropdown li.hover,
20
  ul.dropdown li:hover {
21
+ background:#838383 url('images/default2_g.jpg') repeat-x bottom;
22
+ border-bottom:1px solid #999;
23
+ border-top: 1px solid #999;
24
  }
25
  ul.dropdown a:link,
26
  ul.dropdown a:visited { color: #333; text-decoration: none; display:block; }
30
  ul.dropdown ul {
31
  margin-top: 0px;
32
  margin-left:-1px;
33
+ /* border-bottom:1px solid #666; */
34
  font-size:0.8em;
35
  }
36
  ul.dropdown ul li {
51
  ul.dropdown li.current_page_ancestor a,ul.dropdown li.current_page_ancestor a:visited,ul.dropdown li.current_page_ancestor a:link { text-decoration:underline; }
52
  ul.dropdown li.current_page_ancestor ul a,ul.dropdown li.current_page_ancestor ul a:visited,ul.dropdown li.current_page_ancestor ul a:link {text-decoration:none;}
53
 
54
+ .shailan-dropdown-menu{ background:#a0a0a0 url('images/default1_g.jpg') repeat-x bottom; }
themes/mtv.com/default.css CHANGED
@@ -110,7 +110,7 @@
110
  /* NON-FIRST LEVEL */
111
 
112
  ul.dropdown ul {
113
- left: auto;
114
  right: 0;
115
  width: 150px;
116
  margin-top: -1px;
@@ -128,7 +128,7 @@
128
  right: auto;
129
  left: 100%;
130
  margin-top: 0;
131
- border-top: none;
132
  border-left: none;
133
  font-weight: normal;
134
  }
@@ -174,4 +174,4 @@ ul.dropdown ul ul ul *.dir { border-color: #767676 #404040 #404040; }
174
  #n-movies ul ul a.dir { width: 111px; }
175
  #n-movies ul ul ul { left: 100%; }
176
 
177
- .shailan_DropdownWidget{background-color:#000;}
110
  /* NON-FIRST LEVEL */
111
 
112
  ul.dropdown ul {
113
+ /*left: auto;*/
114
  right: 0;
115
  width: 150px;
116
  margin-top: -1px;
128
  right: auto;
129
  left: 100%;
130
  margin-top: 0;
131
+ /* border-top: none; */
132
  border-left: none;
133
  font-weight: normal;
134
  }
174
  #n-movies ul ul a.dir { width: 111px; }
175
  #n-movies ul ul ul { left: 100%; }
176
 
177
+ .shailan-dropdown-menu{background-color: #3a3a3a;}
themes/simple.css CHANGED
@@ -15,10 +15,6 @@
15
  *
16
  */
17
 
18
- ul.dropdown li {
19
- line-height: 1.3em;
20
- vertical-align: middle;
21
- }
22
  ul.dropdown li.hover,
23
  ul.dropdown li:hover {
24
  z-index: 98;
@@ -42,14 +38,14 @@ ul.dropdown {
42
  font-size:1.1em;
43
  }
44
  ul.dropdown li {
45
- padding: 7px 20px;
46
- border-style: solid;
47
- border-width: 0px 1px 0px 0px;
48
- border-color: #ddd;
49
- background-color: #f6f6f6;
50
- color: #000;
51
- text-align:center;
52
  }
 
53
  ul.dropdown li.hover,
54
  ul.dropdown li:hover {
55
  background-color: #eee;
@@ -107,4 +103,4 @@ li.current_page_item ul a, li.current_page_item ul a:visited, li.current_page_it
107
  li.current_page_ancestor a,li.current_page_ancestor a:visited, li.current_page_ancestor a:link {text-decoration:underline;}
108
  li.current_page_ancestor ul a, li.current_page_ancestor ul a:visited, li.current_page_ancestor ul a:link {text-decoration:none;}
109
 
110
- .shailan_DropdownWidget{background-color:#efefef; border-bottom:1px solid #ddd; border-top:1px solid #ddd;}
15
  *
16
  */
17
 
 
 
 
 
18
  ul.dropdown li.hover,
19
  ul.dropdown li:hover {
20
  z-index: 98;
38
  font-size:1.1em;
39
  }
40
  ul.dropdown li {
41
+ border-style: solid;
42
+ border-width: 0px 1px 0px 0px;
43
+ border-color: #ddd;
44
+ background-color: #f6f6f6;
45
+ color: #000;
46
+ text-align:center;
 
47
  }
48
+ ul.dropdown li a{ padding: 7px 20px; }
49
  ul.dropdown li.hover,
50
  ul.dropdown li:hover {
51
  background-color: #eee;
103
  li.current_page_ancestor a,li.current_page_ancestor a:visited, li.current_page_ancestor a:link {text-decoration:underline;}
104
  li.current_page_ancestor ul a, li.current_page_ancestor ul a:visited, li.current_page_ancestor ul a:link {text-decoration:none;}
105
 
106
+ .shailan-dropdown-menu{background-color:#efefef; border-bottom:1px solid #ddd; border-top:1px solid #ddd;}
themes/wpdefault.css CHANGED
@@ -1,18 +1,20 @@
1
  @charset "UTF-8";
2
 
3
  ul.dropdown li {
4
- padding: 7px 20px;
5
- border-style: solid;
6
- border-width: 1px 1px 0px 0px;
7
- border-color: #4283b9;
8
- color: #4283b9;
9
- text-align:center;
10
  background:#60a3da url('images/default1.jpg') repeat-x bottom;
11
  }
 
12
  ul.dropdown li.hover,
13
  ul.dropdown li:hover {
14
- background:#4283b9 url('images/default2.jpg') repeat-x bottom;
15
- border-bottom:#4283b9;
 
16
  }
17
  ul.dropdown a:link,
18
  ul.dropdown a:visited { color: #c8daeb; text-decoration: none; display:block; }
@@ -22,7 +24,7 @@ ul.dropdown a:active { color: #fff; }
22
  ul.dropdown ul {
23
  margin-top: 0px;
24
  margin-left:-1px;
25
- border-bottom:1px solid #4283b9;
26
  }
27
  ul.dropdown ul li {
28
  background:#60a3da;
@@ -37,4 +39,4 @@ ul.dropdown li.current_page_item ul a,ul.dropdown li.current_page_item ul a:visi
37
  ul.dropdown li.current_page_ancestor a,ul.dropdown li.current_page_ancestor a:visited,ul.dropdown li.current_page_ancestor a:link { text-decoration:underline; /*color:#fff;*/ }
38
  ul.dropdown li.current_page_ancestor ul a,ul.dropdown li.current_page_ancestor ul a:visited,ul.dropdown li.current_page_ancestor ul a:link {text-decoration:none;}
39
 
40
- .shailan_DropdownWidget{ background:#73a0c5 url('images/default1.jpg') repeat-x bottom; /*border-bottom:1px solid #eee; border-top:1px solid #eee; */}
1
  @charset "UTF-8";
2
 
3
  ul.dropdown li {
4
+ border-style: solid;
5
+ border-width: 1px 1px 1px 0px;
6
+ border-color: #4283b9;
7
+ border-top:1px solid #60a3da;
8
+ color: #4283b9;
9
+ text-align:center;
10
  background:#60a3da url('images/default1.jpg') repeat-x bottom;
11
  }
12
+ ul.dropdown li a{ padding: 7px 20px; }
13
  ul.dropdown li.hover,
14
  ul.dropdown li:hover {
15
+ background:#4283b9 url('images/default2.jpg') repeat-x bottom;
16
+ border-bottom:1px solid #4283b9;
17
+ border-top:1px solid #60a3da;
18
  }
19
  ul.dropdown a:link,
20
  ul.dropdown a:visited { color: #c8daeb; text-decoration: none; display:block; }
24
  ul.dropdown ul {
25
  margin-top: 0px;
26
  margin-left:-1px;
27
+ /* border-bottom:1px solid #4283b9; */
28
  }
29
  ul.dropdown ul li {
30
  background:#60a3da;
39
  ul.dropdown li.current_page_ancestor a,ul.dropdown li.current_page_ancestor a:visited,ul.dropdown li.current_page_ancestor a:link { text-decoration:underline; /*color:#fff;*/ }
40
  ul.dropdown li.current_page_ancestor ul a,ul.dropdown li.current_page_ancestor ul a:visited,ul.dropdown li.current_page_ancestor ul a:link {text-decoration:none;}
41
 
42
+ .shailan-dropdown-menu{ background:#60a3da url('images/default1.jpg') repeat-x bottom; }