Dropdown Menu Widget - Version 1.5.6alpha1

Version Description

  • Fixed sub menu display errors.
  • Added alignment option to template tag support.
Download this release

Release Info

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

Code changes from version 1.5.6alpha to 1.5.6alpha1

Files changed (3) hide show
  1. readme.txt +8 -3
  2. shailan.DropDownMenu.php +56 -53
  3. themes/color-scheme.css +1 -1
readme.txt CHANGED
@@ -4,14 +4,14 @@ Donate link: http://shailan.com/donate
4
  Tags: css, dropdown, menu, widget, pages, categories, multi
5
  Requires at least: 2.8
6
  Tested up to: 3.0.1
7
- Stable tag: 1.5.6alpha
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
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. If you don't like ready-made templates you can create your own theme for the menus using CSS. If you want a custom dropdown theme you can [request ](http://shailan.com/contact) one. Please visit [plugin site](http://shailan.com/wordpress/plugins/dropdown-menu) for more information.
15
 
16
  == Installation ==
17
 
@@ -47,9 +47,14 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
47
 
48
  == Changelog ==
49
 
 
 
 
 
50
  = 1.5.6alpha =
51
  * Fixed options page saving error.
52
- * Added a brand new color selection interface for custom "Color Scheme" (beta). Now you can easily select your own colors & plus overlays!
 
53
 
54
  = 1.5.5 =
55
  * New theme! Hulu style theme.
4
  Tags: css, dropdown, menu, widget, pages, categories, multi
5
  Requires at least: 2.8
6
  Tested up to: 3.0.1
7
+ Stable tag: 1.5.6alpha1
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
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://shailan.com/contact) one. Please visit [plugin site](http://shailan.com/wordpress/plugins/dropdown-menu) for more information.
15
 
16
  == Installation ==
17
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.5.6alpha1 =
51
+ * Fixed sub menu display errors.
52
+ * Added alignment option to template tag support.
53
+
54
  = 1.5.6alpha =
55
  * Fixed options page saving error.
56
+ * Added a brand new color selection interface for custom "Color Scheme" (beta).
57
+ * Now you can easily select your own colors & plus overlays!
58
 
59
  = 1.5.5 =
60
  * New theme! Hulu style theme.
shailan.DropDownMenu.php CHANGED
@@ -4,13 +4,13 @@ Plugin Name: Dropdown Menu Widget
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme
7
- Version: 1.5.6alpha
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
- define('SHAILAN_DM_VERSION','1.5.6alpha');
14
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
15
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
16
 
@@ -64,6 +64,8 @@ class shailan_DropdownWidget extends WP_Widget {
64
  'shadow'=>'shadow',
65
  'soft' =>'soft'
66
  );
 
 
67
 
68
  $types = array('pages'=>'Pages', 'categories'=>'Categories');
69
 
@@ -200,6 +202,13 @@ class shailan_DropdownWidget extends WP_Widget {
200
  "std" => "",
201
  "type" => "text"),
202
 
 
 
 
 
 
 
 
203
  array( "type" => "close" ),
204
 
205
  array(
@@ -508,32 +517,34 @@ class shailan_DropdownWidget extends WP_Widget {
508
  $shailan_dm_color_link = get_option('shailan_dm_color_link');
509
  $shailan_dm_color_hoverlink = get_option('shailan_dm_color_hoverlink');
510
 
511
- echo "\n<!-- Start of Dropdown Menu Widget Styles by shailan (http://shailan.com) -->";
512
- echo "\n\t<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/shailan-dropdown.css\" type=\"text/css\" />";
513
 
514
  if($theme!='NONE' || $theme != 'Custom'){
515
- echo "\n\t<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/themes/".$theme.".css\" type=\"text/css\" />";
516
  }
517
 
518
- echo "\n\t<style type=\"text/css\" media=\"all\">";
 
 
519
 
520
  // Font family and font size
521
- $font_family = stripslashes(get_option('shailan_dm_font')); //'"Segoe UI",Calibri,"Myriad Pro",Myriad,"Trebuchet MS",Helvetica,Arial,sans-serif';
522
 
523
- if(!empty($font_family)){ echo "\n\t\tul.dropdown li a { font-family:$font_family; } "; }
524
 
525
  $font_size = get_option('shailan_dm_fontsize'); //'12px';
526
 
527
- if(!empty($font_size)){ echo "\n\t\tul.dropdown li a { font-size:$font_size; }"; }
528
 
529
  if(!$allow_multiline){
530
- echo "\n\t\tul.dropdown { white-space: nowrap; }\n";
531
  }
532
 
533
  // Overlay support
534
  $overlay = get_option('shailan_dm_overlay');
535
 
536
- echo "/** Overlay: ". $overlay . " */";
537
 
538
  if($overlay!='none' && $theme=='color-scheme' ){
539
  $posvert = 0;
@@ -551,51 +562,41 @@ class shailan_DropdownWidget extends WP_Widget {
551
  $posvert = -300;
552
  break;
553
  }
 
 
554
 
555
  ?>
556
 
557
- .shailan-dropdown-menu .dropdown-horizontal-container,
558
- ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover,
559
- ul.dropdown li.hover a, ul.dropdown li:hover a{ background-position:0px <?php echo $posvert; ?>px; }
560
-
561
- <?php } elseif($overlay == 'none') { ?>
562
-
563
- .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover { background-image:none; }
564
-
565
- <?php } else {}
566
-
567
- // Custom colors support !! Use with caution !!
568
- ?>
569
-
570
- .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
571
- ul.dropdown a:link,
572
- ul.dropdown a:visited { color: <?php echo $shailan_dm_color_link; ?>; }
573
- ul.dropdown a:hover { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
574
- ul.dropdown a:active { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
575
-
576
- ul.dropdown li.hover a, ul.dropdown li:hover a{ background-color: <?php echo $shailan_dm_color_lihover; ?>;
577
- color: <?php echo $shailan_dm_color_hoverlink; ?>; }
578
- ul.dropdown li.hover ul li, ul.dropdown li:hover ul li{ background-color: <?php echo $shailan_dm_color_menubg; ?>;
579
- color: <?php echo $shailan_dm_color_link; ?>; }
580
-
581
- ul.dropdown li.hover ul li.hover, ul.dropdown li:hover ul li:hover { background-image: none; }
582
- ul.dropdown li.hover ul li.hover a, ul.dropdown li:hover ul li:hover a { background-color: <?php echo $shailan_dm_color_lihover; ?>; }
583
-
584
- ul.dropdown ul{ background-image:none; background-color:<?php echo $shailan_dm_color_menubg; ?>; border:1px solid <?php echo $shailan_dm_color_menubg; ?>; }
585
- ul.dropdown-vertical li { border-bottom:1px solid <?php echo $shailan_dm_color_lihover; ?>; }
586
-
587
- <?php
588
 
589
  // Custom css support
590
  /* if($theme == 'custom'){ */
591
- $custom_css = stripslashes(get_option('shailan_dm_custom_css'));
592
-
593
- if(!empty($custom_css)){ echo $custom_css; }
594
- /*}*/
595
-
596
-
597
- echo "\n\t</style>";
598
-
599
  /*
600
  echo "\n\t<!--[if lte IE 7]>";
601
  echo "\n\t<style type=\"text/css\" media=\"screen\">";
@@ -604,7 +605,7 @@ class shailan_DropdownWidget extends WP_Widget {
604
  echo "\n\t<![endif]-->";
605
  */
606
 
607
- echo "\n<!-- End of Wordpress Dropdown Menu Styles -->";
608
  echo "\n ";
609
 
610
  } else {
@@ -640,6 +641,7 @@ function shailan_dropdown_menu(){
640
  $admin = (bool) get_option('shailan_dm_admin');
641
  $vertical = (bool) get_option('shailan_dm_vertical');
642
  $home = (bool) get_option('shailan_dm_home');
 
643
 
644
  $args = array(
645
  'type' => $type,
@@ -648,8 +650,9 @@ function shailan_dropdown_menu(){
648
  'login' => $login,
649
  'admin' => $admin,
650
  'vertical' => $vertical,
651
- 'home' => $home
652
- );
 
653
 
654
  the_widget('shailan_DropdownWidget', $args);
655
  }
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme
7
+ Version: 1.5.6alpha1
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
+ define('SHAILAN_DM_VERSION','1.5.6alpha1');
14
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
15
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
16
 
64
  'shadow'=>'shadow',
65
  'soft' =>'soft'
66
  );
67
+
68
+ $alignment = array('left'=>'left', 'center' => 'center', 'right'=> 'right');
69
 
70
  $types = array('pages'=>'Pages', 'categories'=>'Categories');
71
 
202
  "std" => "",
203
  "type" => "text"),
204
 
205
+ array( "name" => "Alignment",
206
+ "desc" => "Menu alignment.",
207
+ "id" => "shailan_dm_align",
208
+ "std" => "left",
209
+ "options" => $alignment,
210
+ "type" => "select"),
211
+
212
  array( "type" => "close" ),
213
 
214
  array(
517
  $shailan_dm_color_link = get_option('shailan_dm_color_link');
518
  $shailan_dm_color_hoverlink = get_option('shailan_dm_color_hoverlink');
519
 
520
+ echo "\n\n<!-- Dropdown Menu Widget Styles by shailan (http://shailan.com) v".SHAILAN_DM_VERSION." on wp".get_bloginfo( 'version' )." -->";
521
+ echo "\n<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/shailan-dropdown.css\" type=\"text/css\" />";
522
 
523
  if($theme!='NONE' || $theme != 'Custom'){
524
+ echo "\n<link rel=\"stylesheet\" href=\"".WP_PLUGIN_URL."/".SHAILAN_DM_FOLDER."/themes/".$theme.".css\" type=\"text/css\" />";
525
  }
526
 
527
+ echo "\n<style type=\"text/css\" media=\"all\">";
528
+
529
+ $indent = "\n\t";
530
 
531
  // Font family and font size
532
+ $font_family = stripslashes(get_option('shailan_dm_font'));
533
 
534
+ if(!empty($font_family)){ echo $indent. "ul.dropdown li a { font-family:$font_family; } "; }
535
 
536
  $font_size = get_option('shailan_dm_fontsize'); //'12px';
537
 
538
+ if(!empty($font_size)){ echo $indent. "ul.dropdown li a { font-size:$font_size; }"; }
539
 
540
  if(!$allow_multiline){
541
+ echo $indent. "ul.dropdown { white-space: nowrap; }";
542
  }
543
 
544
  // Overlay support
545
  $overlay = get_option('shailan_dm_overlay');
546
 
547
+ echo $indent . "/* Selected overlay: ". $overlay . " */";
548
 
549
  if($overlay!='none' && $theme=='color-scheme' ){
550
  $posvert = 0;
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
+ <?php } elseif($overlay == 'none') { ?>
574
+ .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li, ul.dropdown li.hover, ul.dropdown li:hover { background-image:none; }
575
+ <?php } else {/* unidentified overlay */} ?>
576
+
577
+ .shailan-dropdown-menu .dropdown-horizontal-container, ul.dropdown li{ background-color:<?php echo $shailan_dm_color_menubg; ?>; }
578
+ ul.dropdown a:link,
579
+ ul.dropdown a:visited { color: <?php echo $shailan_dm_color_link; ?>; }
580
+ ul.dropdown a:hover { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
581
+ ul.dropdown a:active { color: <?php echo $shailan_dm_color_hoverlink; ?>; }
582
+
583
+ ul.dropdown li.hover a, ul.dropdown li:hover a{ background-color: <?php echo $shailan_dm_color_lihover; ?>; }
584
+ ul.dropdown li.hover ul li, ul.dropdown li:hover ul li{ background-color: <?php echo $shailan_dm_color_menubg; ?>;
585
+ color: <?php echo $shailan_dm_color_link; ?>; }
586
+
587
+ ul.dropdown li.hover ul li.hover, ul.dropdown li:hover ul li:hover { background-image: none; }
588
+ ul.dropdown li.hover a:hover, ul.dropdown li:hover a:hover { background-color: <?php echo $shailan_dm_color_lihover; ?>; }
589
+
590
+ ul.dropdown ul{ background-image:none; background-color:<?php echo $shailan_dm_color_menubg; ?>; border:1px solid <?php echo $shailan_dm_color_menubg; ?>; }
591
+ ul.dropdown-vertical li { border-bottom:1px solid <?php echo $shailan_dm_color_lihover; ?>; }
592
+ <?php
 
 
 
 
 
 
 
 
593
 
594
  // Custom css support
595
  /* if($theme == 'custom'){ */
596
+ $custom_css = stripslashes(get_option('shailan_dm_custom_css'));
597
+ if(!empty($custom_css)){ echo $custom_css; }
598
+ /*}*/
599
+ echo "\n</style>";
 
 
 
 
600
  /*
601
  echo "\n\t<!--[if lte IE 7]>";
602
  echo "\n\t<style type=\"text/css\" media=\"screen\">";
605
  echo "\n\t<![endif]-->";
606
  */
607
 
608
+ echo "\n<!-- /Dropdown Menu Widget Styles -->";
609
  echo "\n ";
610
 
611
  } else {
641
  $admin = (bool) get_option('shailan_dm_admin');
642
  $vertical = (bool) get_option('shailan_dm_vertical');
643
  $home = (bool) get_option('shailan_dm_home');
644
+ $align = get_option('shailan_dm_align');
645
 
646
  $args = array(
647
  'type' => $type,
650
  'login' => $login,
651
  'admin' => $admin,
652
  'vertical' => $vertical,
653
+ 'home' => $home,
654
+ 'align' => $align
655
+ );
656
 
657
  the_widget('shailan_DropdownWidget', $args);
658
  }
themes/color-scheme.css CHANGED
@@ -27,7 +27,7 @@ ul.dropdown a:active { color: #ed008c; }
27
  ul.dropdown ul { margin-top: 0px; margin-left:-1px; border:none; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.496094); -moz-box-shadow:0 2px 5px rgba(40, 40, 40, 0.8) }
28
  ul.dropdown ul li { text-align: left; border:none; }
29
  ul.dropdown ul { margin:0px; padding:0px; }
30
- ul.dropdown ul li a{ margin:2px; height:auto; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
31
  ul.dropdown li.hover ul li a:hover, ul.dropdown li:hover ul li a:hover{ background-image:none; text-decoration:none; }
32
  ul.dropdown ul li{ background-image: none; }
33
 
27
  ul.dropdown ul { margin-top: 0px; margin-left:-1px; border:none; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.496094); -moz-box-shadow:0 2px 5px rgba(40, 40, 40, 0.8) }
28
  ul.dropdown ul li { text-align: left; border:none; }
29
  ul.dropdown ul { margin:0px; padding:0px; }
30
+ ul.dropdown a{ margin:2px; height:auto; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; text-shadow: 0 1px 1px rgba(70, 70, 70, 0.7); }
31
  ul.dropdown li.hover ul li a:hover, ul.dropdown li:hover ul li a:hover{ background-image:none; text-decoration:none; }
32
  ul.dropdown ul li{ background-image: none; }
33