Dropdown Menu Widget - Version 1.8

Version Description

  • Fixed: HoverIntent hotfix for Wordpress 3.3
Download this release

Release Info

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

Code changes from version 1.7.2 to 1.8

css/shailan-dropdown.css CHANGED
@@ -1,12 +1,15 @@
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
  /* .dropdown-horizontal-container{ width:100%; } */
4
  /* Remove list styling */
5
  ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
6
 
7
  /* Z-index */
8
  ul.dropdown li{ position: relative; }
9
- ul.dropdown li ul { position:absolute; z-index: 497; }
10
  ul.dropdown li.hover, ul.dropdown li:hover{ cursor: default; }
11
 
12
  /* Top level */
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 */
options-page.php CHANGED
@@ -223,10 +223,6 @@ $i++;
223
  <li><a href="http://shailan.com/wordpress/plugins/dropdown-menu/">Commenting on plugin page</a></li>
224
  <li><a href="http://wordpress.org/extend/plugins/dropdown-menu-widget/">Rating it on wordpress plugin page</a></li>
225
  <li><a href="http://shailan.com/wordpress/plugins/dropdown-menu/" title="Permanent link to Dropdown menu widget" >Writing a post about it</a></li>
226
- <!-- <li><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fshailan.com%2Fwordpress%2Fplugins%2Fdropdown-menu&amp;layout=button_count&amp;show_faces=false&amp;width=200&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:21px;" allowTransparency="true"></iframe></li>
227
- <li><script type="text/javascript">
228
- tweetmeme_url = 'http://shailan.com/wordpress/plugins/dropdown-menu/'; tweetmeme_style = 'compact'; tweetmeme_source = 'mattsay';
229
- </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></li> -->
230
  </ul>
231
 
232
  <p>You can also buy me a coffee here: <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
223
  <li><a href="http://shailan.com/wordpress/plugins/dropdown-menu/">Commenting on plugin page</a></li>
224
  <li><a href="http://wordpress.org/extend/plugins/dropdown-menu-widget/">Rating it on wordpress plugin page</a></li>
225
  <li><a href="http://shailan.com/wordpress/plugins/dropdown-menu/" title="Permanent link to Dropdown menu widget" >Writing a post about it</a></li>
 
 
 
 
226
  </ul>
227
 
228
  <p>You can also buy me a coffee here: <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mattsay
3
  Donate link: http://shailan.com/donate
4
  Tags: css, dropdown, menu, widget, pages, categories, multi, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
- Tested up to: 3.1
7
- Stable tag: 1.7.2
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
10
 
@@ -47,6 +47,9 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
47
 
48
  == Changelog ==
49
 
 
 
 
50
  = 1.7.2 =
51
  * Fixed: Widget hotfix.
52
 
3
  Donate link: http://shailan.com/donate
4
  Tags: css, dropdown, menu, widget, pages, categories, multi, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
+ Tested up to: 3.3
7
+ Stable tag: 1.8
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
10
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.8 =
51
+ * Fixed: HoverIntent hotfix for Wordpress 3.3
52
+
53
  = 1.7.2 =
54
  * Fixed: Widget hotfix.
55
 
shailan-dropdown-menu-options.php CHANGED
@@ -42,11 +42,11 @@ $overlays = array(
42
  'soft' =>'soft'
43
  );
44
 
45
- $alignment = array('left'=>'left', 'center' => 'center', 'right'=> 'right');
46
- $types = array('pages'=>'Pages', 'categories'=>'Categories');
47
  $effects = array('fade'=>'Fade In/Out', 'slide'=>'Slide Up/Down');
48
- $speed = array('400'=>'Normal', 'fast'=>'Fast', 'slow'=>'Slow');
49
- $delay = array('100'=>'100', '200'=>'200', '300'=>'300');
50
 
51
  if( function_exists('wp_nav_menu') ){
52
  // Get available menus
@@ -93,6 +93,12 @@ array(
93
  "std" => __("Home"),
94
  "type" => "text"),
95
 
 
 
 
 
 
 
96
  array( "name" => "Wrap long menu items",
97
  "desc" => "If checked long menu items will wrap",
98
  "id" => "shailan_dm_allowmultiline",
@@ -134,7 +140,7 @@ array(
134
  "options" => $speed ),
135
 
136
  array( "name" => "Effect delay",
137
- "desc" => "Select effect delay",
138
  "id" => "shailan_dm_effect_delay",
139
  "type" => "select",
140
  "options" => $delay ),
42
  'soft' =>'soft'
43
  );
44
 
45
+ $alignment = array( 'left'=>'left', 'center' => 'center', 'right'=> 'right' );
46
+ $types = array( 'pages'=>'Pages', 'categories'=>'Categories' );
47
  $effects = array('fade'=>'Fade In/Out', 'slide'=>'Slide Up/Down');
48
+ $speed = array( '400'=>'Normal', 'fast'=>'Fast', 'slow'=>'Slow' );
49
+ $delay = array('100'=>'100', '200'=>'200', '300'=>'300', '400'=>'400', '500'=>'500', '600'=>'600','700'=>'700');
50
 
51
  if( function_exists('wp_nav_menu') ){
52
  // Get available menus
93
  "std" => __("Home"),
94
  "type" => "text"),
95
 
96
+ array( "name" => "Show arrow pointers",
97
+ "desc" => "This option will enable arrow pointers for parent items.",
98
+ "id" => "shailan_dm_arrows",
99
+ "type" => "checkbox",
100
+ "std" => "on" ),
101
+
102
  array( "name" => "Wrap long menu items",
103
  "desc" => "If checked long menu items will wrap",
104
  "id" => "shailan_dm_allowmultiline",
140
  "options" => $speed ),
141
 
142
  array( "name" => "Effect delay",
143
+ "desc" => "Select effect delay (hoverIntent script used for delayed effects.)",
144
  "id" => "shailan_dm_effect_delay",
145
  "type" => "select",
146
  "options" => $delay ),
shailan.DropDownMenu.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Dropdown Menu Widget
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme, jquery, template, multi-color, theme
7
- Version: 1.7.2
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
@@ -37,8 +37,8 @@ class shailan_DropdownWidget extends WP_Widget {
37
  // Hook up scripts
38
  if(!is_admin()){
39
  wp_enqueue_script( 'jquery' );
 
40
  wp_enqueue_script( 'dropdown-ie-support', plugins_url( '/scripts/include.js' , __FILE__ ) , array('jquery') );
41
- wp_enqueue_script( 'hoverIntent', plugins_url( '/scripts/hoverIntent.js' , __FILE__ ) , array('jquery') );
42
  }
43
 
44
  // Include options array
@@ -264,7 +264,7 @@ function options_page(){
264
  Like this plugin?
265
  </div>
266
  <div class="share-button tweet">
267
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://shailan.com/wordpress/plugins/dropdown-menu/" data-text="I am using #dropdown-menu-widget by shailan on my #wordpress blog, Check this out!" data-count="horizontal" data-via="shailancom">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
268
  </div>
269
  <div class="share-button facebook">
270
  <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
@@ -636,6 +636,29 @@ function options_page(){
636
 
637
  <?php }
638
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
639
  // Insert Custom CSS last
640
  $custom_css = stripslashes( $this->get_plugin_setting('shailan_dm_custom_css') );
641
  if(!empty($custom_css)){ echo $custom_css; }
@@ -663,41 +686,26 @@ function options_page(){
663
 
664
  echo "\n\n<!-- Dropdown Menu Widget Effects by shailan (http://shailan.com) v". VERSION ." on wp".get_bloginfo( 'version' )." -->"; // For debug
665
  echo "\n<script type=\"text/javascript\">/* <![CDATA[ */";
666
- echo "\n(function($){ \n";
667
 
668
- // Remove title attributes from links
 
669
  if($remove_title_attributes){
670
  ?>
671
  $('ul.dropdown li a').removeAttr('title');
672
  <?php
673
  }
674
 
675
- ?>
676
- /*
677
-
678
-
679
- jQuery.fn.alignSubs = function ( args ) {
680
- return this.each(function(){
681
- var $this = jQuery(this);
682
- oleft = ( $this.parent().width() - $this.width() ) / 2;
683
- $this.css('left', oleft);
684
- });
685
- };
686
-
687
- jQuery('ul.dropdown li ul:first').alignSubs();
688
-
689
- */
690
-
691
- <?php
692
-
693
- // Remove links from top-level elements
694
  if($remove_top_level_links){
695
  ?>
696
  $('ul.dropdown>li>ul.children').parent().find('a:first').removeAttr('href');
697
  <?php
698
  }
699
 
700
- // Dropdown FX
 
701
  if( 'fade' == $effect ){
702
  ?>
703
 
@@ -728,7 +736,7 @@ function options_page(){
728
 
729
  <?php }
730
 
731
- echo "\n})(jQuery);";
732
  echo "\n/* ]]> */</script>";
733
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
734
  echo "\n\n ";
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme, jquery, template, multi-color, theme
7
+ Version: 1.8
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
37
  // Hook up scripts
38
  if(!is_admin()){
39
  wp_enqueue_script( 'jquery' );
40
+ wp_enqueue_script( 'hoverIntent' );
41
  wp_enqueue_script( 'dropdown-ie-support', plugins_url( '/scripts/include.js' , __FILE__ ) , array('jquery') );
 
42
  }
43
 
44
  // Include options array
264
  Like this plugin?
265
  </div>
266
  <div class="share-button tweet">
267
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://shailan.com/wordpress/plugins/dropdown-menu/" data-text="I am using #dropdownmenu #widget by shailan on my #wordpress blog, Check this out!" data-count="horizontal" data-via="shailancom">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
268
  </div>
269
  <div class="share-button facebook">
270
  <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
636
 
637
  <?php }
638
 
639
+ // Arrow pointers
640
+
641
+ if( 'on' == $this->get_plugin_setting('shailan_dm_arrows') ){
642
+
643
+ ?>
644
+ ul.dropdown li.parent>a{
645
+ padding-right:25px;
646
+ }
647
+ ul.dropdown li.parent>a:after{
648
+ content:""; position:absolute; top: 45%; right:6px;width:0;height:0;
649
+ border-top:4px solid rgba(0,0,0,0.3);border-right:4px solid transparent;border-left:4px solid transparent }
650
+ ul.dropdown li.parent:hover>a:after{
651
+ content:"";position:absolute; top: 45%; right:6px; width:0; height:0;
652
+ border-top:4px solid rgba(0,0,0,0.4);border-right:4px solid transparent;border-left:4px solid transparent }
653
+ ul.dropdown li li.parent>a:after{
654
+ content:"";position:absolute;top: 40%; right:5px;width:0;height:0;
655
+ border-left:4px solid rgba(0,0,0,0.3);border-top:4px solid transparent;border-bottom:4px solid transparent }
656
+ ul.dropdown li li.parent:hover>a:after{
657
+ content:"";position:absolute;top: 40%; right:5px;width:0;height:0;
658
+ border-left:4px solid rgba(0,0,0,0.4);border-top:4px solid transparent;border-bottom:4px solid transparent }
659
+
660
+ <?php }
661
+
662
  // Insert Custom CSS last
663
  $custom_css = stripslashes( $this->get_plugin_setting('shailan_dm_custom_css') );
664
  if(!empty($custom_css)){ echo $custom_css; }
686
 
687
  echo "\n\n<!-- Dropdown Menu Widget Effects by shailan (http://shailan.com) v". VERSION ." on wp".get_bloginfo( 'version' )." -->"; // For debug
688
  echo "\n<script type=\"text/javascript\">/* <![CDATA[ */";
689
+ echo "\njQuery(document).ready(function($) { \n";
690
 
691
+ // Remove title attributes from links
692
+
693
  if($remove_title_attributes){
694
  ?>
695
  $('ul.dropdown li a').removeAttr('title');
696
  <?php
697
  }
698
 
699
+ // Remove links from top-level elements
700
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
  if($remove_top_level_links){
702
  ?>
703
  $('ul.dropdown>li>ul.children').parent().find('a:first').removeAttr('href');
704
  <?php
705
  }
706
 
707
+ // Dropdown FX
708
+
709
  if( 'fade' == $effect ){
710
  ?>
711
 
736
 
737
  <?php }
738
 
739
+ echo "\n});";
740
  echo "\n/* ]]> */</script>";
741
  echo "\n<!-- /Dropdown Menu Widget Styles -->";
742
  echo "\n\n ";
themes/flickr.com/default.css CHANGED
@@ -1,31 +1,5 @@
1
  @charset "UTF-8";
2
 
3
- /**
4
- * Flickr CSS Drop-Down Menu Theme
5
- *
6
- * @file default.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
-
19
-
20
- /*-------------------------------------------------/
21
- * @section Base Drop-Down Styling
22
- * @structure ul (unordered list)
23
- * ul li (list item)
24
- * ul li a (links)
25
- * /*\.class|(li|a):hover/
26
- * @level sep ul
27
- */
28
-
29
  .dropdown-horizontal-container table{
30
  padding-bottom: 1px;
31
  background: url(images/pattern1.png) 0 100% repeat-x;
@@ -52,9 +26,6 @@
52
  ul.dropdown a:hover { color: #0063dc; text-decoration: underline; }
53
  ul.dropdown a:active { color: #ff0084; }
54
 
55
-
56
- /* -- level mark -- */
57
-
58
  ul.dropdown ul {
59
  width: 150px;
60
  padding: 3px 6px;
@@ -70,14 +41,7 @@
70
  }
71
 
72
 
73
-
74
- /*-------------------------------------------------/
75
- * @section Support Class `dir`
76
- * @level sep ul, .class
77
- */
78
-
79
-
80
- ul.dropdown *.dir, ul.dropdown *.parent {
81
  padding-right: 25px;
82
  background-image: url(images/nav-arrow-down.png);
83
  background-position: 95% 50%;
1
  @charset "UTF-8";
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  .dropdown-horizontal-container table{
4
  padding-bottom: 1px;
5
  background: url(images/pattern1.png) 0 100% repeat-x;
26
  ul.dropdown a:hover { color: #0063dc; text-decoration: underline; }
27
  ul.dropdown a:active { color: #ff0084; }
28
 
 
 
 
29
  ul.dropdown ul {
30
  width: 150px;
31
  padding: 3px 6px;
41
  }
42
 
43
 
44
+ ul.dropdown *.dir {
 
 
 
 
 
 
 
45
  padding-right: 25px;
46
  background-image: url(images/nav-arrow-down.png);
47
  background-position: 95% 50%;
themes/nvidia.com/default.css CHANGED
@@ -20,5 +20,4 @@ ul.dropdown ul li.hover, ul.dropdown ul li:hover { background-color: transparent
20
  ul.dropdown ul a,ul.dropdown ul a:link,ul.dropdown ul a:visited { color: #fff; }
21
  ul.dropdown ul a:hover { color: #fff; text-decoration: none; }
22
  ul.dropdown ul a:active { color: #fff; }
23
- ul.dropdown *.dir, ul.dropdown *.parent { padding-right: 12px; background-image: none; background-position: 100% 50%; background-repeat: no-repeat; }
24
  .dropdown-horizontal-container{background-color:#000;}
20
  ul.dropdown ul a,ul.dropdown ul a:link,ul.dropdown ul a:visited { color: #fff; }
21
  ul.dropdown ul a:hover { color: #fff; text-decoration: none; }
22
  ul.dropdown ul a:active { color: #fff; }
 
23
  .dropdown-horizontal-container{background-color:#000;}
themes/simple-blue.css CHANGED
@@ -1,18 +1,14 @@
1
  @charset "UTF-8";
2
 
3
  /** Container */
4
- .shailan-dropdown-menu { background:url(images/blue-gradient/menu_bg.png) no-repeat; height:40px;
5
  font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; margin-right:15px; }
6
  .dropdown-horizontal-container{ background:url(images/blue-gradient/menu_bg.png) top right no-repeat; height:40px; margin-right:-15px; }
7
 
8
  ul.dropdown{ padding:0px 0px 0px 20px;}
9
  ul.dropdown-align-right{ padding: 0px 20px 0px 0px; }
10
-
11
- ul.dropdown li a{ display:block; vertical-align:middle; text-align:center; padding:12px 10px 10px 12px;
12
- text-decoration:none; text-transform:uppercase; color:#fff; }
13
-
14
  ul.dropdown-horizontal li+li a{ background:url(images/blue-gradient/sep.gif) left center no-repeat; }
15
-
16
  ul.dropdown ul { border-bottom:1px solid #ddd; }
17
  ul.dropdown ul ul { top: 1px; left: 99%; }
18
  ul.dropdown-upward ul ul { /* bottom: 1px; */ }
@@ -33,7 +29,7 @@ ul.dropdown a:active { font-weight:bold; }
33
  /** Sub menus */
34
  ul.dropdown ul { margin:0px; list-style:none; padding:0px; background:#002055; border:1px solid #000047; text-align:left; }
35
  ul.dropdown ul li { text-align: left; }
36
- ul.dropdown ul li a{ color:#fff; width:auto; min-width:100px; padding:2px 5px 3px 5px; margin:0px; height:auto; text-align:left; background:transparent; }
37
  ul.dropdown ul li a:hover{ position:relative; background-color:#002f6a; color: #fff; text-decoration:none; }
38
 
39
  /** Current menu item */
1
  @charset "UTF-8";
2
 
3
  /** Container */
4
+ .shailan-dropdown-menu { background: url(images/blue-gradient/menu_bg.png) top left no-repeat; height:40px;
5
  font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:14px; margin-right:15px; }
6
  .dropdown-horizontal-container{ background:url(images/blue-gradient/menu_bg.png) top right no-repeat; height:40px; margin-right:-15px; }
7
 
8
  ul.dropdown{ padding:0px 0px 0px 20px;}
9
  ul.dropdown-align-right{ padding: 0px 20px 0px 0px; }
10
+ ul.dropdown li a{ display:block; color:#fff; vertical-align: middle; text-align: center; padding: 0 10px 0 12px; text-transform: uppercase; line-height: 40px; height: 40px; }
 
 
 
11
  ul.dropdown-horizontal li+li a{ background:url(images/blue-gradient/sep.gif) left center no-repeat; }
 
12
  ul.dropdown ul { border-bottom:1px solid #ddd; }
13
  ul.dropdown ul ul { top: 1px; left: 99%; }
14
  ul.dropdown-upward ul ul { /* bottom: 1px; */ }
29
  /** Sub menus */
30
  ul.dropdown ul { margin:0px; list-style:none; padding:0px; background:#002055; border:1px solid #000047; text-align:left; }
31
  ul.dropdown ul li { text-align: left; }
32
+ ul.dropdown ul li a{ color:#fff; width:auto; min-width:100px; padding:2px 5px 3px 5px; margin:0px; height:auto; text-align:left; background:transparent; line-height: 1.5em; height: auto; }
33
  ul.dropdown ul li a:hover{ position:relative; background-color:#002f6a; color: #fff; text-decoration:none; }
34
 
35
  /** Current menu item */
themes/web20.css CHANGED
@@ -30,6 +30,7 @@
30
  }
31
 
32
  ul.dropdown li { color: #555; text-align:center; }
 
33
  ul.dropdown-vertical>li{ border-top:1px solid #4283b9; }
34
  ul.dropdown-horizontal.dropdown-align-left>li { border-right:1px solid #ccc; }
35
  ul.dropdown-horizontal.dropdown-align-left>li:last-child { border-right:0; }
30
  }
31
 
32
  ul.dropdown li { color: #555; text-align:center; }
33
+ ul.dropdown ul li { text-align: left; }
34
  ul.dropdown-vertical>li{ border-top:1px solid #4283b9; }
35
  ul.dropdown-horizontal.dropdown-align-left>li { border-right:1px solid #ccc; }
36
  ul.dropdown-horizontal.dropdown-align-left>li:last-child { border-right:0; }