@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * Checks if template exists |
112 | 112 | * |
113 | 113 | * @param string $type template/scope |
114 | - * @param string $template in blade path format, ex: layout/header |
|
114 | + * @param string|false $file |
|
115 | 115 | * @return boolean true/false |
116 | 116 | */ |
117 | 117 | public static function file_exists($type = 'template', $file) { |
@@ -129,8 +129,9 @@ discard block |
||
129 | 129 | * Returns template name for render, based on type of request |
130 | 130 | * |
131 | 131 | * @param string $type template/scope |
132 | - * @param string $type |
|
133 | - * @return array |
|
132 | + * @param string $type |
|
133 | + * @param string $page |
|
134 | + * @return string|false |
|
134 | 135 | */ |
135 | 136 | public static function get_available_file($type = 'template', $page) { |
136 | 137 | |
@@ -377,7 +378,7 @@ discard block |
||
377 | 378 | /** |
378 | 379 | * Returns classy template name or boolean if this is not classy template |
379 | 380 | * |
380 | - * @return mixed |
|
381 | + * @return string|false |
|
381 | 382 | */ |
382 | 383 | public static function get_classy_template() { |
383 | 384 |
@@ -43,6 +43,7 @@ |
||
43 | 43 | /** |
44 | 44 | * Extends Scope with scope that is defined in theme_name/scope folder |
45 | 45 | * |
46 | + * @param string|false $template_name |
|
46 | 47 | * @return array |
47 | 48 | */ |
48 | 49 | public static function extend_scope($scope, $template_name) { |
@@ -247,58 +247,58 @@ |
||
247 | 247 | |
248 | 248 | $textdomain = Classy::textdomain(); |
249 | 249 | |
250 | - $archives_title = ''; |
|
250 | + $archives_title = ''; |
|
251 | 251 | |
252 | - if ( is_category() ) { |
|
252 | + if ( is_category() ) { |
|
253 | 253 | |
254 | - $archives_title = single_cat_title( '', false ); |
|
254 | + $archives_title = single_cat_title( '', false ); |
|
255 | 255 | |
256 | - } else if ( is_tag() ) { |
|
256 | + } else if ( is_tag() ) { |
|
257 | 257 | |
258 | - $archives_title = 'Tag: ' . single_tag_title( '', false ); |
|
258 | + $archives_title = 'Tag: ' . single_tag_title( '', false ); |
|
259 | 259 | |
260 | - } else if ( is_author() ) { |
|
260 | + } else if ( is_author() ) { |
|
261 | 261 | |
262 | - if ( have_posts() ) { |
|
262 | + if ( have_posts() ) { |
|
263 | 263 | |
264 | - the_post(); |
|
265 | - $archives_title = 'Author: ' . get_the_author(); |
|
264 | + the_post(); |
|
265 | + $archives_title = 'Author: ' . get_the_author(); |
|
266 | 266 | |
267 | - } |
|
267 | + } |
|
268 | 268 | |
269 | - rewind_posts(); |
|
269 | + rewind_posts(); |
|
270 | 270 | |
271 | - } else if ( is_search() ) { |
|
271 | + } else if ( is_search() ) { |
|
272 | 272 | |
273 | - $archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' ); |
|
273 | + $archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' ); |
|
274 | 274 | |
275 | - } else if ( is_archive() ) { |
|
275 | + } else if ( is_archive() ) { |
|
276 | 276 | |
277 | - if ( is_day() ) { |
|
277 | + if ( is_day() ) { |
|
278 | 278 | |
279 | - $archives_title = get_the_date(); |
|
279 | + $archives_title = get_the_date(); |
|
280 | 280 | |
281 | - } elseif ( is_month() ) { |
|
281 | + } elseif ( is_month() ) { |
|
282 | 282 | |
283 | - $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain )); |
|
283 | + $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain )); |
|
284 | 284 | |
285 | - } elseif ( is_year() ) { |
|
285 | + } elseif ( is_year() ) { |
|
286 | 286 | |
287 | - $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain )); |
|
287 | + $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain )); |
|
288 | 288 | |
289 | - } else { |
|
289 | + } else { |
|
290 | 290 | |
291 | - $archives_title = 'Archives'; |
|
291 | + $archives_title = 'Archives'; |
|
292 | 292 | |
293 | - } |
|
293 | + } |
|
294 | 294 | |
295 | - } else { |
|
295 | + } else { |
|
296 | 296 | |
297 | - $archives_title = 'Archives'; |
|
297 | + $archives_title = 'Archives'; |
|
298 | 298 | |
299 | - } |
|
299 | + } |
|
300 | 300 | |
301 | - return $archives_title; |
|
301 | + return $archives_title; |
|
302 | 302 | |
303 | 303 | } |
304 | 304 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | $templates = array(); |
56 | 56 | |
57 | - $files = (array) glob( THEME_PATH . '/' . self::$folder . '/*/*.blade.php' ); |
|
57 | + $files = (array) glob( THEME_PATH . '/' . self::$folder . '/*/*.blade.php' ); |
|
58 | 58 | |
59 | 59 | foreach ( $files as $filename ) { |
60 | 60 |