Version Description
Download this release
Release Info
Developer | mattsay |
Plugin | Dropdown Menu Widget |
Version | 1.2.5 |
Comparing to | |
See all releases |
Code changes from version 1.2.4 to 1.2.5
- dropdown-menu-widget.pot +163 -0
- readme.txt +1 -1
- shailan.DropDownMenu.php +47 -34
- themes/images/tabright2.gif +0 -0
dropdown-menu-widget.pot
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin by .
|
2 |
+
# Copyright (C) 2009
|
3 |
+
# This file is distributed under the same license as the package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
|
5 |
+
#
|
6 |
+
#, fuzzy
|
7 |
+
msgid ""
|
8 |
+
msgstr ""
|
9 |
+
"Project-Id-Version: \n"
|
10 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/dropdown-menu-widget\n"
|
11 |
+
"POT-Creation-Date: 2009-12-31 09:25+0000\n"
|
12 |
+
"PO-Revision-Date: 2009-MO-DA HO:MI+ZONE\n"
|
13 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
+
"MIME-Version: 1.0\n"
|
16 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
17 |
+
"Content-Transfer-Encoding: 8bit\n"
|
18 |
+
|
19 |
+
#: shailan-category-walker.php:95
|
20 |
+
#, php-format
|
21 |
+
msgid "Feed for all posts filed under %s"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: shailan.DropDownMenu.php:22
|
25 |
+
msgid "Dropdown page/category menu"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: shailan.DropDownMenu.php:23 shailan.DropDownMenu.php:33
|
29 |
+
msgid "Dropdown Menu"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: shailan.DropDownMenu.php:33
|
33 |
+
msgid "Settings for Dropdown Menu"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: shailan.DropDownMenu.php:82
|
37 |
+
msgid "Options saved."
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: shailan.DropDownMenu.php:116
|
41 |
+
msgid ""
|
42 |
+
"Dropdown menu creates a beautiful CSS only dropdown menu from your wordpress "
|
43 |
+
"pages or categories. You can customize dropdown menu theme and settings here:"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: shailan.DropDownMenu.php:124
|
47 |
+
msgid "Dropdown menu theme"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: shailan.DropDownMenu.php:132
|
51 |
+
msgid "You can choose a theme for your dropdown menu here."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: shailan.DropDownMenu.php:137
|
55 |
+
msgid "Template tag options"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: shailan.DropDownMenu.php:138
|
59 |
+
msgid ""
|
60 |
+
"You can use following template tag in your themes to display the dropdown "
|
61 |
+
"menu."
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: shailan.DropDownMenu.php:140
|
65 |
+
msgid "Here you can set template tag options:"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: shailan.DropDownMenu.php:143 shailan.DropDownMenu.php:269
|
69 |
+
msgid "Title (won't be shown):"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: shailan.DropDownMenu.php:145 shailan.DropDownMenu.php:271
|
73 |
+
msgid "Type:"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: shailan.DropDownMenu.php:145 shailan.DropDownMenu.php:271
|
77 |
+
msgid "Pages"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: shailan.DropDownMenu.php:145 shailan.DropDownMenu.php:271
|
81 |
+
msgid "Categories"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: shailan.DropDownMenu.php:147 shailan.DropDownMenu.php:273
|
85 |
+
msgid "Exclude:"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: shailan.DropDownMenu.php:148
|
89 |
+
msgid "Page IDs, separated by commas."
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: shailan.DropDownMenu.php:152 shailan.DropDownMenu.php:278
|
93 |
+
msgid "Add login/logout"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: shailan.DropDownMenu.php:154 shailan.DropDownMenu.php:280
|
97 |
+
msgid "Add Register/Site Admin"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: shailan.DropDownMenu.php:156 shailan.DropDownMenu.php:282
|
101 |
+
msgid "Vertical menu"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: shailan.DropDownMenu.php:159 shailan.DropDownMenu.php:287
|
105 |
+
msgid "Inline Style:"
|
106 |
+
msgstr ""
|
107 |
+
|
108 |
+
#: shailan.DropDownMenu.php:160
|
109 |
+
msgid "Applied to menu container <div>"
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
#: shailan.DropDownMenu.php:162
|
113 |
+
msgid ""
|
114 |
+
"NOTE: Widgets have their own options. Those options won't affect widgets."
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: shailan.DropDownMenu.php:166
|
118 |
+
msgid ""
|
119 |
+
"NOTE : Onscreen theme edit will be available soon. Be sure to check <a href="
|
120 |
+
"\"http://shailan.com\">shailan.com</a> regularly for updates."
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: shailan.DropDownMenu.php:169
|
124 |
+
msgid "Save Changes"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: shailan.DropDownMenu.php:171
|
128 |
+
msgid ""
|
129 |
+
"Visit <a href=\"http://shailan.com\">shailan.com</a> for more wordpress "
|
130 |
+
"themes, plugins and widgets."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: shailan.DropDownMenu.php:222
|
134 |
+
msgid "Home"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: shailan.DropDownMenu.php:285
|
138 |
+
msgid "Align:"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: shailan.DropDownMenu.php:285
|
142 |
+
msgid "Left"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: shailan.DropDownMenu.php:285
|
146 |
+
msgid "Center"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: shailan.DropDownMenu.php:285
|
150 |
+
msgid "Right"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: shailan.DropDownMenu.php:288
|
154 |
+
msgid "Applied to menu container <div>."
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: shailan.DropDownMenu.php:291
|
158 |
+
msgid "Menu Style"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: shailan.DropDownMenu.php:291
|
162 |
+
msgid "Visit plugin site"
|
163 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://shailan.com/donate
|
|
4 |
Tags: css, dropdown, menu, widget, pages, categories
|
5 |
Requires at least: 2.5
|
6 |
Tested up to: 2.9
|
7 |
-
Stable tag: 1.2.
|
8 |
|
9 |
This widget adds a beatiful vertical/horizontal CSS only dropdown menu of pages OR categories of your blog.
|
10 |
|
4 |
Tags: css, dropdown, menu, widget, pages, categories
|
5 |
Requires at least: 2.5
|
6 |
Tested up to: 2.9
|
7 |
+
Stable tag: 1.2.5
|
8 |
|
9 |
This widget adds a beatiful vertical/horizontal CSS only dropdown menu of pages OR categories of your blog.
|
10 |
|
shailan.DropDownMenu.php
CHANGED
@@ -3,12 +3,13 @@
|
|
3 |
Plugin Name: Shailan Dropdown Menu Widget
|
4 |
Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
|
5 |
Description: A multi widget to generate drop-down menus from your pages and categories. This widget is best used in <a href="http://shailan.com">Shailan.com</a> themes. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
|
6 |
-
Version: 1.2.
|
7 |
Author: Matt Say
|
8 |
Author URI: http://shailan.com
|
|
|
9 |
*/
|
10 |
|
11 |
-
define('SHAILAN_DM_VERSION','1.2.
|
12 |
define('SHAILAN_DM_TITLE', 'Dropdown Menu');
|
13 |
define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
|
14 |
|
@@ -18,8 +19,13 @@ define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
|
|
18 |
class shailan_DropdownWidget extends WP_Widget {
|
19 |
/** constructor */
|
20 |
function shailan_DropdownWidget() {
|
21 |
-
|
|
|
|
|
|
|
|
|
22 |
$this->WP_Widget('dropdown-menu', __('Dropdown Menu'), $widget_ops);
|
|
|
23 |
$this->alt_option_name = 'widget_dropdown_menu';
|
24 |
|
25 |
// if ( is_active_widget(false, false, $this->id_base) ) disabled for the_widget support.
|
@@ -29,7 +35,7 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
29 |
// Add settings page
|
30 |
function adminMenu(){
|
31 |
if (function_exists('add_options_page')) {
|
32 |
-
add_options_page('Settings for Dropdown Menu
|
33 |
}
|
34 |
}
|
35 |
|
@@ -78,7 +84,7 @@ class shailan_DropdownWidget extends WP_Widget {
|
|
78 |
update_option($width_tag, $width);
|
79 |
|
80 |
?>
|
81 |
-
<div class="updated"><p><strong><?php _e('Options saved.', '
|
82 |
|
83 |
<?php
|
84 |
}
|
@@ -112,7 +118,7 @@ Please support if you like this plugin:
|
|
112 |
</form>
|
113 |
</div>
|
114 |
|
115 |
-
<p
|
116 |
|
117 |
<form id="frmShailanDm" name="frmShailanDm" method="post" action="">
|
118 |
|
@@ -120,7 +126,7 @@ Please support if you like this plugin:
|
|
120 |
|
121 |
<table class="form-table">
|
122 |
<tr valign="top">
|
123 |
-
<th scope="row"><label for="<?php echo $theme_tag; ?>"><?php _e('Dropdown menu theme') ?></label></th>
|
124 |
<td><select name="<?php echo $theme_tag; ?>" id="theme">
|
125 |
|
126 |
<?php foreach($themes as $name=>$path){
|
@@ -128,46 +134,46 @@ Please support if you like this plugin:
|
|
128 |
echo '<option value="'.$path.'" '.$selected.'>'.$name.'</option>';
|
129 |
} ?>
|
130 |
|
131 |
-
</select> <span class="description"><?php _e('You can choose a theme for your dropdown menu here.') ?></span></td>
|
132 |
</tr>
|
133 |
</table>
|
134 |
|
135 |
<fieldset width="400">
|
136 |
-
<h2
|
137 |
-
<p
|
138 |
<blockquote><code><?php if(function_exists('shailan_dropdown_menu')){ shailan_dropdown_menu(); } ?></code></blockquote>
|
139 |
-
Here you can set template tag options:
|
140 |
</p>
|
141 |
<div style="padding:10px; border:1px solid #ddd; width:275px; ">
|
142 |
<!-- <p><label for="<?php echo $title_tag; ?>"><?php _e('Title (won\'t be shown):'); ?> <input class="widefat" id="<?php echo $title_tag; ?>" name="<?php echo $title_tag; ?>" type="text" value="<?php echo $title; ?>" /></label></p> -->
|
143 |
|
144 |
-
<p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $type_tag; ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $type_tag; ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories'); ?></label></p>
|
145 |
|
146 |
-
<p><label for="<?php echo $exclude_tag; ?>"><?php _e('Exclude:'); ?> <input class="widefat" id="<?php echo $exclude_tag; ?>" name="<?php echo $exclude_tag; ?>" type="text" value="<?php echo $exclude; ?>" /></label><br />
|
147 |
-
<small
|
148 |
|
149 |
<p>
|
150 |
<input type="checkbox" class="checkbox" id="<?php echo $login_tag; ?>" name="<?php echo $login_tag; ?>"<?php checked( $login ); ?> />
|
151 |
-
<label for="<?php echo $login_tag; ?>"><?php _e( 'Add login/logout' ); ?></label><br />
|
152 |
<input type="checkbox" class="checkbox" id="<?php echo $admin_tag; ?>" name="<?php echo $admin_tag; ?>"<?php checked( $admin ); ?> />
|
153 |
-
<label for="<?php echo $admin_tag; ?>"><?php _e( 'Add Register/Site Admin' ); ?></label><br />
|
154 |
<input type="checkbox" class="checkbox" id="<?php echo $vertical_tag; ?>" name="<?php echo $vertical_tag; ?>"<?php checked( $vertical ); ?> />
|
155 |
-
<label for="<?php echo $vertical_tag; ?>"><?php _e( 'Vertical menu' ); ?></label>
|
156 |
</p>
|
157 |
|
158 |
-
<p><label for="<?php echo $inline_style_tag; ?>"><?php _e('Inline Style:'); ?> <input class="widefat" id="<?php echo $inline_style_tag; ?>" name="<?php echo $inline_style_tag; ?>" type="text" value="<?php echo $inline_style; ?>" /></label><br />
|
159 |
-
<small
|
160 |
|
161 |
-
<p><small
|
162 |
</div>
|
163 |
</fieldset>
|
164 |
|
165 |
-
<p
|
166 |
</div>
|
167 |
<p class="submit">
|
168 |
-
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
|
169 |
</p>
|
170 |
-
<p
|
171 |
</form>
|
172 |
<p>
|
173 |
<a href="http://shailan.com/wordpress/plugins/dropdown-menu">Dropdown Menu <?php echo SHAILAN_DM_VERSION; ?></a> by <a href="http://shailan.com">shailan</a></a> © 2009
|
@@ -218,7 +224,7 @@ Here you can set template tag options:
|
|
218 |
<tr><td>
|
219 |
<ul class="dropdown <?php echo $orientation; ?>">
|
220 |
<?php if($type == 'Pages'){ ?>
|
221 |
-
<li class="<?php if ( is_front_page() && !is_paged() ): ?>current_page_item<?php else: ?>page_item<?php endif; ?> blogtab"><a href="<?php echo get_option('home'); ?>/"><span><?php _e('Home'); ?></span></a></li>
|
222 |
<?php
|
223 |
$page_walker = new shailan_PageWalker();
|
224 |
wp_list_pages(array(
|
@@ -265,29 +271,29 @@ Here you can set template tag options:
|
|
265 |
$align = $instance['align'];
|
266 |
|
267 |
?>
|
268 |
-
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title (won\'t be shown):'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
|
269 |
|
270 |
-
<p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $this->get_field_name('type'); ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $this->get_field_name('type'); ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories'); ?></label></p>
|
271 |
|
272 |
-
<p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('exclude'); ?>" name="<?php echo $this->get_field_name('exclude'); ?>" type="text" value="<?php echo $exclude; ?>" /></label><br />
|
273 |
<small>Page IDs, separated by commas.</small></p>
|
274 |
|
275 |
<p>
|
276 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( $login ); ?> />
|
277 |
-
<label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Add login/logout' ); ?></label><br />
|
278 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( $admin ); ?> />
|
279 |
-
<label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Add Register/Site Admin' ); ?></label><br />
|
280 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( $vertical ); ?> />
|
281 |
-
<label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu ' ); ?></label>
|
282 |
</p>
|
283 |
|
284 |
-
<p><?php _e('Align:'); ?> <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'); ?></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'); ?></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'); ?></label></p>
|
285 |
|
286 |
-
<p><label for="<?php echo $this->get_field_id('style'); ?>"><?php _e('Inline Style:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('style'); ?>" name="<?php echo $this->get_field_name('style'); ?>" type="text" value="<?php echo $inline_style; ?>" /></label><br />
|
287 |
-
<small
|
288 |
|
289 |
<div class="widget-control-actions alignright">
|
290 |
-
<p><small><a href="options-general.php?page=dropdown-menu"
|
291 |
</div>
|
292 |
|
293 |
<?php
|
@@ -315,11 +321,18 @@ Here you can set template tag options:
|
|
315 |
|
316 |
// register widget
|
317 |
add_action('widgets_init', create_function('', 'return register_widget("shailan_DropdownWidget");'));
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
add_action('admin_menu', array('shailan_DropdownWidget', 'adminMenu'));
|
319 |
|
320 |
include('shailan-page-walker.php'); // Load custom page walker
|
321 |
include('shailan-category-walker.php'); // Load custom category walker
|
322 |
|
|
|
323 |
function shailan_dropdown_menu(){
|
324 |
$type = get_option('shailan_dm_type');
|
325 |
$exclude = get_option('shailan_dm_exclude');
|
3 |
Plugin Name: Shailan Dropdown Menu Widget
|
4 |
Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
|
5 |
Description: A multi widget to generate drop-down menus from your pages and categories. This widget is best used in <a href="http://shailan.com">Shailan.com</a> themes. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
|
6 |
+
Version: 1.2.5
|
7 |
Author: Matt Say
|
8 |
Author URI: http://shailan.com
|
9 |
+
Text Domain: shailan-dropdown-menu
|
10 |
*/
|
11 |
|
12 |
+
define('SHAILAN_DM_VERSION','1.2.5');
|
13 |
define('SHAILAN_DM_TITLE', 'Dropdown Menu');
|
14 |
define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
|
15 |
|
19 |
class shailan_DropdownWidget extends WP_Widget {
|
20 |
/** constructor */
|
21 |
function shailan_DropdownWidget() {
|
22 |
+
<<<<<<< .mine
|
23 |
+
$widget_ops = array('classname' => 'shailan-dropdown-menu', 'description' => __( 'Dropdown page/category menu', 'shailan-dropdown-menu' ) );
|
24 |
+
$this->WP_Widget('dropdown-menu', __('Dropdown Menu', 'shailan-dropdown-menu'), $widget_ops);
|
25 |
+
=======
|
26 |
+
$widget_ops = array('classname' => 'shailan-dropdown-menu', 'description' => __( 'Dropdown page/category menu', 'shailan-dropdown-menu' ) );
|
27 |
$this->WP_Widget('dropdown-menu', __('Dropdown Menu'), $widget_ops);
|
28 |
+
>>>>>>> .r188379
|
29 |
$this->alt_option_name = 'widget_dropdown_menu';
|
30 |
|
31 |
// if ( is_active_widget(false, false, $this->id_base) ) disabled for the_widget support.
|
35 |
// Add settings page
|
36 |
function adminMenu(){
|
37 |
if (function_exists('add_options_page')) {
|
38 |
+
add_options_page(__('Settings for Dropdown Menu', 'shailan-dropdown-menu') , __('Dropdown Menu', 'shailan-dropdown-menu'), 9, 'dropdown-menu', array('shailan_DropdownWidget', 'getOptionsPage'));
|
39 |
}
|
40 |
}
|
41 |
|
84 |
update_option($width_tag, $width);
|
85 |
|
86 |
?>
|
87 |
+
<div class="updated"><p><strong><?php _e('Options saved.', 'shailan-dropdown-menu'); ?></strong></p></div>
|
88 |
|
89 |
<?php
|
90 |
}
|
118 |
</form>
|
119 |
</div>
|
120 |
|
121 |
+
<p><?php _e('Dropdown menu creates a beautiful CSS only dropdown menu from your wordpress pages or categories. You can customize dropdown menu theme and settings here:', 'shailan-dropdown-menu'); ?></p>
|
122 |
|
123 |
<form id="frmShailanDm" name="frmShailanDm" method="post" action="">
|
124 |
|
126 |
|
127 |
<table class="form-table">
|
128 |
<tr valign="top">
|
129 |
+
<th scope="row"><label for="<?php echo $theme_tag; ?>"><?php _e('Dropdown menu theme', 'shailan-dropdown-menu') ?></label></th>
|
130 |
<td><select name="<?php echo $theme_tag; ?>" id="theme">
|
131 |
|
132 |
<?php foreach($themes as $name=>$path){
|
134 |
echo '<option value="'.$path.'" '.$selected.'>'.$name.'</option>';
|
135 |
} ?>
|
136 |
|
137 |
+
</select> <span class="description"><?php _e('You can choose a theme for your dropdown menu here.', 'shailan-dropdown-menu'); ?></span></td>
|
138 |
</tr>
|
139 |
</table>
|
140 |
|
141 |
<fieldset width="400">
|
142 |
+
<h2><?php _e('Template tag options', 'shailan-dropdown-menu'); ?></h2>
|
143 |
+
<p><?php _e('You can use following template tag in your themes to display the dropdown menu.', 'shailan-dropdown-menu'); ?><br />
|
144 |
<blockquote><code><?php if(function_exists('shailan_dropdown_menu')){ shailan_dropdown_menu(); } ?></code></blockquote>
|
145 |
+
<?php _e('Here you can set template tag options:', 'shailan-dropdown-menu'); ?>
|
146 |
</p>
|
147 |
<div style="padding:10px; border:1px solid #ddd; width:275px; ">
|
148 |
<!-- <p><label for="<?php echo $title_tag; ?>"><?php _e('Title (won\'t be shown):'); ?> <input class="widefat" id="<?php echo $title_tag; ?>" name="<?php echo $title_tag; ?>" type="text" value="<?php echo $title; ?>" /></label></p> -->
|
149 |
|
150 |
+
<p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $type_tag; ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages', 'shailan-dropdown-menu'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $type_tag; ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories', 'shailan-dropdown-menu'); ?></label></p>
|
151 |
|
152 |
+
<p><label for="<?php echo $exclude_tag; ?>"><?php _e('Exclude:', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $exclude_tag; ?>" name="<?php echo $exclude_tag; ?>" type="text" value="<?php echo $exclude; ?>" /></label><br />
|
153 |
+
<small><?php _e('Page IDs, separated by commas.', 'shailan-dropdown-menu'); ?></small></p>
|
154 |
|
155 |
<p>
|
156 |
<input type="checkbox" class="checkbox" id="<?php echo $login_tag; ?>" name="<?php echo $login_tag; ?>"<?php checked( $login ); ?> />
|
157 |
+
<label for="<?php echo $login_tag; ?>"><?php _e( 'Add login/logout', 'shailan-dropdown-menu' ); ?></label><br />
|
158 |
<input type="checkbox" class="checkbox" id="<?php echo $admin_tag; ?>" name="<?php echo $admin_tag; ?>"<?php checked( $admin ); ?> />
|
159 |
+
<label for="<?php echo $admin_tag; ?>"><?php _e( 'Add Register/Site Admin', 'shailan-dropdown-menu' ); ?></label><br />
|
160 |
<input type="checkbox" class="checkbox" id="<?php echo $vertical_tag; ?>" name="<?php echo $vertical_tag; ?>"<?php checked( $vertical ); ?> />
|
161 |
+
<label for="<?php echo $vertical_tag; ?>"><?php _e( 'Vertical menu', 'shailan-dropdown-menu' ); ?></label>
|
162 |
</p>
|
163 |
|
164 |
+
<p><label for="<?php echo $inline_style_tag; ?>"><?php _e('Inline Style:', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $inline_style_tag; ?>" name="<?php echo $inline_style_tag; ?>" type="text" value="<?php echo $inline_style; ?>" /></label><br />
|
165 |
+
<small><?php _e('Applied to menu container <div>', 'shailan-dropdown-menu'); ?></small></p>
|
166 |
|
167 |
+
<p><small><?php _e('NOTE: Widgets have their own options. Those options won\'t affect widgets.', 'shailan-dropdown-menu'); ?></small></p>
|
168 |
</div>
|
169 |
</fieldset>
|
170 |
|
171 |
+
<p><?php _e('NOTE : Onscreen theme edit will be available soon. Be sure to check <a href="http://shailan.com">shailan.com</a> regularly for updates.', 'shailan-dropdown-menu'); ?></p>
|
172 |
</div>
|
173 |
<p class="submit">
|
174 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes', 'shailan-dropdown-menu'); ?>" />
|
175 |
</p>
|
176 |
+
<p><?php _e('Visit <a href="http://shailan.com">shailan.com</a> for more wordpress themes, plugins and widgets.', 'shailan-dropdown-menu'); ?></p>
|
177 |
</form>
|
178 |
<p>
|
179 |
<a href="http://shailan.com/wordpress/plugins/dropdown-menu">Dropdown Menu <?php echo SHAILAN_DM_VERSION; ?></a> by <a href="http://shailan.com">shailan</a></a> © 2009
|
224 |
<tr><td>
|
225 |
<ul class="dropdown <?php echo $orientation; ?>">
|
226 |
<?php if($type == 'Pages'){ ?>
|
227 |
+
<li class="<?php if ( is_front_page() && !is_paged() ): ?>current_page_item<?php else: ?>page_item<?php endif; ?> blogtab"><a href="<?php echo get_option('home'); ?>/"><span><?php _e('Home', 'shailan-dropdown-menu'); ?></span></a></li>
|
228 |
<?php
|
229 |
$page_walker = new shailan_PageWalker();
|
230 |
wp_list_pages(array(
|
271 |
$align = $instance['align'];
|
272 |
|
273 |
?>
|
274 |
+
<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>
|
275 |
|
276 |
+
<p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $this->get_field_name('type'); ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages', 'shailan-dropdown-menu'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $this->get_field_name('type'); ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories', 'shailan-dropdown-menu'); ?></label></p>
|
277 |
|
278 |
+
<p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:', 'shailan-dropdown-menu'); ?> <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 />
|
279 |
<small>Page IDs, separated by commas.</small></p>
|
280 |
|
281 |
<p>
|
282 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('login'); ?>" name="<?php echo $this->get_field_name('login'); ?>"<?php checked( $login ); ?> />
|
283 |
+
<label for="<?php echo $this->get_field_id('login'); ?>"><?php _e( 'Add login/logout' , 'shailan-dropdown-menu' ); ?></label><br />
|
284 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('admin'); ?>" name="<?php echo $this->get_field_name('admin'); ?>"<?php checked( $admin ); ?> />
|
285 |
+
<label for="<?php echo $this->get_field_id('admin'); ?>"><?php _e( 'Add Register/Site Admin' , 'shailan-dropdown-menu' ); ?></label><br />
|
286 |
<input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('vertical'); ?>" name="<?php echo $this->get_field_name('vertical'); ?>"<?php checked( $vertical ); ?> />
|
287 |
+
<label for="<?php echo $this->get_field_id('vertical'); ?>"><?php _e( 'Vertical menu' , 'shailan-dropdown-menu' ); ?></label>
|
288 |
</p>
|
289 |
|
290 |
+
<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>
|
291 |
|
292 |
+
<p><label for="<?php echo $this->get_field_id('style'); ?>"><?php _e('Inline Style:', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('style'); ?>" name="<?php echo $this->get_field_name('style'); ?>" type="text" value="<?php echo $inline_style; ?>" /></label><br />
|
293 |
+
<small><?php _e('Applied to menu container <div>.', 'shailan-dropdown-menu'); ?></small></p>
|
294 |
|
295 |
<div class="widget-control-actions alignright">
|
296 |
+
<p><small><a href="options-general.php?page=dropdown-menu"><?php esc_attr_e('Menu Style', 'shailan-dropdown-menu'); ?></a> | <a href="http://shailan.com/wordpress/plugins/dropdown-menu"><?php esc_attr_e('Visit plugin site', 'shailan-dropdown-menu'); ?></a></small></p>
|
297 |
</div>
|
298 |
|
299 |
<?php
|
321 |
|
322 |
// register widget
|
323 |
add_action('widgets_init', create_function('', 'return register_widget("shailan_DropdownWidget");'));
|
324 |
+
|
325 |
+
// load translations
|
326 |
+
$plugin_dir = basename(dirname(__FILE__));
|
327 |
+
load_plugin_textdomain( 'shailan-dropdown-menu', 'wp-content/plugins/' . $plugin_dir, $plugin_dir );
|
328 |
+
|
329 |
+
// add admin menu
|
330 |
add_action('admin_menu', array('shailan_DropdownWidget', 'adminMenu'));
|
331 |
|
332 |
include('shailan-page-walker.php'); // Load custom page walker
|
333 |
include('shailan-category-walker.php'); // Load custom category walker
|
334 |
|
335 |
+
// template tag support
|
336 |
function shailan_dropdown_menu(){
|
337 |
$type = get_option('shailan_dm_type');
|
338 |
$exclude = get_option('shailan_dm_exclude');
|
themes/images/tabright2.gif
ADDED
Binary file
|