@@ -97,7 +97,8 @@ discard block |
||
97 | 97 | if ( is_integer( $post ) ) { |
98 | 98 | $this->ID = $post; |
99 | 99 | $this->init(); |
100 | - } elseif ( is_a( $post, '\WP_Post' ) ) { |
|
100 | + } |
|
101 | + elseif ( is_a( $post, '\WP_Post' ) ) { |
|
101 | 102 | $this->import( $post ); |
102 | 103 | } |
103 | 104 | } |
@@ -375,7 +376,8 @@ discard block |
||
375 | 376 | if ( $force ) { |
376 | 377 | $text = Helper::trim_words( $this->post_excerpt, $len, false ); |
377 | 378 | $trimmed = true; |
378 | - } else { |
|
379 | + } |
|
380 | + else { |
|
379 | 381 | $text = $this->post_excerpt; |
380 | 382 | } |
381 | 383 | } |
@@ -434,7 +436,8 @@ discard block |
||
434 | 436 | |
435 | 437 | if ( $readmore && isset( $readmore_matches ) && ! empty( $readmore_matches[1] ) ) { |
436 | 438 | $text .= ' <a href="' . $this->get_permalink() . '" class="read-more">' . trim( $readmore_matches[1] ) . '</a>'; |
437 | - } elseif ( $readmore ) { |
|
439 | + } |
|
440 | + elseif ( $readmore ) { |
|
438 | 441 | $text .= ' <a href="' . $this->get_permalink() . '" class="read-more">' . trim( $readmore ) . '</a>'; |
439 | 442 | } |
440 | 443 |
@@ -43,7 +43,8 @@ |
||
43 | 43 | |
44 | 44 | wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/min/production.js', array( 'jquery' ), THEME_VERSION, true ); |
45 | 45 | |
46 | - } else { |
|
46 | + } |
|
47 | + else { |
|
47 | 48 | |
48 | 49 | wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/plugins.js', array( 'jquery' ), THEME_VERSION, true ); |
49 | 50 |
@@ -229,12 +229,14 @@ discard block |
||
229 | 229 | |
230 | 230 | $scope = array_merge( $common_scope, $data ); |
231 | 231 | |
232 | - } else { |
|
232 | + } |
|
233 | + else { |
|
233 | 234 | |
234 | 235 | $scope = $common_scope; |
235 | 236 | |
236 | 237 | } |
237 | - } else { |
|
238 | + } |
|
239 | + else { |
|
238 | 240 | |
239 | 241 | $view = ClassyView::get_view(); |
240 | 242 | |
@@ -283,11 +285,13 @@ discard block |
||
283 | 285 | |
284 | 286 | $_return[] = $post->id; |
285 | 287 | |
286 | - } elseif ( 'object' === $return ) { |
|
288 | + } |
|
289 | + elseif ( 'object' === $return ) { |
|
287 | 290 | |
288 | 291 | $_return[] = $post; |
289 | 292 | |
290 | - } elseif ( class_exists( $return ) ) { |
|
293 | + } |
|
294 | + elseif ( class_exists( $return ) ) { |
|
291 | 295 | |
292 | 296 | $_return[] = new $return( $post ); |
293 | 297 | |
@@ -341,7 +345,8 @@ discard block |
||
341 | 345 | $args['format'] = 'page/%#%'; |
342 | 346 | $args['base'] = trailingslashit( $url[0] ).'%_%'; |
343 | 347 | |
344 | - } else { |
|
348 | + } |
|
349 | + else { |
|
345 | 350 | $big = 999999999; |
346 | 351 | $args['base'] = str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ); |
347 | 352 | } |
@@ -353,7 +358,8 @@ discard block |
||
353 | 358 | |
354 | 359 | if ( is_int( $prefs ) ) { |
355 | 360 | $args['mid_size'] = $prefs - 2; |
356 | - } else { |
|
361 | + } |
|
362 | + else { |
|
357 | 363 | $args = array_merge( $args, $prefs ); |
358 | 364 | } |
359 | 365 |
@@ -54,9 +54,11 @@ discard block |
||
54 | 54 | |
55 | 55 | elseif ( is_paged() ) : return 'paged'; |
56 | 56 | |
57 | - else : |
|
57 | + else { |
|
58 | + : |
|
58 | 59 | |
59 | 60 | return 'index'; |
61 | + } |
|
60 | 62 | |
61 | 63 | endif; |
62 | 64 | |
@@ -97,7 +99,8 @@ discard block |
||
97 | 99 | |
98 | 100 | return THEME_PATH . $folder . '/' . $view . '.blade.php'; |
99 | 101 | |
100 | - } elseif ( 'scope' === $type ) { |
|
102 | + } |
|
103 | + elseif ( 'scope' === $type ) { |
|
101 | 104 | |
102 | 105 | $folder = ClassyScope::$folder; |
103 | 106 | |
@@ -234,7 +237,8 @@ discard block |
||
234 | 237 | |
235 | 238 | list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); |
236 | 239 | |
237 | - } else { |
|
240 | + } |
|
241 | + else { |
|
238 | 242 | |
239 | 243 | list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); |
240 | 244 | |
@@ -347,9 +351,11 @@ discard block |
||
347 | 351 | |
348 | 352 | // Default |
349 | 353 | |
350 | - else : |
|
354 | + else { |
|
355 | + : |
|
351 | 356 | |
352 | 357 | $views[] = $type; |
358 | + } |
|
353 | 359 | |
354 | 360 | endif; |
355 | 361 |
@@ -43,7 +43,8 @@ |
||
43 | 43 | |
44 | 44 | wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/min/production.js', array( 'jquery' ), THEME_VERSION, true ); |
45 | 45 | |
46 | - } else { |
|
46 | + } |
|
47 | + else { |
|
47 | 48 | |
48 | 49 | wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/plugins.js', array( 'jquery' ), THEME_VERSION, true ); |
49 | 50 |
@@ -28,7 +28,8 @@ |
||
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 |
@@ -195,7 +195,8 @@ discard block |
||
195 | 195 | |
196 | 196 | if ( ! empty( $email ) ) { |
197 | 197 | $avatar = $this->get_avatar_url( $default, $host, $email_hash, $size ); |
198 | - } else { |
|
198 | + } |
|
199 | + else { |
|
199 | 200 | $avatar = $default; |
200 | 201 | } |
201 | 202 | |
@@ -213,7 +214,8 @@ discard block |
||
213 | 214 | |
214 | 215 | if ( $user ) { |
215 | 216 | $email = $user->user_email; |
216 | - } else { |
|
217 | + } |
|
218 | + else { |
|
217 | 219 | $email = $this->comment_author_email; |
218 | 220 | } |
219 | 221 | |
@@ -238,7 +240,8 @@ discard block |
||
238 | 240 | $avatar_default = get_option( 'avatar_default' ); |
239 | 241 | if ( empty( $avatar_default ) ) { |
240 | 242 | $default = 'mystery'; |
241 | - } else { |
|
243 | + } |
|
244 | + else { |
|
242 | 245 | $default = $avatar_default; |
243 | 246 | } |
244 | 247 | } |
@@ -246,13 +249,17 @@ discard block |
||
246 | 249 | if ( 'mystery' === $default ) { |
247 | 250 | $default = $host . '/avatar/ad516503a11cd5ca435acc9bb6523536?s=' . $size; |
248 | 251 | // ad516503a11cd5ca435acc9bb6523536 == md5('[email protected]') |
249 | - } else if ( 'blank' === $default ) { |
|
252 | + } |
|
253 | + else if ( 'blank' === $default ) { |
|
250 | 254 | $default = $email ? 'blank' : includes_url( 'images/blank.gif' ); |
251 | - } else if ( ! empty( $email ) && 'gravatar_default' === $default ) { |
|
255 | + } |
|
256 | + else if ( ! empty( $email ) && 'gravatar_default' === $default ) { |
|
252 | 257 | $default = ''; |
253 | - } else if ( 'gravatar_default' === $default ) { |
|
258 | + } |
|
259 | + else if ( 'gravatar_default' === $default ) { |
|
254 | 260 | $default = $host . '/avatar/?s=' . $size; |
255 | - } else if ( empty( $email ) && ! strstr( $default, 'http://' ) ) { |
|
261 | + } |
|
262 | + else if ( empty( $email ) && ! strstr( $default, 'http://' ) ) { |
|
256 | 263 | $default = $host . '/avatar/?d=' . $default . '&s=' . $size; |
257 | 264 | } |
258 | 265 | |
@@ -269,10 +276,12 @@ discard block |
||
269 | 276 | |
270 | 277 | if ( is_ssl() ) { |
271 | 278 | $host = 'https://secure.gravatar.com'; |
272 | - } else { |
|
279 | + } |
|
280 | + else { |
|
273 | 281 | if ( ! empty( $email_hash ) ) { |
274 | 282 | $host = sprintf( 'http://%d.gravatar.com', (hexdec( $email_hash[0] ) % 2) ); |
275 | - } else { |
|
283 | + } |
|
284 | + else { |
|
276 | 285 | $host = 'http://0.gravatar.com'; |
277 | 286 | } |
278 | 287 | } |
@@ -41,7 +41,8 @@ discard block |
||
41 | 41 | preg_match_all( '/./u', $text, $words_array ); |
42 | 42 | $words_array = array_slice( $words_array[0], 0, $num_words + 1 ); |
43 | 43 | $sep = ''; |
44 | - } else { |
|
44 | + } |
|
45 | + else { |
|
45 | 46 | $words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY ); |
46 | 47 | $sep = ' '; |
47 | 48 | } |
@@ -50,7 +51,8 @@ discard block |
||
50 | 51 | array_pop( $words_array ); |
51 | 52 | $text = implode( $sep, $words_array ); |
52 | 53 | $text = $text . $more; |
53 | - } else { |
|
54 | + } |
|
55 | + else { |
|
54 | 56 | $text = implode( $sep, $words_array ); |
55 | 57 | } |
56 | 58 | |
@@ -89,7 +91,8 @@ discard block |
||
89 | 91 | for ( $i = 0; $i < $len_opened; $i++ ) { |
90 | 92 | if ( ! in_array( $openedtags[ $i ], $closedtags, true ) ) { |
91 | 93 | $html .= '</' . $openedtags[ $i ] . '>'; |
92 | - } else { |
|
94 | + } |
|
95 | + else { |
|
93 | 96 | unset( $closedtags[ array_search( $openedtags[ $i ], $closedtags ) ] ); |
94 | 97 | } |
95 | 98 | } |
@@ -161,7 +164,8 @@ discard block |
||
161 | 164 | 'current' => true, |
162 | 165 | ); |
163 | 166 | $dots = true; |
164 | - } else { |
|
167 | + } |
|
168 | + else { |
|
165 | 169 | 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'] ) ) { |
166 | 170 | $link = str_replace( '%_%', 1 === absint( $n ) ? '' : $args['format'], $args['base'] ); |
167 | 171 | $link = str_replace( '%#%', $n, $link ); |
@@ -179,7 +183,8 @@ discard block |
||
179 | 183 | 'current' => absint( $args['current'] ) === $n, |
180 | 184 | ); |
181 | 185 | $dots = true; |
182 | - } elseif ( $dots && ! $args['show_all'] ) { |
|
186 | + } |
|
187 | + elseif ( $dots && ! $args['show_all'] ) { |
|
183 | 188 | $page_links[] = array( |
184 | 189 | 'class' => 'dots', |
185 | 190 | 'title' => __( '…' ), |
@@ -218,7 +223,8 @@ discard block |
||
218 | 223 | if ( strlen( $k ) ) { |
219 | 224 | if ( is_array( $v ) ) { |
220 | 225 | $obj->{$k} = self::array_to_object( $v ); // Recursion. |
221 | - } else { |
|
226 | + } |
|
227 | + else { |
|
222 | 228 | $obj->{$k} = $v; |
223 | 229 | } |
224 | 230 | } |
@@ -238,23 +244,29 @@ discard block |
||
238 | 244 | |
239 | 245 | if ( is_category() ) { |
240 | 246 | $archives_title = single_cat_title( '', false ); |
241 | - } else if ( is_tag() ) { |
|
247 | + } |
|
248 | + else if ( is_tag() ) { |
|
242 | 249 | $archives_title = 'Tag: ' . single_tag_title( '', false ); |
243 | - } else if ( is_author() ) { |
|
250 | + } |
|
251 | + else if ( is_author() ) { |
|
244 | 252 | if ( have_posts() ) { |
245 | 253 | the_post(); |
246 | 254 | $archives_title = 'Author: ' . get_the_author(); |
247 | 255 | } |
248 | 256 | |
249 | 257 | rewind_posts(); |
250 | - } else if ( is_search() ) { |
|
258 | + } |
|
259 | + else if ( is_search() ) { |
|
251 | 260 | $archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' ); |
252 | - } else if ( is_archive() ) { |
|
261 | + } |
|
262 | + else if ( is_archive() ) { |
|
253 | 263 | if ( is_day() ) { |
254 | 264 | $archives_title = get_the_date(); |
255 | - } elseif ( is_month() ) { |
|
265 | + } |
|
266 | + elseif ( is_month() ) { |
|
256 | 267 | $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain ) ); |
257 | - } elseif ( is_year() ) { |
|
268 | + } |
|
269 | + elseif ( is_year() ) { |
|
258 | 270 | $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain ) ); |
259 | 271 | } |
260 | 272 | } |
@@ -36,9 +36,11 @@ |
||
36 | 36 | |
37 | 37 | if ( is_numeric( $arg ) && 0 !== absint( $arg ) ) { |
38 | 38 | $menu_id = $this->check_menu_id( $arg ); |
39 | - } elseif ( is_array( $locations ) && count( $locations ) ) { |
|
39 | + } |
|
40 | + elseif ( is_array( $locations ) && count( $locations ) ) { |
|
40 | 41 | $menu_id = $this->get_locations_menu_id( $locations, $arg ); |
41 | - } elseif ( is_string( $arg ) ) { |
|
42 | + } |
|
43 | + elseif ( is_string( $arg ) ) { |
|
42 | 44 | $menu_id = $this->get_menu_id_by_name( $arg ); |
43 | 45 | } |
44 | 46 |