Completed
Push — master ( ab4944...534e9c )
by Andrew
02:30
created
app/classy/classy-basis.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,36 +6,36 @@
 block discarded – undo
6 6
 
7 7
 class ClassyBasis {
8 8
 
9
-    /**
10
-     * Imports data params into the class instance
11
-     * 
12
-     * @param  object/array $data
13
-     * @return void
14
-     */
9
+	/**
10
+	 * Imports data params into the class instance
11
+	 * 
12
+	 * @param  object/array $data
13
+	 * @return void
14
+	 */
15 15
 	protected function import($data) {
16 16
 
17
-        if ( is_object( $data ) ) {
17
+		if ( is_object( $data ) ) {
18 18
         
19
-            $data = get_object_vars( $data );
19
+			$data = get_object_vars( $data );
20 20
         
21
-        }
21
+		}
22 22
 
23
-        if ( is_array( $data ) ) {
23
+		if ( is_array( $data ) ) {
24 24
             
25
-            foreach ( $data as $key => $value ) {
25
+			foreach ( $data as $key => $value ) {
26 26
             
27
-                if ( !empty( $key ) ) {
27
+				if ( !empty( $key ) ) {
28 28
             
29
-                    $this->$key = $value;
29
+					$this->$key = $value;
30 30
             
31
-                } else if ( !empty( $key ) && !method_exists($this, $key) ){
31
+				} else if ( !empty( $key ) && !method_exists($this, $key) ){
32 32
             
33
-                    $this->$key = $value;
33
+					$this->$key = $value;
34 34
             
35
-                }
36
-            }
35
+				}
36
+			}
37 37
 
38
-        }
38
+		}
39 39
 
40 40
 	}
41 41
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,21 +14,21 @@
 block discarded – undo
14 14
      */
15 15
 	protected function import($data) {
16 16
 
17
-        if ( is_object( $data ) ) {
17
+        if (is_object($data)) {
18 18
         
19
-            $data = get_object_vars( $data );
19
+            $data = get_object_vars($data);
20 20
         
21 21
         }
22 22
 
23
-        if ( is_array( $data ) ) {
23
+        if (is_array($data)) {
24 24
             
25
-            foreach ( $data as $key => $value ) {
25
+            foreach ($data as $key => $value) {
26 26
             
27
-                if ( !empty( $key ) ) {
27
+                if (!empty($key)) {
28 28
             
29 29
                     $this->$key = $value;
30 30
             
31
-                } else if ( !empty( $key ) && !method_exists($this, $key) ){
31
+                } else if (!empty($key) && !method_exists($this, $key)) {
32 32
             
33 33
                     $this->$key = $value;
34 34
             
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
28 28
             
29 29
                     $this->$key = $value;
30 30
             
31
-                } else if ( !empty( $key ) && !method_exists($this, $key) ){
31
+                }
32
+                else if ( !empty( $key ) && !method_exists($this, $key) ) {
32 33
             
33 34
                     $this->$key = $value;
34 35
             
Please login to merge, or discard this patch.
app/classy/classy-menu.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,8 @@  discard block
 block discarded – undo
29 29
 
30 30
 			$menu_id = $this->check_menu_id($arg);
31 31
 
32
-		} elseif (is_string($arg)) {
32
+		}
33
+		elseif (is_string($arg)) {
33 34
 
34 35
 			$menu_id = $this->get_menu_id_by_name($arg);
35 36
 
@@ -148,11 +149,15 @@  discard block
 block discarded – undo
148 149
 			
149 150
 			$menu_id = get_term_by('slug', $slug, 'nav_menu');
150 151
 
151
-			if ($menu_id) return $menu_id;
152
+			if ($menu_id) {
153
+				return $menu_id;
154
+			}
152 155
 
153 156
 			$menu_id = get_term_by('name', $slug, 'nav_menu');
154 157
 			
155
-			if ($menu_id) return $menu_id;
158
+			if ($menu_id) {
159
+				return $menu_id;
160
+			}
156 161
 
157 162
 		}
158 163
 
Please login to merge, or discard this patch.
app/classy/classy-helper.php 3 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -245,58 +245,58 @@
 block discarded – undo
245 245
 	 */
246 246
 	public static function get_archives_title() {
247 247
 
248
-	    $archives_title = '';
248
+		$archives_title = '';
249 249
 
250
-	    if ( is_category() ) {
250
+		if ( is_category() ) {
251 251
 
252
-	        $archives_title = single_cat_title( '', false );
252
+			$archives_title = single_cat_title( '', false );
253 253
 	    
254
-	    } else if ( is_tag() ) {
254
+		} else if ( is_tag() ) {
255 255
 
256
-	        $archives_title = 'Tag: ' . single_tag_title( '', false );
256
+			$archives_title = 'Tag: ' . single_tag_title( '', false );
257 257
 	    
258
-	    } else if ( is_author() ) {
258
+		} else if ( is_author() ) {
259 259
 
260
-	        if ( have_posts() ) {
260
+			if ( have_posts() ) {
261 261
 	        
262
-	            the_post();
263
-	            $archives_title = 'Author: ' . get_the_author();
262
+				the_post();
263
+				$archives_title = 'Author: ' . get_the_author();
264 264
 	        
265
-	        }
265
+			}
266 266
 	        
267
-	        rewind_posts();
267
+			rewind_posts();
268 268
 
269
-	    } else if ( is_search() ) {
269
+		} else if ( is_search() ) {
270 270
 
271
-	        $archives_title = sprintf( __( 'Search Results for: %s', 'flotheme' ), '<span>' . get_search_query() . '</span>' );
271
+			$archives_title = sprintf( __( 'Search Results for: %s', 'flotheme' ), '<span>' . get_search_query() . '</span>' );
272 272
 	    
273
-	    } else if ( is_archive() ) {
273
+		} else if ( is_archive() ) {
274 274
 	        
275
-	        if ( is_day() ) {
275
+			if ( is_day() ) {
276 276
 	        
277
-	            $archives_title = get_the_date();
277
+				$archives_title = get_the_date();
278 278
 	        
279
-	        } elseif ( is_month() ) {
279
+			} elseif ( is_month() ) {
280 280
 	        
281
-	            $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', 'flotheme'));
281
+				$archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', 'flotheme'));
282 282
 	        
283
-	        } elseif ( is_year() ) {
283
+			} elseif ( is_year() ) {
284 284
 	        
285
-	            $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', 'flotheme'));
285
+				$archives_title = get_the_date( _x( 'Y', 'yearly archives date format', 'flotheme'));
286 286
 	        
287
-	        } else {
287
+			} else {
288 288
 	        
289
-	            $archives_title = 'Archives';
289
+				$archives_title = 'Archives';
290 290
 	        
291
-	        }
291
+			}
292 292
 	    
293
-	    } else {
293
+		} else {
294 294
 	    
295
-	        $archives_title = 'Archives';
295
+			$archives_title = 'Archives';
296 296
 	    
297
-	    }
297
+		}
298 298
 
299
-	    return $archives_title;
299
+		return $archives_title;
300 300
 
301 301
 	}
302 302
 
Please login to merge, or discard this patch.
Spacing   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -15,44 +15,44 @@  discard block
 block discarded – undo
15 15
 	 * @param string  $allowed_tags
16 16
 	 * @return string
17 17
 	 */
18
-	public static function trim_words( $text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote' ) {
19
-		if ( null === $more ) {
20
-			$more = __( '&hellip;' );
18
+	public static function trim_words($text, $num_words = 55, $more = null, $allowed_tags = 'p a span b i br blockquote') {
19
+		if (null === $more) {
20
+			$more = __('&hellip;');
21 21
 		}
22 22
 
23 23
 		$original_text = $text;
24 24
 		$allowed_tag_string = '';
25 25
 
26
-		foreach ( explode( ' ', $allowed_tags  ) as $tag ) {
27
-			$allowed_tag_string .= '<' . $tag . '>';
26
+		foreach (explode(' ', $allowed_tags) as $tag) {
27
+			$allowed_tag_string .= '<'.$tag.'>';
28 28
 		}
29 29
 
30
-		$text = strip_tags( $text, $allowed_tag_string );
30
+		$text = strip_tags($text, $allowed_tag_string);
31 31
 
32 32
 		/* translators: If your word count is based on single characters (East Asian characters),
33 33
 		enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
34 34
 
35
-		if ( 'characters' == _x( 'words', 'word count: words or characters?' ) && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
36
-			$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
37
-			preg_match_all( '/./u', $text, $words_array );
38
-			$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
35
+		if ('characters' == _x('words', 'word count: words or characters?') && preg_match('/^utf\-?8$/i', get_option('blog_charset'))) {
36
+			$text = trim(preg_replace("/[\n\r\t ]+/", ' ', $text), ' ');
37
+			preg_match_all('/./u', $text, $words_array);
38
+			$words_array = array_slice($words_array[0], 0, $num_words + 1);
39 39
 			$sep = '';
40 40
 		} else {
41
-			$words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );
41
+			$words_array = preg_split("/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY);
42 42
 			$sep = ' ';
43 43
 		}
44 44
 
45
-		if ( count( $words_array ) > $num_words ) {
46
-			array_pop( $words_array );
47
-			$text = implode( $sep, $words_array );
48
-			$text = $text . $more;
45
+		if (count($words_array) > $num_words) {
46
+			array_pop($words_array);
47
+			$text = implode($sep, $words_array);
48
+			$text = $text.$more;
49 49
 		} else {
50
-			$text = implode( $sep, $words_array );
50
+			$text = implode($sep, $words_array);
51 51
 		}
52 52
 		
53
-		$text = self::close_tags( $text );
53
+		$text = self::close_tags($text);
54 54
 
55
-		return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text );
55
+		return apply_filters('wp_trim_words', $text, $num_words, $more, $original_text);
56 56
 	}
57 57
 
58 58
 
@@ -62,36 +62,36 @@  discard block
 block discarded – undo
62 62
 	 * @param string  $html
63 63
 	 * @return string
64 64
 	 */
65
-	public static function close_tags( $html ) {
65
+	public static function close_tags($html) {
66 66
 		//put all opened tags into an array
67
-		preg_match_all( '#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result );
67
+		preg_match_all('#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);
68 68
 
69 69
 		$openedtags = $result[1];
70 70
 		
71 71
 		//put all closed tags into an array
72
-		preg_match_all( '#</([a-z]+)>#iU', $html, $result );
72
+		preg_match_all('#</([a-z]+)>#iU', $html, $result);
73 73
 		
74 74
 		$closedtags = $result[1];
75
-		$len_opened = count( $openedtags );
75
+		$len_opened = count($openedtags);
76 76
 		
77 77
 		// all tags are closed
78
-		if ( count( $closedtags ) == $len_opened ) {
78
+		if (count($closedtags) == $len_opened) {
79 79
 			return $html;
80 80
 		}
81 81
 		
82
-		$openedtags = array_reverse( $openedtags );
82
+		$openedtags = array_reverse($openedtags);
83 83
 		
84 84
 		// close tags
85
-		for ( $i = 0; $i < $len_opened; $i++ ) {
86
-			if ( !in_array( $openedtags[$i], $closedtags ) ) {
87
-				$html .= '</' . $openedtags[$i] . '>';
85
+		for ($i = 0; $i < $len_opened; $i++) {
86
+			if (!in_array($openedtags[$i], $closedtags)) {
87
+				$html .= '</'.$openedtags[$i].'>';
88 88
 			} else {
89
-				unset( $closedtags[array_search( $openedtags[$i], $closedtags )] );
89
+				unset($closedtags[array_search($openedtags[$i], $closedtags)]);
90 90
 			}
91 91
 		}
92 92
 
93
-		$html = str_replace(array('</br>','</hr>','</wbr>'), '', $html);
94
-		$html = str_replace(array('<br>','<hr>','<wbr>'), array('<br />','<hr />','<wbr />'), $html);
93
+		$html = str_replace(array('</br>', '</hr>', '</wbr>'), '', $html);
94
+		$html = str_replace(array('<br>', '<hr>', '<wbr>'), array('<br />', '<hr />', '<wbr />'), $html);
95 95
 		
96 96
 		return $html;
97 97
 	}
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
 	 * 
102 102
 	 * @param  mixed $arg
103 103
 	 */
104
-	public static function error_log( $arg ) {
105
-		if ( !WP_DEBUG ) {
104
+	public static function error_log($arg) {
105
+		if (!WP_DEBUG) {
106 106
 			return;
107 107
 		}
108
-		if ( is_object( $arg ) || is_array( $arg ) ) {
109
-			$arg = print_r( $arg, true );
108
+		if (is_object($arg) || is_array($arg)) {
109
+			$arg = print_r($arg, true);
110 110
 		}
111
-		return error_log( $arg );
111
+		return error_log($arg);
112 112
 	}
113 113
 
114 114
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @param string  $args
118 118
 	 * @return array
119 119
 	 */
120
-	public static function paginate_links( $args = '' ) {
120
+	public static function paginate_links($args = '') {
121 121
 		$defaults = array(
122 122
 			'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
123 123
 			'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
@@ -125,43 +125,43 @@  discard block
 block discarded – undo
125 125
 			'current' => 0,
126 126
 			'show_all' => false,
127 127
 			'prev_next' => true,
128
-			'prev_text' => __( '&laquo; Previous' ),
129
-			'next_text' => __( 'Next &raquo;' ),
128
+			'prev_text' => __('&laquo; Previous'),
129
+			'next_text' => __('Next &raquo;'),
130 130
 			'end_size' => 1,
131 131
 			'mid_size' => 2,
132 132
 			'type' => 'array',
133 133
 			'add_args' => false, // array of query args to add
134 134
 			'add_fragment' => ''
135 135
 		);
136
-		$args = wp_parse_args( $args, $defaults );
136
+		$args = wp_parse_args($args, $defaults);
137 137
 		// Who knows what else people pass in $args
138
-		$args['total'] = intval( (int)$args['total'] );
139
-		if ( $args['total'] < 2 ) {
138
+		$args['total'] = intval((int) $args['total']);
139
+		if ($args['total'] < 2) {
140 140
 			return array();
141 141
 		}
142
-		$args['current'] = (int)$args['current'];
143
-		$args['end_size'] = 0 < (int)$args['end_size'] ? (int)$args['end_size'] : 1; // Out of bounds?  Make it the default.
144
-		$args['mid_size'] = 0 <= (int)$args['mid_size'] ? (int)$args['mid_size'] : 2;
145
-		$args['add_args'] = is_array( $args['add_args'] ) ? $args['add_args'] : false;
142
+		$args['current'] = (int) $args['current'];
143
+		$args['end_size'] = 0 < (int) $args['end_size'] ? (int) $args['end_size'] : 1; // Out of bounds?  Make it the default.
144
+		$args['mid_size'] = 0 <= (int) $args['mid_size'] ? (int) $args['mid_size'] : 2;
145
+		$args['add_args'] = is_array($args['add_args']) ? $args['add_args'] : false;
146 146
 		$page_links = array();
147 147
 		$dots = false;
148
-		if ( $args['prev_next'] && $args['current'] && 1 < $args['current'] ) {
149
-			$link = str_replace( '%_%', 2 == $args['current'] ? '' : $args['format'], $args['base'] );
150
-			$link = str_replace( '%#%', $args['current'] - 1, $link );
151
-			if ( $args['add_args'] ) {
152
-				$link = add_query_arg( $args['add_args'], $link );
148
+		if ($args['prev_next'] && $args['current'] && 1 < $args['current']) {
149
+			$link = str_replace('%_%', 2 == $args['current'] ? '' : $args['format'], $args['base']);
150
+			$link = str_replace('%#%', $args['current'] - 1, $link);
151
+			if ($args['add_args']) {
152
+				$link = add_query_arg($args['add_args'], $link);
153 153
 			}
154 154
 			$link .= $args['add_fragment'];
155
-			$link = untrailingslashit( $link );
155
+			$link = untrailingslashit($link);
156 156
 			$page_links[] = array(
157 157
 				'class' => 'prev page-numbers',
158
-				'link' => esc_url( apply_filters( 'paginate_links', $link ) ),
158
+				'link' => esc_url(apply_filters('paginate_links', $link)),
159 159
 				'title' => $args['prev_text']
160 160
 			);
161 161
 		}
162
-		for ( $n = 1; $n <= $args['total']; $n++ ) {
163
-			$n_display = number_format_i18n( $n );
164
-			if ( $n == $args['current'] ) {
162
+		for ($n = 1; $n <= $args['total']; $n++) {
163
+			$n_display = number_format_i18n($n);
164
+			if ($n == $args['current']) {
165 165
 				$page_links[] = array(
166 166
 					'class' => 'page-number page-numbers current',
167 167
 					'title' => $n_display,
@@ -171,42 +171,42 @@  discard block
 block discarded – undo
171 171
 				);
172 172
 				$dots = true;
173 173
 			} else {
174
-				if ( $args['show_all'] || ( $n <= $args['end_size'] || ( $args['current'] && $n >= $args['current'] - $args['mid_size'] && $n <= $args['current'] + $args['mid_size'] ) || $n > $args['total'] - $args['end_size'] ) ) {
175
-					$link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] );
176
-					$link = str_replace( '%#%', $n, $link );
177
-					$link = trailingslashit( $link ) . ltrim( $args['add_fragment'], '/' );
178
-					if ( $args['add_args'] ) {
179
-						$link = rtrim( add_query_arg( $args['add_args'], $link ), '/' );
174
+				if ($args['show_all'] || ($n <= $args['end_size'] || ($args['current'] && $n >= $args['current'] - $args['mid_size'] && $n <= $args['current'] + $args['mid_size']) || $n > $args['total'] - $args['end_size'])) {
175
+					$link = str_replace('%_%', 1 == $n ? '' : $args['format'], $args['base']);
176
+					$link = str_replace('%#%', $n, $link);
177
+					$link = trailingslashit($link).ltrim($args['add_fragment'], '/');
178
+					if ($args['add_args']) {
179
+						$link = rtrim(add_query_arg($args['add_args'], $link), '/');
180 180
 					}
181 181
 					$link = str_replace(' ', '+', $link);
182
-					$link = untrailingslashit( $link );
182
+					$link = untrailingslashit($link);
183 183
 					$page_links[] = array(
184 184
 						'class' => 'page-number page-numbers',
185
-						'link' => esc_url( apply_filters( 'paginate_links', $link ) ),
185
+						'link' => esc_url(apply_filters('paginate_links', $link)),
186 186
 						'title' => $n_display,
187 187
 						'name' => $n_display,
188 188
 						'current' => $args['current'] == $n
189 189
 					);
190 190
 					$dots = true;
191
-				} elseif ( $dots && !$args['show_all'] ) {
191
+				} elseif ($dots && !$args['show_all']) {
192 192
 					$page_links[] = array(
193 193
 						'class' => 'dots',
194
-						'title' => __( '&hellip;' )
194
+						'title' => __('&hellip;')
195 195
 					);
196 196
 					$dots = false;
197 197
 				}
198 198
 			}
199 199
 		}
200
-		if ( $args['prev_next'] && $args['current'] && ( $args['current'] < $args['total'] || -1 == $args['total'] ) ) {
201
-			$link = str_replace( '%_%', $args['format'], $args['base'] );
202
-			$link = str_replace( '%#%', $args['current'] + 1, $link );
203
-			if ( $args['add_args'] ) {
204
-				$link = add_query_arg( $args['add_args'], $link );
200
+		if ($args['prev_next'] && $args['current'] && ($args['current'] < $args['total'] || -1 == $args['total'])) {
201
+			$link = str_replace('%_%', $args['format'], $args['base']);
202
+			$link = str_replace('%#%', $args['current'] + 1, $link);
203
+			if ($args['add_args']) {
204
+				$link = add_query_arg($args['add_args'], $link);
205 205
 			}
206
-			$link = untrailingslashit( trailingslashit( $link ) . $args['add_fragment'] );
206
+			$link = untrailingslashit(trailingslashit($link).$args['add_fragment']);
207 207
 			$page_links[] = array(
208 208
 				'class' => 'next page-numbers',
209
-				'link' => esc_url( apply_filters( 'paginate_links', $link ) ),
209
+				'link' => esc_url(apply_filters('paginate_links', $link)),
210 210
 				'title' => $args['next_text']
211 211
 			);
212 212
 		}
@@ -247,42 +247,42 @@  discard block
 block discarded – undo
247 247
 
248 248
 	    $archives_title = '';
249 249
 
250
-	    if ( is_category() ) {
250
+	    if (is_category()) {
251 251
 
252
-	        $archives_title = single_cat_title( '', false );
252
+	        $archives_title = single_cat_title('', false);
253 253
 	    
254
-	    } else if ( is_tag() ) {
254
+	    } else if (is_tag()) {
255 255
 
256
-	        $archives_title = 'Tag: ' . single_tag_title( '', false );
256
+	        $archives_title = 'Tag: '.single_tag_title('', false);
257 257
 	    
258
-	    } else if ( is_author() ) {
258
+	    } else if (is_author()) {
259 259
 
260
-	        if ( have_posts() ) {
260
+	        if (have_posts()) {
261 261
 	        
262 262
 	            the_post();
263
-	            $archives_title = 'Author: ' . get_the_author();
263
+	            $archives_title = 'Author: '.get_the_author();
264 264
 	        
265 265
 	        }
266 266
 	        
267 267
 	        rewind_posts();
268 268
 
269
-	    } else if ( is_search() ) {
269
+	    } else if (is_search()) {
270 270
 
271
-	        $archives_title = sprintf( __( 'Search Results for: %s', 'flotheme' ), '<span>' . get_search_query() . '</span>' );
271
+	        $archives_title = sprintf(__('Search Results for: %s', 'flotheme'), '<span>'.get_search_query().'</span>');
272 272
 	    
273
-	    } else if ( is_archive() ) {
273
+	    } else if (is_archive()) {
274 274
 	        
275
-	        if ( is_day() ) {
275
+	        if (is_day()) {
276 276
 	        
277 277
 	            $archives_title = get_the_date();
278 278
 	        
279
-	        } elseif ( is_month() ) {
279
+	        } elseif (is_month()) {
280 280
 	        
281
-	            $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', 'flotheme'));
281
+	            $archives_title = get_the_date(_x('F Y', 'monthly archives date format', 'flotheme'));
282 282
 	        
283
-	        } elseif ( is_year() ) {
283
+	        } elseif (is_year()) {
284 284
 	        
285
-	            $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', 'flotheme'));
285
+	            $archives_title = get_the_date(_x('Y', 'yearly archives date format', 'flotheme'));
286 286
 	        
287 287
 	        } else {
288 288
 	        
Please login to merge, or discard this patch.
Braces   +28 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,7 +37,8 @@  discard block
 block discarded – undo
37 37
 			preg_match_all( '/./u', $text, $words_array );
38 38
 			$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
39 39
 			$sep = '';
40
-		} else {
40
+		}
41
+		else {
41 42
 			$words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );
42 43
 			$sep = ' ';
43 44
 		}
@@ -46,7 +47,8 @@  discard block
 block discarded – undo
46 47
 			array_pop( $words_array );
47 48
 			$text = implode( $sep, $words_array );
48 49
 			$text = $text . $more;
49
-		} else {
50
+		}
51
+		else {
50 52
 			$text = implode( $sep, $words_array );
51 53
 		}
52 54
 		
@@ -85,7 +87,8 @@  discard block
 block discarded – undo
85 87
 		for ( $i = 0; $i < $len_opened; $i++ ) {
86 88
 			if ( !in_array( $openedtags[$i], $closedtags ) ) {
87 89
 				$html .= '</' . $openedtags[$i] . '>';
88
-			} else {
90
+			}
91
+			else {
89 92
 				unset( $closedtags[array_search( $openedtags[$i], $closedtags )] );
90 93
 			}
91 94
 		}
@@ -170,7 +173,8 @@  discard block
 block discarded – undo
170 173
 					'current' => true
171 174
 				);
172 175
 				$dots = true;
173
-			} else {
176
+			}
177
+			else {
174 178
 				if ( $args['show_all'] || ( $n <= $args['end_size'] || ( $args['current'] && $n >= $args['current'] - $args['mid_size'] && $n <= $args['current'] + $args['mid_size'] ) || $n > $args['total'] - $args['end_size'] ) ) {
175 179
 					$link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] );
176 180
 					$link = str_replace( '%#%', $n, $link );
@@ -188,7 +192,8 @@  discard block
 block discarded – undo
188 192
 						'current' => $args['current'] == $n
189 193
 					);
190 194
 					$dots = true;
191
-				} elseif ( $dots && !$args['show_all'] ) {
195
+				}
196
+				elseif ( $dots && !$args['show_all'] ) {
192 197
 					$page_links[] = array(
193 198
 						'class' => 'dots',
194 199
 						'title' => __( '&hellip;' )
@@ -227,7 +232,8 @@  discard block
 block discarded – undo
227 232
 			if (strlen($k)) {
228 233
 				if (is_array($v)) {
229 234
 					$obj->{$k} = self::array_to_object($v); //RECURSION
230
-				} else {
235
+				}
236
+				else {
231 237
 					$obj->{$k} = $v;
232 238
 				}
233 239
 			}
@@ -251,11 +257,13 @@  discard block
 block discarded – undo
251 257
 
252 258
 	        $archives_title = single_cat_title( '', false );
253 259
 	    
254
-	    } else if ( is_tag() ) {
260
+	    }
261
+	    else if ( is_tag() ) {
255 262
 
256 263
 	        $archives_title = 'Tag: ' . single_tag_title( '', false );
257 264
 	    
258
-	    } else if ( is_author() ) {
265
+	    }
266
+	    else if ( is_author() ) {
259 267
 
260 268
 	        if ( have_posts() ) {
261 269
 	        
@@ -266,31 +274,37 @@  discard block
 block discarded – undo
266 274
 	        
267 275
 	        rewind_posts();
268 276
 
269
-	    } else if ( is_search() ) {
277
+	    }
278
+	    else if ( is_search() ) {
270 279
 
271 280
 	        $archives_title = sprintf( __( 'Search Results for: %s', 'flotheme' ), '<span>' . get_search_query() . '</span>' );
272 281
 	    
273
-	    } else if ( is_archive() ) {
282
+	    }
283
+	    else if ( is_archive() ) {
274 284
 	        
275 285
 	        if ( is_day() ) {
276 286
 	        
277 287
 	            $archives_title = get_the_date();
278 288
 	        
279
-	        } elseif ( is_month() ) {
289
+	        }
290
+	        elseif ( is_month() ) {
280 291
 	        
281 292
 	            $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', 'flotheme'));
282 293
 	        
283
-	        } elseif ( is_year() ) {
294
+	        }
295
+	        elseif ( is_year() ) {
284 296
 	        
285 297
 	            $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', 'flotheme'));
286 298
 	        
287
-	        } else {
299
+	        }
300
+	        else {
288 301
 	        
289 302
 	            $archives_title = 'Archives';
290 303
 	        
291 304
 	        }
292 305
 	    
293
-	    } else {
306
+	    }
307
+	    else {
294 308
 	    
295 309
 	        $archives_title = 'Archives';
296 310
 	    
Please login to merge, or discard this patch.