Dropdown Menu Widget - Version 1.9.2

Version Description

  • Added: Settings link on plugins page.
  • Added: Plugin activation redirect to Settings page.
  • Added: Filter wp_nav_menu arguments to create a dropdown menu. Theme can be changed via dropdown menu settings page.
  • Added: Demo menu on settings page.
  • Removed: Unnecessary scripts from scripts folder.
  • Removed: Twitter box on settings page.
  • Some minor fixes and tidy up on options page.
Download this release

Release Info

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

Code changes from version 1.9.1 to 1.9.2

css/dropdown-admin.css CHANGED
@@ -20,6 +20,10 @@
20
  #stf_tweet{ background-color:#EAF9FE; border:1px solid #B0ECEE; border-radius:10px; padding:10px; }
21
  #stf_tweet li{ margin:0; font-size:13px; color:#208FBE; }
22
 
 
 
 
 
23
  .follow-link {
24
  font-style: italic;
25
  padding: 5px 15px 5px 30px;
@@ -79,7 +83,7 @@ input.color-error{border:1px solid #f00;}
79
  .stf_opts_wrap{ width:100%; margin-right:-265px; }
80
  .stf_section{ }
81
  .stf_options label{ font-size:14px; font-weight:500; width:230px; display:block; float:left; line-height:24px; }
82
- .stf_paragraph{ padding:10px; background:#eee; border-radius:8px; }
83
  .stf_input { padding:10px 10px; border-bottom:1px solid #eee; }
84
  .stf_options small{
85
  display: block;
@@ -177,7 +181,10 @@ border-radius: 8px;
177
  -webkit-border-radius: 8px;
178
  -moz-border-radius: 5px;
179
  font-family: 'Droid Sans', serif;
180
- font-size: 16px !important; font-weight:normal; text-shadow: #1A5B77 1px 1px 1px;}
 
 
 
181
 
182
  .stf_options #options-tabs .button-primary:hover{ background-color: #298CBA; }
183
  .stf_options #options-tabs .button-primary:active{ background-color: #21759B; }
@@ -187,7 +194,7 @@ font-size: 16px !important; font-weight:normal; text-shadow: #1A5B77 1px 1px 1px
187
 
188
  .stf_options ul.tabs li a.general { padding-left:28px; background-image: url('images/cog.png'); }
189
  .stf_options ul.tabs li a.advanced { padding-left:28px; background-image: url('images/wrench_orange.png'); }
190
- .stf_options ul.tabs li a.theme { padding-left:28px; background-image: url('images/color_wheel.png'); }
191
  .stf_options ul.tabs li a.effects { padding-left:28px; background-image: url('images/lightning.png'); }
192
  .stf_options ul.tabs li a.template-tag { padding-left:28px; background-image: url('images/tag.png'); }
193
 
20
  #stf_tweet{ background-color:#EAF9FE; border:1px solid #B0ECEE; border-radius:10px; padding:10px; }
21
  #stf_tweet li{ margin:0; font-size:13px; color:#208FBE; }
22
 
23
+ #demo{ border:1px solid #ddd; padding: 8px 20px 20px; margin: 6px 0 15px; }
24
+ #demo .widget { border: 0; background: transparent; margin: 0; padding: 0; position: relative; }
25
+ #demo .clearfix:after{ clear:left; }
26
+
27
  .follow-link {
28
  font-style: italic;
29
  padding: 5px 15px 5px 30px;
83
  .stf_opts_wrap{ width:100%; margin-right:-265px; }
84
  .stf_section{ }
85
  .stf_options label{ font-size:14px; font-weight:500; width:230px; display:block; float:left; line-height:24px; }
86
+ .stf_paragraph{ padding:10px; background:#FFFDCB; border-radius:8px; font-size: larger; }
87
  .stf_input { padding:10px 10px; border-bottom:1px solid #eee; }
88
  .stf_options small{
89
  display: block;
181
  -webkit-border-radius: 8px;
182
  -moz-border-radius: 5px;
183
  font-family: 'Droid Sans', serif;
184
+ font-size: 16px !important; font-weight:normal; text-shadow: #1A5B77 1px 1px 1px;
185
+ line-height: 16px;
186
+ height: 40px;
187
+ }
188
 
189
  .stf_options #options-tabs .button-primary:hover{ background-color: #298CBA; }
190
  .stf_options #options-tabs .button-primary:active{ background-color: #21759B; }
194
 
195
  .stf_options ul.tabs li a.general { padding-left:28px; background-image: url('images/cog.png'); }
196
  .stf_options ul.tabs li a.advanced { padding-left:28px; background-image: url('images/wrench_orange.png'); }
197
+ .stf_options ul.tabs li a.custom-colors { padding-left:28px; background-image: url('images/color_wheel.png'); }
198
  .stf_options ul.tabs li a.effects { padding-left:28px; background-image: url('images/lightning.png'); }
199
  .stf_options ul.tabs li a.template-tag { padding-left:28px; background-image: url('images/tag.png'); }
200
 
css/shailan-dropdown.min.css CHANGED
@@ -1 +1 @@
1
- div.shailan-dropdown-menu table,div.shailan-dropdown-menu tbody,div.shailan-dropdown-menu tr,div.shailan-dropdown-menu td,div.shailan-dropdown-menu ul,div.shailan-dropdown-menu li,div.dropdown-horizontal-container,ul.dropdown *{margin:0;padding:0;border:0}.shailan-dropdown-menu{position:relative;z-index:597}ul.dropdown,ul.dropdown li,ul.dropdown ul{list-style:none;margin:0;padding:0}ul.dropdown li{position:relative;display:inline;vertical-align:middle;zoom:1}ul.dropdown li ul{position:absolute;z-index:598}ul.dropdown li.hover,ul.dropdown li:hover{cursor:default}ul.dropdown > li{float:left}ul.dropdown li a{padding:.3em .8em;cursor:pointer}ul.dropdown ul{position:absolute;top:100%;left:0}ul.dropdown ul li{float:none;display:list-item;list-style:none}ul.dropdown ul ul{top:1px;left:99%}ul.dropdown a:active,ul.dropdown a:focus{outline-style:none}* html ul.dropdown li{height:1px}ul.dropdown ul li,ul.dropdown-vertical{margin-left:0}ul.dropdown ul,ul.dropdown li.hover ul ul,ul.dropdown li.hover ul ul ul,ul.dropdown li.hover ul ul ul ul,ul.dropdown li.hover ul ul ul ul ul,ul.dropdown ul,ul.dropdown li:hover ul ul,ul.dropdown li:hover ul ul ul,ul.dropdown li:hover ul ul ul ul,ul.dropdown li:hover ul ul ul ul ul{display:none}ul.dropdown ul ul ul ul ul ul{display:none!important}.dm-align-right table{float:right}.dm-align-left table{float:left}ul.dropdown-horizontal.dropdown-align-right ul{right:0;left:auto}ul.dropdown-horizontal.dropdown-align-right ul ul{right:99%;left:auto}ul.dropdown-vertical.dropdown-align-left ul{top:1px;left:99%;right:auto}ul.dropdown-vertical.dropdown-align-right ul{top:1px;right:99%;left:auto}ul.dropdown-vertical li{float:none;display:block}.clearfix:after{clear:both;content:".";display:block;height:0;visibility:hidden}* html > body .clearfix{display:block;width:100%}* html .clearfix{height:1%}
1
+ div.shailan-dropdown-menu table,div.shailan-dropdown-menu tbody,div.shailan-dropdown-menu tr,div.shailan-dropdown-menu td,div.shailan-dropdown-menu ul,div.shailan-dropdown-menu li,div.dropdown-horizontal-container,ul.dropdown * { margin:0; padding:0; border:0; line-height:1; font-size:100%; }.shailan-dropdown-menu{position:relative;z-index:597}ul.dropdown,ul.dropdown li,ul.dropdown ul{list-style:none;margin:0;padding:0}ul.dropdown li{position:relative;display:inline;vertical-align:middle;zoom:1}ul.dropdown li ul{position:absolute;z-index:598}ul.dropdown li.hover,ul.dropdown li:hover{cursor:default}ul.dropdown > li{float:left}ul.dropdown li a{padding:.3em .8em;cursor:pointer}ul.dropdown ul{position:absolute;top:100%;left:0}ul.dropdown ul li{float:none;display:list-item;list-style:none}ul.dropdown ul ul{top:1px;left:99%}ul.dropdown a:active,ul.dropdown a:focus{outline-style:none}* html ul.dropdown li{height:1px}ul.dropdown ul li,ul.dropdown-vertical{margin-left:0}ul.dropdown ul,ul.dropdown li.hover ul ul,ul.dropdown li.hover ul ul ul,ul.dropdown li.hover ul ul ul ul,ul.dropdown li.hover ul ul ul ul ul,ul.dropdown ul,ul.dropdown li:hover ul ul,ul.dropdown li:hover ul ul ul,ul.dropdown li:hover ul ul ul ul,ul.dropdown li:hover ul ul ul ul ul{display:none}ul.dropdown ul ul ul ul ul ul{display:none!important}.dm-align-right table{float:right}.dm-align-left table{float:left}ul.dropdown-horizontal.dropdown-align-right ul{right:0;left:auto}ul.dropdown-horizontal.dropdown-align-right ul ul{right:99%;left:auto}ul.dropdown-vertical.dropdown-align-left ul{top:1px;left:99%;right:auto}ul.dropdown-vertical.dropdown-align-right ul{top:1px;right:99%;left:auto}ul.dropdown-vertical li{float:none;display:block}.clearfix:after{clear:both;content:".";display:block;height:0;visibility:hidden}* html > body .clearfix{display:block;width:100%}* html .clearfix{height:1%}
options-page.php DELETED
@@ -1,252 +0,0 @@
1
- <?php
2
-
3
- global $pluginname, $pluginoptions;
4
-
5
- $i=0;
6
-
7
- if ( @$_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$pluginname.' settings saved.</strong></p></div>';
8
- if ( @$_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$pluginname.' settings reset.</strong></p></div>';
9
-
10
- ?>
11
-
12
- <div class="wrap">
13
- <?php screen_icon(); ?>
14
- <h2><?php echo esc_html( $title ); ?></h2>
15
-
16
- <?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
17
- <div id="message" class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
18
- <?php } ?>
19
- <?php if ( isset($_GET['error']) && isset($errors[$_GET['error']]) ) { ?>
20
- <div id="message" class="error"><p><?php echo $errors[$_GET['error']]; ?></p></div>
21
- <?php } ?>
22
-
23
- <form id="frmShailanDm" name="frmShailanDm" method="post" action="">
24
-
25
- <div class="widget-liquid-left">
26
- <div id="widgets-left">
27
-
28
-
29
- <?php foreach ($pluginoptions as $value) {
30
- switch ( $value['type'] ) {
31
-
32
- case "open":
33
- ?>
34
-
35
- <?php break;
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>
47
-
48
-
49
- <?php break;
50
-
51
- case "title":
52
- ?>
53
- <p>To easily use the <?php echo $pluginname;?>, you can use the menu below.</p>
54
-
55
-
56
- <?php break;
57
-
58
- case "paragraph":
59
- ?>
60
- <div class="shailan_dm_input shailan_dm_paragraph">
61
- <p><?php echo $value['desc']; ?></p>
62
- </div>
63
-
64
- <?php break;
65
-
66
- case "splitter":
67
- ?>
68
- <div class="shailan_dm_input shailan_dm_splitter"></div>
69
- <?php break;
70
-
71
- case 'picker':
72
- ?>
73
- <div id="picker"></div>
74
-
75
- <?php break;
76
- case 'text':
77
- ?>
78
-
79
- <div class="shailan_dm_input shailan_dm_text">
80
- <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>
81
- <input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_option( $value['id'] ) != "") { echo stripslashes(get_option( $value['id']) ); } else { echo $value['std']; } ?>" />
82
- <small><?php echo $value['desc']; ?></small><div class="clearfix"></div>
83
-
84
- </div>
85
- <?php
86
- break;
87
-
88
- case 'textarea':
89
- ?>
90
-
91
- <div class="shailan_dm_input shailan_dm_textarea">
92
- <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>
93
- <textarea name="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" cols="" rows=""><?php if ( get_option( $value['id'] ) != "") { echo stripslashes(get_option( $value['id']) ); } else { echo $value['std']; } ?></textarea>
94
- <small><?php echo $value['desc']; ?></small><div class="clearfix"></div>
95
-
96
- </div>
97
-
98
- <?php
99
- break;
100
-
101
- case 'select':
102
- ?>
103
-
104
- <div class="shailan_dm_input shailan_dm_select">
105
- <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>
106
-
107
- <!-- <pre>
108
- <?php print_r($value['options']); ?>
109
- </pre> -->
110
-
111
- <select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
112
- <?php foreach ($value['options'] as $key=>$option) { ?>
113
- <option <?php if (get_option( $value['id'] ) == $key) { echo 'selected="selected"'; } ?> value="<?php echo $key; ?>"><?php echo $option; ?></option><?php } ?>
114
- </select>
115
-
116
- <small><?php echo $value['desc']; ?></small><div class="clearfix"></div>
117
- </div>
118
- <?php
119
- break;
120
-
121
- case "checkbox":
122
- ?>
123
-
124
- <div class="shailan_dm_input shailan_dm_checkbox">
125
- <label for="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></label>
126
-
127
- <?php if(get_option($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = "";} ?>
128
- <input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
129
-
130
-
131
- <small><?php echo $value['desc']; ?></small><div class="clearfix"></div>
132
- </div>
133
- <?php break;
134
- case "section":
135
-
136
- $i++;
137
-
138
- ?>
139
-
140
- <div id="available-widgets" class="widgets-holder-wrap">
141
-
142
- <div class="sidebar-name"><h3><?php echo $value['name']; ?></h3> <span style="float:right;"></span><br class="clear" /></div>
143
- <div class="widget-holder">
144
-
145
-
146
- <?php break;
147
-
148
- }
149
- }
150
- ?>
151
-
152
- </div><!-- Widget holder -->
153
- </div><!-- Widgets left -->
154
-
155
- <div class="widget-liquid-right">
156
- <div id="widgets-right">
157
-
158
- <!--
159
- <div class="ads">
160
- <div class="ad">
161
- <span><a href="http://shailan.com/contact">Advertise here</a></span>
162
- </div>
163
- </div>
164
- -->
165
-
166
- <div class="widgets-holder-wrap">
167
- <div class="sidebar-name">
168
- <div class="sidebar-name-arrow"><br /></div>
169
- <h3>Help
170
- <span><img src="<?php echo esc_url( admin_url( 'images/wpspin_dark.gif' ) ); ?>" class="ajax-feedback" title="" alt="" /></span></h3></div>
171
-
172
- <div id='widgets-entry-bottom' class='widgets-sortables'>
173
- <div class='sidebar-description'>
174
- <ul>
175
- <li><a href="http://shailan.com/wordpress/plugins/dropdown-menu">Plugin page</a></li>
176
- <li><a href="http://wordpress.org/tags/dropdown-menu-widget">Support</a></li>
177
- </ul></div>
178
- </div>
179
- </div>
180
-
181
- <div class="widgets-holder-wrap">
182
- <div class="sidebar-name">
183
- <div class="sidebar-name-arrow"><br /></div>
184
- <h3>Shailan.com
185
- <span><img src="<?php echo esc_url( admin_url( 'images/wpspin_dark.gif' ) ); ?>" class="ajax-feedback" title="" alt="" /></span></h3></div>
186
-
187
- <div id='widgets-entry-bottom' class='widgets-sortables'>
188
- <div class='sidebar-description'><p class='description'>
189
-
190
- <?php
191
- //echo get_latest_tweet('mattsay');
192
-
193
- $rss_options = array(
194
- 'link' => 'http://shailan.com',
195
- 'url' => 'http://feeds.feedburner.com/shailan',
196
- 'title' => '',
197
- 'items' => 3,
198
- 'show_summary' => 0,
199
- 'show_author' => 0,
200
- 'show_date' => 0,
201
- 'before' => 'text'
202
- );
203
-
204
- wp_widget_rss_output( $rss_options ); ?>
205
-
206
-
207
- </p></div>
208
- </div>
209
- </div>
210
-
211
- <div class="widgets-holder-wrap">
212
- <div class="sidebar-name">
213
- <div class="sidebar-name-arrow"><br /></div>
214
- <h3>Support
215
- <span><img src="<?php echo esc_url( admin_url( 'images/wpspin_dark.gif' ) ); ?>" class="ajax-feedback" title="" alt="" /></span></h3></div>
216
-
217
- <div id='widgets-entry-bottom' class='widgets-sortables'>
218
- <div class='sidebar-description'><p class='description'>
219
-
220
- <p>If you like this plugin you can use one of the following options to support it:</p>
221
-
222
- <ul style="padding:0px 15px; list-style:disc;">
223
- <li><a href="http://shailan.com/wordpress/plugins/dropdown-menu/">Commenting on plugin page</a></li>
224
- <li><a href="http://wordpress.org/extend/plugins/dropdown-menu-widget/">Rating it on wordpress plugin page</a></li>
225
- <li><a href="http://shailan.com/wordpress/plugins/dropdown-menu/" title="Permanent link to Dropdown menu widget" >Writing a post about it</a></li>
226
- </ul>
227
-
228
- <p>You can also buy me a coffee here: <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
229
- <input type="hidden" name="cmd" value="_s-xclick">
230
- <input type="hidden" name="hosted_button_id" value="8F7M79S2PBU3G">
231
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
232
- <img alt="" border="0" src="https://www.paypal.com/tr_TR/i/scr/pixel.gif" width="1" height="1">
233
- </form></p>
234
-
235
- </div>
236
- </div>
237
- </div>
238
-
239
- </div>
240
- </div>
241
-
242
- <br class="clear">
243
-
244
- <input type="hidden" name="action" value="save" />
245
- <input name="save99" type="submit" class="button-primary menu-save" value="Save changes" />
246
- </form>
247
-
248
- <p class="aligncenter">
249
- <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; 2011
250
- </p>
251
-
252
- </div> <!-- wrap -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
- Tested up to: 3.4
7
- Stable tag: 1.9.1
8
 
9
  Pages/Categories/Custom dropdown navigation menus with nice jQuery effects. Comes with various customizable CSS themes!
10
 
@@ -55,6 +55,15 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
55
 
56
  == Changelog ==
57
 
 
 
 
 
 
 
 
 
 
58
  = 1.9.1 =
59
  * Added: More detailed faq and plugin banner.
60
 
3
  Donate link: http://shailan.com/donate
4
  Tags: css, dropdown, menu, widget, pages, categories, multi, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
+ Tested up to: 3.5
7
+ Stable tag: 1.9.2
8
 
9
  Pages/Categories/Custom dropdown navigation menus with nice jQuery effects. Comes with various customizable CSS themes!
10
 
55
 
56
  == Changelog ==
57
 
58
+ = 1.9.2 =
59
+ * Added: Settings link on plugins page.
60
+ * Added: Plugin activation redirect to Settings page.
61
+ * Added: Filter wp_nav_menu arguments to create a dropdown menu. Theme can be changed via dropdown menu settings page.
62
+ * Added: Demo menu on settings page.
63
+ * Removed: Unnecessary scripts from scripts folder.
64
+ * Removed: Twitter box on settings page.
65
+ * Some minor fixes and tidy up on options page.
66
+
67
  = 1.9.1 =
68
  * Added: More detailed faq and plugin banner.
69
 
scripts/jquery.tweetable.js DELETED
@@ -1,46 +0,0 @@
1
- /*
2
- * tweetable 1.3 - jQuery twitter feed generator plugin
3
- *
4
- * Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/)
5
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
6
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
7
- *
8
- * Revision: $Id: jquery.tweetable.js 2010-08-09 $
9
- *
10
- */
11
- (function($){
12
- $.fn.tweetable=function(options){
13
- var defaults={
14
- limit:5,
15
- username:'philipbeel',
16
- time:false,
17
- replies:false
18
- };
19
- var options=$.extend(defaults,options);
20
- return this.each(function(options){
21
- var act=$(this);
22
- var api="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=";
23
- var count="&count=";
24
- $.getJSON(api+defaults.username+count+defaults.limit+"&callback=?",act,function(data){
25
- $.each(data,function(i,item){
26
- if(i==0){
27
- $(act).prepend('<ul class="tweetList">');
28
- }
29
- if(defaults.replies === false) {
30
- if(item.in_reply_to_status_id === null){
31
- $('.tweetList').append('<li class="tweet_content_'+i+'"><span class="tweet_link_'+i+'">'+item.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2'));
32
- if(defaults.time==true){
33
- $('.tweet_content_'+i).append('<small> '+item.created_at.substr(0,20)+'</small>');
34
- }
35
- }
36
- } else {
37
- $('.tweetList').append('<li class="tweet_content_'+i+'"><span class="tweet_link_'+i+'">'+item.text.replace(/#(.*?)(\s|$)/g,'<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g,'<a href="http://twitter.com/$1">@$1 </a>$2'));
38
- if(defaults.time==true){
39
- $('.tweet_content_'+i).append('<small> '+item.created_at.substr(0,20)+'</small>');
40
- }
41
- }
42
- });
43
- });
44
- });
45
- }
46
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/jquery.wysiwyg.css DELETED
@@ -1,57 +0,0 @@
1
-
2
- div.wysiwyg { border: 1px solid #cccccc; padding: 5px; background-color: #ffffff; }
3
- div.wysiwyg * { margin: 0; padding: 0; }
4
-
5
- div.wysiwyg ul.panel { border-bottom: 1px solid #cccccc; float: left; width: 100%; padding: 0 0 0 0; }
6
- div.wysiwyg ul.panel li { list-style-type: none; float: left; margin: 1px 2px 3px 0; background: #ffffff;}
7
- div.wysiwyg ul.panel li.separator { height: 16px; margin: 0 4px; border-left: 1px solid #cccccc; }
8
- div.wysiwyg ul.panel li a { text-indent: -5000px; opacity: 0.85; filter:alpha(opacity=85); display: block; width: 16px; height: 16px; background: url('jquery.wysiwyg.gif') no-repeat -64px -80px; border: 0; cursor: pointer; padding: 1px; }
9
- div.wysiwyg ul.panel li a:hover, div.wysiwyg ul.panel li a.active { opacity: 1.00; filter:alpha(opacity=100); }
10
- div.wysiwyg ul.panel li a.active { background-color: #f9f9f9; border: 1px solid #cccccc; border-left-color: #aaaaaa; border-top-color: #aaaaaa; padding: 0; }
11
-
12
- div.wysiwyg ul.panel li a.bold { background-position: 0 -16px; }
13
- div.wysiwyg ul.panel li a.italic { background-position: -16px -16px; }
14
- div.wysiwyg ul.panel li a.strikeThrough { background-position: -32px -16px; }
15
- div.wysiwyg ul.panel li a.underline { background-position: -48px -16px; }
16
-
17
- div.wysiwyg ul.panel li a.justifyLeft { background-position: 0 0; }
18
- div.wysiwyg ul.panel li a.justifyCenter { background-position: -16px 0; }
19
- div.wysiwyg ul.panel li a.justifyRight { background-position: -32px 0; }
20
- div.wysiwyg ul.panel li a.justifyFull { background-position: -48px 0; }
21
-
22
- div.wysiwyg ul.panel li a.indent { background-position: -64px 0; }
23
- div.wysiwyg ul.panel li a.outdent { background-position: -80px 0; }
24
-
25
- div.wysiwyg ul.panel li a.subscript { background-position: -64px -16px; }
26
- div.wysiwyg ul.panel li a.superscript { background-position: -80px -16px; }
27
-
28
- div.wysiwyg ul.panel li a.undo { background-position: 0 -64px; }
29
- div.wysiwyg ul.panel li a.redo { background-position: -16px -64px; }
30
-
31
- div.wysiwyg ul.panel li a.insertOrderedList { background-position: -32px -48px; }
32
- div.wysiwyg ul.panel li a.insertUnorderedList { background-position: -16px -48px; }
33
- div.wysiwyg ul.panel li a.insertHorizontalRule { background-position: 0 -48px; }
34
-
35
- div.wysiwyg ul.panel li a.h1 { background-position: 0 -32px; }
36
- div.wysiwyg ul.panel li a.h2 { background-position: -16px -32px; }
37
- div.wysiwyg ul.panel li a.h3 { background-position: -32px -32px; }
38
- div.wysiwyg ul.panel li a.h4 { background-position: -48px -32px; }
39
- div.wysiwyg ul.panel li a.h5 { background-position: -64px -32px; }
40
- div.wysiwyg ul.panel li a.h6 { background-position: -80px -32px; }
41
-
42
- div.wysiwyg ul.panel li a.cut { background-position: -32px -64px; }
43
- div.wysiwyg ul.panel li a.copy { background-position: -48px -64px; }
44
- div.wysiwyg ul.panel li a.paste { background-position: -64px -64px; }
45
-
46
- div.wysiwyg ul.panel li a.increaseFontSize { background-position: -16px -80px; }
47
- div.wysiwyg ul.panel li a.decreaseFontSize { background-position: -32px -80px; }
48
-
49
- div.wysiwyg ul.panel li a.createLink { background-position: -80px -48px; }
50
- div.wysiwyg ul.panel li a.insertImage { background-position: -80px -80px; }
51
-
52
- div.wysiwyg ul.panel li a.html { background-position: -47px -46px; }
53
- div.wysiwyg ul.panel li a.removeFormat { background-position: -80px -63px; }
54
-
55
- div.wysiwyg ul.panel li a.empty { background-position: -64px -80px; }
56
-
57
- div.wysiwyg iframe { border: 0; clear: left; margin: 4px 0 0 1px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/jquery.wysiwyg.gif DELETED
Binary file
scripts/jquery.wysiwyg.jpg DELETED
Binary file
scripts/jquery.wysiwyg.js DELETED
@@ -1,745 +0,0 @@
1
- /**
2
- * WYSIWYG - jQuery plugin 0.6
3
- *
4
- * Copyright (c) 2008-2009 Juan M Martinez
5
- * http://plugins.jquery.com/project/jWYSIWYG
6
- *
7
- * Dual licensed under the MIT and GPL licenses:
8
- * http://www.opensource.org/licenses/mit-license.php
9
- * http://www.gnu.org/licenses/gpl.html
10
- *
11
- * $Id: $
12
- */
13
- (function( $ )
14
- {
15
- $.fn.document = function()
16
- {
17
- var element = this.get(0);
18
-
19
- if ( element.nodeName.toLowerCase() == 'iframe' )
20
- {
21
- return element.contentWindow.document;
22
- /*
23
- return ( $.browser.msie )
24
- ? document.frames[element.id].document
25
- : element.contentWindow.document // contentDocument;
26
- */
27
- }
28
- return this;
29
- };
30
-
31
- $.fn.documentSelection = function()
32
- {
33
- var element = this.get(0);
34
-
35
- if ( element.contentWindow.document.selection )
36
- return element.contentWindow.document.selection.createRange().text;
37
- else
38
- return element.contentWindow.getSelection().toString();
39
- };
40
-
41
- $.fn.wysiwyg = function( options )
42
- {
43
- if ( arguments.length > 0 && arguments[0].constructor == String )
44
- {
45
- var action = arguments[0].toString();
46
- var params = [];
47
-
48
- for ( var i = 1; i < arguments.length; i++ )
49
- params[i - 1] = arguments[i];
50
-
51
- if ( action in Wysiwyg )
52
- {
53
- return this.each(function()
54
- {
55
- $.data(this, 'wysiwyg')
56
- .designMode();
57
-
58
- Wysiwyg[action].apply(this, params);
59
- });
60
- }
61
- else return this;
62
- }
63
-
64
- var controls = {};
65
-
66
- /**
67
- * If the user set custom controls, we catch it, and merge with the
68
- * defaults controls later.
69
- */
70
- if ( options && options.controls )
71
- {
72
- var controls = options.controls;
73
- delete options.controls;
74
- }
75
-
76
- options = $.extend({
77
- html : '<'+'?xml version="1.0" encoding="UTF-8"?'+'><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">STYLE_SHEET</head><body style="margin: 0px;">INITIAL_CONTENT</body></html>',
78
- css : {},
79
-
80
- debug : false,
81
-
82
- autoSave : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=11
83
- rmUnwantedBr : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=15
84
- brIE : true,
85
-
86
- controls : {},
87
- messages : {}
88
- }, options);
89
-
90
- options.messages = $.extend(true, options.messages, Wysiwyg.MSGS_EN);
91
- options.controls = $.extend(true, options.controls, Wysiwyg.TOOLBAR);
92
-
93
- for ( var control in controls )
94
- {
95
- if ( control in options.controls )
96
- $.extend(options.controls[control], controls[control]);
97
- else
98
- options.controls[control] = controls[control];
99
- }
100
-
101
- // not break the chain
102
- return this.each(function()
103
- {
104
- Wysiwyg(this, options);
105
- });
106
- };
107
-
108
- function Wysiwyg( element, options )
109
- {
110
- return this instanceof Wysiwyg
111
- ? this.init(element, options)
112
- : new Wysiwyg(element, options);
113
- }
114
-
115
- $.extend(Wysiwyg, {
116
- insertImage : function( szURL, attributes )
117
- {
118
- var self = $.data(this, 'wysiwyg');
119
-
120
- if ( self.constructor == Wysiwyg && szURL && szURL.length > 0 )
121
- {
122
- if ($.browser.msie) self.focus();
123
- if ( attributes )
124
- {
125
- self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
126
- var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
127
-
128
- if ( img )
129
- {
130
- img.src = szURL;
131
-
132
- for ( var attribute in attributes )
133
- {
134
- img.setAttribute(attribute, attributes[attribute]);
135
- }
136
- }
137
- }
138
- else
139
- {
140
- self.editorDoc.execCommand('insertImage', false, szURL);
141
- }
142
- }
143
- },
144
-
145
- createLink : function( szURL )
146
- {
147
- var self = $.data(this, 'wysiwyg');
148
-
149
- if ( self.constructor == Wysiwyg && szURL && szURL.length > 0 )
150
- {
151
- var selection = $(self.editor).documentSelection();
152
-
153
- if ( selection.length > 0 )
154
- {
155
- if ($.browser.msie) self.focus();
156
- self.editorDoc.execCommand('unlink', false, []);
157
- self.editorDoc.execCommand('createLink', false, szURL);
158
- }
159
- else if ( self.options.messages.nonSelection )
160
- alert(self.options.messages.nonSelection);
161
- }
162
- },
163
-
164
- insertHtml : function( szHTML )
165
- {
166
- var self = $.data(this, 'wysiwyg');
167
-
168
- if ( self.constructor == Wysiwyg && szHTML && szHTML.length > 0 )
169
- {
170
- if ($.browser.msie)
171
- {
172
- self.focus();
173
- self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
174
- var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
175
- if (img)
176
- {
177
- $(img).replaceWith(szHTML);
178
- }
179
- }
180
- else
181
- {
182
- self.editorDoc.execCommand('insertHTML', false, szHTML);
183
- }
184
- }
185
- },
186
-
187
- setContent : function( newContent )
188
- {
189
- var self = $.data(this, 'wysiwyg');
190
- self.setContent( newContent );
191
- self.saveContent();
192
- },
193
-
194
- clear : function()
195
- {
196
- var self = $.data(this, 'wysiwyg');
197
- self.setContent('');
198
- self.saveContent();
199
- },
200
-
201
- MSGS_EN : {
202
- nonSelection : 'select the text you wish to link'
203
- },
204
-
205
- TOOLBAR : {
206
- bold : { visible : true, tags : ['b', 'strong'], css : { fontWeight : 'bold' }, tooltip : "Bold" },
207
- italic : { visible : true, tags : ['i', 'em'], css : { fontStyle : 'italic' }, tooltip : "Italic" },
208
- strikeThrough : { visible : true, tags : ['s', 'strike'], css : { textDecoration : 'line-through' }, tooltip : "Strike-through" },
209
- underline : { visible : true, tags : ['u'], css : { textDecoration : 'underline' }, tooltip : "Underline" },
210
-
211
- separator00 : { visible : true, separator : true },
212
-
213
- justifyLeft : { visible : true, css : { textAlign : 'left' }, tooltip : "Justify Left" },
214
- justifyCenter : { visible : true, tags : ['center'], css : { textAlign : 'center' }, tooltip : "Justify Center" },
215
- justifyRight : { visible : true, css : { textAlign : 'right' }, tooltip : "Justify Right" },
216
- justifyFull : { visible : true, css : { textAlign : 'justify' }, tooltip : "Justify Full" },
217
-
218
- separator01 : { visible : true, separator : true },
219
-
220
- indent : { visible : true, tooltip : "Indent" },
221
- outdent : { visible : true, tooltip : "Outdent" },
222
-
223
- separator02 : { visible : false, separator : true },
224
-
225
- subscript : { visible : true, tags : ['sub'], tooltip : "Subscript" },
226
- superscript : { visible : true, tags : ['sup'], tooltip : "Superscript" },
227
-
228
- separator03 : { visible : true, separator : true },
229
-
230
- undo : { visible : true, tooltip : "Undo" },
231
- redo : { visible : true, tooltip : "Redo" },
232
-
233
- separator04 : { visible : true, separator : true },
234
-
235
- insertOrderedList : { visible : true, tags : ['ol'], tooltip : "Insert Ordered List" },
236
- insertUnorderedList : { visible : true, tags : ['ul'], tooltip : "Insert Unordered List" },
237
- insertHorizontalRule : { visible : true, tags : ['hr'], tooltip : "Insert Horizontal Rule" },
238
-
239
- separator05 : { separator : true },
240
-
241
- createLink : {
242
- visible : true,
243
- exec : function()
244
- {
245
- var selection = $(this.editor).documentSelection();
246
-
247
- if ( selection.length > 0 )
248
- {
249
- if ( $.browser.msie )
250
- {
251
- this.focus();
252
- this.editorDoc.execCommand('createLink', true, null);
253
- }
254
- else
255
- {
256
- var szURL = prompt('URL', 'http://');
257
-
258
- if ( szURL && szURL.length > 0 )
259
- {
260
- this.editorDoc.execCommand('unlink', false, []);
261
- this.editorDoc.execCommand('createLink', false, szURL);
262
- }
263
- }
264
- }
265
- else if ( this.options.messages.nonSelection )
266
- alert(this.options.messages.nonSelection);
267
- },
268
-
269
- tags : ['a'],
270
- tooltip : "Create link"
271
- },
272
-
273
- insertImage : {
274
- visible : true,
275
- exec : function()
276
- {
277
- if ( $.browser.msie )
278
- {
279
- this.focus();
280
- this.editorDoc.execCommand('insertImage', true, null);
281
- }
282
- else
283
- {
284
- var szURL = prompt('URL', 'http://');
285
-
286
- if ( szURL && szURL.length > 0 )
287
- this.editorDoc.execCommand('insertImage', false, szURL);
288
- }
289
- },
290
-
291
- tags : ['img'],
292
- tooltip : "Insert image"
293
- },
294
-
295
- separator06 : { separator : true },
296
-
297
- h1mozilla : { visible : true && $.browser.mozilla, className : 'h1', command : 'heading', arguments : ['h1'], tags : ['h1'], tooltip : "Header 1" },
298
- h2mozilla : { visible : true && $.browser.mozilla, className : 'h2', command : 'heading', arguments : ['h2'], tags : ['h2'], tooltip : "Header 2" },
299
- h3mozilla : { visible : true && $.browser.mozilla, className : 'h3', command : 'heading', arguments : ['h3'], tags : ['h3'], tooltip : "Header 3" },
300
-
301
- h1 : { visible : true && !( $.browser.mozilla ), className : 'h1', command : 'formatBlock', arguments : ['<H1>'], tags : ['h1'], tooltip : "Header 1" },
302
- h2 : { visible : true && !( $.browser.mozilla ), className : 'h2', command : 'formatBlock', arguments : ['<H2>'], tags : ['h2'], tooltip : "Header 2" },
303
- h3 : { visible : true && !( $.browser.mozilla ), className : 'h3', command : 'formatBlock', arguments : ['<H3>'], tags : ['h3'], tooltip : "Header 3" },
304
-
305
- separator07 : { visible : false, separator : true },
306
-
307
- cut : { visible : false, tooltip : "Cut" },
308
- copy : { visible : false, tooltip : "Copy" },
309
- paste : { visible : false, tooltip : "Paste" },
310
-
311
- separator08 : { separator : false && !( $.browser.msie ) },
312
-
313
- increaseFontSize : { visible : false && !( $.browser.msie ), tags : ['big'], tooltip : "Increase font size" },
314
- decreaseFontSize : { visible : false && !( $.browser.msie ), tags : ['small'], tooltip : "Decrease font size" },
315
-
316
- separator09 : { separator : true },
317
-
318
- html : {
319
- visible : false,
320
- exec : function()
321
- {
322
- if ( this.viewHTML )
323
- {
324
- this.setContent( $(this.original).val() );
325
- $(this.original).hide();
326
- }
327
- else
328
- {
329
- this.saveContent();
330
- $(this.original).show();
331
- }
332
-
333
- this.viewHTML = !( this.viewHTML );
334
- },
335
- tooltip : "View source code"
336
- },
337
-
338
- removeFormat : {
339
- visible : true,
340
- exec : function()
341
- {
342
- if ($.browser.msie) this.focus();
343
- this.editorDoc.execCommand('removeFormat', false, []);
344
- this.editorDoc.execCommand('unlink', false, []);
345
- },
346
- tooltip : "Remove formatting"
347
- }
348
- }
349
- });
350
-
351
- $.extend(Wysiwyg.prototype,
352
- {
353
- original : null,
354
- options : {},
355
-
356
- element : null,
357
- editor : null,
358
-
359
- focus : function()
360
- {
361
- $(this.editorDoc.body).focus();
362
- },
363
-
364
- init : function( element, options )
365
- {
366
- var self = this;
367
-
368
- this.editor = element;
369
- this.options = options || {};
370
-
371
- $.data(element, 'wysiwyg', this);
372
-
373
- var newX = element.width || element.clientWidth;
374
- var newY = element.height || element.clientHeight;
375
-
376
- if ( element.nodeName.toLowerCase() == 'textarea' )
377
- {
378
- this.original = element;
379
-
380
- if ( newX == 0 && element.cols )
381
- newX = ( element.cols * 8 ) + 21;
382
-
383
- if ( newY == 0 && element.rows )
384
- newY = ( element.rows * 16 ) + 16;
385
-
386
- var editor = this.editor = $('<iframe src="javascript:false;"></iframe>').css({
387
- minHeight : ( newY - 6 ).toString() + 'px',
388
- width : ( newX - 8 ).toString() + 'px'
389
- }).attr('id', $(element).attr('id') + 'IFrame')
390
- .attr('frameborder', '0');
391
-
392
- /**
393
- * http://code.google.com/p/jwysiwyg/issues/detail?id=96
394
- */
395
- this.editor.attr('tabindex', $(element).attr('tabindex'));
396
-
397
- if ( $.browser.msie )
398
- {
399
- this.editor
400
- .css('height', ( newY ).toString() + 'px');
401
-
402
- /**
403
- var editor = $('<span></span>').css({
404
- width : ( newX - 6 ).toString() + 'px',
405
- height : ( newY - 8 ).toString() + 'px'
406
- }).attr('id', $(element).attr('id') + 'IFrame');
407
-
408
- editor.outerHTML = this.editor.outerHTML;
409
- */
410
- }
411
- }
412
-
413
- var panel = this.panel = $('<ul role="menu" class="panel"></ul>');
414
-
415
- this.appendControls();
416
- this.element = $('<div></div>').css({
417
- width : ( newX > 0 ) ? ( newX ).toString() + 'px' : '100%'
418
- }).addClass('wysiwyg')
419
- .append(panel)
420
- .append( $('<div><!-- --></div>').css({ clear : 'both' }) )
421
- .append(editor)
422
- ;
423
-
424
- $(element)
425
- .hide()
426
- .before(this.element)
427
- ;
428
-
429
- this.viewHTML = false;
430
- this.initialHeight = newY - 8;
431
-
432
- /**
433
- * @link http://code.google.com/p/jwysiwyg/issues/detail?id=52
434
- */
435
- this.initialContent = $(element).val();
436
- this.initFrame();
437
-
438
- if ( this.initialContent.length == 0 )
439
- this.setContent('');
440
-
441
- /**
442
- * http://code.google.com/p/jwysiwyg/issues/detail?id=100
443
- */
444
- var form = $(element).closest('form');
445
-
446
- if ( this.options.autoSave )
447
- {
448
- form.submit(function() { self.saveContent(); });
449
- }
450
-
451
- form.bind('reset', function()
452
- {
453
- self.setContent( self.initialContent );
454
- self.saveContent();
455
- });
456
- },
457
-
458
- initFrame : function()
459
- {
460
- var self = this;
461
- var style = '';
462
-
463
- /**
464
- * @link http://code.google.com/p/jwysiwyg/issues/detail?id=14
465
- */
466
- if ( this.options.css && this.options.css.constructor == String )
467
- {
468
- style = '<link rel="stylesheet" type="text/css" media="screen" href="' + this.options.css + '" />';
469
- }
470
-
471
- this.editorDoc = $(this.editor).document();
472
- this.editorDoc_designMode = false;
473
-
474
- try {
475
- this.editorDoc.designMode = 'on';
476
- this.editorDoc_designMode = true;
477
- } catch ( e ) {
478
- // Will fail on Gecko if the editor is placed in an hidden container element
479
- // The design mode will be set ones the editor is focused
480
-
481
- $(this.editorDoc).focus(function()
482
- {
483
- self.designMode();
484
- });
485
- }
486
-
487
- this.editorDoc.open();
488
- this.editorDoc.write(
489
- this.options.html
490
- /**
491
- * @link http://code.google.com/p/jwysiwyg/issues/detail?id=144
492
- */
493
- .replace(/INITIAL_CONTENT/, function() { return self.initialContent; })
494
- .replace(/STYLE_SHEET/, function() { return style; })
495
- );
496
- this.editorDoc.close();
497
-
498
- this.editorDoc.contentEditable = 'true';
499
-
500
- if ( $.browser.msie )
501
- {
502
- /**
503
- * Remove the horrible border it has on IE.
504
- */
505
- setTimeout(function() { $(self.editorDoc.body).css('border', 'none'); }, 0);
506
- }
507
-
508
- $(this.editorDoc).click(function( event )
509
- {
510
- self.checkTargets( event.target ? event.target : event.srcElement);
511
- });
512
-
513
- /**
514
- * @link http://code.google.com/p/jwysiwyg/issues/detail?id=20
515
- */
516
- $(this.original).focus(function()
517
- {
518
- if (!$.browser.msie)
519
- {
520
- self.focus();
521
- }
522
- });
523
-
524
- if ( this.options.autoSave )
525
- {
526
- /**
527
- * @link http://code.google.com/p/jwysiwyg/issues/detail?id=11
528
- */
529
- $(this.editorDoc).keydown(function() { self.saveContent(); })
530
- .keyup(function() { self.saveContent(); })
531
- .mousedown(function() { self.saveContent(); });
532
- }
533
-
534
- if ( this.options.css )
535
- {
536
- setTimeout(function()
537
- {
538
- if ( self.options.css.constructor == String )
539
- {
540
- /**
541
- * $(self.editorDoc)
542
- * .find('head')
543
- * .append(
544
- * $('<link rel="stylesheet" type="text/css" media="screen" />')
545
- * .attr('href', self.options.css)
546
- * );
547
- */
548
- }
549
- else
550
- $(self.editorDoc).find('body').css(self.options.css);
551
- }, 0);
552
- }
553
-
554
- $(this.editorDoc).keydown(function( event )
555
- {
556
- if ( $.browser.msie && self.options.brIE && event.keyCode == 13 )
557
- {
558
- var rng = self.getRange();
559
- rng.pasteHTML('<br />');
560
- rng.collapse(false);
561
- rng.select();
562
- return false;
563
- }
564
- return true;
565
- });
566
- },
567
-
568
- designMode : function()
569
- {
570
- if ( !( this.editorDoc_designMode ) )
571
- {
572
- try {
573
- this.editorDoc.designMode = 'on';
574
- this.editorDoc_designMode = true;
575
- } catch ( e ) {}
576
- }
577
- },
578
-
579
- getSelection : function()
580
- {
581
- return ( window.getSelection ) ? window.getSelection() : document.selection;
582
- },
583
-
584
- getRange : function()
585
- {
586
- var selection = this.getSelection();
587
-
588
- if ( !( selection ) )
589
- return null;
590
-
591
- return ( selection.rangeCount > 0 ) ? selection.getRangeAt(0) : selection.createRange();
592
- },
593
-
594
- getContent : function()
595
- {
596
- return $( $(this.editor).document() ).find('body').html();
597
- },
598
-
599
- setContent : function( newContent )
600
- {
601
- $( $(this.editor).document() ).find('body').html(newContent);
602
- },
603
-
604
- saveContent : function()
605
- {
606
- if ( this.original )
607
- {
608
- var content = this.getContent();
609
-
610
- if ( this.options.rmUnwantedBr )
611
- {
612
- content = ( content.substr(-4) == '<br>' ) ? content.substr(0, content.length - 4) : content;
613
- }
614
-
615
- $(this.original).val(content);
616
- }
617
- },
618
-
619
- withoutCss: function()
620
- {
621
- if ($.browser.mozilla)
622
- {
623
- try
624
- {
625
- this.editorDoc.execCommand('styleWithCSS', false, false);
626
- }
627
- catch (e)
628
- {
629
- try
630
- {
631
- this.editorDoc.execCommand('useCSS', false, true);
632
- }
633
- catch (e)
634
- {
635
- }
636
- }
637
- }
638
- },
639
-
640
- appendMenu : function( cmd, args, className, fn, tooltip )
641
- {
642
- var self = this;
643
- args = args || [];
644
-
645
- $('<li></li>').append(
646
- $('<a role="menuitem" tabindex="-1" href="javascript:;">' + (className || cmd) + '</a>')
647
- .addClass(className || cmd)
648
- .attr('title', tooltip)
649
- ).click(function() {
650
- if ( fn ) fn.apply(self); else
651
- {
652
- self.withoutCss();
653
- self.editorDoc.execCommand(cmd, false, args);
654
- }
655
- if ( self.options.autoSave ) self.saveContent();
656
- }).appendTo( this.panel );
657
- },
658
-
659
- appendMenuSeparator : function()
660
- {
661
- $('<li role="separator" class="separator"></li>').appendTo( this.panel );
662
- },
663
-
664
- appendControls : function()
665
- {
666
- for ( var name in this.options.controls )
667
- {
668
- var control = this.options.controls[name];
669
-
670
- if ( control.separator )
671
- {
672
- if ( control.visible !== false )
673
- this.appendMenuSeparator();
674
- }
675
- else if ( control.visible )
676
- {
677
- this.appendMenu(
678
- control.command || name, control.arguments || [],
679
- control.className || control.command || name || 'empty', control.exec,
680
- control.tooltip || control.command || name || ''
681
- );
682
- }
683
- }
684
- },
685
-
686
- checkTargets : function( element )
687
- {
688
- for ( var name in this.options.controls )
689
- {
690
- var control = this.options.controls[name];
691
- var className = control.className || control.command || name || 'empty';
692
-
693
- $('.' + className, this.panel).removeClass('active');
694
-
695
- if ( control.tags )
696
- {
697
- var elm = element;
698
-
699
- do {
700
- if ( elm.nodeType != 1 )
701
- break;
702
-
703
- if ( $.inArray(elm.tagName.toLowerCase(), control.tags) != -1 )
704
- $('.' + className, this.panel).addClass('active');
705
- } while ((elm = elm.parentNode));
706
- }
707
-
708
- if ( control.css )
709
- {
710
- var elm = $(element);
711
-
712
- do {
713
- if ( elm[0].nodeType != 1 )
714
- break;
715
-
716
- for ( var cssProperty in control.css )
717
- if ( elm.css(cssProperty).toString().toLowerCase() == control.css[cssProperty] )
718
- $('.' + className, this.panel).addClass('active');
719
- } while ((elm = elm.parent()));
720
- }
721
- }
722
- },
723
-
724
- getElementByAttributeValue : function( tagName, attributeName, attributeValue )
725
- {
726
- var elements = this.editorDoc.getElementsByTagName(tagName);
727
-
728
- for ( var i = 0; i < elements.length; i++ )
729
- {
730
- var value = elements[i].getAttribute(attributeName);
731
-
732
- if ( $.browser.msie )
733
- {
734
- /** IE add full path, so I check by the last chars. */
735
- value = value.substr(value.length - attributeValue.length);
736
- }
737
-
738
- if ( value == attributeValue )
739
- return elements[i];
740
- }
741
-
742
- return false;
743
- }
744
- });
745
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
shailan-dropdown-menu-options.php CHANGED
@@ -5,7 +5,7 @@ function help_icon($hash){
5
  }
6
 
7
  // Define themes
8
- $available_themes = array(
9
  'None' => '*none*',
10
  'From URL' => '*url*',
11
  'Custom CSS' => '*custom*',
@@ -27,6 +27,8 @@ $available_themes = array(
27
  'Pills by Shailan' => plugins_url('/themes/pills.css', __FILE__)
28
  );
29
 
 
 
30
  // Check for theme style file
31
  if( file_exists( trailingslashit( get_stylesheet_directory() ) . 'dropdown.css') ){
32
  $available_themes['Dropdown.css (theme)'] = get_stylesheet_directory_uri() . '/dropdown.css';
@@ -36,6 +38,8 @@ if( file_exists( trailingslashit( get_template_directory() ) . 'dropdown.css') )
36
  $available_themes['Dropdown.css (template)'] = get_template_directory_uri() . '/dropdown.css';
37
  }
38
 
 
 
39
  // Swap array for options page
40
  $themes = array();
41
  while(list($Key,$Val) = each($available_themes))
@@ -72,6 +76,9 @@ if( function_exists('wp_nav_menu') ){
72
 
73
  $this->menu_types = $types; // Back it up
74
 
 
 
 
75
  // Define plugin options
76
  $options = array(
77
 
@@ -80,6 +87,31 @@ array(
80
  "label" => __("General"),
81
  "type" => "section"
82
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  array( "name" => "Rename Homepage",
85
  "desc" => "You can change your homepage link text here " . help_icon("rename-homepage"),
@@ -99,22 +131,64 @@ array(
99
  "std" => "rgba(0,0,0,0.5)",
100
  "type" => "text"),
101
 
102
- array( "name" => "Wrap long menu items",
103
- "desc" => "If checked long menu items will wrap". help_icon("wrap-long-menu-items"),
104
- "id" => "shailan_dm_allowmultiline",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  "type" => "checkbox"),
106
 
107
- array( "name" => "Remove title attributes",
108
- "desc" => "This will remove 'View all posts under..' title attributes from menu links". help_icon("remove-title-attributes"),
109
- "id" => "shailan_dm_remove_title_attributes",
 
110
  "type" => "checkbox"),
111
 
112
- array( "name" => "Remove links from top levels",
113
- "desc" => "This will remove links from top level pages/categories. So user can only click to sub-level menu.". help_icon("remove-links-from-top-levels"),
114
- "id" => "shailan_dm_remove_top_level_links",
 
115
  "type" => "checkbox"),
116
 
117
- array( "type" => "close" ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
  array(
120
  "name" => "Effects",
@@ -124,6 +198,7 @@ array(
124
 
125
  array( "name" => "Enable dropdown effects",
126
  "desc" => "If checked sub menus will use effects below". help_icon("enable-dropdown-effects"),
 
127
  "id" => "shailan_dm_effects",
128
  "type" => "checkbox"),
129
 
@@ -137,6 +212,7 @@ array(
137
  "desc" => "Select effect speed".help_icon("effect-speed"),
138
  "id" => "shailan_dm_effect_speed",
139
  "type" => "select",
 
140
  "options" => $speed ),
141
 
142
  array( "name" => "Effect delay",
@@ -148,33 +224,20 @@ array(
148
  array( "type" => "close" ),
149
 
150
  array(
151
- "name" => "Theme",
152
- "label" => __("Theme"),
153
  "type" => "section"
154
  ),
155
 
156
- array( "name" => "Dropdown Menu Theme",
157
- "desc" => "Skin for the menu".help_icon("menu-theme"),
158
- "id" => "shailan_dm_active_theme",
159
- "std" => "None",
160
- "options" => $themes,
161
- "type" => "select"),
162
-
163
- array( "name" => "Theme URL",
164
- "desc" => "If <strong>From URL</strong> is selected you can specify theme URL here. ".help_icon("theme-url"),
165
- "id" => "shailan_dm_theme_url",
166
- "std" => "http://",
167
- "type" => "text"),
168
-
169
  array(
170
- "desc" => "Using options below you can customize certain elements of current theme. If you choose <strong>Color Scheme</strong> as theme, you will have full control over colors.",
171
  "type" => "paragraph"
172
  ),
173
 
174
  array( "name" => "Use custom colors",
175
  "desc" => "If not checked custom colors won't work.".help_icon("use-custom-colors"),
176
  "id" => "shailan_dm_custom_colors",
177
- "std" => true,
178
  "type" => "checkbox"),
179
 
180
  array("type"=>"picker"),
@@ -241,66 +304,33 @@ array(
241
  array( "name" => "Show Empty Categories",
242
  "desc" => "If checked categories with no posts will be shown.".help_icon("show-empty-categories"),
243
  "id" => "shailan_dm_show_empty",
244
- "std" => false,
245
  "type" => "checkbox"),
246
 
247
- array( "type" => "close" ),
248
-
249
- array(
250
- "name" => "Template Tag",
251
- "label" => __("Template Tag"),
252
- "type" => "section"
253
  ),
254
 
255
- array(
256
- "desc" => "Settings here only effect menus inserted with template tag : <code>&lt;?php shailan_dropdown_menu(); ?&gt;</code>. Widget settings are NOT affected by these settings. ".help_icon("template-tag"),
257
- "type" => "paragraph"
 
 
 
258
  ),
259
 
260
- array( "name" => "Menu Type",
261
- "desc" => "Dropdown Menu Type".help_icon("menu-type"),
262
- "id" => "shailan_dm_type",
263
- "std" => "pages",
264
- "options" => $types,
265
- "type" => "select"),
266
-
267
- array( "name" => "Home link",
268
- "desc" => "If checked dropdown menu displays home link".help_icon("home-link"),
269
- "id" => "shailan_dm_home",
270
- "std" => true,
271
- "type" => "checkbox"),
272
-
273
- array( "name" => "Login",
274
- "desc" => "If checked dropdown menu displays login link".help_icon("login"),
275
- "id" => "shailan_dm_login",
276
- "std" => true,
277
- "type" => "checkbox"),
278
-
279
- array( "name" => "Register / Site Admin",
280
- "desc" => "If checked dropdown menu displays register/site admin link.".help_icon("register-site-admin"),
281
- "id" => "shailan_dm_login",
282
- "std" => true,
283
- "type" => "checkbox"),
284
-
285
- array( "name" => "Vertical menu",
286
- "desc" => "If checked dropdown menu is displayed vertical.".help_icon("vertical-menu"),
287
- "id" => "shailan_dm_vertical",
288
- "std" => true,
289
- "type" => "checkbox"),
290
-
291
- array( "name" => "Exclude Pages",
292
- "desc" => "Excluded page IDs.".help_icon("exclude-pages"),
293
- "id" => "shailan_dm_exclude",
294
- "std" => "",
295
- "type" => "text"),
296
-
297
- array( "name" => "Alignment",
298
- "desc" => "Menu alignment.".help_icon("alignment"),
299
- "id" => "shailan_dm_align",
300
- "std" => "left",
301
- "options" => $alignment,
302
- "type" => "select"),
303
 
304
  array( "type" => "close" )
305
 
306
- );
5
  }
6
 
7
  // Define themes
8
+ $default_themes = array(
9
  'None' => '*none*',
10
  'From URL' => '*url*',
11
  'Custom CSS' => '*custom*',
27
  'Pills by Shailan' => plugins_url('/themes/pills.css', __FILE__)
28
  );
29
 
30
+ $available_themes = array();
31
+
32
  // Check for theme style file
33
  if( file_exists( trailingslashit( get_stylesheet_directory() ) . 'dropdown.css') ){
34
  $available_themes['Dropdown.css (theme)'] = get_stylesheet_directory_uri() . '/dropdown.css';
38
  $available_themes['Dropdown.css (template)'] = get_template_directory_uri() . '/dropdown.css';
39
  }
40
 
41
+ $available_themes = array_merge( $available_themes, $default_themes );
42
+
43
  // Swap array for options page
44
  $themes = array();
45
  while(list($Key,$Val) = each($available_themes))
76
 
77
  $this->menu_types = $types; // Back it up
78
 
79
+ // Registered menu locations
80
+ global $_wp_registered_nav_menus;
81
+
82
  // Define plugin options
83
  $options = array(
84
 
87
  "label" => __("General"),
88
  "type" => "section"
89
  ),
90
+
91
+ array( "name" => "Dropdown Menu Theme",
92
+ "desc" => "Skin for the menu".help_icon("menu-theme"),
93
+ "id" => "shailan_dm_active_theme",
94
+ "std" => plugins_url("/dropdown-menu-widget/themes/web20.css"),
95
+ "options" => $themes,
96
+ "type" => "select"),
97
+
98
+ array( "name" => "Theme URL",
99
+ "desc" => "If <strong>From URL</strong> is selected you can specify theme URL here. ".help_icon("theme-url"),
100
+ "id" => "shailan_dm_theme_url",
101
+ "std" => "http://",
102
+ "type" => "text"),
103
+
104
+ array( "name" => "Use Theme Location",
105
+ "desc" => "This option enables use of theme location.". help_icon("theme-location"),
106
+ "id" => "shailan_dm_location_enabled",
107
+ "type" => "checkbox",
108
+ "std" => "off" ),
109
+
110
+ array( "name" => "Theme Location",
111
+ "desc" => "This option will place dropdown menu automatically to the theme location.". help_icon("theme-location"),
112
+ "id" => "shailan_dm_location",
113
+ "type" => "select",
114
+ "options" => $_wp_registered_nav_menus ),
115
 
116
  array( "name" => "Rename Homepage",
117
  "desc" => "You can change your homepage link text here " . help_icon("rename-homepage"),
131
  "std" => "rgba(0,0,0,0.5)",
132
  "type" => "text"),
133
 
134
+ array( "type" => "close" ),
135
+
136
+ array(
137
+ "name" => "Template Tag",
138
+ "label" => __("Template Tag"),
139
+ "type" => "section"
140
+ ),
141
+
142
+ array(
143
+ "desc" => "Settings here only effect menus inserted with <strong>template tag</strong> : <code>&lt;?php shailan_dropdown_menu(); ?&gt;</code>. Widget settings are NOT affected by these settings. ".help_icon("template-tag"),
144
+ "type" => "paragraph"
145
+ ),
146
+
147
+ array( "name" => "Menu Type",
148
+ "desc" => "Dropdown Menu Type".help_icon("menu-type"),
149
+ "id" => "shailan_dm_type",
150
+ "std" => "pages",
151
+ "options" => $types,
152
+ "type" => "select"),
153
+
154
+ array( "name" => "Home link",
155
+ "desc" => "If checked dropdown menu displays home link".help_icon("home-link"),
156
+ "id" => "shailan_dm_home",
157
+ "std" => 'on',
158
  "type" => "checkbox"),
159
 
160
+ array( "name" => "Login",
161
+ "desc" => "If checked dropdown menu displays login link".help_icon("login"),
162
+ "id" => "shailan_dm_login",
163
+ "std" => 'on',
164
  "type" => "checkbox"),
165
 
166
+ array( "name" => "Register / Site Admin",
167
+ "desc" => "If checked dropdown menu displays register/site admin link.".help_icon("register-site-admin"),
168
+ "id" => "shailan_dm_login",
169
+ "std" => 'on',
170
  "type" => "checkbox"),
171
 
172
+ array( "name" => "Vertical menu",
173
+ "desc" => "If checked dropdown menu is displayed vertical.".help_icon("vertical-menu"),
174
+ "id" => "shailan_dm_vertical",
175
+ "std" => 'off',
176
+ "type" => "checkbox"),
177
+
178
+ array( "name" => "Exclude Pages",
179
+ "desc" => "Excluded page IDs.".help_icon("exclude-pages"),
180
+ "id" => "shailan_dm_exclude",
181
+ "std" => "",
182
+ "type" => "text"),
183
+
184
+ array( "name" => "Alignment",
185
+ "desc" => "Menu alignment.".help_icon("alignment"),
186
+ "id" => "shailan_dm_align",
187
+ "std" => "left",
188
+ "options" => $alignment,
189
+ "type" => "select"),
190
+
191
+ array( "type" => "close" ),
192
 
193
  array(
194
  "name" => "Effects",
198
 
199
  array( "name" => "Enable dropdown effects",
200
  "desc" => "If checked sub menus will use effects below". help_icon("enable-dropdown-effects"),
201
+ "std" => "on",
202
  "id" => "shailan_dm_effects",
203
  "type" => "checkbox"),
204
 
212
  "desc" => "Select effect speed".help_icon("effect-speed"),
213
  "id" => "shailan_dm_effect_speed",
214
  "type" => "select",
215
+ "std" => "fast",
216
  "options" => $speed ),
217
 
218
  array( "name" => "Effect delay",
224
  array( "type" => "close" ),
225
 
226
  array(
227
+ "name" => "custom-colors",
228
+ "label" => __("Custom colors"),
229
  "type" => "section"
230
  ),
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  array(
233
+ "desc" => "Using options below you can customize certain elements of current theme. If you select <strong>Color Scheme</strong> as your theme, you will have full control over colors.",
234
  "type" => "paragraph"
235
  ),
236
 
237
  array( "name" => "Use custom colors",
238
  "desc" => "If not checked custom colors won't work.".help_icon("use-custom-colors"),
239
  "id" => "shailan_dm_custom_colors",
240
+ "std" => 'off',
241
  "type" => "checkbox"),
242
 
243
  array("type"=>"picker"),
304
  array( "name" => "Show Empty Categories",
305
  "desc" => "If checked categories with no posts will be shown.".help_icon("show-empty-categories"),
306
  "id" => "shailan_dm_show_empty",
307
+ "std" => 'on',
308
  "type" => "checkbox"),
309
 
310
+ array(
311
+ "name" => "Wrap long menu items",
312
+ "desc" => "If checked long menu items will wrap". help_icon("wrap-long-menu-items"),
313
+ "id" => "shailan_dm_allowmultiline",
314
+ "type" => "checkbox",
315
+ "std" => "off"
316
  ),
317
 
318
+ array(
319
+ "name" => "Remove title attributes",
320
+ "desc" => "This will remove 'View all posts under..' title attributes from menu links". help_icon("remove-title-attributes"),
321
+ "id" => "shailan_dm_remove_title_attributes",
322
+ "type" => "checkbox",
323
+ "std" => "off"
324
  ),
325
 
326
+ array(
327
+ "name" => "Remove links from top levels",
328
+ "desc" => "This will remove links from top level pages/categories. So user can only click to sub-level menu.". help_icon("remove-links-from-top-levels"),
329
+ "id" => "shailan_dm_remove_top_level_links",
330
+ "type" => "checkbox",
331
+ "std" => "off"
332
+ ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
 
334
  array( "type" => "close" )
335
 
336
+ );
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, jquery, template, multi-color, theme
7
- Version: 1.9.1
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
- define('VERSION', '1.9');
14
 
15
  class shailan_DropdownWidget extends WP_Widget {
16
 
@@ -34,14 +34,14 @@ class shailan_DropdownWidget extends WP_Widget {
34
 
35
  // Hook up styles
36
  add_action( 'wp_head', array(&$this, 'header') );
37
- add_action( 'wp_footer', array(&$this, 'footer'), 10, 1 );
38
 
39
  // Hook up scripts
40
- if(!is_admin()){
41
  wp_enqueue_script( 'jquery' );
42
  wp_enqueue_script( 'hoverIntent', plugins_url( '/scripts/hoverIntent.js' , __FILE__ ) , array('jquery') );
43
  wp_enqueue_script( 'dropdown-ie-support', plugins_url( '/scripts/include.js' , __FILE__ ) , array('jquery') );
44
- }
45
 
46
  // Include options array
47
  require_once("shailan-dropdown-menu-options.php");
@@ -77,7 +77,6 @@ function admin_header(){
77
  // Options page scripts
78
  wp_enqueue_script( "jquery" );
79
  wp_enqueue_script( 'farbtastic' );
80
- wp_enqueue_script( "tweetable", plugins_url( '/scripts/jquery.tweetable.js' , __FILE__ ) , 'jquery' );
81
  wp_enqueue_script( 'dropdown-colorpick', plugins_url( '/scripts/admin.js' , __FILE__ ) , array('jquery') );
82
 
83
  if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
@@ -166,68 +165,10 @@ function install_default_settings(){
166
 
167
  // Set default values
168
  foreach($this->options as $option){
169
- if( array_key_exists( 'id', $option ) )
170
  $settings[ $option['id'] ] = $option['std'];
171
  }
172
 
173
- // Get old options values and update current settings
174
- $settings['shailan_dm_active_theme'] = get_option('shailan_dm_active_theme');
175
- delete_option('shailan_dm_active_theme');
176
-
177
- $settings['shailan_dm_align'] = get_option('shailan_dm_align');
178
- delete_option('shailan_dm_align');
179
-
180
- $settings['shailan_dm_color_hoverlink'] = get_option('shailan_dm_color_hoverlink');
181
- delete_option('shailan_dm_color_hoverlink');
182
-
183
- $settings['shailan_dm_color_lihover'] = get_option('shailan_dm_color_lihover');
184
- delete_option('shailan_dm_color_lihover');
185
-
186
- $settings['shailan_dm_color_link'] = get_option('shailan_dm_color_link');
187
- delete_option('shailan_dm_color_link');
188
-
189
- $settings['shailan_dm_color_menubg'] = get_option('shailan_dm_color_menubg');
190
- delete_option('shailan_dm_color_menubg');
191
-
192
- $settings['shailan_dm_custom_css'] = get_option('shailan_dm_custom_css');
193
- delete_option('shailan_dm_custom_css');
194
-
195
- $settings['shailan_dm_effect'] = get_option('shailan_dm_effect');
196
- delete_option('shailan_dm_effect');
197
-
198
- $settings['shailan_dm_effects'] = get_option('shailan_dm_effects');
199
- delete_option('shailan_dm_effects');
200
-
201
- $settings['shailan_dm_effect_delay'] = get_option('shailan_dm_effect_delay');
202
- delete_option('shailan_dm_effect_delay');
203
-
204
- $settings['shailan_dm_effect_speed'] = get_option('shailan_dm_effect_speed');
205
- delete_option('shailan_dm_effect_speed');
206
-
207
- $settings['shailan_dm_exclude'] = get_option('shailan_dm_exclude');
208
- delete_option('shailan_dm_exclude');
209
-
210
- $settings['shailan_dm_font'] = get_option('shailan_dm_font');
211
- delete_option('shailan_dm_font');
212
-
213
- $settings['shailan_dm_fontsize'] = get_option('shailan_dm_fontsize');
214
- delete_option('shailan_dm_fontsize');
215
-
216
- $settings['shailan_dm_home_tag'] = get_option('shailan_dm_home_tag');
217
- delete_option('shailan_dm_home_tag');
218
-
219
- $settings['shailan_dm_overlay'] = get_option('shailan_dm_overlay');
220
- delete_option('shailan_dm_overlay');
221
-
222
- $settings['shailan_dm_show_empty'] = get_option('shailan_dm_show_empty');
223
- delete_option('shailan_dm_show_empty');
224
-
225
- $settings['shailan_dm_theme_url'] = get_option('shailan_dm_theme_url');
226
- delete_option('shailan_dm_theme_url');
227
-
228
- $settings['shailan_dm_type'] = get_option('shailan_dm_type');
229
- delete_option('shailan_dm_type');
230
-
231
  $settings['version'] = $this->version;
232
  // Save the settings
233
  update_option( $this->settings_key, $settings );
@@ -301,6 +242,14 @@ function options_page(){
301
  $width_attr = '';
302
  if( $width > 0 )
303
  $width_attr = 'style="width:' . $width . 'px;"';
 
 
 
 
 
 
 
 
304
 
305
  echo $args['before_widget'];
306
 
@@ -428,18 +377,14 @@ function options_page(){
428
  'menu_class' => 'dropdown '. $orientation . ' dropdown-align-'.$align,
429
  'menu_id' => '',
430
  'echo' => true,
431
- 'fallback_cb' => 'wp_page_menu',
432
- 'before' => '',
433
- 'after' => '',
434
- 'link_before' => '',
435
- 'link_after' => '',
436
- 'depth' => 0,
437
- 'walker' => '',
438
- 'theme_location' => $location );
439
 
440
- if($custom_walkers){
441
- $page_walker = new shailan_PageWalker();
442
- $menu_args = wp_parse_args( array('walker'=>$page_walker) , $menu_args ); }
 
443
 
444
  echo $dropdown_wrapper_open;
445
  do_action('dropdown_before');
@@ -454,7 +399,7 @@ function options_page(){
454
  echo $nl . "</div>";
455
  echo "\n\n<!--/ Dropdown Menu Widget -->"; ?>
456
 
457
- <?php echo $after_widget; ?>
458
  <?php
459
  }
460
 
@@ -557,13 +502,15 @@ function options_page(){
557
  ******************************************************************************/
558
  function header($instance){
559
 
560
- if(!is_admin()){
561
 
562
  //$default_headers = array( 'Version' => 'Version' );
563
  //$dropdown = get_file_data( __FILE__, $default_headers, 'plugin' );
564
 
565
  $theme = $this->get_plugin_setting('shailan_dm_active_theme');
566
  if($theme == '*url*'){ $theme = $this->get_plugin_setting('shailan_dm_theme_url'); }
 
 
567
  $allow_multiline = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_allowmultiline') );
568
  // Colors
569
  $custom_colors = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_custom_colors') );
@@ -600,10 +547,10 @@ function options_page(){
600
  if(!empty($font_size)){ echo $indent. "ul.dropdown li a { font-size:$font_size; }"; }
601
 
602
  if(!$allow_multiline){
603
- echo $indent. "ul.dropdown { white-space: nowrap; }";
604
  }
605
-
606
- if($custom_colors){
607
  // Custom color scheme is active
608
 
609
  // Overlay support
@@ -679,6 +626,7 @@ if( 'on' == $this->get_plugin_setting('shailan_dm_arrows') ){
679
  $clr = $this->get_plugin_setting('shailan_dm_arrow_color');
680
 
681
  ?>
 
682
  ul.dropdown li.parent>a{
683
  padding-right:25px;
684
  }
@@ -704,13 +652,13 @@ ul.dropdown li li.parent:hover>a:after{
704
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
705
  echo "\n\n ";
706
 
707
- }
708
  } // -- End Header
709
 
710
  /******************************************************************************
711
  * HEADER
712
  ******************************************************************************/
713
- function footer($instance){
714
  $indent = "\n\t";
715
 
716
  $remove_title_attributes = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_title_attributes') );
@@ -776,7 +724,7 @@ ul.dropdown li li.parent:hover>a:after{
776
 
777
  echo "\n});";
778
  echo "\n/* ]]> */</script>";
779
- echo "\n<!-- /Dropdown Menu Widget Styles -->";
780
  echo "\n\n ";
781
 
782
  } // fx active
@@ -816,6 +764,33 @@ include('shailan-category-walker.php'); // Load custom category walker
816
  /* Custom widget */
817
  include('shailan-multi-dropdown.php'); // Load multi-dropdown widget
818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
  // Template tag support
820
  function shailan_dropdown_menu( $args = array() ){
821
 
@@ -848,3 +823,28 @@ function shailan_dropdown_menu( $args = array() ){
848
  the_widget( 'shailan_DropdownWidget', $options );
849
 
850
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, jquery, template, multi-color, theme
7
+ Version: 1.9.2
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
+ define('VERSION', '1.9.2');
14
 
15
  class shailan_DropdownWidget extends WP_Widget {
16
 
34
 
35
  // Hook up styles
36
  add_action( 'wp_head', array(&$this, 'header') );
37
+ // add_action( 'wp_footer', array(&$this, 'footer'), 10, 1 );
38
 
39
  // Hook up scripts
40
+ /*if(!is_admin()){ */
41
  wp_enqueue_script( 'jquery' );
42
  wp_enqueue_script( 'hoverIntent', plugins_url( '/scripts/hoverIntent.js' , __FILE__ ) , array('jquery') );
43
  wp_enqueue_script( 'dropdown-ie-support', plugins_url( '/scripts/include.js' , __FILE__ ) , array('jquery') );
44
+ /*}*/
45
 
46
  // Include options array
47
  require_once("shailan-dropdown-menu-options.php");
77
  // Options page scripts
78
  wp_enqueue_script( "jquery" );
79
  wp_enqueue_script( 'farbtastic' );
 
80
  wp_enqueue_script( 'dropdown-colorpick', plugins_url( '/scripts/admin.js' , __FILE__ ) , array('jquery') );
81
 
82
  if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
165
 
166
  // Set default values
167
  foreach($this->options as $option){
168
+ if( array_key_exists( 'id', $option ) && array_key_exists( 'std', $option ) )
169
  $settings[ $option['id'] ] = $option['std'];
170
  }
171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  $settings['version'] = $this->version;
173
  // Save the settings
174
  update_option( $this->settings_key, $settings );
242
  $width_attr = '';
243
  if( $width > 0 )
244
  $width_attr = 'style="width:' . $width . 'px;"';
245
+
246
+ if( !isset($align) || $align == '') {
247
+ $align = 'left';
248
+ }
249
+
250
+ if( !isset($type) || $type == '') {
251
+ $type = 'pages';
252
+ }
253
 
254
  echo $args['before_widget'];
255
 
377
  'menu_class' => 'dropdown '. $orientation . ' dropdown-align-'.$align,
378
  'menu_id' => '',
379
  'echo' => true,
380
+ 'theme_location' => $location,
381
+ 'is_shailan_dropdown_callback' => 'yes'
382
+ );
 
 
 
 
 
383
 
384
+ if($custom_walkers){
385
+ $page_walker = new shailan_PageWalker();
386
+ $menu_args = wp_parse_args( array('walker'=>$page_walker) , $menu_args );
387
+ }
388
 
389
  echo $dropdown_wrapper_open;
390
  do_action('dropdown_before');
399
  echo $nl . "</div>";
400
  echo "\n\n<!--/ Dropdown Menu Widget -->"; ?>
401
 
402
+ <?php echo $after_widget; $this->footer(); ?>
403
  <?php
404
  }
405
 
502
  ******************************************************************************/
503
  function header($instance){
504
 
505
+ /*if(!is_admin()){*/
506
 
507
  //$default_headers = array( 'Version' => 'Version' );
508
  //$dropdown = get_file_data( __FILE__, $default_headers, 'plugin' );
509
 
510
  $theme = $this->get_plugin_setting('shailan_dm_active_theme');
511
  if($theme == '*url*'){ $theme = $this->get_plugin_setting('shailan_dm_theme_url'); }
512
+ if($theme == ''){ $theme = "web20"; }
513
+
514
  $allow_multiline = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_allowmultiline') );
515
  // Colors
516
  $custom_colors = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_custom_colors') );
547
  if(!empty($font_size)){ echo $indent. "ul.dropdown li a { font-size:$font_size; }"; }
548
 
549
  if(!$allow_multiline){
550
+ echo $indent. "ul.dropdown { white-space: nowrap; }";
551
  }
552
+
553
+ if( $custom_colors ){
554
  // Custom color scheme is active
555
 
556
  // Overlay support
626
  $clr = $this->get_plugin_setting('shailan_dm_arrow_color');
627
 
628
  ?>
629
+
630
  ul.dropdown li.parent>a{
631
  padding-right:25px;
632
  }
652
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
653
  echo "\n\n ";
654
 
655
+ /*}*/
656
  } // -- End Header
657
 
658
  /******************************************************************************
659
  * HEADER
660
  ******************************************************************************/
661
+ function footer( $instance = null ){
662
  $indent = "\n\t";
663
 
664
  $remove_title_attributes = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_title_attributes') );
724
 
725
  echo "\n});";
726
  echo "\n/* ]]> */</script>";
727
+ echo "\n<!-- /Dropdown Menu Widget Effects -->";
728
  echo "\n\n ";
729
 
730
  } // fx active
764
  /* Custom widget */
765
  include('shailan-multi-dropdown.php'); // Load multi-dropdown widget
766
 
767
+ // Settings link
768
+ function shailan_dropdown_add_settings_link($links) {
769
+ $settings_link = '<a href="options-general.php?page=dropdown-menu">Settings</a>';
770
+ array_push( $links, $settings_link );
771
+ return $links;
772
+ }
773
+
774
+ $plugin = plugin_basename(__FILE__);
775
+ add_filter( "plugin_action_links_$plugin", 'shailan_dropdown_add_settings_link' );
776
+
777
+ // After activation redirect
778
+ register_activation_hook(__FILE__, 'shailan_dropdown_activate');
779
+ add_action('admin_init', 'shailan_dropdown_redirect');
780
+
781
+ function shailan_dropdown_activate() {
782
+ add_option('shailan_dropdown_do_activation_redirect', true);
783
+ }
784
+
785
+ // Redirects to options page on activate
786
+ function shailan_dropdown_redirect() {
787
+ if ( get_option( 'shailan_dropdown_do_activation_redirect', false ) ) {
788
+ delete_option('shailan_dropdown_do_activation_redirect');
789
+ $url = admin_url( 'options-general.php?page=dropdown-menu' );
790
+ wp_redirect($url);
791
+ }
792
+ }
793
+
794
  // Template tag support
795
  function shailan_dropdown_menu( $args = array() ){
796
 
823
  the_widget( 'shailan_DropdownWidget', $options );
824
 
825
  }
826
+
827
+ /**
828
+ * Replaces nav menu callback function to use dropdown menu.
829
+ *
830
+ * @since 1.9.2
831
+ */
832
+ function shailan_nav_menu_args_filter( $args ){
833
+
834
+ $replace_enabled = get_dropdown_setting( 'shailan_dm_location_enabled' );
835
+
836
+ if( 'on' == $replace_enabled ){
837
+ $theme_location = get_dropdown_setting( 'shailan_dm_location' );
838
+ if( $args['theme_location'] == $theme_location ){
839
+ $args['fallback_cb'] = 'shailan_dropdown_menu';
840
+ }
841
+ }
842
+
843
+ return $args;
844
+ } add_filter('wp_nav_menu_args', 'shailan_nav_menu_args_filter', 90, 1);
845
+
846
+ /*
847
+ function shailan_nav_menu_output_filter( $nav_menu, $args ){
848
+ return $nav_menu;
849
+ } add_filter( 'wp_nav_menu', 'shailan_nav_menu_output_filter', 10, 2);
850
+ */
stf-page-options.php CHANGED
@@ -26,18 +26,12 @@
26
  </div>
27
  </div>
28
 
29
- <div id="stf_tweet_wrap">
30
- <div id="stf_tweet"></div><script type="text/javascript">
31
- jQuery(document).ready(function($) {
32
- $('#stf_tweet').tweetable({username: 'shailancom', time: false, limit: 1, replies: false});
33
- });
34
- </script>
35
-
36
  <a href="http://twitter.com/shailancom" class="follow-link">Follow Shailan.com on twitter!</a>
37
  </div>
38
 
39
  <div id="headlines">
40
- <h3>Latest headlines from Shailan.com</h3>
41
  <?php
42
  //echo get_latest_tweet('mattsay');
43
 
@@ -58,8 +52,16 @@
58
 
59
  <div id="nav"><?php if(!empty($navigation)){echo $navigation;} ?></div>
60
 
 
 
61
  <div class="stf_opts_wrap">
62
  <div class="stf_options">
 
 
 
 
 
 
63
  <form method="post">
64
  <div id="options-tabs">
65
 
@@ -194,17 +196,16 @@ case 'picker':
194
 
195
  <div id="tabs-footer" class="clearfix">
196
  <p class="submit">
197
- <input name="save" type="submit" class="button-primary" value="Save changes" />
198
  <input type="hidden" name="action" value="save" />
199
  </p>
200
  </form>
201
 
202
  <form method="post">
203
- <input name="reset" type="submit" class="button-secondary" value="Reset Options" />
204
  <input type="hidden" name="action" value="reset" />
205
  </form>
206
 
207
-
208
  <div class="copyright"><?php if(!empty($footer_text)){echo $footer_text;} ?></div>
209
  </div>
210
  </div>
26
  </div>
27
  </div>
28
 
29
+ <div id="stf_tweet_wrap">
 
 
 
 
 
 
30
  <a href="http://twitter.com/shailancom" class="follow-link">Follow Shailan.com on twitter!</a>
31
  </div>
32
 
33
  <div id="headlines">
34
+ <h3>Shailan Design Blog</h3>
35
  <?php
36
  //echo get_latest_tweet('mattsay');
37
 
52
 
53
  <div id="nav"><?php if(!empty($navigation)){echo $navigation;} ?></div>
54
 
55
+
56
+
57
  <div class="stf_opts_wrap">
58
  <div class="stf_options">
59
+
60
+
61
+ <div id="demo"><h3>Menu Demo:</h3><?php shailan_dropdown_menu(); ?><br />
62
+ <em>Please note, demo uses <a href="http://shailan.com/2773/dropdown-menu-widget-template-tag-usage-explained/" target="_blank">php template tag</a>.</em></div>
63
+
64
+
65
  <form method="post">
66
  <div id="options-tabs">
67
 
196
 
197
  <div id="tabs-footer" class="clearfix">
198
  <p class="submit">
199
+ <?php submit_button( 'Save Changes', 'primary', 'save', false ); ?>
200
  <input type="hidden" name="action" value="save" />
201
  </p>
202
  </form>
203
 
204
  <form method="post">
205
+ <?php submit_button( 'Reset Options', 'secondary', 'reset', false ); ?>
206
  <input type="hidden" name="action" value="reset" />
207
  </form>
208
 
 
209
  <div class="copyright"><?php if(!empty($footer_text)){echo $footer_text;} ?></div>
210
  </div>
211
  </div>
themes/web20.css CHANGED
@@ -3,14 +3,14 @@
3
 
4
  /** Container */
5
  .shailan-dropdown-menu .dropdown-horizontal-container{
6
- background: #eee;
7
- background: -moz-linear-gradient(top, #eee 0%, #ddd 100%);
8
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eee), color-stop(100%,#ddd));
9
- background: -webkit-linear-gradient(top, #eee 0%,#ddd 100%);
10
- background: -o-linear-gradient(top, #eee 0%,#ddd 100%);
11
- background: -ms-linear-gradient(top, #eee 0%,#ddd 100%);
12
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#dddddd',GradientType=0 );
13
- background: linear-gradient(top, #eee 0%,#ddd 100%);
14
 
15
  border-radius: 4px;
16
  -moz-border-radius: 4px;
@@ -41,12 +41,13 @@ ul.dropdown-horizontal.dropdown-align-right>li:first-child { border-left:0; }
41
  ul.dropdown-align-right li{ border-width: 0px 0px 0px 1px; }
42
 
43
  ul.dropdown li a {
44
- padding: 3px 10px;
 
45
  line-height: 22px;
46
  }
47
 
48
  /** Link colors */
49
- ul.dropdown a, ul.dropdown a:link, ul.dropdown a:visited { color: #888; text-shadow:#fff 1px 1px 1px; text-decoration: none; display:block; margin:1px; }
50
  ul.dropdown a:hover { color: #444; }
51
  ul.dropdown a:active { color: #27d; }
52
 
@@ -79,10 +80,10 @@ ul.dropdown ul li {
79
  }
80
 
81
  /** Current menu item */
82
- li.current-cat>a, li.current_page_item>a, li.current-menu-item>a,
83
- li.current-cat>a:link, li.current_page_item>a:link, li.current-menu-item>a:link,
84
- li.current-cat>a:visited, li.current_page_item>a:visited, li.current-menu-item>a:visited{ color: #444; }
85
 
86
  /** Ancestor */
87
- li.current_page_ancestor>a,li.current_page_ancestor>a:visited, li.current_page_ancestor>a:link { color: #444; }
88
- li.current-menu-ancestor>a,li.current-menu-ancestor>a:visited, li.current-menu-ancestor>a:link { color: #444; }
3
 
4
  /** Container */
5
  .shailan-dropdown-menu .dropdown-horizontal-container{
6
+ background: #efefef;
7
+ background: -moz-linear-gradient(top, #efefef 0%, #ddd 100%);
8
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#efefef), color-stop(100%,#ddd));
9
+ background: -webkit-linear-gradient(top, #efefef 0%,#ddd 100%);
10
+ background: -o-linear-gradient(top, #efefef 0%,#ddd 100%);
11
+ background: -ms-linear-gradient(top, #efefef 0%,#ddd 100%);
12
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#dddddd',GradientType=0 );
13
+ background: linear-gradient(top, #efefef 0%,#ddd 100%);
14
 
15
  border-radius: 4px;
16
  -moz-border-radius: 4px;
41
  ul.dropdown-align-right li{ border-width: 0px 0px 0px 1px; }
42
 
43
  ul.dropdown li a {
44
+ text-transform: uppercase;
45
+ padding: 3px 15px;
46
  line-height: 22px;
47
  }
48
 
49
  /** Link colors */
50
+ ul.dropdown a, ul.dropdown a:link, ul.dropdown a:visited { background: transparent; border: 0; color: #888; text-shadow:#fff 1px 1px 1px; text-decoration: none; display:block; margin:1px; font-weight: normal; }
51
  ul.dropdown a:hover { color: #444; }
52
  ul.dropdown a:active { color: #27d; }
53
 
80
  }
81
 
82
  /** Current menu item */
83
+ ul.dropdown li.current-cat>a, ul.dropdown li.current_page_item>a, ul.dropdown li.current-menu-item>a,
84
+ ul.dropdown li.current-cat>a:link, ul.dropdown li.current_page_item>a:link, ul.dropdown li.current-menu-item>a:link,
85
+ ul.dropdown li.current-cat>a:visited, ul.dropdown li.current_page_item>a:visited, ul.dropdown li.current-menu-item>a:visited{ color: #444; font-weight: normal; }
86
 
87
  /** Ancestor */
88
+ ul.dropdown li.current_page_ancestor>a, ul.dropdown li.current_page_ancestor>a:visited, ul.dropdown li.current_page_ancestor>a:link { color: #444; font-weight: normal; }
89
+ ul.dropdown li.current-menu-ancestor>a, ul.dropdown li.current-menu-ancestor>a:visited, ul.dropdown li.current-menu-ancestor>a:link { color: #444; font-weight: normal; }