@@ -234,35 +234,35 @@ |
||
234 | 234 | */ |
235 | 235 | public static function get_archives_title() { |
236 | 236 | $textdomain = Classy::textdomain(); |
237 | - $archives_title = ''; |
|
237 | + $archives_title = ''; |
|
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 | - } else { |
|
260 | - $archives_title = 'Archives'; |
|
261 | - } |
|
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 | + } else { |
|
260 | + $archives_title = 'Archives'; |
|
261 | + } |
|
262 | 262 | } else { |
263 | - $archives_title = 'Archives'; |
|
264 | - } |
|
263 | + $archives_title = 'Archives'; |
|
264 | + } |
|
265 | 265 | |
266 | - return $archives_title; |
|
266 | + return $archives_title; |
|
267 | 267 | } |
268 | 268 | } |
@@ -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 | } |