Dropdown Menu Widget - Version 1.9.6

Version Description

A list of all changes can be found on Changelog page on Github

Download this release

Release Info

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

Code changes from version 1.9.5 to 1.9.6

CHANGELOG.md ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dropdown Menu Widget Changelog
2
+
3
+ This page lists all the major changes to the **Dropdown Menu Widget** for WordPress.
4
+ Please visit [Dropdown Menu Widget Homepage](http://metinsaylan.com/projects/wordpress/dropdown-menu-widget/) for more information.
5
+
6
+ ### 1.9.3
7
+
8
+ * Updated WordPress version for compatibility.
9
+
10
+ ### 1.9.2
11
+
12
+ * Added: Settings link on plugins page.
13
+ * Added: Plugin activation redirect to Settings page.
14
+ * Added: Filter wp_nav_menu arguments to create a dropdown menu. Theme can be changed via dropdown menu settings page.
15
+ * Added: Demo menu on settings page.
16
+ * Removed: Unnecessary scripts from scripts folder.
17
+ * Removed: Twitter box on settings page.
18
+ * Some minor fixes and tidy up on options page.
19
+
20
+ ### 1.9.1
21
+
22
+ * Added: More detailed faq and plugin banner.
23
+
24
+ ### 1.9
25
+
26
+ * Changed: Minimized included CSS file.
27
+ * Added: Support for changing arrow colors.
28
+ * Added: Help links next to options settings fields.
29
+ * Added: New Theme Rounded Corners.
30
+ * Added: New Theme Rounded Corners Light.
31
+ * Added: New Theme Pills.
32
+
33
+ ### 1.8.1
34
+
35
+ * Fixed: HoverIntent hotfix for older version users. (Thanks to Karsten)
36
+ * Fixed: Various theme problems with vertical menus.
37
+
38
+ ### 1.8
39
+
40
+ * Fixed: HoverIntent hotfix for Wordpress 3.3
41
+
42
+ ### 1.7.2
43
+
44
+ * Fixed: Widget hotfix.
45
+
46
+ ### 1.7.1
47
+
48
+ * Fixed: Template tag hotfix. Fixes displaying vertical instead of horizontal.
49
+
50
+ ### 1.7
51
+
52
+ * Added: brand new options page.
53
+ * Added: Web2.0 Theme.
54
+ * Added: width option to widgets.
55
+ * Fixed: Right aligned menu dropdown errors.
56
+ * Added: Effect delay option (hoverIntent).
57
+ * Added: Plugin both search theme & template folders for dropdown.css
58
+ * Added: Adminbar button to easily change current options.
59
+
60
+ ### 1.6.4
61
+
62
+ * Fixed effect selector error.
63
+ * Added width option for vertical menus.
64
+
65
+ ### 1.6.3
66
+
67
+ * Fixed: Supplied arguments for the menu overwritten in the menu function.
68
+ * Added: Now you can easily add menus using menu names & ids and even locations.
69
+
70
+ ### 1.6.2
71
+
72
+ * Fixed: Stylesheet causing widgets go behind widget containers. (Thanks to Antonio Capone for reporting the issue)
73
+
74
+ ### 1.6.1
75
+
76
+ * Fix: Colorscheme background error.
77
+ * Fix: jQuery not included when effects are enabled.
78
+ * Added: Disabling options that are not used.
79
+ * Added: Custom Theme URL option.
80
+
81
+ ### 1.6
82
+
83
+ * Added option to show title on widget.
84
+ * Added capability to find dropdown.css on your theme folder.
85
+ * Added jQuery dropdown effects.
86
+ * Added remove title attributes option.
87
+ * Added remove links from top level option.
88
+ * Many more to come..
89
+
90
+ ### 1.5.8
91
+
92
+ * Added dropdown_menu_defaults filter for changing default options like order, depth etc.
93
+
94
+ ### 1.5.7
95
+
96
+ * Fixed various css issues.
97
+ * Removed backgrounds for IE on certain themes.
98
+ * Hopefully works with all browsers with javascript enabled (Tested with Chrome, Firefox, Safari, Opera and IE6).
99
+ * Please submit any bugs you see on [dropdown menu plugin page](http://shailan.com/wordpress/plugins/dropdown-menu/)
100
+
101
+ ### 1.5.6beta
102
+
103
+ * Added hooks for inserting your own menu & other navigational elements.
104
+ * Fixed z-index errors.
105
+ * Fixed background problem with custom theme selection.
106
+ * Added "include archives" option to Dropdown-Multi widget.
107
+
108
+ ### 1.5.6alpha1
109
+
110
+ * Fixed sub menu display errors.
111
+ * Added alignment option to template tag support.
112
+
113
+ ### 1.5.6alpha
114
+
115
+ * Fixed options page saving error.
116
+ * Added a brand new color selection interface for custom "Color Scheme" (beta).
117
+ * Now you can easily select your own colors & plus overlays!
118
+
119
+ ### 1.5.5
120
+
121
+ * New theme! Hulu style theme.
122
+ * Added new action hooks to insert your items to the dropdown menu.
123
+
124
+ ### 1.5.4
125
+
126
+ * Added first-child & last-child selector for styling to dropdown menu. (available when jquery is active only)
127
+ * Fixed IE display errors for shiny black theme.
128
+ * Fixed not saving issues with the plugin options.
129
+
130
+ ### 1.5.3
131
+
132
+ * Made Custom CSS area available even when a theme is selected. You can now use this area for your theme customizations.
133
+ * Fixed `Call undefined function wp_nav_menu on 365` error.
134
+ * Fixed font-size problems with `Shiny Black` theme.
135
+ * Removed behaviour fix for IE. Now using only jquery as dropdown fix which comes packed with wordpress.
136
+
137
+ ### 1.5.2
138
+
139
+ * Fixed tested version number.
140
+ * Added screenshot 2.
141
+ * Added options page screenshot.
142
+ * Now plugin allows you to rename the home link.
143
+
144
+ ### 1.5.1
145
+
146
+ * Removed custom walker support for now.
147
+ * Removed blue tabs theme since it was using custom walkers.
148
+ * Fixed all the styles to work with new css classes.
149
+ * Updated Shiny Black theme to work with wide links.
150
+ * Complete support for custom css insert.
151
+
152
+ ### 1.5
153
+
154
+ * Fixed issues with wordpress 3.0.
155
+ * Renamed plugin to dropdown menu.
156
+ * Removed inline style option.
157
+ * Removed unnecessary screenshots.
158
+ * Added support for wordpress 3.0 navigation menus.
159
+ * Removed exclude pages plugin.
160
+
161
+ ### 1.4.1
162
+
163
+ * A minor fix for `Parse error: parse error, expecting 'T_FUNCTION' in C:\wamp\www\wordpress\wp-content\plugins\dropdown-menu-widget\shailan-multi-dropdown.php on line 194` error.
164
+
165
+ ### 1.4.0
166
+
167
+ * Added option for multiline links. If checked a link with more than one word will be wrapped.
168
+ * Another fix for IE. Hopefully last.
169
+
170
+ ### 1.3.9
171
+
172
+ * Fixed errors for IE jquery support.
173
+ * Added belorussian translation provided by [Marcis G.](http://pc.de)
174
+ * Added lang folder for translations.
175
+
176
+ ### 1.3.8
177
+
178
+ * Added option for displaying title attributes. You may now turn title display on from the Settings page.
179
+
180
+ ### 1.3.7
181
+
182
+ * Removed unnecessary extrude line from Dropdown Multi widget.
183
+
184
+ ### 1.3.6
185
+
186
+ * Fixed "Dropdown Multi" widget error with categories and links.
187
+
188
+ ### 1.3.5
189
+
190
+ * Added "Dropdown Multi" widget that allows you to inlude pages, categories and links in one menu.
191
+
192
+ ### 1.3.4
193
+
194
+ * Fixed dropdown errors for IE7. Report any bugs with a screenshot please. Thanks.
195
+
196
+ ### 1.3.3
197
+
198
+ * Fixed function name collisions with "Exclude Pages" plugin. The plugin is fully functional now.
199
+
200
+ ### 1.3.2
201
+
202
+ * Bundled with "Exclude Pages" plugin by [Simon Wheatley](http://simonwheatley.co.uk/wordpress/). You can now easily exclude pages from the navigation. Just uncheck the the "Include page in menus" checkbox on the page edit screen. See [screenshots](http://wordpress.org/extend/plugins/dropdown-menu-widget/screenshots/) for more information.
203
+
204
+ ### 1.3.1
205
+
206
+ * Added "Blue gradient" theme.
207
+
208
+ ### 1.3.0
209
+
210
+ * Fixed "Home" link bug for the template tag. Thanks to Jeff.
211
+
212
+ ### 1.2.7
213
+
214
+ * Added "include homepage link" for both pages and categories now. You can enable/disable this link from the widget options easily.
215
+
216
+ ### 1.2.6
217
+
218
+ * Fixed a minor bug.
219
+
220
+ ### 1.2.5
221
+
222
+ * Added translation support.
223
+ * Added pot file for translators.
224
+
225
+ ### 1.2.4
226
+
227
+ * Fixed category walker for the advanced styling.
228
+
229
+ ### 1.2.3
230
+
231
+ * Added Aqua theme.
232
+ * Added <span> elements in the menu so more advanced styling can be made.
233
+ * Added alignment option. Now you can align your menu wherever you wanted!
234
+ * Added Shiny Black theme.
235
+
236
+ ### 1.2.0
237
+
238
+ * Removed title attributes for the categories dropdown menu items.
239
+
240
+ ### 1.1.0
241
+
242
+ * Added custom walker class to disable title attributes on menu items.
243
+ * Renamed class and style files.
244
+ * Fixed default theme.
245
+
246
+ ### 1.0.0
247
+
248
+ * Added vertical dropdown menu functionality.
249
+ * Fixed widget code.
250
+ * Changed dropdown widget classname to : shailan-dropdown-menu
251
+ * Changed wrapper div classname to : shailan-dropdown-wrapper
252
+ * Moved li item paddings to anchor elements.
253
+
254
+ ### 0.4.3
255
+
256
+ * New grayscale theme.
257
+ * Template tag `shailan_dropdown_menu()` is available now. See usage for more info.
258
+ * Template tag options added.
259
+
260
+ ### 0.4.2
261
+
262
+ * Fixed XHTML error on link tags.
263
+ * Fixed Inline Style error on categories dropdown menu.
264
+ * Removed unnecessary files.
265
+
266
+ ### 0.4.1
267
+
268
+ * Fixed XHTML issues.
269
+ * Added WP Default theme.
270
+ * Made some minor fixes to widget options form.
271
+
272
+ ### 0.3
273
+
274
+ * Fixed problems about styling. Now you can change dropdown menu style from the options page.
275
+
276
+ ### 0.2
277
+
278
+ * First public release.
279
+ * Added login and register button options.
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dropdown Menu Widget
2
+
3
+ *Simple Pages/Categories/Custom dropdown navigation menus with nice jQuery effects. Comes with various customizable CSS themes!*
4
+
5
+ ## Description
6
+
7
+ **Dropdown Menu widget** adds a beautiful dropdown menu, listing pages and categories of your blog. You can also turn your WordPress navigation menus into beautiful dropdown menus using this plugin.
8
+
9
+ ### Main Features:
10
+
11
+ * Automatically generated menus
12
+ * Supports pages, categories and custom menus
13
+ * jQuery Effects (must be enabled from panel)
14
+ * Customizable color scheme (select Custom Theme from options to activate)
15
+ * Vertical or Horizontal Menus
16
+ * Supports Multiple Instances
17
+ * Can be embedded into theme using [PHP Template Tag](http://metinsaylan.com/wordpress/2011/07/31/dropdown-menu-widget-template-tag-usage-explained/)
18
+
19
+ ### Documentation & Simple Tutorials
20
+
21
+ * [Dropdown Menu Widget Help](http://metinsaylan.com/docs/dropdown-menu-widget-help/)
22
+ * [Dropdown Menu PHP Template Tag Usage](http://metinsaylan.com/wordpress/2011/07/31/dropdown-menu-widget-template-tag-usage-explained/)
23
+ * [Using Custom Menus In Dropdown Menu Widget](http://metinsaylan.com/wordpress/2010/07/26/custom-dropdown-menu-using-wordpress-3-nav-menus/)
24
+ * [Tutorial: Create your very own dropdown menu stylesheet](http://metinsaylan.com/wordpress/2010/04/04/tutorial-create-your-very-own-dropdown-menu-stylesheet/)
25
+ * [Hook: Append Categories Menu To Pages Menu](http://metinsaylan.com/wordpress/2011/02/10/how-to-add-categories-dropdown-to-the-end-of-dropdown-menu-widget/)
26
+ * [View all posts tagged `Dropdown Menu Widget`](http://metinsaylan.com/tag/dropdown-menu-widget/)
27
+
28
+ If you like this plugin, please [donate](http://metinsaylan.com/donate/).
29
+
30
+ Please report issues on [Github Issues Page](https://github.com/shailancom/dropdown-menu-widget/issues).
31
+ Visit source on [github](https://github.com/shailancom/dropdown-menu-widget)
32
+
33
+ ## Installation
34
+
35
+ Dropdown menu widget is so easy to setup. Just follow the steps below to add it to your site.
36
+
37
+ 1. Login to your WordPress dashboard and go to Plugins > Add New.
38
+ 2. If you have downloaded the plugin, click on `Upload` link and upload the plugin.
39
+ 3. If you haven't downloaded yet, type `dropdown menu widget` to search field and click `Search`.
40
+ 4. Click on `Install` and click `Activate plugin` once it is loaded.
41
+ 5. Go to `Dropdown menu settings` under `Settings` to change dropdown theme and edit your settings.
42
+ 6. Add the dropdown menu to your site using `Widgets` or template tag codes.
43
+ 7. Done. Enjoy!
css/dropdown-admin.css CHANGED
@@ -15,28 +15,15 @@
15
  background: lightYellow;
16
  color: #827500;
17
  }
18
- #stf_tweet{ background-color:#EAF9FE; border:1px solid #B0ECEE; border-radius:10px; padding:10px; }
19
- #stf_tweet li{ margin:0; font-size:13px; color:#208FBE; }
20
-
21
- #demo{ border:1px solid #ddd; padding: 8px 20px 20px; margin: 6px 0 15px; }
22
- #demo .widget { border: 0; background: transparent; margin: 0; padding: 0; position: relative; }
23
- #demo .clearfix:after{ clear:left; }
24
-
25
- .follow-link {
26
- font-style: italic;
27
- padding: 5px 15px 5px 30px;
28
- display: block;
29
- background: url(images/twitter.png) 13px 50% no-repeat;
30
- }
31
 
32
  .stf_share{ background:#ededed; padding:5px; border-radius:5px; overflow:hidden; margin-right:15px; }
33
  .share-label, .share-button{ display:inline; float:left; margin-right:10px; }
34
- .share-label{
35
  margin-top: 3px;
36
  margin-left: 5px;
37
  font-size: 16px;
38
  text-shadow: white 1px 1px 0;
39
- color: #aaa;
40
  } .stf_share:hover .share-label{ color:#21759B }
41
  .tweet{ margin-top:2px; }
42
  .panel{ background: #ededed; border-bottom:1px solid #ddd; }
@@ -54,19 +41,15 @@ a.helplink{ color:#666; text-decoration:none; }
54
 
55
  .shailan_dm_input textarea{
56
  width:400px; height:150px; }
57
-
58
- #widgets-right .widgets-sortables{ min-height:0px; }
59
-
60
- .widget-holder{position:relative; zoom:1;}
61
-
62
- #picker{
63
- position: absolute;
64
- top: 10px;
65
- right: 10px;
66
- background: white;
67
- box-shadow: #999 0 1px 15px;
68
- border-radius: 8px;
69
- }
70
 
71
  .sidebar-name{overflow:auto; display:block;}
72
  .sidebar-name h3{float:left;}
@@ -75,15 +58,48 @@ a.helplink{ color:#666; text-decoration:none; }
75
  input.selected{border:1px solid #f93}
76
  input.color-error{border:1px solid #f00;}
77
 
 
 
 
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
- .stf_options { margin-top: 20px; margin-right:265px; text-shadow:#fff 0 0 1px }
81
- .stf_opts_wrap{ width:100%; margin-right:-265px; }
82
  .stf_section{ }
83
- .stf_options label{ font-size:14px; font-weight:500; width:230px; display:block; float:left; line-height:24px; }
84
- .stf_paragraph{ padding:10px; background:#FFFDCB; border-radius:8px; font-size: larger; }
85
- .stf_input { padding:10px 10px; border-bottom:1px solid #eee; }
86
- .stf_options small{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  display: block;
88
  float: left;
89
  width: 330px;
@@ -94,106 +110,38 @@ input.color-error{border:1px solid #f00;}
94
  line-height: 24px;
95
  }
96
  .stf_options small:hover{ color:#444; }
97
- .stf_options input[type="text"], .stf_options textarea, .stf_options select {
98
- width:250px; font-size:12px; padding:4px; color:#333; line-height:1em; background:#efefef; float:left; }
99
- .stf_options input[type="checkbox"]{ float:left; margin:5px 0; }
100
- .stf_input input:focus, .stf_input textarea:focus{ background:#fff; }
101
- .stf_input textarea{ width:250px; height:135px; font-size:12px; padding:4px; color:#333; line-height:1.5em; background:#efefef;
102
- }
103
- .stf_table th, .stf_table td{ border:1px solid #bbb; padding:10px; text-align:center; }
104
- .stf_table th, .stf_table td.feature{ border-color:#ccc; }
105
-
106
- .stf_options ul.tabs {
107
- margin: 0;
108
- padding: 0;
109
- list-style: none;
110
- height: 32px; /*--Set height of tabs--*/
111
- border-bottom: 1px solid #ddd;
112
- /* border-left: 1px solid #ddd; */
113
- border-left: 0;
114
- border-top-left-radius: 4px;
115
- width: 100%;
116
- float:none;
117
- }
118
- .stf_options ul.tabs li {
119
- float: left;
120
- margin: 0;
121
- padding: 0;
122
- height: 31px; /*--Subtract 1px from the height of the unordered list--*/
123
- line-height: 31px; /*--Vertically aligns the text within the tab--*/
124
- border: 1px solid #ddd;
125
- /*border-left: none;*/
126
- margin-bottom: -1px; /*--Pull the list item down 1px--*/
127
- overflow: hidden;
128
- position: relative;
129
- background: #efefef;
130
- border-top-left-radius: 4px;
131
- border-top-right-radius: 4px;
132
- }
133
- .stf_options ul.tabs li a {
134
- text-decoration: none;
135
- color: #999;
136
- display: block;
137
- font-size: 1.3em;
138
- padding: 0 10px 0 10px;
139
- border: 1px solid #fff; /*--Gives the bevel look with a 1px white border inside the list item--*/
140
- outline: none;
141
- background-position: 6px 50%;
142
- background-repeat: no-repeat;
143
- border-top-left-radius: 6px;
144
- border-top-right-radius: 6px;
145
- }
146
- .stf_options ul.tabs li a:hover { background-color: #fff; }
147
- .stf_options ul.tabs li:hover { border-top:1px solid #f60; }
148
-
149
- html .stf_options ul.tabs li.active, html .stf_options ul.tabs li.active a:hover { /*--Makes sure that the active tab does not listen to the hover properties--*/
150
- background-color: #fff;
151
- border-bottom: 1px solid #fff; /*--Makes the active tab look like it's connected with its content--*/
152
- border-top-left-radius: 5px;
153
- border-top-right-radius: 5px;
154
  }
155
 
156
- html .stf_options ul.tabs li.active { /*--Makes sure that the active tab does not listen to the hover properties--*/
157
- border-top-color:#2275AA;
158
  }
159
 
160
- .stf_options .tab_container {
161
- border: 1px solid #ddd; border-top: none; float:none; clear:none; overflow: hidden; width: 100%; background: #fff; position: relative; }
162
- .stf_options .tab_content { padding: 20px; }
163
 
164
- .stf_options #tabs-footer{
165
- padding: 15px;
166
- border-top: 1px solid #ddd;
167
- overflow: hidden;
168
- background: transparent;
169
  }
170
- #tabs-footer .copyright { margin-top: 24px }
171
  .stf_options #tabs-footer p.submit{ margin:0; padding:0; float:right; }
172
- .stf_options #options-tabs .button-primary {
173
- background-image: url('images/disk.png');
174
- background-position: 12px 50%;
175
- background-repeat: no-repeat;
176
- padding: 12px 30px 12px 40px;
177
- border-radius: 8px;
178
- -webkit-border-radius: 8px;
179
- -moz-border-radius: 5px;
180
- font-size: 16px !important; font-weight:normal; text-shadow: #1A5B77 1px 1px 1px;
181
- line-height: 16px;
182
- height: 40px;
183
  }
184
-
185
  .stf_options #options-tabs .button-primary:hover{ background-color: #298CBA; }
186
  .stf_options #options-tabs .button-primary:active{ background-color: #21759B; }
187
 
188
- .stf_options #options-tabs .wysiwyg{ float:left; padding:0; }
189
- .stf_options #options-tabs .wysiwyg ul.panel li { background-color:transparent; }
190
-
191
- .stf_options ul.tabs li a.general { padding-left:28px; background-image: url('images/cog.png'); }
192
- .stf_options ul.tabs li a.advanced { padding-left:28px; background-image: url('images/wrench_orange.png'); }
193
- .stf_options ul.tabs li a.custom-colors { padding-left:28px; background-image: url('images/color_wheel.png'); }
194
- .stf_options ul.tabs li a.effects { padding-left:28px; background-image: url('images/lightning.png'); }
195
- .stf_options ul.tabs li a.template-tag { padding-left:28px; background-image: url('images/tag.png'); }
196
-
197
  /* Clearfix */
198
  .clearfix:after {
199
  clear: both;
@@ -208,4 +156,4 @@ height: 40px;
208
  }
209
  * html .clearfix {
210
  height: 1%;
211
- }
15
  background: lightYellow;
16
  color: #827500;
17
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  .stf_share{ background:#ededed; padding:5px; border-radius:5px; overflow:hidden; margin-right:15px; }
20
  .share-label, .share-button{ display:inline; float:left; margin-right:10px; }
21
+ .share-label{
22
  margin-top: 3px;
23
  margin-left: 5px;
24
  font-size: 16px;
25
  text-shadow: white 1px 1px 0;
26
+ color: #aaa;
27
  } .stf_share:hover .share-label{ color:#21759B }
28
  .tweet{ margin-top:2px; }
29
  .panel{ background: #ededed; border-bottom:1px solid #ddd; }
41
 
42
  .shailan_dm_input textarea{
43
  width:400px; height:150px; }
44
+
45
+ #picker {
46
+ position: fixed;
47
+ top: 40px;
48
+ right: 10px;
49
+ background: white;
50
+ box-shadow: #999 0 1px 15px;
51
+ border-radius: 8px;
52
+ }
 
 
 
 
53
 
54
  .sidebar-name{overflow:auto; display:block;}
55
  .sidebar-name h3{float:left;}
58
  input.selected{border:1px solid #f93}
59
  input.color-error{border:1px solid #f00;}
60
 
61
+ .stf_options {
62
+ max-width: 920px;
63
+ }
64
 
65
+ .stf_opts_wrap{ }
66
+
67
+ #demo {
68
+ border: 5px dashed #E0E0E0;
69
+ padding: 8px 20px 20px;
70
+ margin: 6px 0 15px;
71
+ color: #999;
72
+ }
73
+ #demo .widget { border: 0; background: transparent; margin: 0; padding: 0; position: relative; }
74
+ #demo .clearfix:after{ clear:left; }
75
+
76
+ h3.section-title {
77
+ border-bottom: 2px solid #ddd;
78
+ padding: .8em;
79
+ margin-top: 2em;
80
+ }
81
 
 
 
82
  .stf_section{ }
83
+
84
+ .stf_options label {
85
+ font-weight: 500;
86
+ width: 230px;
87
+ display: block;
88
+ float: left;
89
+ line-height: 24px;
90
+ }
91
+
92
+ .stf_paragraph {
93
+ padding: 10px;
94
+ background: #e6e6e6;
95
+ }
96
+
97
+ .stf_input {
98
+ padding: 15px 15px;
99
+ border-bottom: 1px solid #ddd;
100
+ }
101
+
102
+ .stf_options small{
103
  display: block;
104
  float: left;
105
  width: 330px;
110
  line-height: 24px;
111
  }
112
  .stf_options small:hover{ color:#444; }
113
+
114
+ .stf_options input[type="text"], .stf_options textarea, .stf_options select {
115
+ width: 250px;
116
+ float: left;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
118
 
119
+ .stf_input textarea {
120
+ height: 135px;
121
  }
122
 
123
+ .stf_options input[type="checkbox"]{ float:left; margin:5px 0; }
124
+ .stf_input input:focus, .stf_input textarea:focus{ background:#fff; }
 
125
 
126
+ .stf_options #tabs-footer {
127
+ padding: 1em;
128
+ overflow: hidden;
129
+ background: #e0e0e0;
130
+ margin: 1em 0;
131
  }
132
+
133
  .stf_options #tabs-footer p.submit{ margin:0; padding:0; float:right; }
134
+
135
+ .stf_options #options-tabs .button-primary {
136
+ font-size: larger;
137
+ padding: .4em 1.4em;
138
+ height: auto;
139
+ border-radius: .4em;
 
 
 
 
 
140
  }
141
+
142
  .stf_options #options-tabs .button-primary:hover{ background-color: #298CBA; }
143
  .stf_options #options-tabs .button-primary:active{ background-color: #21759B; }
144
 
 
 
 
 
 
 
 
 
 
145
  /* Clearfix */
146
  .clearfix:after {
147
  clear: both;
156
  }
157
  * html .clearfix {
158
  height: 1%;
159
+ }
css/shailan-dropdown.css DELETED
@@ -1,54 +0,0 @@
1
- /* Reset */
2
- 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; }
3
-
4
- .shailan-dropdown-menu { position:relative; z-index:597; }
5
-
6
- /* .dropdown-horizontal-container{ width:100%; } */
7
- /* Remove list styling */
8
- ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
9
-
10
- /* Z-index */
11
- ul.dropdown li{ position: relative; }
12
- ul.dropdown li ul { position:absolute; z-index: 598; }
13
- ul.dropdown li.hover, ul.dropdown li:hover{ cursor: default; }
14
-
15
- /* Top level */
16
- ul.dropdown li { display:inline; vertical-align: middle; zoom:1; }
17
- ul.dropdown > li { float:left; }
18
- ul.dropdown li a{ padding: .3em .8em; }
19
-
20
- /* Sub levels */
21
- ul.dropdown ul { position: absolute; top: 100%; left: 0; }
22
- ul.dropdown ul li { float: none; display: list-item; list-style: none; }
23
-
24
- ul.dropdown ul ul { top: 1px; left: 99%; }
25
- ul.dropdown a:active, ul.dropdown a:focus { outline-style:none; }
26
-
27
- * html ul.dropdown li { height: 1px; }
28
-
29
- /* IE Submenu margin fix */
30
- ul.dropdown ul li, ul.dropdown-vertical { margin-left: -16px; mar\gin-left: 0; }
31
-
32
- /* Hide submenus */
33
- 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; }
34
-
35
- ul.dropdown ul ul ul ul ul ul { display: none !important; }
36
-
37
- /* Alignment support */
38
- .dm-align-right table{ float:right; }
39
- .dm-align-left table{ float:left; }
40
- ul.dropdown-horizontal.dropdown-align-right ul { right: 0; left: auto; }
41
- ul.dropdown-horizontal.dropdown-align-right ul ul{ right: 99%; left: auto; }
42
-
43
- /* Vertical menu support */
44
- ul.dropdown-vertical.dropdown-align-left ul { top: 1px; left: 99%; right:auto; }
45
- ul.dropdown-vertical.dropdown-align-right ul { top: 1px; right: 99%; left:auto; }
46
- ul.dropdown-vertical li { float: none; display:block; }
47
-
48
- /* Clearfix */
49
- .clearfix:after { clear: both; content: "."; display: block; height: 0; visibility: hidden; }
50
- * html > body .clearfix { display: block; width: 100%; }
51
- * html .clearfix { height: 1%; }
52
-
53
- /* Cursor fix */
54
- ul.dropdown li a{ cursor:pointer; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/shailan-dropdown.min.css CHANGED
@@ -1 +1,140 @@
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; padding-left: 0; padding-right: 0;}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 * {
2
+ margin: 0;
3
+ padding: 0;
4
+ border: 0;
5
+ width: auto;
6
+ line-height: 1;
7
+ font-size: 100%;
8
+ }
9
+
10
+ .shailan-dropdown-menu {
11
+ position: relative;
12
+ z-index: 597
13
+ }
14
+
15
+ ul.dropdown,ul.dropdown li,ul.dropdown ul {
16
+ list-style: none;
17
+ margin: 0;
18
+ padding: 0
19
+ }
20
+
21
+ ul.dropdown li {
22
+ position: relative;
23
+ display: inline;
24
+ vertical-align: middle;
25
+ zoom:1}
26
+
27
+ ul.dropdown li ul {
28
+ position: absolute;
29
+ z-index: 598
30
+ }
31
+
32
+ ul.dropdown li.hover,ul.dropdown li:hover {
33
+ cursor: default
34
+ }
35
+
36
+ ul.dropdown > li {
37
+ float: left
38
+ }
39
+
40
+ ul.dropdown li a {
41
+ padding: .3em .8em;
42
+ cursor: pointer
43
+ }
44
+
45
+ ul.dropdown ul {
46
+ position: absolute;
47
+ top: 100%;
48
+ left: 0
49
+ }
50
+
51
+ ul.dropdown ul li {
52
+ float: none;
53
+ display: list-item;
54
+ list-style: none
55
+ }
56
+
57
+ ul.dropdown ul ul {
58
+ top: 1px;
59
+ left: 99%
60
+ }
61
+
62
+ ul.dropdown a:active,ul.dropdown a:focus {
63
+ outline-style: none
64
+ }
65
+
66
+ * html ul.dropdown li {
67
+ height: 1px
68
+ }
69
+
70
+ ul.dropdown ul li,ul.dropdown-vertical {
71
+ margin-left: 0
72
+ }
73
+
74
+ 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 {
75
+ display: none
76
+ }
77
+
78
+ ul.dropdown ul ul ul ul ul ul {
79
+ display: none!important
80
+ }
81
+
82
+ .menu-alignment-wrap {
83
+ display: table;
84
+ }
85
+
86
+ .dm-align-right table, .dm-align-right .menu-alignment-wrap {
87
+ float: right
88
+ }
89
+
90
+ .dm-align-left table, .dm-align-left .menu-alignment-wrap {
91
+ float: left
92
+ }
93
+
94
+
95
+
96
+ ul.dropdown-horizontal.dropdown-align-right ul {
97
+ right: 0;
98
+ left: auto
99
+ }
100
+
101
+ ul.dropdown-horizontal.dropdown-align-right ul ul {
102
+ right: 99%;
103
+ left: auto
104
+ }
105
+
106
+ ul.dropdown-vertical.dropdown-align-left ul {
107
+ top: 1px;
108
+ left: 99%;
109
+ right: auto;
110
+ padding-left: 0;
111
+ padding-right: 0;
112
+ }
113
+
114
+ ul.dropdown-vertical.dropdown-align-right ul {
115
+ top: 1px;
116
+ right: 99%;
117
+ left: auto
118
+ }
119
+
120
+ ul.dropdown-vertical li {
121
+ float: none;
122
+ display: block
123
+ }
124
+
125
+ .clearfix:after {
126
+ clear: both;
127
+ content: ".";
128
+ display: block;
129
+ height: 0;
130
+ visibility: hidden
131
+ }
132
+
133
+ * html > body .clearfix {
134
+ display: block;
135
+ width: 100%
136
+ }
137
+
138
+ * html .clearfix {
139
+ height: 1%
140
+ }
lang/be_BY.mo DELETED
Binary file
readme.txt CHANGED
@@ -1,49 +1,72 @@
1
  === Dropdown Menu Widget ===
2
  Contributors: mattsay
3
- Donate link: http://metinsaylan.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: 4.7
7
- Stable tag: 1.9.5
8
 
9
- Pages/Categories/Custom dropdown navigation menus with nice jQuery effects. Comes with various customizable CSS themes!
10
 
11
  == Description ==
12
 
13
- Dropdown Menu widget adds a beautiful, CSS only dropdown menu, listing pages, categories of your blog. You can also turn your wordpress navigation menu into a beatiful dropdown menu using this plugin.
14
- It allows you to chose vertical or horizontal layout. It supports multiple instances. You can select a theme for your widget from the Dropdown Menu Settings page or you can CREATE YOUR OWN THEME WITHIN SAME PLUGIN!! You can also customize your dropdown menu using CSS. If you want a custom dropdown theme you can [request](http://metinsaylan.com/contact) one. Please visit [plugin site](http://metinsaylan.com/wordpress/plugins/dropdown-menu) for more information.
15
 
16
- == Installation ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
- 1. Upload the plugin to your `/wp-content/plugins/` directory
19
- 1. Activate the plugin through the 'Plugins' menu in WordPress
20
- 1. Go to Appearance -> Widgets to add this widget to one of your sidebars
21
- 1. You can also use `<?php shailan_dropdown_menu(); ?>` in your template to display the menu.
22
- 1. Don't forget to change menu settings from Settings -> Dropdown Menu panel.
 
23
 
24
- More detailed information can be found [here](http://metinsaylan.com/wordpress/plugins/dropdown-menu/#installation).
25
 
26
- More information about php template tag can be found [here](http://metinsaylan.com/2773/dropdown-menu-widget-template-tag-usage-explained/).
 
 
 
 
 
 
27
 
28
  == Frequently Asked Questions ==
29
 
30
- = I don't have sidebar on my header, how can i add one? =
31
 
32
- Adding a sidebar in wordpress is a quite easy task. You can [read instructions here](http://metinsaylan.com/727/how-to-widgetize-your-theme-in-3-simple-steps/). If you don't want to add a sidebar consider using PHP template tag instead.
33
 
34
  = I added this widget to my sidebar but it looks all weird! =
35
 
36
- This widget is intented for *wide header widget areas*, not regular sidebars. You can [add a sidebar](http://metinsaylan.com/727/how-to-widgetize-your-theme-in-3-simple-steps/) to your theme or you can [get a theme](http://metinsaylan.com/wordpress/plugins/dropdown-menu/themes) that supports dropdown menu widget. If you don't want to add a sidebar, you can use php template tag instead. Read [php template tag](http://metinsaylan.com/2773/dropdown-menu-widget-template-tag-usage-explained/) instructions [here](http://metinsaylan.com/2773/dropdown-menu-widget-template-tag-usage-explained/).
37
 
38
- = Can i create my own theme? =
39
 
40
  Since this plugin works on CSS, if you are capable of writing CSS, you can customize the theme as you like it. If you want full customization select `None` as your theme.
41
 
42
- = I don't know CSS, how can i customize it? =
43
 
44
  Plugin comes with various themes already installed. If you don't like existing themes put `dropdown.css` in your theme root and it will be selectable on themes list ;)
45
 
46
- = I found a bug! Where do i submit it? =
47
 
48
  Please submit errors, bugs or requests on [Dropdown Menu Widget Github](https://github.com/shailancom/dropdown-menu-widget/issues) page.
49
 
@@ -55,227 +78,6 @@ Please submit errors, bugs or requests on [Dropdown Menu Widget Github](https://
55
 
56
  == Changelog ==
57
 
58
- = 1.9.3 =
59
- * Updated WordPress version for compatibility.
60
-
61
- = 1.9.2 =
62
- * Added: Settings link on plugins page.
63
- * Added: Plugin activation redirect to Settings page.
64
- * Added: Filter wp_nav_menu arguments to create a dropdown menu. Theme can be changed via dropdown menu settings page.
65
- * Added: Demo menu on settings page.
66
- * Removed: Unnecessary scripts from scripts folder.
67
- * Removed: Twitter box on settings page.
68
- * Some minor fixes and tidy up on options page.
69
-
70
- = 1.9.1 =
71
- * Added: More detailed faq and plugin banner.
72
-
73
- = 1.9 =
74
- * Changed: Minimized included CSS file.
75
- * Added: Support for changing arrow colors.
76
- * Added: Help links next to options settings fields.
77
- * Added: New Theme Rounded Corners.
78
- * Added: New Theme Rounded Corners Light.
79
- * Added: New Theme Pills.
80
-
81
- = 1.8.1 =
82
- * Fixed: HoverIntent hotfix for older version users. (Thanks to Karsten)
83
- * Fixed: Various theme problems with vertical menus.
84
-
85
- = 1.8 =
86
- * Fixed: HoverIntent hotfix for Wordpress 3.3
87
-
88
- = 1.7.2 =
89
- * Fixed: Widget hotfix.
90
-
91
- = 1.7.1 =
92
- * Fixed: Template tag hotfix. Fixes displaying vertical instead of horizontal.
93
-
94
- = 1.7 =
95
- * Added: brand new options page.
96
- * Added: Web2.0 Theme.
97
- * Added: width option to widgets.
98
- * Fixed: Right aligned menu dropdown errors.
99
- * Added: Effect delay option (hoverIntent).
100
- * Added: Plugin both search theme & template folders for dropdown.css
101
- * Added: Adminbar button to easily change current options.
102
-
103
- = 1.6.4 =
104
- * Fixed effect selector error.
105
- * Added width option for vertical menus.
106
-
107
- = 1.6.3 =
108
- * Fixed: Supplied arguments for the menu overwritten in the menu function.
109
- * Added: Now you can easily add menus using menu names & ids and even locations.
110
-
111
- = 1.6.2 =
112
- * Fixed: Stylesheet causing widgets go behind widget containers. (Thanks to Antonio Capone for reporting the issue)
113
-
114
- = 1.6.1 =
115
- * Fix: Colorscheme background error.
116
- * Fix: jQuery not included when effects are enabled.
117
- * Added: Disabling options that are not used.
118
- * Added: Custom Theme URL option.
119
-
120
- = 1.6 =
121
- * Added option to show title on widget.
122
- * Added capability to find dropdown.css on your theme folder.
123
- * Added jQuery dropdown effects.
124
- * Added remove title attributes option.
125
- * Added remove links from top level option.
126
- * Many more to come..
127
-
128
- = 1.5.8 =
129
- * Added dropdown_menu_defaults filter for changing default options like order, depth etc.
130
-
131
- = 1.5.7 =
132
- * Fixed various css issues.
133
- * Removed backgrounds for IE on certain themes.
134
- * Hopefully works with all browsers with javascript enabled (Tested with Chrome, Firefox, Safari, Opera and IE6).
135
- * Please submit any bugs you see on [dropdown menu plugin page](http://shailan.com/wordpress/plugins/dropdown-menu/)
136
-
137
- = 1.5.6beta =
138
- * Added hooks for inserting your own menu & other navigational elements.
139
- * Fixed z-index errors.
140
- * Fixed background problem with custom theme selection.
141
- * Added "include archives" option to Dropdown-Multi widget.
142
-
143
- = 1.5.6alpha1 =
144
- * Fixed sub menu display errors.
145
- * Added alignment option to template tag support.
146
-
147
- = 1.5.6alpha =
148
- * Fixed options page saving error.
149
- * Added a brand new color selection interface for custom "Color Scheme" (beta).
150
- * Now you can easily select your own colors & plus overlays!
151
-
152
- = 1.5.5 =
153
- * New theme! Hulu style theme.
154
- * Added new action hooks to insert your items to the dropdown menu.
155
-
156
- = 1.5.4 =
157
- * Added first-child & last-child selector for styling to dropdown menu. (available when jquery is active only)
158
- * Fixed IE display errors for shiny black theme.
159
- * Fixed not saving issues with the plugin options.
160
-
161
- = 1.5.3 =
162
- * Made Custom CSS area available even when a theme is selected. You can now use this area for your theme customizations.
163
- * Fixed `Call undefined function wp_nav_menu on 365` error.
164
- * Fixed font-size problems with `Shiny Black` theme.
165
- * Removed behaviour fix for IE. Now using only jquery as dropdown fix which comes packed with wordpress.
166
-
167
- = 1.5.2 =
168
- * Fixed tested version number.
169
- * Added screenshot 2.
170
- * Added options page screenshot.
171
- * Now plugin allows you to rename the home link.
172
-
173
- = 1.5.1 =
174
- * Removed custom walker support for now.
175
- * Removed blue tabs theme since it was using custom walkers.
176
- * Fixed all the styles to work with new css classes.
177
- * Updated Shiny Black theme to work with wide links.
178
- * Complete support for custom css insert.
179
-
180
- = 1.5 =
181
- * Fixed issues with wordpress 3.0.
182
- * Renamed plugin to dropdown menu.
183
- * Removed inline style option.
184
- * Removed unnecessary screenshots.
185
- * Added support for wordpress 3.0 navigation menus.
186
- * Removed exclude pages plugin.
187
-
188
- = 1.4.1 =
189
- * A minor fix for `Parse error: parse error, expecting 'T_FUNCTION' in C:\wamp\www\wordpress\wp-content\plugins\dropdown-menu-widget\shailan-multi-dropdown.php on line 194` error.
190
-
191
- = 1.4.0 =
192
- * Added option for multiline links. If checked a link with more than one word will be wrapped.
193
- * Another fix for IE. Hopefully last.
194
-
195
- = 1.3.9 =
196
- * Fixed errors for IE jquery support.
197
- * Added belorussian translation provided by [Marcis G.](http://pc.de)
198
- * Added lang folder for translations.
199
-
200
- = 1.3.8 =
201
- * Added option for displaying title attributes. You may now turn title display on from the Settings page.
202
-
203
- = 1.3.7 =
204
- * Removed unnecessary extrude line from Dropdown Multi widget.
205
-
206
- = 1.3.6 =
207
- * Fixed "Dropdown Multi" widget error with categories and links.
208
-
209
- = 1.3.5 =
210
- * Added "Dropdown Multi" widget that allows you to inlude pages, categories and links in one menu.
211
-
212
- = 1.3.4 =
213
- * Fixed dropdown errors for IE7. Report any bugs with a screenshot please. Thanks.
214
-
215
- = 1.3.3 =
216
- * Fixed function name collisions with "Exclude Pages" plugin. The plugin is fully functional now.
217
-
218
- = 1.3.2 =
219
- * Bundled with "Exclude Pages" plugin by [Simon Wheatley](http://simonwheatley.co.uk/wordpress/). You can now easily exclude pages from the navigation. Just uncheck the the "Include page in menus" checkbox on the page edit screen. See [screenshots](http://wordpress.org/extend/plugins/dropdown-menu-widget/screenshots/) for more information.
220
-
221
- = 1.3.1 =
222
- * Added "Blue gradient" theme.
223
-
224
- = 1.3.0 =
225
- * Fixed "Home" link bug for the template tag. Thanks to Jeff.
226
-
227
- = 1.2.7 =
228
- * Added "include homepage link" for both pages and categories now. You can enable/disable this link from the widget options easily.
229
-
230
- = 1.2.6 =
231
- * Fixed a minor bug.
232
-
233
- = 1.2.5 =
234
- * Added translation support.
235
- * Added pot file for translators.
236
-
237
- = 1.2.4 =
238
- * Fixed category walker for the advanced styling.
239
-
240
- = 1.2.3 =
241
- * Added Aqua theme.
242
- * Added <span> elements in the menu so more advanced styling can be made.
243
- * Added alignment option. Now you can align your menu wherever you wanted!
244
- * Added Shiny Black theme.
245
-
246
- = 1.2.0 =
247
- * Removed title attributes for the categories dropdown menu items.
248
-
249
- = 1.1.0 =
250
- * Added custom walker class to disable title attributes on menu items.
251
- * Renamed class and style files.
252
- * Fixed default theme.
253
-
254
- = 1.0.0 =
255
- * Added vertical dropdown menu functionality.
256
- * Fixed widget code.
257
- * Changed dropdown widget classname to : shailan-dropdown-menu
258
- * Changed wrapper div classname to : shailan-dropdown-wrapper
259
- * Moved li item paddings to anchor elements.
260
-
261
- = 0.4.3 =
262
- * New grayscale theme.
263
- * Template tag `shailan_dropdown_menu()` is available now. See usage for more info.
264
- * Template tag options added.
265
-
266
- = 0.4.2 =
267
- * Fixed XHTML error on link tags.
268
- * Fixed Inline Style error on categories dropdown menu.
269
- * Removed unnecessary files.
270
-
271
- = 0.4.1 =
272
- * Fixed XHTML issues.
273
- * Added WP Default theme.
274
- * Made some minor fixes to widget options form.
275
-
276
- = 0.3 =
277
- * Fixed problems about styling. Now you can change dropdown menu style from the options page.
278
 
279
- = 0.2 =
280
- * First public release.
281
- * Added login and register button options.
1
  === Dropdown Menu Widget ===
2
  Contributors: mattsay
3
+ Donate link: http://metinsaylan.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: 4.7
7
+ Stable tag: 1.9.6
8
 
9
+ Highly customizable automatic pages, categories or custom dropdown navigation menu widget with nice jQuery effects.
10
 
11
  == Description ==
12
 
13
+ **Dropdown Menu widget** adds a beautiful dropdown menu, listing pages and categories of your blog. You can also turn your WordPress navigation menus into beautiful dropdown menus using this plugin.
 
14
 
15
+ Features:
16
+
17
+ * Automatically generated menus
18
+ * Supports pages, categories and custom menus
19
+ * jQuery Effects (must be enabled from panel)
20
+ * Customizable color scheme (select Custom Theme from options to activate)
21
+ * Vertical or Horizontal Menus
22
+ * Supports Multiple Instances
23
+ * Can be embedded into theme using [PHP Template Tag](http://metinsaylan.com/wordpress/2011/07/31/dropdown-menu-widget-template-tag-usage-explained/)
24
+
25
+ *Documentation & Simple Tutorials to Get You Started:*
26
+
27
+ * [Dropdown Menu Widget Help](http://metinsaylan.com/docs/dropdown-menu-widget-help/)
28
+ * [Dropdown Menu PHP Template Tag Usage](http://metinsaylan.com/wordpress/2011/07/31/dropdown-menu-widget-template-tag-usage-explained/)
29
+ * [Using Custom Menus In Dropdown Menu Widget](http://metinsaylan.com/wordpress/2010/07/26/custom-dropdown-menu-using-wordpress-3-nav-menus/)
30
+ * [Tutorial: Create your very own dropdown menu stylesheet](http://metinsaylan.com/wordpress/2010/04/04/tutorial-create-your-very-own-dropdown-menu-stylesheet/)
31
+ * [Hook: Append Categories Menu To Pages Menu](http://metinsaylan.com/wordpress/2011/02/10/how-to-add-categories-dropdown-to-the-end-of-dropdown-menu-widget/)
32
+ * [View all posts tagged `Dropdown Menu Widget`](http://metinsaylan.com/tag/dropdown-menu-widget/)
33
 
34
+ If you like this plugin, please [donate](http://metinsaylan.com/donate/).
35
+
36
+ Please report issues on [Github Issues Page](https://github.com/shailancom/dropdown-menu-widget/issues).
37
+ Visit source on [github](https://github.com/shailancom/dropdown-menu-widget)
38
+
39
+ == Installation ==
40
 
41
+ Dropdown menu widget is so easy to setup. Just follow the steps below to add it to your site.
42
 
43
+ 1. Login to your WordPress dashboard and go to Plugins > Add New.
44
+ 2. If you have downloaded the plugin, click on `Upload` link and upload the plugin.
45
+ 3. If you haven't downloaded yet, type `dropdown menu widget` to search field and click `Search`.
46
+ 4. Click on `Install` and click `Activate plugin` once it is loaded.
47
+ 5. Go to `Dropdown menu settings` under `Settings` to change dropdown theme and edit your settings.
48
+ 6. Add the dropdown menu to your site using `Widgets` or template tag codes.
49
+ 7. Done. Enjoy!
50
 
51
  == Frequently Asked Questions ==
52
 
53
+ = I don't have sidebar on my header, how can I add one? =
54
 
55
+ Adding a sidebar in WordPress is a quite easy task. You can [read instructions here](http://metinsaylan.com/wordpress/2010/04/30/how-to-widgetize-your-theme-in-3-simple-steps/). If you don't want to add a sidebar consider using [PHP template tag](http://metinsaylan.com/wordpress/2011/07/31/dropdown-menu-widget-template-tag-usage-explained/) instead.
56
 
57
  = I added this widget to my sidebar but it looks all weird! =
58
 
59
+ This widget is intended for *wide header widget areas*, not regular sidebars. You can [add a sidebar](http://metinsaylan.com/727/how-to-widgetize-your-theme-in-3-simple-steps/) to your theme or you can [get a theme](http://metinsaylan.com/lists/themes-support-dropdown/) that supports dropdown menu widget. If you don't want to add a sidebar, you can use [PHP template tag](http://metinsaylan.com/wordpress/2011/07/31/dropdown-menu-widget-template-tag-usage-explained/) instead.
60
 
61
+ = Can I create my own theme? =
62
 
63
  Since this plugin works on CSS, if you are capable of writing CSS, you can customize the theme as you like it. If you want full customization select `None` as your theme.
64
 
65
+ = I don't know CSS, how can I customize it? =
66
 
67
  Plugin comes with various themes already installed. If you don't like existing themes put `dropdown.css` in your theme root and it will be selectable on themes list ;)
68
 
69
+ = I found a bug! Where do I submit it? =
70
 
71
  Please submit errors, bugs or requests on [Dropdown Menu Widget Github](https://github.com/shailancom/dropdown-menu-widget/issues) page.
72
 
78
 
79
  == Changelog ==
80
 
81
+ = 1.9.6 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
+ A list of all changes can be found on [Changelog page on Github](https://github.com/shailancom/dropdown-menu-widget/blob/master/CHANGELOG.md)
 
 
scripts/admin.js CHANGED
@@ -1,7 +1,7 @@
1
  /*var farbtastic; */
2
 
3
  function pickColor(obj, color) {
4
- farbtastic.setColor(color);
5
  jQuery("#" + obj).val(color);
6
  }
7
 
@@ -22,10 +22,10 @@ jQuery(document).ready(function() {
22
  jQuery('#shailan_dm_theme_url').disable();
23
  }
24
  }
25
-
26
  jQuery('#shailan_dm_active_theme').change(function(){ shailan_dm_active_theme_change() });
27
  shailan_dm_active_theme_change();
28
-
29
  function shailan_dm_effects_change(){
30
  if( jQuery('#shailan_dm_effects').attr('checked') == true || jQuery('#shailan_dm_effects').attr('checked') == 'checked' ){
31
  jQuery('#shailan_dm_effect').enable();
@@ -35,23 +35,28 @@ jQuery(document).ready(function() {
35
  jQuery('#shailan_dm_effect_speed').disable();
36
  }
37
  }
38
-
39
  jQuery('#shailan_dm_effects').change(function(){ shailan_dm_effects_change() });
40
  shailan_dm_effects_change();
41
-
42
  var f = jQuery.farbtastic('#picker');
43
  var p = jQuery('#picker').fadeOut();
44
  var selected;
45
 
46
  // Color selector areas:
47
- var pickers = ["shailan_dm_color_lihover", "shailan_dm_color_menubg", "shailan_dm_color_link", "shailan_dm_color_hoverlink"];
 
 
 
 
 
 
 
 
 
48
 
49
- jQuery.each(pickers, function() {
50
-
51
- f.linkTo(this);
52
-
53
  jQuery("#" + this).css('background-color', jQuery("#" + this).val());
54
-
55
  jQuery("#" + this).focus(function(){
56
  if (selected) {
57
  jQuery(selected).removeClass('selected');
@@ -61,7 +66,7 @@ jQuery(document).ready(function() {
61
  jQuery(selected = this).addClass('selected');
62
  //jQuery('#picker').show();
63
  });
64
-
65
  jQuery("#" + this).keyup(function() {
66
  f.linkTo(this);
67
  p.fadeIn(2);
@@ -78,7 +83,7 @@ jQuery(document).ready(function() {
78
  jQuery(this).addClass('color-error');
79
  }
80
  });
81
-
82
  });
83
 
84
  jQuery(document).mousedown(function(){
@@ -88,8 +93,8 @@ jQuery(document).ready(function() {
88
  jQuery(this).fadeOut(10);
89
  });
90
  });
91
-
92
-
93
-
94
-
95
- });
1
  /*var farbtastic; */
2
 
3
  function pickColor(obj, color) {
4
+ jQuery.farbtastic.setColor(color);
5
  jQuery("#" + obj).val(color);
6
  }
7
 
22
  jQuery('#shailan_dm_theme_url').disable();
23
  }
24
  }
25
+
26
  jQuery('#shailan_dm_active_theme').change(function(){ shailan_dm_active_theme_change() });
27
  shailan_dm_active_theme_change();
28
+
29
  function shailan_dm_effects_change(){
30
  if( jQuery('#shailan_dm_effects').attr('checked') == true || jQuery('#shailan_dm_effects').attr('checked') == 'checked' ){
31
  jQuery('#shailan_dm_effect').enable();
35
  jQuery('#shailan_dm_effect_speed').disable();
36
  }
37
  }
38
+
39
  jQuery('#shailan_dm_effects').change(function(){ shailan_dm_effects_change() });
40
  shailan_dm_effects_change();
41
+
42
  var f = jQuery.farbtastic('#picker');
43
  var p = jQuery('#picker').fadeOut();
44
  var selected;
45
 
46
  // Color selector areas:
47
+ var pickers = [
48
+ "shailan_dm_color_lihover",
49
+ "shailan_dm_color_menubg",
50
+ "shailan_dm_color_link",
51
+ "shailan_dm_color_hoverlink"
52
+ ];
53
+
54
+ jQuery.each(pickers, function() {
55
+
56
+ f.linkTo("#" + this);
57
 
 
 
 
 
58
  jQuery("#" + this).css('background-color', jQuery("#" + this).val());
59
+
60
  jQuery("#" + this).focus(function(){
61
  if (selected) {
62
  jQuery(selected).removeClass('selected');
66
  jQuery(selected = this).addClass('selected');
67
  //jQuery('#picker').show();
68
  });
69
+
70
  jQuery("#" + this).keyup(function() {
71
  f.linkTo(this);
72
  p.fadeIn(2);
83
  jQuery(this).addClass('color-error');
84
  }
85
  });
86
+
87
  });
88
 
89
  jQuery(document).mousedown(function(){
93
  jQuery(this).fadeOut(10);
94
  });
95
  });
96
+
97
+
98
+
99
+
100
+ });
scripts/superfish.js DELETED
@@ -1,121 +0,0 @@
1
-
2
- /*
3
- * Superfish v1.4.8 - jQuery menu widget
4
- * Copyright (c) 2008 Joel Birch
5
- *
6
- * Dual licensed under the MIT and GPL licenses:
7
- * http://www.opensource.org/licenses/mit-license.php
8
- * http://www.gnu.org/licenses/gpl.html
9
- *
10
- * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
11
- */
12
-
13
- ;(function($){
14
- $.fn.superfish = function(op){
15
-
16
- var sf = $.fn.superfish,
17
- c = sf.c,
18
- $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
19
- over = function(){
20
- var $$ = $(this), menu = getMenu($$);
21
- clearTimeout(menu.sfTimer);
22
- $$.showSuperfishUl().siblings().hideSuperfishUl();
23
- },
24
- out = function(){
25
- var $$ = $(this), menu = getMenu($$), o = sf.op;
26
- clearTimeout(menu.sfTimer);
27
- menu.sfTimer=setTimeout(function(){
28
- o.retainPath=($.inArray($$[0],o.$path)>-1);
29
- $$.hideSuperfishUl();
30
- if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
31
- },o.delay);
32
- },
33
- getMenu = function($menu){
34
- var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
35
- sf.op = sf.o[menu.serial];
36
- return menu;
37
- },
38
- addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
39
-
40
- return this.each(function() {
41
- var s = this.serial = sf.o.length;
42
- var o = $.extend({},sf.defaults,op);
43
- o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
44
- $(this).addClass([o.hoverClass,c.bcClass].join(' '))
45
- .filter('li:has(ul)').removeClass(o.pathClass);
46
- });
47
- sf.o[s] = sf.op = o;
48
-
49
- $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
50
- if (o.autoArrows) addArrow( $('>a:first-child',this) );
51
- })
52
- .not('.'+c.bcClass)
53
- .hideSuperfishUl();
54
-
55
- var $a = $('a',this);
56
- $a.each(function(i){
57
- var $li = $a.eq(i).parents('li');
58
- $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
59
- });
60
- o.onInit.call(this);
61
-
62
- }).each(function() {
63
- menuClasses = [c.menuClass];
64
- if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
65
- $(this).addClass(menuClasses.join(' '));
66
- });
67
- };
68
-
69
- var sf = $.fn.superfish;
70
- sf.o = [];
71
- sf.op = {};
72
- sf.IE7fix = function(){
73
- var o = sf.op;
74
- if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
75
- this.toggleClass(sf.c.shadowClass+'-off');
76
- };
77
- sf.c = {
78
- bcClass : 'sf-breadcrumb',
79
- menuClass : 'sf-js-enabled',
80
- anchorClass : 'sf-with-ul',
81
- arrowClass : 'sf-sub-indicator',
82
- shadowClass : 'sf-shadow'
83
- };
84
- sf.defaults = {
85
- hoverClass : 'sfHover',
86
- pathClass : 'overideThisToUse',
87
- pathLevels : 1,
88
- delay : 800,
89
- animation : {opacity:'show'},
90
- speed : 'normal',
91
- autoArrows : true,
92
- dropShadows : true,
93
- disableHI : false, // true disables hoverIntent detection
94
- onInit : function(){}, // callback functions
95
- onBeforeShow: function(){},
96
- onShow : function(){},
97
- onHide : function(){}
98
- };
99
- $.fn.extend({
100
- hideSuperfishUl : function(){
101
- var o = sf.op,
102
- not = (o.retainPath===true) ? o.$path : '';
103
- o.retainPath = false;
104
- var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
105
- .find('>ul').hide().css('visibility','hidden');
106
- o.onHide.call($ul);
107
- return this;
108
- },
109
- showSuperfishUl : function(){
110
- var o = sf.op,
111
- sh = sf.c.shadowClass+'-off',
112
- $ul = this.addClass(o.hoverClass)
113
- .find('>ul:hidden').css('visibility','visible');
114
- sf.IE7fix.call($ul);
115
- o.onBeforeShow.call($ul);
116
- $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
117
- return this;
118
- }
119
- });
120
-
121
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/supersubs.js DELETED
@@ -1,90 +0,0 @@
1
-
2
- /*
3
- * Supersubs v0.2b - jQuery plugin
4
- * Copyright (c) 2008 Joel Birch
5
- *
6
- * Dual licensed under the MIT and GPL licenses:
7
- * http://www.opensource.org/licenses/mit-license.php
8
- * http://www.gnu.org/licenses/gpl.html
9
- *
10
- *
11
- * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
12
- * their longest list item children. If you use this, please expect bugs and report them
13
- * to the jQuery Google Group with the word 'Superfish' in the subject line.
14
- *
15
- */
16
-
17
- ;(function($){ // $ will refer to jQuery within this closure
18
-
19
- $.fn.supersubs = function(options){
20
- var opts = $.extend({}, $.fn.supersubs.defaults, options);
21
- // return original object to support chaining
22
- return this.each(function() {
23
- // cache selections
24
- var $$ = $(this);
25
- // support metadata
26
- var o = $.meta ? $.extend({}, opts, $$.data()) : opts;
27
- // get the font size of menu.
28
- // .css('fontSize') returns various results cross-browser, so measure an em dash instead
29
- var fontsize = $('<li id="menu-fontsize">&#8212;</li>').css({
30
- 'padding' : 0,
31
- 'position' : 'absolute',
32
- 'top' : '-999em',
33
- 'width' : 'auto'
34
- }).appendTo($$).width(); //clientWidth is faster, but was incorrect here
35
- // remove em dash
36
- $('#menu-fontsize').remove();
37
- // cache all ul elements
38
- $ULs = $$.find('ul');
39
- // loop through each ul in menu
40
- $ULs.each(function(i) {
41
- // cache this ul
42
- var $ul = $ULs.eq(i);
43
- // get all (li) children of this ul
44
- var $LIs = $ul.children();
45
- // get all anchor grand-children
46
- var $As = $LIs.children('a');
47
- // force content to one line and save current float property
48
- var liFloat = $LIs.css('white-space','nowrap').css('float');
49
- // remove width restrictions and floats so elements remain vertically stacked
50
- var emWidth = $ul.add($LIs).add($As).css({
51
- 'float' : 'none',
52
- 'width' : 'auto'
53
- })
54
- // this ul will now be shrink-wrapped to longest li due to position:absolute
55
- // so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer
56
- .end().end()[0].clientWidth / fontsize;
57
- // add more width to ensure lines don't turn over at certain sizes in various browsers
58
- emWidth += o.extraWidth;
59
- // restrict to at least minWidth and at most maxWidth
60
- if (emWidth > o.maxWidth) { emWidth = o.maxWidth; }
61
- else if (emWidth < o.minWidth) { emWidth = o.minWidth; }
62
- emWidth += 'em';
63
- // set ul to width in ems
64
- $ul.css('width',emWidth);
65
- // restore li floats to avoid IE bugs
66
- // set li width to full width of this ul
67
- // revert white-space to normal
68
- $LIs.css({
69
- 'float' : liFloat,
70
- 'width' : '100%',
71
- 'white-space' : 'normal'
72
- })
73
- // update offset position of descendant ul to reflect new width of parent
74
- .each(function(){
75
- var $childUl = $('>ul',this);
76
- var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right';
77
- $childUl.css(offsetDirection,emWidth);
78
- });
79
- });
80
-
81
- });
82
- };
83
- // expose defaults
84
- $.fn.supersubs.defaults = {
85
- minWidth : 9, // requires em unit.
86
- maxWidth : 25, // requires em unit.
87
- extraWidth : 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
88
- };
89
-
90
- })(jQuery); // plugin code ends
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scripts/widgets.js DELETED
@@ -1,4 +0,0 @@
1
- jQuery(document).ready(function() {
2
- jQuery("div[id*='_dropdown-menu-']").addClass('shailan-dropdown');
3
- jQuery("div[id*='_multi-dropdown-menu-']").addClass('shailan-dropdown');
4
- });
 
 
 
 
shailan-category-walker.php CHANGED
@@ -1,36 +1,10 @@
1
- <?php // is the love
2
-
3
- /**
4
- * Create HTML list of categories.
5
- *
6
- * @package Shailan Dropdown Menu Widget
7
- * @since 2.1.0
8
- * @uses Walker
9
- */
10
  class shailan_CategoryWalker extends Walker {
11
- /**
12
- * @see Walker::$tree_type
13
- * @since 2.1.0
14
- * @var string
15
- */
16
- var $tree_type = 'category';
17
 
18
- /**
19
- * @see Walker::$db_fields
20
- * @since 2.1.0
21
- * @todo Decouple this
22
- * @var array
23
- */
24
  var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
25
 
26
- /**
27
- * @see Walker::start_lvl()
28
- * @since 2.1.0
29
- *
30
- * @param string $output Passed by reference. Used to append additional content.
31
- * @param int $depth Depth of category. Used for tab indentation.
32
- * @param array $args Will only append content if style argument value is 'list'.
33
- */
34
  function start_lvl( &$output, $depth = 0, $args = array() ) {
35
  if ( 'list' != $args['style'] )
36
  return;
@@ -39,14 +13,6 @@ class shailan_CategoryWalker extends Walker {
39
  $output .= "$indent<ul class='children'>\n";
40
  }
41
 
42
- /**
43
- * @see Walker::end_lvl()
44
- * @since 2.1.0
45
- *
46
- * @param string $output Passed by reference. Used to append additional content.
47
- * @param int $depth Depth of category. Used for tab indentation.
48
- * @param array $args Will only append content if style argument value is 'list'.
49
- */
50
  function end_lvl( &$output, $depth = 0, $args = array() ) {
51
  if ( 'list' != $args['style'] )
52
  return;
@@ -55,31 +21,12 @@ class shailan_CategoryWalker extends Walker {
55
  $output .= "$indent</ul>\n";
56
  }
57
 
58
- /**
59
- * @see Walker::start_el()
60
- * @since 2.1.0
61
- *
62
- * @param string $output Passed by reference. Used to append additional content.
63
- * @param object $category Category data object.
64
- * @param int $depth Depth of category in reference to parents.
65
- * @param array $args
66
- */
67
  function start_el( &$output, $object, $depth = 0, $args = Array(), $current_object_id = 0 ) {
68
  extract($args);
69
 
70
  $cat_name = esc_attr( $category->name);
71
  $cat_name = apply_filters( 'list_cats', $cat_name, $category );
72
  $link = '<a href="' . get_category_link( $category->term_id ) . '" ';
73
- /*
74
-
75
- @shailan: Disabled titles for dropdown menu.
76
-
77
- if ( $use_desc_for_title == 0 || empty($category->description) )
78
- $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
79
- else
80
- $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
81
-
82
- */
83
  $link .= '><span>';
84
  $link .= $cat_name . '</span></a>';
85
 
@@ -97,7 +44,6 @@ class shailan_CategoryWalker extends Walker {
97
  $title = ' title="' . $feed . '"';
98
  $alt = ' alt="' . $feed . '"';
99
  $name = $feed;
100
- //$link .= $title; // @shailan: removed title
101
  }
102
 
103
  $link .= '>';
@@ -105,7 +51,7 @@ class shailan_CategoryWalker extends Walker {
105
  if ( empty($feed_image) )
106
  $link .= $name;
107
  else
108
- $link .= "<img src='$feed_image'$alt" . ' />'; // @shailan: removed title
109
  $link .= '</a>';
110
  if ( empty($feed_image) )
111
  $link .= ')';
@@ -135,15 +81,6 @@ class shailan_CategoryWalker extends Walker {
135
  }
136
  }
137
 
138
- /**
139
- * @see Walker::end_el()
140
- * @since 2.1.0
141
- *
142
- * @param string $output Passed by reference. Used to append additional content.
143
- * @param object $page Not used.
144
- * @param int $depth Depth of category. Not used.
145
- * @param array $args Only uses 'list' for whether should append to output.
146
- */
147
  function end_el( &$output, $object, $depth = 0, $args = Array() ) {
148
  if ( 'list' != $args['style'] )
149
  return;
@@ -151,4 +88,4 @@ class shailan_CategoryWalker extends Walker {
151
  $output .= "</li>\n";
152
  }
153
 
154
- }
1
+ <?php
2
+
 
 
 
 
 
 
 
3
  class shailan_CategoryWalker extends Walker {
 
 
 
 
 
 
4
 
5
+ var $tree_type = 'category';
 
 
 
 
 
6
  var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
7
 
 
 
 
 
 
 
 
 
8
  function start_lvl( &$output, $depth = 0, $args = array() ) {
9
  if ( 'list' != $args['style'] )
10
  return;
13
  $output .= "$indent<ul class='children'>\n";
14
  }
15
 
 
 
 
 
 
 
 
 
16
  function end_lvl( &$output, $depth = 0, $args = array() ) {
17
  if ( 'list' != $args['style'] )
18
  return;
21
  $output .= "$indent</ul>\n";
22
  }
23
 
 
 
 
 
 
 
 
 
 
24
  function start_el( &$output, $object, $depth = 0, $args = Array(), $current_object_id = 0 ) {
25
  extract($args);
26
 
27
  $cat_name = esc_attr( $category->name);
28
  $cat_name = apply_filters( 'list_cats', $cat_name, $category );
29
  $link = '<a href="' . get_category_link( $category->term_id ) . '" ';
 
 
 
 
 
 
 
 
 
 
30
  $link .= '><span>';
31
  $link .= $cat_name . '</span></a>';
32
 
44
  $title = ' title="' . $feed . '"';
45
  $alt = ' alt="' . $feed . '"';
46
  $name = $feed;
 
47
  }
48
 
49
  $link .= '>';
51
  if ( empty($feed_image) )
52
  $link .= $name;
53
  else
54
+ $link .= "<img src='$feed_image'$alt" . ' />';
55
  $link .= '</a>';
56
  if ( empty($feed_image) )
57
  $link .= ')';
81
  }
82
  }
83
 
 
 
 
 
 
 
 
 
 
84
  function end_el( &$output, $object, $depth = 0, $args = Array() ) {
85
  if ( 'list' != $args['style'] )
86
  return;
88
  $output .= "</li>\n";
89
  }
90
 
91
+ }
shailan-dropdown-menu-options.php CHANGED
@@ -1,7 +1,7 @@
1
- <?php
2
 
3
  function help_icon($hash){
4
- return " <a href=\"http://metinsaylan.com/wordpress/plugins/dropdown-menu/help//#".$hash."\" class=\"help-icon\">(?)</a>";
5
  }
6
 
7
  // Define themes
@@ -17,14 +17,14 @@ $default_themes = array(
17
  'Aqua' => plugins_url('/themes/aqua.css', __FILE__),
18
  'Blue gradient' => plugins_url('/themes/simple-blue.css', __FILE__),
19
  'Shiny Black' => plugins_url('/themes/shiny-black.css', __FILE__),
20
- 'Flickr theme' => plugins_url('/themes/flickr.com/default.ultimate.css', __FILE__),
21
- 'Nvidia theme' => plugins_url('/themes/nvidia.com/default.advanced.css', __FILE__),
22
- 'Adobe theme' => plugins_url('/themes/adobe.com/default.advanced.css', __FILE__),
23
- 'MTV theme' => plugins_url('/themes/mtv.com/default.ultimate.css', __FILE__),
24
- 'Hulu theme' => plugins_url('/themes/hulu/hulu.css', __FILE__),
25
- 'Rounded Corners by Shailan' => plugins_url('/themes/rounded-corners.css', __FILE__),
26
- 'Rounded Corners Light by Shailan' => plugins_url('/themes/rounded-corners-light.css', __FILE__),
27
- 'Pills by Shailan' => plugins_url('/themes/pills.css', __FILE__)
28
  );
29
 
30
  $available_themes = array();
@@ -63,13 +63,13 @@ if( function_exists('wp_nav_menu') ){
63
  // Get available menus
64
  $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
65
  $navmenus = array();
66
-
67
  if($menus){
68
  foreach( $menus as $menu ){
69
  $navmenus[ 'navmenu_' . $menu->term_id ] = $menu->name;
70
  }
71
  }
72
-
73
  // Merge type with menu array
74
  $types = array_merge($types, $navmenus);
75
  }
@@ -79,9 +79,9 @@ $this->menu_types = $types; // Back it up
79
  // Registered menu locations
80
  global $_wp_registered_nav_menus;
81
 
82
- // Define plugin options
83
  $options = array(
84
-
85
  array(
86
  "name" => "General",
87
  "label" => __("General"),
@@ -94,43 +94,43 @@ array(
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"),
118
  "id" => "shailan_dm_home_tag",
119
  "std" => __("Home"),
120
  "type" => "text"),
121
-
122
  array( "name" => "Show parent indicators",
123
  "desc" => "This option will enable arrows next to parent items.". help_icon("parent-indicators"),
124
  "id" => "shailan_dm_arrows",
125
  "type" => "checkbox",
126
  "std" => "on" ),
127
-
128
  array( "name" => "Indicator color",
129
  "desc" => "Change indicator color (eg. #000000).". help_icon("indicator-color"),
130
  "id" => "shailan_dm_arrow_color",
131
  "std" => "rgba(0,0,0,0.5)",
132
  "type" => "text"),
133
-
134
  array( "type" => "close" ),
135
 
136
  array(
@@ -138,89 +138,89 @@ array(
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",
195
  "label" => __("Effects"),
196
  "type" => "section"
197
  ),
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
-
205
  array( "name" => "Effect",
206
  "desc" => "Select effect you want to use".help_icon("effect"),
207
  "id" => "shailan_dm_effect",
208
  "type" => "select",
209
  "options" => $effects ),
210
-
211
  array( "name" => "Effect Speed",
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",
219
  "desc" => "Select effect delay (uses hoverIntent)".help_icon("effect-delay"),
220
  "id" => "shailan_dm_effect_delay",
221
  "type" => "select",
222
  "options" => $delay ),
223
-
224
  array( "type" => "close" ),
225
 
226
  array(
@@ -233,104 +233,104 @@ 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"),
244
-
245
  array( "name" => "Menu Background Color",
246
  "desc" => "Background color of the dropdown menu".help_icon("menu-background-color"),
247
  "id" => "shailan_dm_color_menubg",
248
  "std" => '#000000',
249
  "type" => "text"),
250
-
251
  array( "name" => "Hover Background Color",
252
  "desc" => "Background color of list item link.".help_icon("hover-background-color"),
253
  "id" => "shailan_dm_color_lihover",
254
  "std" => '#333333',
255
  "type" => "text"),
256
-
257
  array( "name" => "Link Text Color",
258
  "desc" => "Default link color".help_icon("link-text-color"),
259
  "id" => "shailan_dm_color_link",
260
  "std" => '#FFFFFF',
261
  "type" => "text"),
262
-
263
  array( "name" => "Link Text Color on mouse over",
264
  "desc" => "Secondary link color".help_icon("link-text-color-on-mouse-over"),
265
  "id" => "shailan_dm_color_hoverlink",
266
  "std" => '#FFFFFF',
267
  "type" => "text"),
268
-
269
  array( "name" => "Overlay",
270
  "desc" => "Menu overlay (Works on browsers that support png transparency only.)".help_icon("overlay"),
271
  "id" => "shailan_dm_overlay",
272
  "std" => "glass",
273
  "type" => "select",
274
  "options" => $overlays ),
275
-
276
  array( "type" => "close" ),
277
-
278
  array(
279
  "name" => "Advanced",
280
  "label" => __("Advanced"),
281
  "type" => "section"
282
  ),
283
-
284
  array( "name" => "Dropdown Menu Font",
285
  "desc" => "Font family for the menu<br />Please leave blank to use your wordpress theme font.".help_icon("dropdown-menu-font"),
286
  "id" => "shailan_dm_font",
287
  "std" => '',
288
  "type" => "text"),
289
-
290
  array( "name" => "Dropdown Menu Font Size",
291
  "desc" => "Font size of the menu items (Eg: 12px OR 1em) <br />Please leave blank to use your wordpress theme font-size.".help_icon("dropdown-menu-font-size"),
292
  "id" => "shailan_dm_fontsize",
293
  "std" => '',
294
  "type" => "text"),
295
-
296
- array(
297
  "name" => "Custom CSS",
298
  "desc" => "You can paste your own customization file here.".help_icon("custom-css"),
299
  "id" => "shailan_dm_custom_css",
300
  "std" => '',
301
  "type" => "textarea"
302
  ),
303
-
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
- );
1
+ <?php
2
 
3
  function help_icon($hash){
4
+ return " <a href=\"http://metinsaylan.com/docs/dropdown-menu-widget-help/#".$hash."\" target=\"_blank\" class=\"help-icon\">(?)</a>";
5
  }
6
 
7
  // Define themes
17
  'Aqua' => plugins_url('/themes/aqua.css', __FILE__),
18
  'Blue gradient' => plugins_url('/themes/simple-blue.css', __FILE__),
19
  'Shiny Black' => plugins_url('/themes/shiny-black.css', __FILE__),
20
+ 'Flickr' => plugins_url('/themes/flickr.com/default.ultimate.css', __FILE__),
21
+ 'Nvidia' => plugins_url('/themes/nvidia.com/default.advanced.css', __FILE__),
22
+ 'Adobe' => plugins_url('/themes/adobe.com/default.advanced.css', __FILE__),
23
+ 'MTV' => plugins_url('/themes/mtv.com/default.ultimate.css', __FILE__),
24
+ 'Hulu' => plugins_url('/themes/hulu/hulu.css', __FILE__),
25
+ 'Rounded Corners' => plugins_url('/themes/rounded-corners.css', __FILE__),
26
+ 'Rounded Corners Light' => plugins_url('/themes/rounded-corners-light.css', __FILE__),
27
+ 'Pills' => plugins_url('/themes/pills.css', __FILE__)
28
  );
29
 
30
  $available_themes = array();
63
  // Get available menus
64
  $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
65
  $navmenus = array();
66
+
67
  if($menus){
68
  foreach( $menus as $menu ){
69
  $navmenus[ 'navmenu_' . $menu->term_id ] = $menu->name;
70
  }
71
  }
72
+
73
  // Merge type with menu array
74
  $types = array_merge($types, $navmenus);
75
  }
79
  // Registered menu locations
80
  global $_wp_registered_nav_menus;
81
 
82
+ // Define plugin options
83
  $options = array(
84
+
85
  array(
86
  "name" => "General",
87
  "label" => __("General"),
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"),
118
  "id" => "shailan_dm_home_tag",
119
  "std" => __("Home"),
120
  "type" => "text"),
121
+
122
  array( "name" => "Show parent indicators",
123
  "desc" => "This option will enable arrows next to parent items.". help_icon("parent-indicators"),
124
  "id" => "shailan_dm_arrows",
125
  "type" => "checkbox",
126
  "std" => "on" ),
127
+
128
  array( "name" => "Indicator color",
129
  "desc" => "Change indicator color (eg. #000000).". help_icon("indicator-color"),
130
  "id" => "shailan_dm_arrow_color",
131
  "std" => "rgba(0,0,0,0.5)",
132
  "type" => "text"),
133
+
134
  array( "type" => "close" ),
135
 
136
  array(
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",
195
  "label" => __("Effects"),
196
  "type" => "section"
197
  ),
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
+
205
  array( "name" => "Effect",
206
  "desc" => "Select effect you want to use".help_icon("effect"),
207
  "id" => "shailan_dm_effect",
208
  "type" => "select",
209
  "options" => $effects ),
210
+
211
  array( "name" => "Effect Speed",
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",
219
  "desc" => "Select effect delay (uses hoverIntent)".help_icon("effect-delay"),
220
  "id" => "shailan_dm_effect_delay",
221
  "type" => "select",
222
  "options" => $delay ),
223
+
224
  array( "type" => "close" ),
225
 
226
  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"),
244
+
245
  array( "name" => "Menu Background Color",
246
  "desc" => "Background color of the dropdown menu".help_icon("menu-background-color"),
247
  "id" => "shailan_dm_color_menubg",
248
  "std" => '#000000',
249
  "type" => "text"),
250
+
251
  array( "name" => "Hover Background Color",
252
  "desc" => "Background color of list item link.".help_icon("hover-background-color"),
253
  "id" => "shailan_dm_color_lihover",
254
  "std" => '#333333',
255
  "type" => "text"),
256
+
257
  array( "name" => "Link Text Color",
258
  "desc" => "Default link color".help_icon("link-text-color"),
259
  "id" => "shailan_dm_color_link",
260
  "std" => '#FFFFFF',
261
  "type" => "text"),
262
+
263
  array( "name" => "Link Text Color on mouse over",
264
  "desc" => "Secondary link color".help_icon("link-text-color-on-mouse-over"),
265
  "id" => "shailan_dm_color_hoverlink",
266
  "std" => '#FFFFFF',
267
  "type" => "text"),
268
+
269
  array( "name" => "Overlay",
270
  "desc" => "Menu overlay (Works on browsers that support png transparency only.)".help_icon("overlay"),
271
  "id" => "shailan_dm_overlay",
272
  "std" => "glass",
273
  "type" => "select",
274
  "options" => $overlays ),
275
+
276
  array( "type" => "close" ),
277
+
278
  array(
279
  "name" => "Advanced",
280
  "label" => __("Advanced"),
281
  "type" => "section"
282
  ),
283
+
284
  array( "name" => "Dropdown Menu Font",
285
  "desc" => "Font family for the menu<br />Please leave blank to use your wordpress theme font.".help_icon("dropdown-menu-font"),
286
  "id" => "shailan_dm_font",
287
  "std" => '',
288
  "type" => "text"),
289
+
290
  array( "name" => "Dropdown Menu Font Size",
291
  "desc" => "Font size of the menu items (Eg: 12px OR 1em) <br />Please leave blank to use your wordpress theme font-size.".help_icon("dropdown-menu-font-size"),
292
  "id" => "shailan_dm_fontsize",
293
  "std" => '',
294
  "type" => "text"),
295
+
296
+ array(
297
  "name" => "Custom CSS",
298
  "desc" => "You can paste your own customization file here.".help_icon("custom-css"),
299
  "id" => "shailan_dm_custom_css",
300
  "std" => '',
301
  "type" => "textarea"
302
  ),
303
+
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-multi-dropdown.php CHANGED
@@ -1,20 +1,20 @@
1
- <?php
2
 
3
  class shailan_MultiDropDown extends WP_Widget {
4
  /** constructor */
5
  //function shailan_MultiDropDown() {
6
  public function __construct() {
7
  $widget_ops = array('classname' => 'shailan-dropdown-menu shailan-multi-dropdown', 'description' => __( 'Dropdown page & category menu', 'shailan-dropdown-menu' ) );
8
-
9
  parent::__construct(
10
- 'multi-dropdown-menu',
11
- __('Dropdown Multi', 'shailan-multi-dropdown'),
12
  $widget_ops
13
  );
14
-
15
-
16
- $this->alt_option_name = 'widget_multi_dropdown';
17
-
18
  $this->defaults = array(
19
  'title' => '',
20
  'pages' => false,
@@ -28,41 +28,41 @@ class shailan_MultiDropDown extends WP_Widget {
28
  'vertical' => false,
29
  'align' => 'left'
30
  );
31
-
32
  }
33
-
34
  /** @see WP_Widget::widget */
35
- function widget($args, $instance) {
36
  extract( $args );
37
  $widget_options = wp_parse_args( $instance, $this->defaults );
38
  extract( $widget_options, EXTR_SKIP );
39
-
40
  $orientation = ($vertical ? 'dropdown-vertical' : 'dropdown-horizontal');
41
-
42
  $custom_walkers = false; //(bool) get_option('shailan_dm_customwalkers');
43
  //$custom_walkers = !$custom_walkers;
44
-
45
  ?>
46
  <?php echo $before_widget; ?>
47
 
48
  <div id="shailan-dropdown-wrapper-<?php echo $this->number; ?>">
49
-
50
- <?php do_action('dropdown_before');
51
- echo '<div align="' . $align . '" class="'.$orientation.'-container dm-align-'.$align.'">';
52
  ?>
53
- <table cellpadding="0" cellspacing="0">
54
- <tr><td>
55
  <ul class="dropdown <?php echo $orientation; ?>">
56
-
57
  <?php do_action('dropdown_list_before'); ?>
58
-
59
- <?php if($home){ ?>
60
- <li class="page_item cat-item blogtab <?php if ( is_front_page() && !is_paged() ){ ?>current_page_item current-cat<?php } ?>"><a href="<?php echo get_option('home'); ?>/"><span><?php _e('Home', 'shailan-dropdown-menu'); ?></span></a></li>
61
  <?php } ?>
62
-
63
  <?php if($pages){ ?>
64
-
65
- <?php if($custom_walkers){
66
  $page_walker = new shailan_PageWalker();
67
  wp_list_pages(array(
68
  'walker'=>$page_walker,
@@ -70,20 +70,20 @@ class shailan_MultiDropDown extends WP_Widget {
70
  'depth'=>'4',
71
  'title_li'=>'',
72
  'exclude'=>$exclude
73
- ));
74
  } else {
75
  wp_list_pages(array(
76
  'sort_column'=>'menu_order',
77
  'depth'=>'4',
78
  'title_li'=>'',
79
  'exclude'=>$exclude
80
- ));
81
  } ?>
82
-
83
  <?php }; if($categories){ ?>
84
-
85
- <?php
86
- if($custom_walkers){
87
  $cat_walker = new shailan_CategoryWalker();
88
  wp_list_categories(array(
89
  'walker'=>$cat_walker,
@@ -91,18 +91,18 @@ class shailan_MultiDropDown extends WP_Widget {
91
  'depth'=>'4',
92
  'title_li'=>'',
93
  'exclude'=>$exclude
94
- ));
95
  } else {
96
  wp_list_categories(array(
97
  'order_by'=>'name',
98
  'depth'=>'4',
99
  'title_li'=>'',
100
  'exclude'=>$exclude
101
- ));
102
- } ?>
103
-
104
  <?php }; ?>
105
-
106
  <?php if($links){ ?>
107
  <li> <a href="#"><span>Links</span></a>
108
  <ul>
@@ -110,88 +110,85 @@ class shailan_MultiDropDown extends WP_Widget {
110
  </ul>
111
  </li>
112
  <?php } ?>
113
-
114
  <?php if($archives){ ?>
115
  <li> <a href="#"><span>Archives</span></a>
116
  <ul>
117
- <?php
118
  $args = array();
119
  wp_get_archives( $args ); ?>
120
  </ul>
121
  </li>
122
  <?php } ?>
123
-
124
  <?php do_action('dropdown_list_after'); ?>
125
-
126
  <?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
127
-
128
  </ul></td>
129
- </tr></table>
130
  </div>
131
-
132
  <?php do_action('dropdown_after'); ?>
133
-
134
- </div>
135
  <?php echo $after_widget; ?>
136
  <?php
137
  }
138
 
139
  /** @see WP_Widget::update */
140
- function update($new_instance, $old_instance) {
141
  return $new_instance;
142
  }
143
 
144
  /** @see WP_Widget::form */
145
- function form($instance) {
146
-
147
  extract( $instance );
148
  $widget_options = wp_parse_args( $instance, $this->defaults );
149
  extract( $widget_options, EXTR_SKIP );
150
-
151
- ?>
152
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (won\'t be shown):', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
153
-
154
  <p> Includes: <br/>
155
-
156
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('home'); ?>" name="<?php echo $this->get_field_name('home'); ?>"<?php checked( (bool) $home ); ?> />
157
  <label for="<?php echo $this->get_field_id('home'); ?>"><?php _e( 'Homepage link' , 'shailan-dropdown-menu' ); ?></label><br />
158
-
159
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('pages'); ?>" name="<?php echo $this->get_field_name('pages'); ?>"<?php checked( (bool) $pages ); ?> />
160
  <label for="<?php echo $this->get_field_id('pages'); ?>"><?php _e( 'Pages' , 'shailan-dropdown-menu' ); ?></label><br />
161
-
162
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('categories'); ?>" name="<?php echo $this->get_field_name('categories'); ?>"<?php checked( (bool) $categories ); ?> />
163
  <label for="<?php echo $this->get_field_id('categories'); ?>"><?php _e( 'Categories' , 'shailan-dropdown-menu' ); ?></label><br />
164
-
165
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('links'); ?>" name="<?php echo $this->get_field_name('links'); ?>"<?php checked( (bool) $links ); ?> />
166
- <label for="<?php echo $this->get_field_id('links'); ?>"><?php _e( 'Links' , 'shailan-dropdown-menu' ); ?></label><br />
167
-
168
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>"<?php checked( (bool) $archives ); ?> />
169
- <label for="<?php echo $this->get_field_id('archives'); ?>"><?php _e( 'Archives' , 'shailan-dropdown-menu' ); ?></label><br />
170
-
171
 
172
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( (bool) $login ); ?> />
173
  <label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Login/logout' , 'shailan-dropdown-menu' ); ?></label><br />
174
-
175
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( (bool) $admin ); ?> />
176
  <label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Register/Site Admin' , 'shailan-dropdown-menu' ); ?></label>
177
  </p>
178
-
179
  <p>
180
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( (bool) $vertical ); ?> />
181
  <label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu' , 'shailan-dropdown-menu' ); ?></label>
182
  </p>
183
-
184
  <p><?php _e('Align:', 'shailan-dropdown-menu'); ?> <label for="left"><input type="radio" id="left" name="<?php echo $this->get_field_name('align'); ?>" value="left" <?php if($align=='left'){ echo 'checked="checked"'; } ?> /> <?php _e('Left', 'shailan-dropdown-menu'); ?></label> <label for="center"><input type="radio" id="center" name="<?php echo $this->get_field_name('align'); ?>" value="center" <?php if($align=='center'){ echo 'checked="checked"'; } ?>/> <?php _e('Center', 'shailan-dropdown-menu'); ?></label> <label for="right"><input type="radio" id="right" name="<?php echo $this->get_field_name('align'); ?>" value="right" <?php if($align=='right'){ echo 'checked="checked"'; } ?>/> <?php _e('Right', 'shailan-dropdown-menu'); ?></label></p>
185
 
186
- <div class="widget-control-actions">
187
- <p><small>Powered by <a href="http://metinsaylan.com/wordpress/plugins/dropdown-menu/" title="Wordpress Tips and tricks, Freelancing, Web Design">MetinSaylan.com</a> | <a href="http://metinsaylan.com/wordpress/" title="Get more wordpress widgets and themes" target="_blank" >Get more..</a></small></p>
188
- </div>
189
  <br class="clear" />
190
-
191
- <?php
192
  }
193
 
194
  } // class shailan_MultiDropDown
195
 
196
  // register widget
197
- add_action('widgets_init', create_function('', 'return register_widget("shailan_MultiDropDown");'));
1
+ <?php
2
 
3
  class shailan_MultiDropDown extends WP_Widget {
4
  /** constructor */
5
  //function shailan_MultiDropDown() {
6
  public function __construct() {
7
  $widget_ops = array('classname' => 'shailan-dropdown-menu shailan-multi-dropdown', 'description' => __( 'Dropdown page & category menu', 'shailan-dropdown-menu' ) );
8
+
9
  parent::__construct(
10
+ 'multi-dropdown-menu',
11
+ __('Dropdown Multi', 'shailan-multi-dropdown'),
12
  $widget_ops
13
  );
14
+
15
+
16
+ $this->alt_option_name = 'widget_multi_dropdown';
17
+
18
  $this->defaults = array(
19
  'title' => '',
20
  'pages' => false,
28
  'vertical' => false,
29
  'align' => 'left'
30
  );
31
+
32
  }
33
+
34
  /** @see WP_Widget::widget */
35
+ function widget($args, $instance) {
36
  extract( $args );
37
  $widget_options = wp_parse_args( $instance, $this->defaults );
38
  extract( $widget_options, EXTR_SKIP );
39
+
40
  $orientation = ($vertical ? 'dropdown-vertical' : 'dropdown-horizontal');
41
+
42
  $custom_walkers = false; //(bool) get_option('shailan_dm_customwalkers');
43
  //$custom_walkers = !$custom_walkers;
44
+
45
  ?>
46
  <?php echo $before_widget; ?>
47
 
48
  <div id="shailan-dropdown-wrapper-<?php echo $this->number; ?>">
49
+
50
+ <?php do_action('dropdown_before');
51
+ echo '<div align="' . $align . '" class="'.$orientation.'-container dm-align-'.$align.'">';
52
  ?>
53
+ <table cellpadding="0" cellspacing="0">
54
+ <tr><td>
55
  <ul class="dropdown <?php echo $orientation; ?>">
56
+
57
  <?php do_action('dropdown_list_before'); ?>
58
+
59
+ <?php if($home){ ?>
60
+ <li class="page_item cat-item blogtab <?php if ( is_front_page() && !is_paged() ){ ?>current_page_item current-cat<?php } ?>"><a href="<?php echo get_option('home'); ?>/"><span><?php _e('Home', 'shailan-dropdown-menu'); ?></span></a></li>
61
  <?php } ?>
62
+
63
  <?php if($pages){ ?>
64
+
65
+ <?php if($custom_walkers){
66
  $page_walker = new shailan_PageWalker();
67
  wp_list_pages(array(
68
  'walker'=>$page_walker,
70
  'depth'=>'4',
71
  'title_li'=>'',
72
  'exclude'=>$exclude
73
+ ));
74
  } else {
75
  wp_list_pages(array(
76
  'sort_column'=>'menu_order',
77
  'depth'=>'4',
78
  'title_li'=>'',
79
  'exclude'=>$exclude
80
+ ));
81
  } ?>
82
+
83
  <?php }; if($categories){ ?>
84
+
85
+ <?php
86
+ if($custom_walkers){
87
  $cat_walker = new shailan_CategoryWalker();
88
  wp_list_categories(array(
89
  'walker'=>$cat_walker,
91
  'depth'=>'4',
92
  'title_li'=>'',
93
  'exclude'=>$exclude
94
+ ));
95
  } else {
96
  wp_list_categories(array(
97
  'order_by'=>'name',
98
  'depth'=>'4',
99
  'title_li'=>'',
100
  'exclude'=>$exclude
101
+ ));
102
+ } ?>
103
+
104
  <?php }; ?>
105
+
106
  <?php if($links){ ?>
107
  <li> <a href="#"><span>Links</span></a>
108
  <ul>
110
  </ul>
111
  </li>
112
  <?php } ?>
113
+
114
  <?php if($archives){ ?>
115
  <li> <a href="#"><span>Archives</span></a>
116
  <ul>
117
+ <?php
118
  $args = array();
119
  wp_get_archives( $args ); ?>
120
  </ul>
121
  </li>
122
  <?php } ?>
123
+
124
  <?php do_action('dropdown_list_after'); ?>
125
+
126
  <?php if($admin){ wp_register('<li class="admintab">','</li>'); } if($login){ ?><li class="page_item"><?php wp_loginout(); ?><?php } ?>
127
+
128
  </ul></td>
129
+ </tr></table>
130
  </div>
131
+
132
  <?php do_action('dropdown_after'); ?>
133
+
134
+ </div>
135
  <?php echo $after_widget; ?>
136
  <?php
137
  }
138
 
139
  /** @see WP_Widget::update */
140
+ function update($new_instance, $old_instance) {
141
  return $new_instance;
142
  }
143
 
144
  /** @see WP_Widget::form */
145
+ function form($instance) {
146
+
147
  extract( $instance );
148
  $widget_options = wp_parse_args( $instance, $this->defaults );
149
  extract( $widget_options, EXTR_SKIP );
150
+
151
+ ?>
152
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (won\'t be shown):', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
153
+
154
  <p> Includes: <br/>
155
+
156
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('home'); ?>" name="<?php echo $this->get_field_name('home'); ?>"<?php checked( (bool) $home ); ?> />
157
  <label for="<?php echo $this->get_field_id('home'); ?>"><?php _e( 'Homepage link' , 'shailan-dropdown-menu' ); ?></label><br />
158
+
159
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('pages'); ?>" name="<?php echo $this->get_field_name('pages'); ?>"<?php checked( (bool) $pages ); ?> />
160
  <label for="<?php echo $this->get_field_id('pages'); ?>"><?php _e( 'Pages' , 'shailan-dropdown-menu' ); ?></label><br />
161
+
162
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('categories'); ?>" name="<?php echo $this->get_field_name('categories'); ?>"<?php checked( (bool) $categories ); ?> />
163
  <label for="<?php echo $this->get_field_id('categories'); ?>"><?php _e( 'Categories' , 'shailan-dropdown-menu' ); ?></label><br />
164
+
165
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('links'); ?>" name="<?php echo $this->get_field_name('links'); ?>"<?php checked( (bool) $links ); ?> />
166
+ <label for="<?php echo $this->get_field_id('links'); ?>"><?php _e( 'Links' , 'shailan-dropdown-menu' ); ?></label><br />
167
+
168
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('archives'); ?>" name="<?php echo $this->get_field_name('archives'); ?>"<?php checked( (bool) $archives ); ?> />
169
+ <label for="<?php echo $this->get_field_id('archives'); ?>"><?php _e( 'Archives' , 'shailan-dropdown-menu' ); ?></label><br />
170
+
171
 
172
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( (bool) $login ); ?> />
173
  <label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Login/logout' , 'shailan-dropdown-menu' ); ?></label><br />
174
+
175
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( (bool) $admin ); ?> />
176
  <label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Register/Site Admin' , 'shailan-dropdown-menu' ); ?></label>
177
  </p>
178
+
179
  <p>
180
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( (bool) $vertical ); ?> />
181
  <label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu' , 'shailan-dropdown-menu' ); ?></label>
182
  </p>
183
+
184
  <p><?php _e('Align:', 'shailan-dropdown-menu'); ?> <label for="left"><input type="radio" id="left" name="<?php echo $this->get_field_name('align'); ?>" value="left" <?php if($align=='left'){ echo 'checked="checked"'; } ?> /> <?php _e('Left', 'shailan-dropdown-menu'); ?></label> <label for="center"><input type="radio" id="center" name="<?php echo $this->get_field_name('align'); ?>" value="center" <?php if($align=='center'){ echo 'checked="checked"'; } ?>/> <?php _e('Center', 'shailan-dropdown-menu'); ?></label> <label for="right"><input type="radio" id="right" name="<?php echo $this->get_field_name('align'); ?>" value="right" <?php if($align=='right'){ echo 'checked="checked"'; } ?>/> <?php _e('Right', 'shailan-dropdown-menu'); ?></label></p>
185
 
 
 
 
186
  <br class="clear" />
187
+
188
+ <?php
189
  }
190
 
191
  } // class shailan_MultiDropDown
192
 
193
  // register widget
194
+ add_action('widgets_init', create_function('', 'return register_widget("shailan_MultiDropDown");'));
shailan.DropDownMenu.php CHANGED
@@ -1,55 +1,55 @@
1
- <?php
2
  /*
3
  Plugin Name: Dropdown Menu Widget
4
- Plugin URI: http://metinsaylan.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://metinsaylan.com">metinsaylan.com</a>.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme, jquery, template, multi-color, theme
7
- Version: 1.9.5
8
  Author: Metin Saylan
9
  Author URI: http://metinsaylan.com/
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
- define('VERSION', '1.9.5');
14
 
15
  class shailan_DropdownWidget extends WP_Widget {
16
 
17
  public function __construct() {
18
  $widget_ops = array(
19
- 'classname' => 'shailan-dropdown-menu-widget',
20
- 'description' => __( 'Dropdown page/category/custom menu', 'shailan-dropdown-menu' )
21
  );
22
-
23
  parent::__construct(
24
- 'dropdown-menu',
25
- __('Dropdown Menu', 'shailan-dropdown-menu'),
26
  $widget_ops
27
  );
28
-
29
  $this->alt_option_name = 'widget_dropdown_menu';
30
-
31
  $this->pluginname = "Dropdown Menu";
32
  $this->shortname = "shailan_dm";
33
-
34
- $this->help_url = "http://metinsaylan.com/wordpress/plugins/dropdown-menu/help/";
35
-
36
- $this->version = VERSION;
37
  $this->settings_key = "shailan_dropdown_menu";
38
  $this->options_page = "dropdown-menu";
39
-
40
  // Hook up styles
41
- add_action( 'wp_head', array(&$this, 'header') );
42
-
43
- // Hook up scripts
44
- wp_enqueue_script( 'jquery' );
45
  wp_enqueue_script( 'hoverIntent', plugins_url( '/scripts/hoverIntent.js' , __FILE__ ) , array('jquery') );
46
- wp_enqueue_script( 'dropdown-ie-support', plugins_url( '/scripts/include.js' , __FILE__ ) , array('jquery') );
47
-
48
  // Include options array
49
  require_once("shailan-dropdown-menu-options.php");
50
  $this->options = $options;
51
  $this->settings = $this->get_plugin_settings();
52
-
53
  $this->widget_defaults = array(
54
  'title' => '',
55
  'type' => 'pages',
@@ -63,86 +63,86 @@ class shailan_DropdownWidget extends WP_Widget {
63
  'show_title' => false,
64
  'width' => 'empty'
65
  );
66
-
67
  add_action('admin_menu', array( &$this, 'admin_header') );
68
  }
69
-
70
  function admin_header(){
71
-
72
  if ( @$_GET['page'] == $this->options_page ) {
73
-
74
  // Options page styles
75
- wp_enqueue_style( 'farbtastic' );
76
- wp_enqueue_style( "dropdown-admin", plugins_url( '/css/dropdown-admin.css' , __FILE__ ) , false, "1.0", "all");
77
-
78
  // Options page scripts
79
  wp_enqueue_script( "jquery" );
80
- wp_enqueue_script( 'farbtastic' );
81
  wp_enqueue_script( 'dropdown-colorpick', plugins_url( '/scripts/admin.js' , __FILE__ ) , array('jquery') );
82
-
83
  if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
84
-
85
  // Save settings
86
  $settings = $this->get_settings();
87
-
88
  // Set updated values
89
- foreach($this->options as $option){
90
  if( array_key_exists( 'id', $option ) ){
91
  if( $option['type'] == 'checkbox' && empty( $_REQUEST[ $option['id'] ] ) ) {
92
  $settings[ $option['id'] ] = 'off';
93
  } else {
94
- $settings[ $option['id'] ] = $_REQUEST[ $option['id'] ];
95
  }
96
  }
97
  }
98
-
99
  // Save the settings
100
  update_option( $this->settings_key, $settings );
101
  header("Location: admin.php?page=" . $this->options_page . "&saved=true&message=1");
102
  die;
103
  } else if( @$_REQUEST['action'] && 'reset' == $_REQUEST['action'] ) {
104
-
105
  // Start a new settings array
106
  $settings = array();
107
  delete_option( $this->settings_key );
108
-
109
  header("Location: admin.php?page=" . $this->options_page . "&reset=true&message=2");
110
  die;
111
  }
112
-
113
  }
114
-
115
- $page = add_options_page(
116
  __('Settings for Dropdown Menu', 'shailan-dropdown-menu'),
117
- __('Dropdown Menu', 'shailan-dropdown-menu'),
118
  'edit_themes',
119
  $this->options_page,
120
- array( &$this, 'options_page')
121
  );
122
-
123
  add_action( 'admin_print_styles-' . $page, array( &$this, 'header' ) );
124
  }
125
-
126
  function get_plugin_settings(){
127
- $settings = get_option( $this->settings_key );
128
-
129
- if(FALSE === $settings){
130
  // Options doesn't exist, install standard settings
131
  return $this->install_default_settings();
132
  } else { // Options exist, update if necessary
133
- if( !empty( $settings['version'] ) ){ $ver = $settings['version']; }
134
  else { $ver = ''; }
135
-
136
- if($ver != $this->version){
137
  // Update settings
138
- return $this->update_plugin_settings( $settings );
139
- } else {
140
  // Plugin is up to date, let's return
141
  return $settings;
142
- }
143
- }
144
  }
145
-
146
  /* Updates a single option key */
147
  function update_plugin_setting( $key, $value ){
148
  $settings = $this->get_plugin_settings();
@@ -158,20 +158,20 @@ function get_plugin_setting( $key, $default = '' ) {
158
  } else {
159
  return $default;
160
  }
161
-
162
  return FALSE;
163
  }
164
 
165
  function install_default_settings(){
166
  // Create settings array
167
  $settings = array();
168
-
169
  // Set default values
170
  foreach($this->options as $option){
171
  if( array_key_exists( 'id', $option ) && array_key_exists( 'std', $option ) )
172
  $settings[ $option['id'] ] = $option['std'];
173
  }
174
-
175
  $settings['version'] = $this->version;
176
  // Save the settings
177
  update_option( $this->settings_key, $settings );
@@ -185,98 +185,92 @@ function update_plugin_settings( $current_settings ){
185
  $current_settings[ $option['id'] ] = $option['std'];
186
  }
187
  }
188
-
189
  update_option( $this->settings_key, $current_settings );
190
  return $current_settings;
191
  }
192
-
193
  function options_page(){
194
  global $options, $current;
195
 
196
  $title = "Dropdown Menu Widget Options";
197
-
198
- $options = $this->options;
199
  $current = $this->get_plugin_settings();
200
-
201
- $messages = array(
202
  "1" => __("Dropdown Menu Widget settings are saved.", "shailan-dropdown-menu"),
203
  "2" => __("Dropdown Menu Widget settings are reset.", "shailan-dropdown-menu")
204
  );
205
-
206
- $navigation = '<div id="stf_nav"><a href="http://metinsaylan.com/wordpress/plugins/dropdown-menu/">Plugin page</a> | <a href="http://metinsaylan.com/wordpress/plugins/dropdown-menu/help/">Usage</a> | <a href="http://metinsaylan.com/donate/">Donate</a> | <a href="http://metinsaylan.com/wordpress/plugins/">Get more plugins..</a></div>';
207
-
208
- $footer_text = '<em><a href="http://metinsaylan.com/wordpress/plugins/dropdown-menu/">Dropdown Menu Widget</a> by <a href="http://metinsaylan.com/">SHAILAN</a></em>';
209
-
210
  include_once( "stf-page-options.php" );
211
 
212
  }
213
-
214
  /******************************************************************************
215
- * the WIDGET
216
  ******************************************************************************/
217
- function widget($args, $instance) {
218
  extract( $args );
219
  $widget_options = wp_parse_args( $instance, $this->widget_defaults );
220
  extract( $widget_options, EXTR_SKIP );
221
-
222
  // On and off
223
- $show_title = (bool) ( 'on' == $show_title );
224
  $orientation = ( (bool) ( 'on' == $vertical) ? 'dropdown-vertical' : 'dropdown-horizontal');
225
  $custom_walkers = false; // (bool) get_option('shailan_dm_customwalkers'); disabled
226
  $show_empty = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_show_empty') );
227
-
228
  $width = (int) $width;
229
-
230
  $width_attr = '';
231
  if( $width > 0 )
232
  $width_attr = 'style="width:' . $width . 'px;"';
233
-
234
  if( !isset($align) || $align == '') {
235
  $align = 'left';
236
  }
237
-
238
  if( !isset($type) || $type == '') {
239
  $type = 'pages';
240
  }
241
-
242
- echo $args['before_widget'];
243
-
244
  // Show title if option checked
245
  if ( $title && $show_title ){ echo $before_title . $title . $after_title; }
246
-
247
  $nl = "\n"; $indent = "\n\t"; $indent2 = "\n\t\t";
248
-
249
- echo $nl . "<!-- Dropdown Menu Widget by metinsaylan.com (http://metinsaylan.com) v". VERSION ." on wp".get_bloginfo( 'version' )." -->";
250
- echo $nl . "<!-- Menu Type : " . $type . " -->";
251
  echo $nl . "<div class=\"shailan-dropdown-menu\" >";
252
-
253
  $dropdown_wrapper_open = $nl . '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
254
-
255
- $dropdown_open = $indent . '<div align="'.$align.'" class="'.$orientation.'-container dm-align-'.$align.' clearfix"><table cellpadding="0" cellspacing="0"><tr><td>';
256
  $list_open = $indent2 . '<ul id="dropdown-'. $this->number .'" class="dropdown dropdown-'. $this->number .' '. $orientation . ' dropdown-align-'.$align.'" '. $width_attr .' >' . $nl . "<!-- Menu elements start -->\n";
257
-
258
- if($home && ($type == 'pages' || $type == 'categories')){
259
-
260
  $home_item = $nl . '<li class="page_item cat-item blogtab '. (is_front_page() && !is_paged() ? 'current_page_item current-cat' : '' ) . '">
261
  <a href="'.get_option('home').'">';
262
 
263
- $home_tag = get_option('shailan_dm_home_tag');
264
  if(empty($home_tag)){ $home_tag = __('Home'); }
265
-
266
  $home_item .= $home_tag;
267
  $home_item .= '</a></li>';
268
-
269
  $list_open .= $home_item;
270
  }
271
-
272
  $list_close = ($admin ? wp_register('<li class="admintab">','</li>', false) : '') . ($login ? '<li class="page_item">'. wp_loginout('', false) . '</li>' : '') . '
273
  </ul>';
274
- $dropdown_close = '</td>
275
- </tr></table>
276
- </div>';
277
-
278
  $dropdown_wrapper_close = '</div> ';
279
-
280
  $menu_defaults = array(
281
  'ID' => $this->number,
282
  'sort_column' => 'menu_order, post_title',
@@ -285,18 +279,18 @@ function options_page(){
285
  'title_li' => '',
286
  'exclude' => $exclude
287
  );
288
-
289
  $menu_defaults = apply_filters( 'dropdown_menu_defaults', $menu_defaults );
290
-
291
  switch ( $type ) {
292
 
293
  /** Pages menu */
294
- case "pages":
295
-
296
  if($custom_walkers){
297
  $page_walker = new shailan_PageWalker();
298
  $menu_defaults = wp_parse_args( array('walker'=>$page_walker) , $menu_defaults ); }
299
-
300
  echo $dropdown_wrapper_open;
301
  do_action('dropdown_before');
302
  echo $dropdown_open;
@@ -308,24 +302,24 @@ function options_page(){
308
  echo $dropdown_close;
309
  do_action('dropdown_after');
310
  echo $dropdown_wrapper_close;
311
-
312
- break;
313
-
314
  /** Categories menu */
315
- case "categories":
316
-
317
- if($custom_walkers){
318
  $cat_walker = new shailan_CategoryWalker();
319
  $menu_defaults = wp_parse_args( array('walker'=>$cat_walker) , $menu_defaults ); }
320
-
321
  if($show_empty){$menu_defaults = wp_parse_args( array('hide_empty'=>'0') , $menu_defaults ); }
322
-
323
  echo $dropdown_wrapper_open;
324
  do_action('dropdown_before');
325
  echo $dropdown_open;
326
  echo $list_open;
327
  do_action('dropdown_list_before');
328
- wp_list_categories($menu_defaults);
329
  do_action('dropdown_list_after');
330
  echo $list_close;
331
  echo $dropdown_close;
@@ -333,47 +327,47 @@ function options_page(){
333
  echo $dropdown_wrapper_close;
334
 
335
  break;
336
-
337
  /** WP3 Nav menu */
338
  default:
339
-
340
  $location = '';
341
  $menu = '';
342
-
343
  // Replace navmenu_
344
  if( FALSE !== strpos( $type, 'navmenu_' ) ){
345
  $type = str_replace( 'navmenu_', '', $type );
346
  }
347
-
348
  $menu_id = $type;
349
-
350
  // Check if a menu exists with this id
351
  $menu = wp_get_nav_menu_object( $menu_id );
352
  if( $menu ){ $menu = $menu_id; }
353
-
354
  // Is that a location?
355
  if ( ! $menu && ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_id ] ) ){
356
  $location = $menu_id;
357
  $menu = '';
358
  }
359
-
360
  $menu_args = array(
361
- 'menu' => $menu,
362
- 'container' => false,
363
- 'container_class' => '',
364
- 'container_id' => '',
365
- 'menu_class' => 'dropdown '. $orientation . ' dropdown-align-'.$align,
366
  'menu_id' => '',
367
  'echo' => true,
368
  'theme_location' => $location,
369
  'is_shailan_dropdown_callback' => 'yes'
370
  );
371
-
372
  if($custom_walkers){
373
  $page_walker = new shailan_PageWalker();
374
- $menu_args = wp_parse_args( array('walker'=>$page_walker) , $menu_args );
375
  }
376
-
377
  echo $dropdown_wrapper_open;
378
  do_action('dropdown_before');
379
  echo $dropdown_open;
@@ -381,58 +375,56 @@ function options_page(){
381
  echo $dropdown_close;
382
  do_action('dropdown_after');
383
  echo $dropdown_wrapper_close;
384
-
385
  } // switch ($type)
386
 
387
- echo $nl . "</div>";
388
- echo "\n\n<!--/ Dropdown Menu Widget -->"; ?>
389
-
390
  <?php echo $after_widget; $this->footer(); ?>
391
  <?php
392
  }
393
-
394
- function update($new_instance, $old_instance) {
395
  return $new_instance;
396
  }
397
-
398
  /******************************************************************************
399
  * WIDGET FORM
400
  ******************************************************************************/
401
- function form($instance) {
402
-
403
  $widget_options = wp_parse_args( $instance, $this->widget_defaults );
404
  extract( $widget_options, EXTR_SKIP );
405
-
406
  $width = (int) $width;
407
  $show_title = (bool) $show_title;
408
  $home = (bool) $home;
409
  $login = (bool) $login;
410
  $admin = (bool) $admin;
411
  $vertical = (bool) $vertical;
412
-
413
- ?>
414
-
415
  <style type="text/css">.help-link{ padding:2px 5px; text-decoration:none; }</style>
416
-
417
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title :', 'shailan-dropdown-menu'); ?> <?php $this->help_link('widget-title'); ?><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>
418
-
419
  <p>
420
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_title'); ?>" name="<?php echo $this->get_field_name('show_title'); ?>"<?php checked( $show_title ); ?> />
421
  <label for="<?php echo $this->get_field_id('show_title'); ?>"><?php _e( 'Show widget title' , 'shailan-dropdown-menu' ); ?></label><?php $this->help_link('show-title'); ?> <br />
422
-
423
  <p><label for="<?php echo $this->get_field_id('type'); ?>"><?php _e('Menu Type:'); ?>
424
  <select name="<?php echo $this->get_field_name('type'); ?>" id="<?php echo $this->get_field_id('type'); ?>">
425
  <?php foreach ($this->menu_types as $key=>$option) { ?>
426
  <option <?php if ($type == $key) { echo 'selected="selected"'; } ?> value="<?php echo $key; ?>"><?php echo $option; ?></option><?php } ?>
427
  </select>
428
  </label><?php $this->help_link('widget-menu-type'); ?> </p>
429
-
430
- <p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:', 'shailan-dropdown-menu'); ?> <?php $this->help_link('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 />
431
  <small>Page IDs, separated by commas.</small></p>
432
-
433
- <p><label for="<?php echo $this->get_field_id('width'); ?>"><?php _e('Menu Width:', 'shailan-dropdown-menu'); ?> <?php $this->help_link('widget-width'); ?><input class="widefat" id="<?php echo $this->get_field_id('width'); ?>" name="<?php echo $this->get_field_name('width'); ?>" type="text" value="<?php echo $width; ?>" /></label><br />
434
- <small>Menu width, leave blank for default.</small></p>
435
-
436
  <p>
437
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('home'); ?>" name="<?php echo $this->get_field_name('home'); ?>"<?php checked( $home ); ?> />
438
  <label for="<?php echo $this->get_field_id('home'); ?>"><?php _e( 'Add homepage link' , 'shailan-dropdown-menu' ); ?></label><?php $this->help_link('homepage-link'); ?><br />
@@ -443,63 +435,64 @@ function options_page(){
443
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( $vertical ); ?> />
444
  <label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu' , 'shailan-dropdown-menu' ); ?><?php $this->help_link('vertical-menu'); ?></label>
445
  </p>
446
-
447
- <p><?php _e('Align:', 'shailan-dropdown-menu'); ?> <?php $this->help_link('alignment'); ?><label for="left"><input type="radio" id="left" name="<?php echo $this->get_field_name('align'); ?>" value="left" <?php if($align=='left'){ echo 'checked="checked"'; } ?> /> <?php _e('Left', 'shailan-dropdown-menu'); ?></label> <label for="center"><input type="radio" id="center" name="<?php echo $this->get_field_name('align'); ?>" value="center" <?php if($align=='center'){ echo 'checked="checked"'; } ?>/> <?php _e('Center', 'shailan-dropdown-menu'); ?></label> <label for="right"><input type="radio" id="right" name="<?php echo $this->get_field_name('align'); ?>" value="right" <?php if($align=='right'){ echo 'checked="checked"'; } ?>/> <?php _e('Right', 'shailan-dropdown-menu'); ?></label></p>
448
-
 
 
 
 
449
  <p><?php _e('Current Theme:', 'shailan-dropdown-menu') ?><br />
450
  <?php $theme = $this->get_plugin_setting('shailan_dm_active_theme');
451
-
452
  $available_themes = array(
453
  'None' => '*none*',
454
  'From URL' => '*url*',
455
  'Custom CSS' => '*custom*',
456
  'Color Scheme' => 'color-scheme',
457
- 'Web 2.0 by MetinSaylan' => plugins_url('/themes/web20.css', __FILE__),
458
  'Simple White' => plugins_url('/themes/simple.css', __FILE__),
459
  'Wordpress Default' => plugins_url('/themes/wpdefault.css', __FILE__),
460
  'Grayscale' => plugins_url('/themes/grayscale.css', __FILE__),
461
  'Aqua' => plugins_url('/themes/aqua.css', __FILE__),
462
  'Blue gradient' => plugins_url('/themes/simple-blue.css', __FILE__),
463
  'Shiny Black' => plugins_url('/themes/shiny-black.css', __FILE__),
464
- 'Flickr theme' => plugins_url('/themes/flickr.com/default.ultimate.css', __FILE__),
465
- 'Nvidia theme' => plugins_url('/themes/nvidia.com/default.advanced.css', __FILE__),
466
- 'Adobe theme' => plugins_url('/themes/adobe.com/default.advanced.css', __FILE__),
467
- 'MTV theme' => plugins_url('/themes/mtv.com/default.ultimate.css', __FILE__),
468
- 'Hulu theme' => plugins_url('/themes/hulu/hulu.css', __FILE__),
469
- 'Rounded Corners by MetinSaylan' => plugins_url('/themes/rounded-corners.css', __FILE__),
470
- 'Rounded Corners Light by MetinSaylan' => plugins_url('/themes/rounded-corners-light.css', __FILE__),
471
- 'Pills by MetinSaylan' => plugins_url('/themes/pills.css', __FILE__)
472
  );
473
-
474
- $theme_names = array_flip($available_themes);
475
- $theme_name = $theme_names[$theme];
476
  echo "<strong>" . $theme_name . "</strong>";
477
  ?>
478
- <a href="options-general.php?page=dropdown-menu" style="text-decoration:none;"><?php esc_attr_e('Change theme &rarr;', 'shailan-dropdown-menu'); ?></a>
479
  </p>
480
-
481
- <div class="widget-control-actions">
482
- <p><small>Powered by <a href="http://metinsaylan.com/wordpress/plugins/dropdown-menu/" title="Wordpress Tips and tricks, Freelancing, Web Design">MetinSaylan.com</a> | <a href="http://metinsaylan.com/wordpress/" title="Get more wordpress widgets and themes" target="_blank" >Get more..</a></small></p>
483
- </div>
484
  <br class="clear" />
485
-
486
- <?php
487
  }
488
-
489
  /******************************************************************************
490
  * HEADER
491
  ******************************************************************************/
492
  function header($instance){
493
-
494
  /*if(!is_admin()){*/
495
-
496
  //$default_headers = array( 'Version' => 'Version' );
497
  //$dropdown = get_file_data( __FILE__, $default_headers, 'plugin' );
498
-
499
  $theme = $this->get_plugin_setting('shailan_dm_active_theme');
500
  if($theme == '*url*'){ $theme = $this->get_plugin_setting('shailan_dm_theme_url'); }
501
  if($theme == ''){ $theme = "web20"; }
502
-
503
  $allow_multiline = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_allowmultiline') );
504
  // Colors
505
  $custom_colors = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_custom_colors') );
@@ -508,10 +501,10 @@ function options_page(){
508
  $shailan_dm_color_link = $this->get_plugin_setting('shailan_dm_color_link');
509
  $shailan_dm_color_hoverlink = $this->get_plugin_setting('shailan_dm_color_hoverlink');
510
  $is_fx_active = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_effects') );
511
-
512
  echo "\n\n<!-- Dropdown Menu Widget Styles by shailan (http://metinsaylan.com) v" . VERSION . " on wp" . get_bloginfo( 'version' ) . " -->"; // For debug
513
  echo "\n<link rel=\"stylesheet\" href=\"". plugins_url( '/css/shailan-dropdown.min.css' , __FILE__ ) . "\" type=\"text/css\" />";
514
-
515
  if( $theme!='*none*' && $theme != '*custom*' ){
516
  if( false === strpos($theme, 'http') ){
517
  // Default
@@ -521,61 +514,61 @@ function options_page(){
521
  echo "\n<link rel=\"stylesheet\" href=\"".$theme."\" type=\"text/css\" />";
522
  }
523
  }
524
-
525
  echo "\n<style type=\"text/css\" media=\"all\">";
526
-
527
  $indent = "\n\t";
528
-
529
  // Font family and font size
530
  $font_family = stripslashes( $this->get_plugin_setting('shailan_dm_font') );
531
-
532
  if(!empty($font_family)){ echo $indent. "ul.dropdown li a { font-family:$font_family; } "; }
533
-
534
- $font_size = $this->get_plugin_setting('shailan_dm_fontsize'); //'12px';
535
-
536
  if(!empty($font_size)){ echo $indent. "ul.dropdown li a { font-size:$font_size; }"; }
537
-
538
  if(!$allow_multiline){
539
  echo $indent. "ul.dropdown { white-space: nowrap; }";
540
  }
541
-
542
  if( $custom_colors ){
543
  // Custom color scheme is active
544
-
545
- // Overlay support
546
  $overlay = $this->get_plugin_setting('shailan_dm_overlay');
547
  echo $indent . "/* Selected overlay: ". $overlay . " */";
548
-
549
  if($overlay!='none' && $theme=='color-scheme' ){
550
  $posvert = 0;
551
  switch ( $overlay ) {
552
- case "glass":
553
  $posvert = 0;
554
- break;
555
- case "flat":
556
  $posvert = -100;
557
- break;
558
- case "shadow":
559
  $posvert = -200;
560
- break;
561
- case "soft":
562
  $posvert = -300;
563
- break;
564
  }
565
-
566
  $apos = $posvert - 2;
567
-
568
  ?>
569
-
570
- .shailan-dropdown-menu .dropdown-horizontal-container,
571
  ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover{ background-position:0px <?php echo $posvert; ?>px; }
572
  ul.dropdown li.hover a, ul.dropdown li:hover a{ background-position:0px <?php echo $apos; ?>px; }
573
 
574
  <?php } elseif($overlay == 'none') { ?>
575
  /* Clear background images */
576
- .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover, ul.dropdown li.hover a, ul.dropdown li:hover a { background-image:none; }
577
  <?php } else {/* unidentified overlay ? */} ?>
578
-
579
  .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
580
  ul.dropdown a,
581
  ul.dropdown a:link,
@@ -584,31 +577,31 @@ function options_page(){
584
  ul.dropdown a:hover,
585
  ul.dropdown li:hover { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
586
  ul.dropdown a:active { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
587
-
588
  ul.dropdown li.hover a, ul.dropdown li:hover a{ background-color: <?php echo $shailan_dm_color_lihover; ?>; }
589
  ul.dropdown li.hover ul li, ul.dropdown li:hover ul li{ background-color: <?php echo $shailan_dm_color_menubg; ?>;
590
  color: <?php echo $shailan_dm_color_link; ?>; }
591
-
592
  ul.dropdown li.hover ul li.hover, ul.dropdown li:hover ul li:hover { background-image: none; }
593
  ul.dropdown li.hover a:hover, ul.dropdown li:hover a:hover { background-color: <?php echo $shailan_dm_color_lihover; ?>; }
594
-
595
  ul.dropdown ul{ background-image:none; background-color:<?php echo $shailan_dm_color_menubg; ?>; border:1px solid <?php echo $shailan_dm_color_menubg; ?>; }
596
  ul.dropdown-vertical li { border-bottom:1px solid <?php echo $shailan_dm_color_lihover; ?>; }
597
  <?php
598
-
599
  } // if($custom_colors)
600
-
601
  // If effects not active, embed CSS display:
602
  if(! $is_fx_active){ ?>
603
-
604
  /** Show submenus */
605
  ul.dropdown li:hover > ul, ul.dropdown li.hover ul{ display: block; }
606
-
607
  /** Show current submenu */
608
- ul.dropdown li.hover ul, ul.dropdown ul li.hover ul, ul.dropdown ul ul li.hover ul, ul.dropdown ul ul ul li.hover ul, ul.dropdown ul ul ul ul li.hover ul , ul.dropdown li:hover ul, ul.dropdown ul li:hover ul, ul.dropdown ul ul li:hover ul, ul.dropdown ul ul ul li:hover ul, ul.dropdown ul ul ul ul li:hover ul { display: block; }
609
-
610
  <?php }
611
-
612
  // Arrow pointers
613
 
614
  if( 'on' == $this->get_plugin_setting('shailan_dm_arrows') ){
@@ -619,8 +612,8 @@ if( 'on' == $this->get_plugin_setting('shailan_dm_arrows') ){
619
  ul.dropdown li.parent>a{
620
  padding-right:25px;
621
  }
622
- ul.dropdown li.parent>a:after{
623
- content:""; position:absolute; top: 45%; right:6px;width:0;height:0;
624
  border-top:4px solid <?php echo $clr; ?>;border-right:4px solid transparent;border-left:4px solid transparent }
625
  ul.dropdown li.parent:hover>a:after{
626
  content:"";position:absolute; top: 45%; right:6px; width:0; height:0;
@@ -632,37 +625,37 @@ ul.dropdown li li.parent:hover>a:after{
632
  content:"";position:absolute;top: 40%; right:5px;width:0;height:0;
633
  border-left:4px solid <?php echo $clr; ?>;border-top:4px solid transparent;border-bottom:4px solid transparent }
634
 
635
- <?php }
636
-
637
  // Insert Custom CSS last
638
  $custom_css = stripslashes( $this->get_plugin_setting('shailan_dm_custom_css') );
639
  if(!empty($custom_css)){ echo $custom_css; }
640
  echo "\n</style>";
641
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
642
  echo "\n\n ";
643
-
644
  /*}*/
645
  } // -- End Header
646
-
647
  /******************************************************************************
648
  * HEADER
649
  ******************************************************************************/
650
  function footer( $instance = null ){
651
  $indent = "\n\t";
652
-
653
  $remove_title_attributes = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_title_attributes') );
654
  $remove_top_level_links = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_top_level_links') );
655
  $is_fx_active = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_effects') );
656
  $speed = $this->get_plugin_setting('shailan_dm_effect_speed', '400');
657
  $effect = $this->get_plugin_setting('shailan_dm_effect', 'fade');
658
  $delay = $this->get_plugin_setting('shailan_dm_effect_delay', '100');
659
-
660
  if( $is_fx_active || $remove_title_attributes || $remove_top_level_links ){
661
-
662
  echo "\n\n<!-- Dropdown Menu Widget Effects by shailan (http://metinsaylan.com) v". VERSION ." on wp".get_bloginfo( 'version' )." -->"; // For debug
663
  echo "\n<script type=\"text/javascript\">/* <![CDATA[ */";
664
  echo "\njQuery(document).ready(function($) { \n";
665
-
666
  // Remove title attributes from links
667
 
668
  if($remove_title_attributes){
@@ -670,7 +663,7 @@ ul.dropdown li li.parent:hover>a:after{
670
  $('ul.dropdown li a').removeAttr('title');
671
  <?php
672
  }
673
-
674
  // Remove links from top-level elements
675
 
676
  if($remove_top_level_links){
@@ -678,79 +671,75 @@ ul.dropdown li li.parent:hover>a:after{
678
  $('ul.dropdown>li>ul.children').parent().find('a:first').removeAttr('href');
679
  <?php
680
  }
681
-
682
  // Dropdown FX
683
 
684
  if( 'fade' == $effect ){
685
  ?>
686
-
687
  var config = {
688
- over : function(){ $(this).find("ul:first").fadeIn('<?php echo $speed; ?>'); },
689
  out : function(){ $(this).find("ul:first").fadeOut('<?php echo $speed; ?>'); },
690
  timeout : <?php echo $delay; ?>
691
  }
692
-
693
  $(".dropdown li").hoverIntent( config );
694
  <?php
695
  } elseif( 'slide' == $effect ) { ?>
696
 
697
  var config = {
698
- over : function(){ $(this).find("ul:first").slideDown('<?php echo $speed; ?>'); },
699
  out : function(){ $(this).find("ul:first").slideUp('<?php echo $speed; ?>'); },
700
  timeout : <?php echo $delay; ?>
701
  }
702
-
703
- $(".dropdown li").hoverIntent( config );
704
- <?php
705
  } elseif( 'fade2' == $effect ) { ?>
706
-
707
  $(".dropdown li").hoverIntent(
708
  function(){ h = $(this).height() + 'px'; $(this).find("ul:first").animate( {opacity:'show', top:h}, '<?php echo $speed; ?>'); },
709
  function(){ h = $(this).height() + 5 + 'px'; $(this).find("ul:first").animate( {opacity:'hide', top:h}, '<?php echo $speed; ?>'); }
710
- );
711
-
712
  <?php }
713
-
714
  echo "\n});";
715
  echo "\n/* ]]> */</script>";
716
  echo "\n<!-- /Dropdown Menu Widget Effects -->";
717
  echo "\n\n ";
718
 
719
  } // fx active
720
-
721
  }
722
-
723
  function help_link($key, $text = '(?)'){
724
  echo '<a href="'.$this->help_url.'#' . $key. '" target="_blank" class="help-link">' . $text . '</a>';
725
  }
726
 
727
- }
728
  // *** END OF CLASS ***
729
 
730
  function get_dropdown_setting( $key, $default = '' ) {
731
- $settings = get_option('shailan_dropdown_menu');
732
-
733
  if( array_key_exists( $key, $settings ) ){
734
  return $settings[ $key ];
735
  } else {
736
  return $default;
737
  }
738
-
739
  return FALSE;
740
  }
741
 
742
  // Register widget
743
  add_action('widgets_init', create_function('', 'return register_widget("shailan_DropdownWidget");'));
744
 
745
- // Load translations
746
- $plugin_dir = basename(dirname(__FILE__));
747
- load_plugin_textdomain( 'shailan-dropdown-menu', false, $plugin_dir . '/lang');
748
-
749
  /* Includes */
750
  include('shailan-page-walker.php'); // Load custom page walker
751
  include('shailan-category-walker.php'); // Load custom category walker
752
 
753
- /* Custom widget */
754
  include('shailan-multi-dropdown.php'); // Load multi-dropdown widget
755
 
756
  // Settings link
@@ -765,16 +754,16 @@ add_filter( "plugin_action_links_$plugin", 'shailan_dropdown_add_settings_link'
765
 
766
  // After activation redirect
767
  register_activation_hook(__FILE__, 'shailan_dropdown_activate');
768
- add_action('admin_init', 'shailan_dropdown_redirect');
769
 
770
  function shailan_dropdown_activate() {
771
- add_option('shailan_dropdown_do_activation_redirect', true);
772
  }
773
 
774
  // Redirects to options page on activate
775
  function shailan_dropdown_redirect() {
776
  if ( get_option( 'shailan_dropdown_do_activation_redirect', false ) ) {
777
- delete_option('shailan_dropdown_do_activation_redirect');
778
  $url = admin_url( 'options-general.php?page=dropdown-menu' );
779
  wp_redirect($url);
780
  }
@@ -783,16 +772,16 @@ function shailan_dropdown_redirect() {
783
  // Template tag support
784
  function shailan_dropdown_menu( $args = array() ){
785
 
786
- $type = get_dropdown_setting('shailan_dm_type');
787
- $exclude = get_dropdown_setting('shailan_dm_exclude');
788
- $inline_style = get_dropdown_setting('shailan_dm_style');
789
- $login = (bool) ( 'on' == get_dropdown_setting('shailan_dm_login') );
790
- $admin = (bool) ( 'on' == get_dropdown_setting('shailan_dm_admin') );
791
- $vertical = (bool) ( 'on' == get_dropdown_setting('shailan_dm_vertical') );
792
- $home = (bool) ( 'on' == get_dropdown_setting('shailan_dm_home') );
793
- $align = get_dropdown_setting('shailan_dm_align');
794
- $width = get_dropdown_setting('shailan_dm_width');
795
-
796
  $opts = array(
797
  'type' => $type,
798
  'exclude' => $exclude,
@@ -804,13 +793,13 @@ function shailan_dropdown_menu( $args = array() ){
804
  'align' => $align,
805
  'width' => $width
806
  );
807
-
808
  $options = wp_parse_args( $args, $opts );
809
-
810
  if(!empty( $args['menu'] )){ $options['type'] = $args['menu']; }
811
 
812
  the_widget( 'shailan_DropdownWidget', $options );
813
-
814
  }
815
 
816
  /**
@@ -820,16 +809,16 @@ function shailan_dropdown_menu( $args = array() ){
820
  */
821
  function shailan_nav_menu_args_filter( $args ){
822
 
823
- $replace_enabled = get_dropdown_setting( 'shailan_dm_location_enabled' );
824
-
825
  if( 'on' == $replace_enabled ){
826
- $theme_location = get_dropdown_setting( 'shailan_dm_location' );
827
-
828
  if( $args['theme_location'] == $theme_location ){
829
  $args['fallback_cb'] = 'shailan_dropdown_menu';
830
  }
831
  }
832
-
833
  return $args;
834
  } add_filter('wp_nav_menu_args', 'shailan_nav_menu_args_filter', 90, 1);
835
 
@@ -837,4 +826,4 @@ function shailan_nav_menu_args_filter( $args ){
837
  function shailan_nav_menu_output_filter( $nav_menu, $args ){
838
  return $nav_menu;
839
  } add_filter( 'wp_nav_menu', 'shailan_nav_menu_output_filter', 10, 2);
840
- */
1
+ <?php
2
  /*
3
  Plugin Name: Dropdown Menu Widget
4
+ Plugin URI: http://metinsaylan.com/projects/wordpress/dropdown-menu-widget/
5
+ Description: Highly customizable automatic pages, categories or custom dropdown navigation menu widget with nice jQuery effects.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme, jquery, template, multi-color, theme
7
+ Version: 1.9.6
8
  Author: Metin Saylan
9
  Author URI: http://metinsaylan.com/
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
+ define('VERSION', '1.9.6');
14
 
15
  class shailan_DropdownWidget extends WP_Widget {
16
 
17
  public function __construct() {
18
  $widget_ops = array(
19
+ 'classname' => 'shailan-dropdown-menu-widget',
20
+ 'description' => __( 'Dropdown page/category/custom menu', 'shailan-dropdown-menu' )
21
  );
22
+
23
  parent::__construct(
24
+ 'dropdown-menu',
25
+ __('Dropdown Menu', 'shailan-dropdown-menu'),
26
  $widget_ops
27
  );
28
+
29
  $this->alt_option_name = 'widget_dropdown_menu';
30
+
31
  $this->pluginname = "Dropdown Menu";
32
  $this->shortname = "shailan_dm";
33
+
34
+ $this->help_url = "http://metinsaylan.com/docs/dropdown-menu-widget-help/";
35
+
36
+ $this->version = VERSION;
37
  $this->settings_key = "shailan_dropdown_menu";
38
  $this->options_page = "dropdown-menu";
39
+
40
  // Hook up styles
41
+ add_action( 'wp_head', array(&$this, 'header') );
42
+
43
+ // Hook up scripts
44
+ wp_enqueue_script( 'jquery' );
45
  wp_enqueue_script( 'hoverIntent', plugins_url( '/scripts/hoverIntent.js' , __FILE__ ) , array('jquery') );
46
+ wp_enqueue_script( 'dropdown-ie-support', plugins_url( '/scripts/include.js' , __FILE__ ) , array('jquery') );
47
+
48
  // Include options array
49
  require_once("shailan-dropdown-menu-options.php");
50
  $this->options = $options;
51
  $this->settings = $this->get_plugin_settings();
52
+
53
  $this->widget_defaults = array(
54
  'title' => '',
55
  'type' => 'pages',
63
  'show_title' => false,
64
  'width' => 'empty'
65
  );
66
+
67
  add_action('admin_menu', array( &$this, 'admin_header') );
68
  }
69
+
70
  function admin_header(){
71
+
72
  if ( @$_GET['page'] == $this->options_page ) {
73
+
74
  // Options page styles
75
+ wp_enqueue_style( 'farbtastic' );
76
+ wp_enqueue_style( "dropdown-admin", plugins_url( '/css/dropdown-admin.css' , __FILE__ ) , false, "1.0", "all");
77
+
78
  // Options page scripts
79
  wp_enqueue_script( "jquery" );
80
+ wp_enqueue_script( 'farbtastic' );
81
  wp_enqueue_script( 'dropdown-colorpick', plugins_url( '/scripts/admin.js' , __FILE__ ) , array('jquery') );
82
+
83
  if ( @$_REQUEST['action'] && 'save' == $_REQUEST['action'] ) {
84
+
85
  // Save settings
86
  $settings = $this->get_settings();
87
+
88
  // Set updated values
89
+ foreach($this->options as $option){
90
  if( array_key_exists( 'id', $option ) ){
91
  if( $option['type'] == 'checkbox' && empty( $_REQUEST[ $option['id'] ] ) ) {
92
  $settings[ $option['id'] ] = 'off';
93
  } else {
94
+ $settings[ $option['id'] ] = $_REQUEST[ $option['id'] ];
95
  }
96
  }
97
  }
98
+
99
  // Save the settings
100
  update_option( $this->settings_key, $settings );
101
  header("Location: admin.php?page=" . $this->options_page . "&saved=true&message=1");
102
  die;
103
  } else if( @$_REQUEST['action'] && 'reset' == $_REQUEST['action'] ) {
104
+
105
  // Start a new settings array
106
  $settings = array();
107
  delete_option( $this->settings_key );
108
+
109
  header("Location: admin.php?page=" . $this->options_page . "&reset=true&message=2");
110
  die;
111
  }
112
+
113
  }
114
+
115
+ $page = add_options_page(
116
  __('Settings for Dropdown Menu', 'shailan-dropdown-menu'),
117
+ __('Dropdown Menu', 'shailan-dropdown-menu'),
118
  'edit_themes',
119
  $this->options_page,
120
+ array( &$this, 'options_page')
121
  );
122
+
123
  add_action( 'admin_print_styles-' . $page, array( &$this, 'header' ) );
124
  }
125
+
126
  function get_plugin_settings(){
127
+ $settings = get_option( $this->settings_key );
128
+
129
+ if(FALSE === $settings){
130
  // Options doesn't exist, install standard settings
131
  return $this->install_default_settings();
132
  } else { // Options exist, update if necessary
133
+ if( !empty( $settings['version'] ) ){ $ver = $settings['version']; }
134
  else { $ver = ''; }
135
+
136
+ if($ver != $this->version){
137
  // Update settings
138
+ return $this->update_plugin_settings( $settings );
139
+ } else {
140
  // Plugin is up to date, let's return
141
  return $settings;
142
+ }
143
+ }
144
  }
145
+
146
  /* Updates a single option key */
147
  function update_plugin_setting( $key, $value ){
148
  $settings = $this->get_plugin_settings();
158
  } else {
159
  return $default;
160
  }
161
+
162
  return FALSE;
163
  }
164
 
165
  function install_default_settings(){
166
  // Create settings array
167
  $settings = array();
168
+
169
  // Set default values
170
  foreach($this->options as $option){
171
  if( array_key_exists( 'id', $option ) && array_key_exists( 'std', $option ) )
172
  $settings[ $option['id'] ] = $option['std'];
173
  }
174
+
175
  $settings['version'] = $this->version;
176
  // Save the settings
177
  update_option( $this->settings_key, $settings );
185
  $current_settings[ $option['id'] ] = $option['std'];
186
  }
187
  }
188
+
189
  update_option( $this->settings_key, $current_settings );
190
  return $current_settings;
191
  }
192
+
193
  function options_page(){
194
  global $options, $current;
195
 
196
  $title = "Dropdown Menu Widget Options";
197
+
198
+ $options = $this->options;
199
  $current = $this->get_plugin_settings();
200
+
201
+ $messages = array(
202
  "1" => __("Dropdown Menu Widget settings are saved.", "shailan-dropdown-menu"),
203
  "2" => __("Dropdown Menu Widget settings are reset.", "shailan-dropdown-menu")
204
  );
205
+
206
+ $navigation = '<div id="stf_nav"><a href="http://metinsaylan.com/projects/wordpress/dropdown-menu-widget/" target="_blank">Plugin page</a> | <a href="http://metinsaylan.com/docs/dropdown-menu-widget-help/" target="_blank">Usage</a> | <a href="http://metinsaylan.com/donate/" target="_blank">Donate</a> | <a href="http://metinsaylan.com/projects/" target="_blank">Get more plugins..</a></div>';
207
+
208
+ $footer_text = '';
209
+
210
  include_once( "stf-page-options.php" );
211
 
212
  }
213
+
214
  /******************************************************************************
215
+ * the WIDGET
216
  ******************************************************************************/
217
+ function widget($args, $instance) {
218
  extract( $args );
219
  $widget_options = wp_parse_args( $instance, $this->widget_defaults );
220
  extract( $widget_options, EXTR_SKIP );
221
+
222
  // On and off
223
+ $show_title = (bool) ( 'on' == $show_title );
224
  $orientation = ( (bool) ( 'on' == $vertical) ? 'dropdown-vertical' : 'dropdown-horizontal');
225
  $custom_walkers = false; // (bool) get_option('shailan_dm_customwalkers'); disabled
226
  $show_empty = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_show_empty') );
227
+
228
  $width = (int) $width;
229
+
230
  $width_attr = '';
231
  if( $width > 0 )
232
  $width_attr = 'style="width:' . $width . 'px;"';
233
+
234
  if( !isset($align) || $align == '') {
235
  $align = 'left';
236
  }
237
+
238
  if( !isset($type) || $type == '') {
239
  $type = 'pages';
240
  }
241
+
242
+ echo $args['before_widget'];
243
+
244
  // Show title if option checked
245
  if ( $title && $show_title ){ echo $before_title . $title . $after_title; }
246
+
247
  $nl = "\n"; $indent = "\n\t"; $indent2 = "\n\t\t";
248
+
 
 
249
  echo $nl . "<div class=\"shailan-dropdown-menu\" >";
 
250
  $dropdown_wrapper_open = $nl . '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
251
+ $dropdown_open = $indent . '<div align="'.$align.'" class="'.$orientation.'-container dm-align-'.$align.' clearfix"><div class="menu-alignment-wrap">';
 
252
  $list_open = $indent2 . '<ul id="dropdown-'. $this->number .'" class="dropdown dropdown-'. $this->number .' '. $orientation . ' dropdown-align-'.$align.'" '. $width_attr .' >' . $nl . "<!-- Menu elements start -->\n";
253
+
254
+ if($home && ($type == 'pages' || $type == 'categories')){
255
+
256
  $home_item = $nl . '<li class="page_item cat-item blogtab '. (is_front_page() && !is_paged() ? 'current_page_item current-cat' : '' ) . '">
257
  <a href="'.get_option('home').'">';
258
 
259
+ $home_tag = $this->get_plugin_setting('shailan_dm_home_tag');
260
  if(empty($home_tag)){ $home_tag = __('Home'); }
261
+
262
  $home_item .= $home_tag;
263
  $home_item .= '</a></li>';
264
+
265
  $list_open .= $home_item;
266
  }
267
+
268
  $list_close = ($admin ? wp_register('<li class="admintab">','</li>', false) : '') . ($login ? '<li class="page_item">'. wp_loginout('', false) . '</li>' : '') . '
269
  </ul>';
270
+
271
+ $dropdown_close = '</div></div>';
 
 
272
  $dropdown_wrapper_close = '</div> ';
273
+
274
  $menu_defaults = array(
275
  'ID' => $this->number,
276
  'sort_column' => 'menu_order, post_title',
279
  'title_li' => '',
280
  'exclude' => $exclude
281
  );
282
+
283
  $menu_defaults = apply_filters( 'dropdown_menu_defaults', $menu_defaults );
284
+
285
  switch ( $type ) {
286
 
287
  /** Pages menu */
288
+ case "pages":
289
+
290
  if($custom_walkers){
291
  $page_walker = new shailan_PageWalker();
292
  $menu_defaults = wp_parse_args( array('walker'=>$page_walker) , $menu_defaults ); }
293
+
294
  echo $dropdown_wrapper_open;
295
  do_action('dropdown_before');
296
  echo $dropdown_open;
302
  echo $dropdown_close;
303
  do_action('dropdown_after');
304
  echo $dropdown_wrapper_close;
305
+
306
+ break;
307
+
308
  /** Categories menu */
309
+ case "categories":
310
+
311
+ if($custom_walkers){
312
  $cat_walker = new shailan_CategoryWalker();
313
  $menu_defaults = wp_parse_args( array('walker'=>$cat_walker) , $menu_defaults ); }
314
+
315
  if($show_empty){$menu_defaults = wp_parse_args( array('hide_empty'=>'0') , $menu_defaults ); }
316
+
317
  echo $dropdown_wrapper_open;
318
  do_action('dropdown_before');
319
  echo $dropdown_open;
320
  echo $list_open;
321
  do_action('dropdown_list_before');
322
+ wp_list_categories($menu_defaults);
323
  do_action('dropdown_list_after');
324
  echo $list_close;
325
  echo $dropdown_close;
327
  echo $dropdown_wrapper_close;
328
 
329
  break;
330
+
331
  /** WP3 Nav menu */
332
  default:
333
+
334
  $location = '';
335
  $menu = '';
336
+
337
  // Replace navmenu_
338
  if( FALSE !== strpos( $type, 'navmenu_' ) ){
339
  $type = str_replace( 'navmenu_', '', $type );
340
  }
341
+
342
  $menu_id = $type;
343
+
344
  // Check if a menu exists with this id
345
  $menu = wp_get_nav_menu_object( $menu_id );
346
  if( $menu ){ $menu = $menu_id; }
347
+
348
  // Is that a location?
349
  if ( ! $menu && ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_id ] ) ){
350
  $location = $menu_id;
351
  $menu = '';
352
  }
353
+
354
  $menu_args = array(
355
+ 'menu' => $menu,
356
+ 'container' => false,
357
+ 'container_class' => '',
358
+ 'container_id' => '',
359
+ 'menu_class' => 'dropdown '. $orientation . ' dropdown-align-'.$align,
360
  'menu_id' => '',
361
  'echo' => true,
362
  'theme_location' => $location,
363
  'is_shailan_dropdown_callback' => 'yes'
364
  );
365
+
366
  if($custom_walkers){
367
  $page_walker = new shailan_PageWalker();
368
+ $menu_args = wp_parse_args( array('walker'=>$page_walker) , $menu_args );
369
  }
370
+
371
  echo $dropdown_wrapper_open;
372
  do_action('dropdown_before');
373
  echo $dropdown_open;
375
  echo $dropdown_close;
376
  do_action('dropdown_after');
377
  echo $dropdown_wrapper_close;
378
+
379
  } // switch ($type)
380
 
381
+ echo $nl . "</div>"; ?>
 
 
382
  <?php echo $after_widget; $this->footer(); ?>
383
  <?php
384
  }
385
+
386
+ function update($new_instance, $old_instance) {
387
  return $new_instance;
388
  }
389
+
390
  /******************************************************************************
391
  * WIDGET FORM
392
  ******************************************************************************/
393
+ function form($instance) {
394
+
395
  $widget_options = wp_parse_args( $instance, $this->widget_defaults );
396
  extract( $widget_options, EXTR_SKIP );
397
+
398
  $width = (int) $width;
399
  $show_title = (bool) $show_title;
400
  $home = (bool) $home;
401
  $login = (bool) $login;
402
  $admin = (bool) $admin;
403
  $vertical = (bool) $vertical;
404
+
405
+ ?>
406
+
407
  <style type="text/css">.help-link{ padding:2px 5px; text-decoration:none; }</style>
408
+
409
  <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title :', 'shailan-dropdown-menu'); ?> <?php $this->help_link('widget-title'); ?><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>
410
+
411
  <p>
412
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_title'); ?>" name="<?php echo $this->get_field_name('show_title'); ?>"<?php checked( $show_title ); ?> />
413
  <label for="<?php echo $this->get_field_id('show_title'); ?>"><?php _e( 'Show widget title' , 'shailan-dropdown-menu' ); ?></label><?php $this->help_link('show-title'); ?> <br />
414
+
415
  <p><label for="<?php echo $this->get_field_id('type'); ?>"><?php _e('Menu Type:'); ?>
416
  <select name="<?php echo $this->get_field_name('type'); ?>" id="<?php echo $this->get_field_id('type'); ?>">
417
  <?php foreach ($this->menu_types as $key=>$option) { ?>
418
  <option <?php if ($type == $key) { echo 'selected="selected"'; } ?> value="<?php echo $key; ?>"><?php echo $option; ?></option><?php } ?>
419
  </select>
420
  </label><?php $this->help_link('widget-menu-type'); ?> </p>
421
+
422
+ <p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:', 'shailan-dropdown-menu'); ?> <?php $this->help_link('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 />
423
  <small>Page IDs, separated by commas.</small></p>
424
+
425
+ <p><label for="<?php echo $this->get_field_id('width'); ?>"><?php _e('Menu Width:', 'shailan-dropdown-menu'); ?> <?php $this->help_link('widget-width'); ?><input class="widefat" id="<?php echo $this->get_field_id('width'); ?>" name="<?php echo $this->get_field_name('width'); ?>" type="text" value="<?php echo $width; ?>" /></label><br />
426
+ <small>Menu width in pixels (Eg. 200). Leave blank for default.</small></p>
427
+
428
  <p>
429
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('home'); ?>" name="<?php echo $this->get_field_name('home'); ?>"<?php checked( $home ); ?> />
430
  <label for="<?php echo $this->get_field_id('home'); ?>"><?php _e( 'Add homepage link' , 'shailan-dropdown-menu' ); ?></label><?php $this->help_link('homepage-link'); ?><br />
435
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( $vertical ); ?> />
436
  <label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu' , 'shailan-dropdown-menu' ); ?><?php $this->help_link('vertical-menu'); ?></label>
437
  </p>
438
+
439
+ <p><?php _e('Align:', 'shailan-dropdown-menu'); ?> <?php $this->help_link('alignment'); ?>
440
+ <label for="left"><input type="radio" id="left" name="<?php echo $this->get_field_name('align'); ?>" value="left" <?php if($align=='left'){ echo 'checked="checked"'; } ?> /><?php _e('Left', 'shailan-dropdown-menu'); ?></label>
441
+ <label for="center"><input type="radio" id="center" name="<?php echo $this->get_field_name('align'); ?>" value="center" <?php if($align=='center'){ echo 'checked="checked"'; } ?>/> <?php _e('Center', 'shailan-dropdown-menu'); ?></label>
442
+ <label for="right"><input type="radio" id="right" name="<?php echo $this->get_field_name('align'); ?>" value="right" <?php if($align=='right'){ echo 'checked="checked"'; } ?>/> <?php _e('Right', 'shailan-dropdown-menu'); ?></label>
443
+ </p>
444
+
445
  <p><?php _e('Current Theme:', 'shailan-dropdown-menu') ?><br />
446
  <?php $theme = $this->get_plugin_setting('shailan_dm_active_theme');
447
+
448
  $available_themes = array(
449
  'None' => '*none*',
450
  'From URL' => '*url*',
451
  'Custom CSS' => '*custom*',
452
  'Color Scheme' => 'color-scheme',
453
+ 'Web 2.0' => plugins_url('/themes/web20.css', __FILE__),
454
  'Simple White' => plugins_url('/themes/simple.css', __FILE__),
455
  'Wordpress Default' => plugins_url('/themes/wpdefault.css', __FILE__),
456
  'Grayscale' => plugins_url('/themes/grayscale.css', __FILE__),
457
  'Aqua' => plugins_url('/themes/aqua.css', __FILE__),
458
  'Blue gradient' => plugins_url('/themes/simple-blue.css', __FILE__),
459
  'Shiny Black' => plugins_url('/themes/shiny-black.css', __FILE__),
460
+ 'Flickr' => plugins_url('/themes/flickr.com/default.ultimate.css', __FILE__),
461
+ 'Nvidia' => plugins_url('/themes/nvidia.com/default.advanced.css', __FILE__),
462
+ 'Adobe' => plugins_url('/themes/adobe.com/default.advanced.css', __FILE__),
463
+ 'MTV' => plugins_url('/themes/mtv.com/default.ultimate.css', __FILE__),
464
+ 'Hulu' => plugins_url('/themes/hulu/hulu.css', __FILE__),
465
+ 'Rounded Corners' => plugins_url('/themes/rounded-corners.css', __FILE__),
466
+ 'Rounded Corners Light' => plugins_url('/themes/rounded-corners-light.css', __FILE__),
467
+ 'Pills' => plugins_url('/themes/pills.css', __FILE__)
468
  );
469
+
470
+ $theme_names = array_flip($available_themes);
471
+ $theme_name = $theme_names[$theme];
472
  echo "<strong>" . $theme_name . "</strong>";
473
  ?>
474
+ <a href="options-general.php?page=dropdown-menu" target="_blank" style="text-decoration:none;"><?php esc_attr_e('Change theme &rarr;', 'shailan-dropdown-menu'); ?></a>
475
  </p>
476
+
 
 
 
477
  <br class="clear" />
478
+
479
+ <?php
480
  }
481
+
482
  /******************************************************************************
483
  * HEADER
484
  ******************************************************************************/
485
  function header($instance){
486
+
487
  /*if(!is_admin()){*/
488
+
489
  //$default_headers = array( 'Version' => 'Version' );
490
  //$dropdown = get_file_data( __FILE__, $default_headers, 'plugin' );
491
+
492
  $theme = $this->get_plugin_setting('shailan_dm_active_theme');
493
  if($theme == '*url*'){ $theme = $this->get_plugin_setting('shailan_dm_theme_url'); }
494
  if($theme == ''){ $theme = "web20"; }
495
+
496
  $allow_multiline = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_allowmultiline') );
497
  // Colors
498
  $custom_colors = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_custom_colors') );
501
  $shailan_dm_color_link = $this->get_plugin_setting('shailan_dm_color_link');
502
  $shailan_dm_color_hoverlink = $this->get_plugin_setting('shailan_dm_color_hoverlink');
503
  $is_fx_active = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_effects') );
504
+
505
  echo "\n\n<!-- Dropdown Menu Widget Styles by shailan (http://metinsaylan.com) v" . VERSION . " on wp" . get_bloginfo( 'version' ) . " -->"; // For debug
506
  echo "\n<link rel=\"stylesheet\" href=\"". plugins_url( '/css/shailan-dropdown.min.css' , __FILE__ ) . "\" type=\"text/css\" />";
507
+
508
  if( $theme!='*none*' && $theme != '*custom*' ){
509
  if( false === strpos($theme, 'http') ){
510
  // Default
514
  echo "\n<link rel=\"stylesheet\" href=\"".$theme."\" type=\"text/css\" />";
515
  }
516
  }
517
+
518
  echo "\n<style type=\"text/css\" media=\"all\">";
519
+
520
  $indent = "\n\t";
521
+
522
  // Font family and font size
523
  $font_family = stripslashes( $this->get_plugin_setting('shailan_dm_font') );
524
+
525
  if(!empty($font_family)){ echo $indent. "ul.dropdown li a { font-family:$font_family; } "; }
526
+
527
+ $font_size = $this->get_plugin_setting('shailan_dm_fontsize'); //'12px';
528
+
529
  if(!empty($font_size)){ echo $indent. "ul.dropdown li a { font-size:$font_size; }"; }
530
+
531
  if(!$allow_multiline){
532
  echo $indent. "ul.dropdown { white-space: nowrap; }";
533
  }
534
+
535
  if( $custom_colors ){
536
  // Custom color scheme is active
537
+
538
+ // Overlay support
539
  $overlay = $this->get_plugin_setting('shailan_dm_overlay');
540
  echo $indent . "/* Selected overlay: ". $overlay . " */";
541
+
542
  if($overlay!='none' && $theme=='color-scheme' ){
543
  $posvert = 0;
544
  switch ( $overlay ) {
545
+ case "glass":
546
  $posvert = 0;
547
+ break;
548
+ case "flat":
549
  $posvert = -100;
550
+ break;
551
+ case "shadow":
552
  $posvert = -200;
553
+ break;
554
+ case "soft":
555
  $posvert = -300;
556
+ break;
557
  }
558
+
559
  $apos = $posvert - 2;
560
+
561
  ?>
562
+
563
+ .shailan-dropdown-menu .dropdown-horizontal-container,
564
  ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover{ background-position:0px <?php echo $posvert; ?>px; }
565
  ul.dropdown li.hover a, ul.dropdown li:hover a{ background-position:0px <?php echo $apos; ?>px; }
566
 
567
  <?php } elseif($overlay == 'none') { ?>
568
  /* Clear background images */
569
+ .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover, ul.dropdown li.hover a, ul.dropdown li:hover a { background-image:none; }
570
  <?php } else {/* unidentified overlay ? */} ?>
571
+
572
  .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
573
  ul.dropdown a,
574
  ul.dropdown a:link,
577
  ul.dropdown a:hover,
578
  ul.dropdown li:hover { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
579
  ul.dropdown a:active { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
580
+
581
  ul.dropdown li.hover a, ul.dropdown li:hover a{ background-color: <?php echo $shailan_dm_color_lihover; ?>; }
582
  ul.dropdown li.hover ul li, ul.dropdown li:hover ul li{ background-color: <?php echo $shailan_dm_color_menubg; ?>;
583
  color: <?php echo $shailan_dm_color_link; ?>; }
584
+
585
  ul.dropdown li.hover ul li.hover, ul.dropdown li:hover ul li:hover { background-image: none; }
586
  ul.dropdown li.hover a:hover, ul.dropdown li:hover a:hover { background-color: <?php echo $shailan_dm_color_lihover; ?>; }
587
+
588
  ul.dropdown ul{ background-image:none; background-color:<?php echo $shailan_dm_color_menubg; ?>; border:1px solid <?php echo $shailan_dm_color_menubg; ?>; }
589
  ul.dropdown-vertical li { border-bottom:1px solid <?php echo $shailan_dm_color_lihover; ?>; }
590
  <?php
591
+
592
  } // if($custom_colors)
593
+
594
  // If effects not active, embed CSS display:
595
  if(! $is_fx_active){ ?>
596
+
597
  /** Show submenus */
598
  ul.dropdown li:hover > ul, ul.dropdown li.hover ul{ display: block; }
599
+
600
  /** Show current submenu */
601
+ ul.dropdown li.hover ul, ul.dropdown ul li.hover ul, ul.dropdown ul ul li.hover ul, ul.dropdown ul ul ul li.hover ul, ul.dropdown ul ul ul ul li.hover ul , ul.dropdown li:hover ul, ul.dropdown ul li:hover ul, ul.dropdown ul ul li:hover ul, ul.dropdown ul ul ul li:hover ul, ul.dropdown ul ul ul ul li:hover ul { display: block; }
602
+
603
  <?php }
604
+
605
  // Arrow pointers
606
 
607
  if( 'on' == $this->get_plugin_setting('shailan_dm_arrows') ){
612
  ul.dropdown li.parent>a{
613
  padding-right:25px;
614
  }
615
+ ul.dropdown li.parent>a:after{
616
+ content:""; position:absolute; top: 45%; right:6px;width:0;height:0;
617
  border-top:4px solid <?php echo $clr; ?>;border-right:4px solid transparent;border-left:4px solid transparent }
618
  ul.dropdown li.parent:hover>a:after{
619
  content:"";position:absolute; top: 45%; right:6px; width:0; height:0;
625
  content:"";position:absolute;top: 40%; right:5px;width:0;height:0;
626
  border-left:4px solid <?php echo $clr; ?>;border-top:4px solid transparent;border-bottom:4px solid transparent }
627
 
628
+ <?php }
629
+
630
  // Insert Custom CSS last
631
  $custom_css = stripslashes( $this->get_plugin_setting('shailan_dm_custom_css') );
632
  if(!empty($custom_css)){ echo $custom_css; }
633
  echo "\n</style>";
634
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
635
  echo "\n\n ";
636
+
637
  /*}*/
638
  } // -- End Header
639
+
640
  /******************************************************************************
641
  * HEADER
642
  ******************************************************************************/
643
  function footer( $instance = null ){
644
  $indent = "\n\t";
645
+
646
  $remove_title_attributes = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_title_attributes') );
647
  $remove_top_level_links = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_remove_top_level_links') );
648
  $is_fx_active = (bool) ( 'on' == $this->get_plugin_setting('shailan_dm_effects') );
649
  $speed = $this->get_plugin_setting('shailan_dm_effect_speed', '400');
650
  $effect = $this->get_plugin_setting('shailan_dm_effect', 'fade');
651
  $delay = $this->get_plugin_setting('shailan_dm_effect_delay', '100');
652
+
653
  if( $is_fx_active || $remove_title_attributes || $remove_top_level_links ){
654
+
655
  echo "\n\n<!-- Dropdown Menu Widget Effects by shailan (http://metinsaylan.com) v". VERSION ." on wp".get_bloginfo( 'version' )." -->"; // For debug
656
  echo "\n<script type=\"text/javascript\">/* <![CDATA[ */";
657
  echo "\njQuery(document).ready(function($) { \n";
658
+
659
  // Remove title attributes from links
660
 
661
  if($remove_title_attributes){
663
  $('ul.dropdown li a').removeAttr('title');
664
  <?php
665
  }
666
+
667
  // Remove links from top-level elements
668
 
669
  if($remove_top_level_links){
671
  $('ul.dropdown>li>ul.children').parent().find('a:first').removeAttr('href');
672
  <?php
673
  }
674
+
675
  // Dropdown FX
676
 
677
  if( 'fade' == $effect ){
678
  ?>
679
+
680
  var config = {
681
+ over : function(){ $(this).find("ul:first").fadeIn('<?php echo $speed; ?>'); },
682
  out : function(){ $(this).find("ul:first").fadeOut('<?php echo $speed; ?>'); },
683
  timeout : <?php echo $delay; ?>
684
  }
685
+
686
  $(".dropdown li").hoverIntent( config );
687
  <?php
688
  } elseif( 'slide' == $effect ) { ?>
689
 
690
  var config = {
691
+ over : function(){ $(this).find("ul:first").slideDown('<?php echo $speed; ?>'); },
692
  out : function(){ $(this).find("ul:first").slideUp('<?php echo $speed; ?>'); },
693
  timeout : <?php echo $delay; ?>
694
  }
695
+
696
+ $(".dropdown li").hoverIntent( config );
697
+ <?php
698
  } elseif( 'fade2' == $effect ) { ?>
699
+
700
  $(".dropdown li").hoverIntent(
701
  function(){ h = $(this).height() + 'px'; $(this).find("ul:first").animate( {opacity:'show', top:h}, '<?php echo $speed; ?>'); },
702
  function(){ h = $(this).height() + 5 + 'px'; $(this).find("ul:first").animate( {opacity:'hide', top:h}, '<?php echo $speed; ?>'); }
703
+ );
704
+
705
  <?php }
706
+
707
  echo "\n});";
708
  echo "\n/* ]]> */</script>";
709
  echo "\n<!-- /Dropdown Menu Widget Effects -->";
710
  echo "\n\n ";
711
 
712
  } // fx active
713
+
714
  }
715
+
716
  function help_link($key, $text = '(?)'){
717
  echo '<a href="'.$this->help_url.'#' . $key. '" target="_blank" class="help-link">' . $text . '</a>';
718
  }
719
 
720
+ }
721
  // *** END OF CLASS ***
722
 
723
  function get_dropdown_setting( $key, $default = '' ) {
724
+ $settings = get_option( 'shailan_dropdown_menu' );
725
+ $key = 'shailan_dm_' . $key;
726
  if( array_key_exists( $key, $settings ) ){
727
  return $settings[ $key ];
728
  } else {
729
  return $default;
730
  }
731
+
732
  return FALSE;
733
  }
734
 
735
  // Register widget
736
  add_action('widgets_init', create_function('', 'return register_widget("shailan_DropdownWidget");'));
737
 
 
 
 
 
738
  /* Includes */
739
  include('shailan-page-walker.php'); // Load custom page walker
740
  include('shailan-category-walker.php'); // Load custom category walker
741
 
742
+ /* Custom widget */
743
  include('shailan-multi-dropdown.php'); // Load multi-dropdown widget
744
 
745
  // Settings link
754
 
755
  // After activation redirect
756
  register_activation_hook(__FILE__, 'shailan_dropdown_activate');
757
+ add_action( 'admin_init', 'shailan_dropdown_redirect' );
758
 
759
  function shailan_dropdown_activate() {
760
+ add_option( 'shailan_dropdown_do_activation_redirect', true );
761
  }
762
 
763
  // Redirects to options page on activate
764
  function shailan_dropdown_redirect() {
765
  if ( get_option( 'shailan_dropdown_do_activation_redirect', false ) ) {
766
+ delete_option( 'shailan_dropdown_do_activation_redirect' );
767
  $url = admin_url( 'options-general.php?page=dropdown-menu' );
768
  wp_redirect($url);
769
  }
772
  // Template tag support
773
  function shailan_dropdown_menu( $args = array() ){
774
 
775
+ $type = get_dropdown_setting( 'type' );
776
+ $exclude = get_dropdown_setting( 'exclude' );
777
+ $inline_style = get_dropdown_setting( 'style' );
778
+ $login = (bool) ( 'on' == get_dropdown_setting( 'login' ) );
779
+ $admin = (bool) ( 'on' == get_dropdown_setting( 'admin' ) );
780
+ $vertical = (bool) ( 'on' == get_dropdown_setting( 'vertical' ) );
781
+ $home = (bool) ( 'on' == get_dropdown_setting( 'home' ) );
782
+ $align = get_dropdown_setting( 'align' );
783
+ $width = get_dropdown_setting( 'width' );
784
+
785
  $opts = array(
786
  'type' => $type,
787
  'exclude' => $exclude,
793
  'align' => $align,
794
  'width' => $width
795
  );
796
+
797
  $options = wp_parse_args( $args, $opts );
798
+
799
  if(!empty( $args['menu'] )){ $options['type'] = $args['menu']; }
800
 
801
  the_widget( 'shailan_DropdownWidget', $options );
802
+
803
  }
804
 
805
  /**
809
  */
810
  function shailan_nav_menu_args_filter( $args ){
811
 
812
+ $replace_enabled = get_dropdown_setting( 'location_enabled' );
813
+
814
  if( 'on' == $replace_enabled ){
815
+ $theme_location = get_dropdown_setting( 'location' );
816
+
817
  if( $args['theme_location'] == $theme_location ){
818
  $args['fallback_cb'] = 'shailan_dropdown_menu';
819
  }
820
  }
821
+
822
  return $args;
823
  } add_filter('wp_nav_menu_args', 'shailan_nav_menu_args_filter', 90, 1);
824
 
826
  function shailan_nav_menu_output_filter( $nav_menu, $args ){
827
  return $nav_menu;
828
  } add_filter( 'wp_nav_menu', 'shailan_nav_menu_output_filter', 10, 2);
829
+ */
stf-page-options.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="wrap stf_options_page">
2
  <?php screen_icon(); ?>
3
  <h2><?php echo esc_html( $title ); ?></h2>
4
-
5
  <!-- Notifications -->
6
  <?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
7
  <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
@@ -11,73 +11,63 @@
11
  <?php } ?>
12
  <!-- [End] Notifications -->
13
 
14
-
15
- <div id="shailancom">
16
- <div id="headlines">
17
-
18
- <h3>User Survey</h3>
19
- <p>
20
- Please <a href="https://docs.google.com/forms/u/0/d/e/1FAIpQLSe0kpN2Ak2pmRwkWlDf8_pMoHPokjGPrFYi1yd6v0TmnahGug/viewform?usp=sf_link" rel="_blank">take our little survey</a> to help us improve this plugin. <p>
21
-
22
- <h3>Metin Saylan's Blog</h3>
23
- <em>Latest Headlines</em>
24
- <?php
25
- //echo get_latest_tweet('mattsay');
26
-
27
- $rss_options = array(
28
- 'link' => 'http://metinsaylan.com',
29
- 'url' => 'http://feeds.feedburner.com/shailan',
30
- 'title' => 'Shailan.com',
31
- 'items' => 5,
32
- 'show_summary' => 0,
33
- 'show_author' => 0,
34
- 'show_date' => 0,
35
- 'before' => 'text'
36
- );
37
-
38
- wp_widget_rss_output( $rss_options ); ?>
39
- </div>
40
- </div>
41
-
42
  <div id="nav"><?php if(!empty($navigation)){echo $navigation;} ?></div>
43
 
44
-
45
-
46
  <div class="stf_opts_wrap">
47
  <div class="stf_options">
48
 
49
-
50
  <div id="demo"><h3>Menu Demo:</h3><?php shailan_dropdown_menu(); ?><br />
51
- <em>Please note, demo uses <a href="http://metinsaylan.com/2773/dropdown-menu-widget-template-tag-usage-explained/" target="_blank">php template tag</a>.</em></div>
52
-
53
 
54
  <form method="post">
55
  <div id="options-tabs">
56
 
57
- <!-- Tabs navigation -->
58
- <ul id="tabs-navigation" class="tabs">
59
- <?php
60
- foreach ($options as $field) {
61
- if ( $field['type'] == "section" ) {
62
- echo "<li><a href=\"#" . sanitize_title( $field['name'] ) . "\" class=\"" . sanitize_title( $field['name'] ) . "\">".$field['label']."</a></li>";
63
- }
64
- }
65
- ?>
66
- </ul>
67
- <!-- [End] Tabs Navigation -->
68
-
69
  <div class="tab_container">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  <?php foreach ($options as $field) {
71
  switch ( $field['type'] ) {
72
-
 
 
 
 
 
 
73
  case 'open': ?>
74
-
 
 
75
  <?php break;
76
-
77
  case 'close': ?>
78
 
79
  </div>
80
-
 
 
 
 
 
 
 
 
 
 
 
 
81
  <?php break;
82
 
83
  case 'paragraph': ?>
@@ -88,7 +78,7 @@ switch ( $field['type'] ) {
88
 
89
  <?php
90
  break;
91
-
92
  case 'text': ?>
93
 
94
  <div class="stf_input stf_text clearfix">
@@ -99,7 +89,7 @@ break;
99
 
100
  <?php
101
  break;
102
-
103
  case 'textarea':
104
  ?>
105
 
@@ -107,9 +97,9 @@ case 'textarea':
107
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
108
  <textarea name="<?php echo $field['id']; ?>" type="<?php echo $field['type']; ?>" cols="" rows=""><?php if ( $current[ $field['id'] ] != "") { echo stripslashes($current[ $field['id'] ] ); } else { echo $field['std']; } ?></textarea>
109
  <small><?php echo $field['desc']; ?></small>
110
-
111
  </div>
112
-
113
  <?php
114
  break;
115
 
@@ -118,27 +108,27 @@ case 'htmlarea':
118
 
119
  <div class="stf_input stf_textarea clearfix">
120
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
121
-
122
  <script type="text/javascript">
123
  jQuery(document).ready(function($) {
124
  $('#<?php echo $field['id']; ?>').wysiwyg();
125
  });
126
  </script>
127
-
128
  <textarea name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>" type="<?php echo $field['type']; ?>" cols="" rows=""><?php if ( $current[ $field['id'] ] != "") { echo stripslashes($current[ $field['id'] ] ); } else { echo $field['std']; } ?></textarea>
129
  <small><?php echo $field['desc']; ?></small>
130
-
131
  </div>
132
-
133
  <?php
134
  break;
135
-
136
  case 'select':
137
  ?>
138
 
139
  <div class="stf_input stf_select clearfix">
140
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
141
-
142
  <select name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>">
143
  <?php foreach ($field['options'] as $key=>$name) { ?>
144
  <option <?php if ( isset($current[ $field['id'] ]) && $current[ $field['id'] ] == $key) { echo 'selected="selected"'; } ?> value="<?php echo $key;?>"><?php echo $name; ?></option><?php } ?>
@@ -148,84 +138,49 @@ case 'select':
148
  </div>
149
  <?php
150
  break;
151
-
152
  case "checkbox":
153
  ?>
154
 
155
  <div class="stf_input stf_checkbox clearfix">
156
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
157
-
158
  <input type="checkbox" name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>" value="on" <?php checked($current[ $field['id'] ], "on") ?> />
159
 
160
  <small><?php echo $field['desc']; ?></small>
161
  </div>
162
- <?php break;
163
  case "section":
164
 
165
  ?>
166
 
167
  <div class="stf_section tab_content" id="<?php echo sanitize_title( $field['name'] ); ?>">
168
-
169
  <?php break;
170
 
171
  case "splitter":
172
  ?>
173
- <div class="shailan_dm_input shailan_dm_splitter"></div>
174
  <?php break;
175
 
176
  case 'picker':
177
  ?>
178
- <div id="picker"></div>
179
-
180
  <?php break;
181
-
182
  }
183
  }
184
  ?>
185
 
186
- <div id="tabs-footer" class="clearfix">
187
- <p class="submit">
188
- <?php submit_button( 'Save Changes', 'primary', 'save', false ); ?>
189
- <input type="hidden" name="action" value="save" />
190
- </p>
191
- </form>
192
-
193
- <form method="post">
194
- <?php submit_button( 'Reset Options', 'secondary', 'reset', false ); ?>
195
- <input type="hidden" name="action" value="reset" />
196
- </form>
197
-
198
- <div class="copyright"><?php if(!empty($footer_text)){echo $footer_text;} ?></div>
199
  </div>
200
  </div>
201
  </div>
202
- </div>
203
-
204
- <script type="text/javascript">
205
- jQuery(document).ready(function($) {
206
-
207
- //When page loads...
208
- jQuery(".tab_content").hide(); //Hide all content
209
- jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab
210
- jQuery(".tab_content:first").show(); //Show first tab content
211
-
212
- //On Click Event
213
- jQuery("ul.tabs li").click(function() {
214
-
215
- jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
216
- jQuery(this).addClass("active"); //Add "active" class to selected tab
217
- jQuery(".tab_content").hide(); //Hide all tab content
218
-
219
- var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
220
- jQuery(activeTab).fadeIn(); //Fade in the active ID content
221
- return false;
222
- });
223
-
224
- });
225
- </script>
226
 
227
  <?php if(WP_DEBUG){ ?>
228
  <h3>Debug information</h3>
 
229
  <pre><?php print_r($current) ?></pre>
230
  <?php } ?>
231
- </div>
 
1
  <div class="wrap stf_options_page">
2
  <?php screen_icon(); ?>
3
  <h2><?php echo esc_html( $title ); ?></h2>
4
+
5
  <!-- Notifications -->
6
  <?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
7
  <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
11
  <?php } ?>
12
  <!-- [End] Notifications -->
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  <div id="nav"><?php if(!empty($navigation)){echo $navigation;} ?></div>
15
 
 
 
16
  <div class="stf_opts_wrap">
17
  <div class="stf_options">
18
 
 
19
  <div id="demo"><h3>Menu Demo:</h3><?php shailan_dropdown_menu(); ?><br />
20
+ <em>Please note, demo uses <a href="http://metinsaylan.com/wordpress/2011/07/31/dropdown-menu-widget-template-tag-usage-explained/" target="_blank">php template tag</a>.</em></div>
 
21
 
22
  <form method="post">
23
  <div id="options-tabs">
24
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  <div class="tab_container">
26
+
27
+ <div id="tabs-footer" class="clearfix">
28
+ <p class="submit">
29
+ <?php submit_button( 'Save Changes', 'primary', 'save', false ); ?>
30
+ <input type="hidden" name="action" value="save" />
31
+ </p>
32
+ </form>
33
+
34
+ <form method="post">
35
+ <?php submit_button( 'Reset Options', 'secondary', 'reset', false ); ?>
36
+ <input type="hidden" name="action" value="reset" />
37
+ </form>
38
+ </div>
39
+
40
  <?php foreach ($options as $field) {
41
  switch ( $field['type'] ) {
42
+
43
+ case 'section': ?>
44
+
45
+ <h3 id="<?php echo sanitize_title( $field['name'] ); ?>" class="section-title"><?php echo $field['label']; ?></h3>
46
+
47
+ <?php
48
+
49
  case 'open': ?>
50
+
51
+ <div class="settings-section">
52
+
53
  <?php break;
54
+
55
  case 'close': ?>
56
 
57
  </div>
58
+ <div id="tabs-footer" class="clearfix">
59
+ <p class="submit">
60
+ <?php submit_button( 'Save Changes', 'primary', 'save', false ); ?>
61
+ <input type="hidden" name="action" value="save" />
62
+ </p>
63
+ </form>
64
+
65
+ <form method="post">
66
+ <?php submit_button( 'Reset Options', 'secondary', 'reset', false ); ?>
67
+ <input type="hidden" name="action" value="reset" />
68
+ </form>
69
+ </div>
70
+
71
  <?php break;
72
 
73
  case 'paragraph': ?>
78
 
79
  <?php
80
  break;
81
+
82
  case 'text': ?>
83
 
84
  <div class="stf_input stf_text clearfix">
89
 
90
  <?php
91
  break;
92
+
93
  case 'textarea':
94
  ?>
95
 
97
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
98
  <textarea name="<?php echo $field['id']; ?>" type="<?php echo $field['type']; ?>" cols="" rows=""><?php if ( $current[ $field['id'] ] != "") { echo stripslashes($current[ $field['id'] ] ); } else { echo $field['std']; } ?></textarea>
99
  <small><?php echo $field['desc']; ?></small>
100
+
101
  </div>
102
+
103
  <?php
104
  break;
105
 
108
 
109
  <div class="stf_input stf_textarea clearfix">
110
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
111
+
112
  <script type="text/javascript">
113
  jQuery(document).ready(function($) {
114
  $('#<?php echo $field['id']; ?>').wysiwyg();
115
  });
116
  </script>
117
+
118
  <textarea name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>" type="<?php echo $field['type']; ?>" cols="" rows=""><?php if ( $current[ $field['id'] ] != "") { echo stripslashes($current[ $field['id'] ] ); } else { echo $field['std']; } ?></textarea>
119
  <small><?php echo $field['desc']; ?></small>
120
+
121
  </div>
122
+
123
  <?php
124
  break;
125
+
126
  case 'select':
127
  ?>
128
 
129
  <div class="stf_input stf_select clearfix">
130
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
131
+
132
  <select name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>">
133
  <?php foreach ($field['options'] as $key=>$name) { ?>
134
  <option <?php if ( isset($current[ $field['id'] ]) && $current[ $field['id'] ] == $key) { echo 'selected="selected"'; } ?> value="<?php echo $key;?>"><?php echo $name; ?></option><?php } ?>
138
  </div>
139
  <?php
140
  break;
141
+
142
  case "checkbox":
143
  ?>
144
 
145
  <div class="stf_input stf_checkbox clearfix">
146
  <label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label>
147
+
148
  <input type="checkbox" name="<?php echo $field['id']; ?>" id="<?php echo $field['id']; ?>" value="on" <?php checked($current[ $field['id'] ], "on") ?> />
149
 
150
  <small><?php echo $field['desc']; ?></small>
151
  </div>
152
+ <?php break;
153
  case "section":
154
 
155
  ?>
156
 
157
  <div class="stf_section tab_content" id="<?php echo sanitize_title( $field['name'] ); ?>">
158
+
159
  <?php break;
160
 
161
  case "splitter":
162
  ?>
163
+ <div class="shailan_dm_input shailan_dm_splitter"></div>
164
  <?php break;
165
 
166
  case 'picker':
167
  ?>
168
+ <div id="picker"></div>
169
+
170
  <?php break;
171
+
172
  }
173
  }
174
  ?>
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  </div>
177
  </div>
178
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
 
180
  <?php if(WP_DEBUG){ ?>
181
  <h3>Debug information</h3>
182
+ <p>You are seeing this because your WP_DEBUG variable is set to true.</p>
183
  <pre><?php print_r($current) ?></pre>
184
  <?php } ?>
185
+
186
+ </div>
themes/adobe.com/images/favicon.ico DELETED
Binary file
themes/adobe.com/images/icon.png DELETED
Binary file
themes/flickr.com/default.ultimate.linear.css DELETED
@@ -1,62 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /**
4
- * Flickr Ultimate Linear CSS Drop-Down Menu Theme
5
- *
6
- * @file default.ultimate.linear.css
7
- * @name Flickr
8
- * @version beta
9
- * @type transitional
10
- * @browsers Windows: IE5+, Opera7+, Firefox1+
11
- * Mac OS: Safari2+, Firefox2+
12
- *
13
- * @link http://www.lwis.net/
14
- * @copyright 2008 Live Web Institute. All Rights Reserved.
15
- *
16
- */
17
-
18
- @import "default.ultimate.css";
19
-
20
-
21
- ul.dropdown {
22
- width: 100%;
23
- }
24
-
25
- ul.dropdown li.divider {
26
- border: none;
27
- }
28
-
29
- ul.dropdown ul {
30
- width: 100%;
31
- margin-top: -1px;
32
- padding: 3px 0;
33
- }
34
-
35
- * html ul.dropdown ul {
36
- margin-top: 0;
37
- width: 760px;
38
- }
39
-
40
- ul.dropdown ul li {
41
- background: url(images/pattern2.png) 100% 0 repeat-y;
42
- }
43
-
44
- ul.dropdown ul li.last {
45
- background: none;
46
- }
47
-
48
- ul.dropdown ul a {
49
- padding: 4px 6px !important;
50
- }
51
-
52
-
53
-
54
- ul.dropdown ul *.dir,
55
- ul.dropdown ul a.dir:hover {
56
- padding-right: 0;
57
- background: none !important;
58
- }
59
-
60
- ul.dropdown ul span.dir {
61
- display: none; /* to-do: consider moving to abstract */
62
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
themes/flickr.com/default.ultimate.upward.css DELETED
@@ -1,71 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /**
4
- * Flickr Ultimate Upward CSS Drop-Down Menu Theme
5
- *
6
- * @file default.ultimate.upward.css
7
- * @name Flickr
8
- * @version beta
9
- * @type transitional
10
- * @browsers Windows: IE5+, Opera7+, Firefox1+
11
- * Mac OS: Safari2+, Firefox2+
12
- *
13
- * @link http://www.lwis.net/
14
- * @copyright 2008 Live Web Institute. All Rights Reserved.
15
- *
16
- */
17
-
18
- @import "default.ultimate.css";
19
-
20
- ul.dropdown {
21
- padding: 1px 0 0;
22
- background-position: 0 0;
23
- }
24
-
25
- ul.dropdown li.divider {
26
- border-top: none;
27
- border-bottom: solid 1px #e5e5e5;
28
- }
29
-
30
- ul.dropdown ul {
31
- border-color: #666 #666 #f0f0f0 #f0f0f0;
32
- }
33
-
34
-
35
-
36
-
37
- /* Mixed */
38
-
39
- ul.dropdown li a,
40
- ul.dropdown *.dir {
41
- border-width: 0 1px 1px;
42
- }
43
-
44
-
45
-
46
- ul.dropdown li.hover *.open {
47
- margin: -1px 0 0;
48
- padding-top: 5px;
49
- padding-bottom: 5px;
50
- border-color: #f0f0f0 #666 #f0f0f0 #f0f0f0;
51
- }
52
-
53
- ul.dropdown ul li.hover *.open {
54
- padding-top: 4px;
55
- border: none;
56
- }
57
-
58
-
59
- /* CSS2 clone */
60
-
61
- ul.dropdown li:hover > *.dir {
62
- margin: -1px 0 0;
63
- padding-top: 5px;
64
- padding-bottom: 5px;
65
- border-color: #f0f0f0 #666 #f0f0f0 #f0f0f0;
66
- }
67
-
68
- ul.dropdown ul li:hover > *.dir {
69
- padding-top: 4px;
70
- border: none;
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
themes/flickr.com/images/favicon.ico DELETED
Binary file
themes/flickr.com/images/icon.png DELETED
Binary file
themes/mtv.com/default.advanced.css DELETED
@@ -1,120 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- /**
4
- * MTV.com Advanced CSS Drop-Down Menu Theme
5
- *
6
- * @file default.advanced.css
7
- * @name MTV.com
8
- * @version 0.1
9
- * @type transitional
10
- * @browsers Windows: IE6+, Opera7+, Firefox1+
11
- * Mac OS: Safari2+, Firefox2+
12
- *
13
- * @link http://www.lwis.net/
14
- * @copyright 2008 Live Web Institute. All Rights Reserved.
15
- *
16
- */
17
-
18
- @import "default.css";
19
-
20
-
21
-
22
-
23
- ul.dropdown li a {
24
- display: block;
25
- padding: 5px 30px;
26
- }
27
-
28
-
29
- /* ------------- Override default */
30
-
31
- ul.dropdown li {
32
- padding: 0;
33
- }
34
-
35
- ul.dropdown ul a { /* POI, proposal: override abstract a */
36
- padding: 8px;
37
- }
38
-
39
-
40
- /* ------------- Reinitiate default: post-override activities */
41
-
42
- ul.dropdown *.dir { /* POI */
43
- padding: 5px 30px;
44
- }
45
-
46
- ul.dropdown ul *.dir {
47
- padding: 8px 30px 8px 8px;
48
- }
49
-
50
-
51
- /* ------------- Custom */
52
-
53
- ul.dropdown li {
54
-
55
- }
56
-
57
- /* Especially for IE6 or lower */
58
-
59
- ul.dropdown ul a {
60
- /*width: 139px;*/
61
- }
62
-
63
- ul.dropdown ul *.dir {
64
- /*width: 129px;*/
65
- }
66
-
67
-
68
- ul.dropdown ul li.dir ul { /* POI, proposal */
69
- margin-top: -1px ;
70
- margin-left: 1px;
71
- }
72
-
73
-
74
-
75
- /* Roll-overs: li level */
76
-
77
- /* First-level abstract */
78
- ul.dropdown li.hover,
79
- ul.dropdown li:hover {
80
- border-top-color: #5b5b5b;
81
- background-color: #3d3d3d;
82
- }
83
-
84
- /* Non-first-level abstract */
85
- ul.dropdown ul li.hover,
86
- ul.dropdown ul li:hover {
87
- background: #4c4c4c url(images/comnav-arrowover.png) 100% 50% no-repeat;
88
- }
89
-
90
- ul.dropdown ul ul li.hover,
91
- ul.dropdown ul ul li:hover {
92
- background: #595959 url(images/comnav-arrowover2.png) 100% 50% no-repeat;
93
- }
94
-
95
-
96
-
97
-
98
- /* Proposals for Open */
99
-
100
- ul.dropdown ul a.open,
101
- ul.dropdown ul li:hover > a.dir {
102
- border-top-color: #5b5b5b;
103
- background-image: url(images/comnav-arrowover.png);
104
- }
105
-
106
- ul.dropdown ul ul a.open,
107
- ul.dropdown ul ul li:hover > a.dir { /* ? merge with ul.dropdown ul a.dir:hover */
108
- border-top-color: #595959;
109
- background: #595959 url(images/comnav-arrowover2.png) 100% 50% no-repeat;
110
- color: #fff;
111
- }
112
-
113
- /* Override UPPER TWO definitions */
114
- ul.dropdown ul a.open:hover,
115
- ul.dropdown ul li:hover > a.dir:hover { /* ? merge with ul.dropdown ul a.dir:hover */
116
- background: #4698ca url(images/comnav-arrowon.png) 100% 50% no-repeat;
117
- color: #fff;
118
- }
119
-
120
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
themes/mtv.com/images/favicon.ico DELETED
Binary file
themes/mtv.com/images/icon.png DELETED
Binary file
themes/nvidia.com/images/favicon.ico DELETED
Binary file
themes/nvidia.com/images/icon.png DELETED
Binary file