Completed
Pull Request — master (#304)
by
unknown
01:28
created
wp-bootstrap-navwalker.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			 * menu item. To prevent errors we use the strcasecmp() function to so a
70 70
 			 * comparison that is not case sensitive. The strcasecmp() function returns
71 71
 			 * a 0 if the strings are equal.
72
-                        */
72
+			 */
73 73
 			if ( 0 === strcasecmp( $item->attr_title, 'divider' ) && 1 === $depth ) {
74 74
 				$output .= $indent . '<li role="presentation" class="divider">';
75 75
 			} elseif ( 0 === strcasecmp( $item->title, 'divider' ) && 1 === $depth ) {
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
 				$atts['rel']    = ! empty( $item->xfn )		? $item->xfn	: '';
107 107
 				// If item has_children add atts to a.
108 108
 				if ( $args->has_children ) {
109
-                $atts['href']           = '#';
110
-                $atts['data-toggle']    = 'dropdown';
111
-                $atts['class']          = 'dropdown-toggle';
112
-                $atts['aria-haspopup']  = 'true';
113
-            } else {
109
+				$atts['href']           = '#';
110
+				$atts['data-toggle']    = 'dropdown';
111
+				$atts['class']          = 'dropdown-toggle';
112
+				$atts['aria-haspopup']  = 'true';
113
+			} else {
114 114
 					$atts['href'] = ! empty( $item->url ) ? $item->url : '';
115 115
 				}
116 116
 				$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args );
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,18 +134,22 @@
 block discarded – undo
134 134
 								$pos = strpos( esc_attr( $item->attr_title ), 'glyphicon' );
135 135
 					if ( false !== $pos ) :
136 136
 						$item_output .= '<a' . $attributes . '><span class="glyphicon ' . esc_attr( $item->attr_title ) . '" aria-hidden="true"></span>&nbsp;';
137
-								else :
137
+								else {
138
+									:
138 139
 									$item_output .= '<a' . $attributes . '><i class="fa ' . esc_attr( $item->attr_title ) . '" aria-hidden="true"></i>&nbsp;';
140
+								}
139 141
 											endif;
140
-				else :
142
+				else {
143
+					:
141 144
 					$item_output .= '<a' . $attributes . '>';
145
+				}
142 146
 				endif;
143 147
 				$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
144 148
 				if($args->has_children && $depth == 0){
145 149
 					$caret = ' <span class="caret"></span></a>';
146
-				}elseif ($args->has_children && $depth > 0){
150
+				} elseif ($args->has_children && $depth > 0){
147 151
 					$caret = ' <span class="caret-right"></span></a>';
148
-				}else{
152
+				} else{
149 153
 					$caret = '</a>';
150 154
 				}
151 155
 				$item_output .= $caret;
Please login to merge, or discard this patch.