Version Description
- Fixed XHTML issues.
- Added WP Default theme.
- Made some minor fixes to widget options form.
Download this release
Release Info
Developer | mattsay |
Plugin | Dropdown Menu Widget |
Version | 0.4 |
Comparing to | |
See all releases |
Code changes from version 0.3 to 0.4
- readme.txt +6 -1
- shailan.DropDownMenu.php +21 -18
- themes/images/default1.jpg +0 -0
- themes/images/default2.jpg +0 -0
- themes/wpdefault.css +38 -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.
|
8 |
|
9 |
This widget adds a beatiful, CSS only dropdown menu of pages OR categories of your blog.
|
10 |
|
@@ -30,6 +30,11 @@ This widget is intented for *wide header widget areas*, not regular sidebars. Yo
|
|
30 |
|
31 |
== Changelog ==
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
= 0.3 =
|
34 |
* Fixed problems about styling. Now you can change dropdown menu style from the options page.
|
35 |
|
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
|
8 |
|
9 |
This widget adds a beatiful, CSS only dropdown menu of pages OR categories of your blog.
|
10 |
|
30 |
|
31 |
== Changelog ==
|
32 |
|
33 |
+
= 0.4 =
|
34 |
+
* Fixed XHTML issues.
|
35 |
+
* Added WP Default theme.
|
36 |
+
* Made some minor fixes to widget options form.
|
37 |
+
|
38 |
= 0.3 =
|
39 |
* Fixed problems about styling. Now you can change dropdown menu style from the options page.
|
40 |
|
shailan.DropDownMenu.php
CHANGED
@@ -3,14 +3,14 @@
|
|
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.
|
7 |
Author: Matt Say
|
8 |
Author URI: http://shailan.com
|
9 |
*/
|
10 |
|
11 |
-
define('SHAILAN_DM_VERSION','0.
|
12 |
define('SHAILAN_DM_TITLE', 'Dropdown Menu');
|
13 |
-
define('
|
14 |
|
15 |
/**
|
16 |
* Shailan Dropdown Widget Class
|
@@ -57,6 +57,7 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
57 |
$themes = array(
|
58 |
'None'=>'NONE',
|
59 |
'Simple White'=>'simple',
|
|
|
60 |
'Flickr theme'=>'flickr.com/default',
|
61 |
'Nvidia theme'=>'nvidia.com/default.advanced',
|
62 |
'Adobe theme'=>'adobe.com/default.advanced',
|
@@ -123,25 +124,26 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
123 |
<div id="shailan-dropdown-menu-<?php echo $this->number; ?>" style="<?php echo $inline_style; ?>">
|
124 |
<div>
|
125 |
<table cellpadding="0" cellspacing="0">
|
126 |
-
<td>
|
127 |
<ul class="dropdown dropdown-horizontal dropdown-upward">
|
128 |
|
129 |
<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>
|
130 |
<?php wp_list_pages('sort_column=menu_order&depth=4&title_li=&exclude='.$exclude); ?>
|
131 |
-
<?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout();
|
132 |
</ul></td>
|
133 |
-
</table>
|
134 |
</div>
|
135 |
</div>
|
136 |
<?php } else { ?>
|
137 |
<div id="shailan-dropdown-menu<?php echo $this->number; ?>" style="background:<?php echo $background; ?>; <?php echo $additional_styles ?>">
|
138 |
<div>
|
139 |
<table cellpadding="0" cellspacing="0">
|
140 |
-
<td>
|
141 |
<ul class="dropdown dropdown-horizontal dropdown-upward">
|
142 |
<?php wp_list_categories('order_by=name&depth=4&title_li=&exclude='.$exclude); ?>
|
|
|
143 |
</ul></td>
|
144 |
-
</table>
|
145 |
</div>
|
146 |
</div>
|
147 |
<?php } ?>
|
@@ -164,12 +166,13 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
164 |
$login = (bool) $instance['login'];
|
165 |
$admin = (bool) $instance['admin'];
|
166 |
|
167 |
-
?>
|
168 |
-
|
169 |
|
170 |
-
|
171 |
|
172 |
-
|
|
|
173 |
|
174 |
<p>
|
175 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( $login ); ?> />
|
@@ -177,12 +180,12 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
177 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( $admin ); ?> />
|
178 |
<label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Add Register/Site Admin' ); ?></label>
|
179 |
</p>
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
|
184 |
<div class="widget-control-actions alignright">
|
185 |
-
<p><a href="options-general.php?page=dropdown-menu">Menu Style</a> | <a href="http://shailan.com/wordpress/plugins/dropdown-menu">Visit plugin site</a></p>
|
186 |
</div>
|
187 |
|
188 |
<?php
|
@@ -194,11 +197,11 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
194 |
$font_family = '"Segoe UI",Calibri,"Myriad Pro",Myriad,"Trebuchet MS",Helvetica,Arial,sans-serif';
|
195 |
$font_size = '12px';
|
196 |
|
197 |
-
echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.
|
198 |
//echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/shailan.DropDownMenu/dropdown.limited.css" type="text/css">';
|
199 |
|
200 |
if($theme!='NONE'){
|
201 |
-
echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.
|
202 |
}
|
203 |
echo '<style type="text/css" media="all">';
|
204 |
echo ' ul.dropdown {font-family: '.$font_family.' font-size:'.$font_size.'; }';
|
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
|
7 |
Author: Matt Say
|
8 |
Author URI: http://shailan.com
|
9 |
*/
|
10 |
|
11 |
+
define('SHAILAN_DM_VERSION','0.4');
|
12 |
define('SHAILAN_DM_TITLE', 'Dropdown Menu');
|
13 |
+
define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
|
14 |
|
15 |
/**
|
16 |
* Shailan Dropdown Widget Class
|
57 |
$themes = array(
|
58 |
'None'=>'NONE',
|
59 |
'Simple White'=>'simple',
|
60 |
+
'Wordpress Default'=>'wpdefault',
|
61 |
'Flickr theme'=>'flickr.com/default',
|
62 |
'Nvidia theme'=>'nvidia.com/default.advanced',
|
63 |
'Adobe theme'=>'adobe.com/default.advanced',
|
124 |
<div id="shailan-dropdown-menu-<?php echo $this->number; ?>" style="<?php echo $inline_style; ?>">
|
125 |
<div>
|
126 |
<table cellpadding="0" cellspacing="0">
|
127 |
+
<tr><td>
|
128 |
<ul class="dropdown dropdown-horizontal dropdown-upward">
|
129 |
|
130 |
<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>
|
131 |
<?php wp_list_pages('sort_column=menu_order&depth=4&title_li=&exclude='.$exclude); ?>
|
132 |
+
<?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
|
133 |
</ul></td>
|
134 |
+
</tr></table>
|
135 |
</div>
|
136 |
</div>
|
137 |
<?php } else { ?>
|
138 |
<div id="shailan-dropdown-menu<?php echo $this->number; ?>" style="background:<?php echo $background; ?>; <?php echo $additional_styles ?>">
|
139 |
<div>
|
140 |
<table cellpadding="0" cellspacing="0">
|
141 |
+
<tr><td>
|
142 |
<ul class="dropdown dropdown-horizontal dropdown-upward">
|
143 |
<?php wp_list_categories('order_by=name&depth=4&title_li=&exclude='.$exclude); ?>
|
144 |
+
<?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
|
145 |
</ul></td>
|
146 |
+
</tr></table>
|
147 |
</div>
|
148 |
</div>
|
149 |
<?php } ?>
|
166 |
$login = (bool) $instance['login'];
|
167 |
$admin = (bool) $instance['admin'];
|
168 |
|
169 |
+
?>
|
170 |
+
<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>
|
171 |
|
172 |
+
<p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $this->get_field_name('type'); ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $this->get_field_name('type'); ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories'); ?></label></p>
|
173 |
|
174 |
+
<p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('exclude'); ?>" name="<?php echo $this->get_field_name('exclude'); ?>" type="text" value="<?php echo $exclude; ?>" /></label><br />
|
175 |
+
<small>Page IDs, separated by commas.</small></p>
|
176 |
|
177 |
<p>
|
178 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( $login ); ?> />
|
180 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( $admin ); ?> />
|
181 |
<label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Add Register/Site Admin' ); ?></label>
|
182 |
</p>
|
183 |
+
|
184 |
+
<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 />
|
185 |
+
<small>Applied to menu container <div>.</small></p>
|
186 |
|
187 |
<div class="widget-control-actions alignright">
|
188 |
+
<p><small><a href="options-general.php?page=dropdown-menu">Menu Style</a> | <a href="http://shailan.com/wordpress/plugins/dropdown-menu">Visit plugin site</a></small></p>
|
189 |
</div>
|
190 |
|
191 |
<?php
|
197 |
$font_family = '"Segoe UI",Calibri,"Myriad Pro",Myriad,"Trebuchet MS",Helvetica,Arial,sans-serif';
|
198 |
$font_size = '12px';
|
199 |
|
200 |
+
echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.SHAILAN_DM_FOLDER.'/shailan.DropdownStyles.css" type="text/css">';
|
201 |
//echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/shailan.DropDownMenu/dropdown.limited.css" type="text/css">';
|
202 |
|
203 |
if($theme!='NONE'){
|
204 |
+
echo '<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/'.SHAILAN_DM_FOLDER.'/themes/'.$theme.'.css" type="text/css">';
|
205 |
}
|
206 |
echo '<style type="text/css" media="all">';
|
207 |
echo ' ul.dropdown {font-family: '.$font_family.' font-size:'.$font_size.'; }';
|
themes/images/default1.jpg
ADDED
Binary file
|
themes/images/default2.jpg
ADDED
Binary file
|
themes/wpdefault.css
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "UTF-8";
|
2 |
+
|
3 |
+
ul.dropdown li {
|
4 |
+
padding: 7px 20px;
|
5 |
+
border-style: solid;
|
6 |
+
border-width: 0px 1px 0px 0px;
|
7 |
+
border-color: #5192ca;
|
8 |
+
color: #c8daeb;
|
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 |
+
}
|
16 |
+
ul.dropdown a:link,
|
17 |
+
ul.dropdown a:visited { color: #c8daeb; text-decoration: none; display:block; }
|
18 |
+
ul.dropdown a:hover { color: #fff; }
|
19 |
+
ul.dropdown a:active { color: #fff; }
|
20 |
+
/* -- level mark -- */
|
21 |
+
ul.dropdown ul {
|
22 |
+
margin-top: 0px;
|
23 |
+
margin-left:-1px;
|
24 |
+
border-top:1px solid #5192ca;
|
25 |
+
border-bottom:1px solid #5192ca;
|
26 |
+
}
|
27 |
+
ul.dropdown ul li {
|
28 |
+
text-align: left;
|
29 |
+
border-left:1px solid #5192ca;
|
30 |
+
}
|
31 |
+
|
32 |
+
ul.dropdown li.current_page_item a { color: #fff; }
|
33 |
+
ul.dropdown li.current_page_item a:link,ul.dropdown li.current_page_item a:visited { color: #fff; }
|
34 |
+
ul.dropdown li.current_page_item ul a,ul.dropdown li.current_page_item ul a:visited, li.current_page_item ul a:link { color: #fff; }
|
35 |
+
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;*/ }
|
36 |
+
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;}
|
37 |
+
|
38 |
+
.shailan_DropdownWidget{ background:#73a0c5 url('images/default1.jpg') repeat-x bottom; /*border-bottom:1px solid #eee; border-top:1px solid #eee; */}
|