@@ -209,7 +209,7 @@ |
||
| 209 | 209 | * |
| 210 | 210 | * @param array $array Array to be converted. |
| 211 | 211 | * |
| 212 | - * @return object |
|
| 212 | + * @return \stdClass |
|
| 213 | 213 | */ |
| 214 | 214 | public static function array_to_object( $array ) { |
| 215 | 215 | $obj = new \stdClass; |
@@ -236,29 +236,29 @@ |
||
| 236 | 236 | $textdomain = Classy::textdomain(); |
| 237 | 237 | $archives_title = 'Archives'; |
| 238 | 238 | |
| 239 | - if ( is_category() ) { |
|
| 240 | - $archives_title = single_cat_title( '', false ); |
|
| 241 | - } else if ( is_tag() ) { |
|
| 242 | - $archives_title = 'Tag: ' . single_tag_title( '', false ); |
|
| 243 | - } else if ( is_author() ) { |
|
| 244 | - if ( have_posts() ) { |
|
| 245 | - the_post(); |
|
| 246 | - $archives_title = 'Author: ' . get_the_author(); |
|
| 247 | - } |
|
| 239 | + if ( is_category() ) { |
|
| 240 | + $archives_title = single_cat_title( '', false ); |
|
| 241 | + } else if ( is_tag() ) { |
|
| 242 | + $archives_title = 'Tag: ' . single_tag_title( '', false ); |
|
| 243 | + } else if ( is_author() ) { |
|
| 244 | + if ( have_posts() ) { |
|
| 245 | + the_post(); |
|
| 246 | + $archives_title = 'Author: ' . get_the_author(); |
|
| 247 | + } |
|
| 248 | 248 | |
| 249 | - rewind_posts(); |
|
| 250 | - } else if ( is_search() ) { |
|
| 251 | - $archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' ); |
|
| 252 | - } else if ( is_archive() ) { |
|
| 253 | - if ( is_day() ) { |
|
| 254 | - $archives_title = get_the_date(); |
|
| 255 | - } elseif ( is_month() ) { |
|
| 256 | - $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain ) ); |
|
| 257 | - } elseif ( is_year() ) { |
|
| 258 | - $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain ) ); |
|
| 259 | - } |
|
| 249 | + rewind_posts(); |
|
| 250 | + } else if ( is_search() ) { |
|
| 251 | + $archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' ); |
|
| 252 | + } else if ( is_archive() ) { |
|
| 253 | + if ( is_day() ) { |
|
| 254 | + $archives_title = get_the_date(); |
|
| 255 | + } elseif ( is_month() ) { |
|
| 256 | + $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain ) ); |
|
| 257 | + } elseif ( is_year() ) { |
|
| 258 | + $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain ) ); |
|
| 259 | + } |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | - return $archives_title; |
|
| 262 | + return $archives_title; |
|
| 263 | 263 | } |
| 264 | 264 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | * @param string $type View|scope. |
| 122 | 122 | * @param string $page Request type like: home, single etc. |
| 123 | 123 | * |
| 124 | - * @return array|bool |
|
| 124 | + * @return string|false |
|
| 125 | 125 | */ |
| 126 | 126 | public static function get_available_file( $type = 'view', $page ) { |
| 127 | 127 | $views = self::get_request_hierarchy_list( $page ); |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | /** |
| 307 | 307 | * Returns classy template name or boolean if this is not classy template. |
| 308 | 308 | * |
| 309 | - * @return mixed |
|
| 309 | + * @return string|false |
|
| 310 | 310 | */ |
| 311 | 311 | public static function get_classy_template() { |
| 312 | 312 | preg_match( '/classy\-(.*)/', get_page_template_slug(), $matches ); |