@@ -28,8 +28,9 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @see twentythirteen_content_width() for template-specific adjustments. |
| 30 | 30 | */ |
| 31 | -if ( ! isset( $content_width ) ) |
|
| 31 | +if ( ! isset( $content_width ) ) { |
|
| 32 | 32 | $content_width = 604; |
| 33 | +} |
|
| 33 | 34 | |
| 34 | 35 | /** |
| 35 | 36 | * Add support for a custom header image. |
@@ -39,8 +40,9 @@ discard block |
||
| 39 | 40 | /** |
| 40 | 41 | * Twenty Thirteen only works in WordPress 3.6 or later. |
| 41 | 42 | */ |
| 42 | -if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) |
|
| 43 | +if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) { |
|
| 43 | 44 | require get_template_directory() . '/inc/back-compat.php'; |
| 45 | +} |
|
| 44 | 46 | |
| 45 | 47 | /** |
| 46 | 48 | * Twenty Thirteen setup. |
@@ -136,11 +138,13 @@ discard block |
||
| 136 | 138 | if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) { |
| 137 | 139 | $font_families = array(); |
| 138 | 140 | |
| 139 | - if ( 'off' !== $source_sans_pro ) |
|
| 140 | - $font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic'; |
|
| 141 | + if ( 'off' !== $source_sans_pro ) { |
|
| 142 | + $font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic'; |
|
| 143 | + } |
|
| 141 | 144 | |
| 142 | - if ( 'off' !== $bitter ) |
|
| 143 | - $font_families[] = 'Bitter:400,700'; |
|
| 145 | + if ( 'off' !== $bitter ) { |
|
| 146 | + $font_families[] = 'Bitter:400,700'; |
|
| 147 | + } |
|
| 144 | 148 | |
| 145 | 149 | $query_args = array( |
| 146 | 150 | 'family' => urlencode( implode( '|', $font_families ) ), |
@@ -162,12 +166,14 @@ discard block |
||
| 162 | 166 | * Adds JavaScript to pages with the comment form to support |
| 163 | 167 | * sites with threaded comments (when in use). |
| 164 | 168 | */ |
| 165 | - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) |
|
| 166 | - wp_enqueue_script( 'comment-reply' ); |
|
| 169 | + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
|
| 170 | + wp_enqueue_script( 'comment-reply' ); |
|
| 171 | + } |
|
| 167 | 172 | |
| 168 | 173 | // Adds Masonry to handle vertical alignment of footer widgets. |
| 169 | - if ( is_active_sidebar( 'sidebar-1' ) ) |
|
| 170 | - wp_enqueue_script( 'jquery-masonry' ); |
|
| 174 | + if ( is_active_sidebar( 'sidebar-1' ) ) { |
|
| 175 | + wp_enqueue_script( 'jquery-masonry' ); |
|
| 176 | + } |
|
| 171 | 177 | |
| 172 | 178 | // Loads JavaScript file with functionality specific to Twenty Thirteen. |
| 173 | 179 | wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true ); |
@@ -202,20 +208,23 @@ discard block |
||
| 202 | 208 | function twentythirteen_wp_title( $title, $sep ) { |
| 203 | 209 | global $paged, $page; |
| 204 | 210 | |
| 205 | - if ( is_feed() ) |
|
| 206 | - return $title; |
|
| 211 | + if ( is_feed() ) { |
|
| 212 | + return $title; |
|
| 213 | + } |
|
| 207 | 214 | |
| 208 | 215 | // Add the site name. |
| 209 | 216 | $title .= get_bloginfo( 'name', 'display' ); |
| 210 | 217 | |
| 211 | 218 | // Add the site description for the home/front page. |
| 212 | 219 | $site_description = get_bloginfo( 'description', 'display' ); |
| 213 | - if ( $site_description && ( is_home() || is_front_page() ) ) |
|
| 214 | - $title = "$title $sep $site_description"; |
|
| 220 | + if ( $site_description && ( is_home() || is_front_page() ) ) { |
|
| 221 | + $title = "$title $sep $site_description"; |
|
| 222 | + } |
|
| 215 | 223 | |
| 216 | 224 | // Add a page number if necessary. |
| 217 | - if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) |
|
| 218 | - $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) ); |
|
| 225 | + if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { |
|
| 226 | + $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) ); |
|
| 227 | + } |
|
| 219 | 228 | |
| 220 | 229 | return $title; |
| 221 | 230 | } |
@@ -259,8 +268,9 @@ discard block |
||
| 259 | 268 | global $wp_query; |
| 260 | 269 | |
| 261 | 270 | // Don't print empty markup if there's only one page. |
| 262 | - if ( $wp_query->max_num_pages < 2 ) |
|
| 263 | - return; |
|
| 271 | + if ( $wp_query->max_num_pages < 2 ) { |
|
| 272 | + return; |
|
| 273 | + } |
|
| 264 | 274 | ?> |
| 265 | 275 | <nav class="navigation paging-navigation" role="navigation"> |
| 266 | 276 | <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1> |
@@ -293,8 +303,9 @@ discard block |
||
| 293 | 303 | $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); |
| 294 | 304 | $next = get_adjacent_post( false, '', false ); |
| 295 | 305 | |
| 296 | - if ( ! $next && ! $previous ) |
|
| 297 | - return; |
|
| 306 | + if ( ! $next && ! $previous ) { |
|
| 307 | + return; |
|
| 308 | + } |
|
| 298 | 309 | ?> |
| 299 | 310 | <nav class="navigation post-navigation" role="navigation"> |
| 300 | 311 | <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1> |
@@ -318,11 +329,13 @@ discard block |
||
| 318 | 329 | * @since Twenty Thirteen 1.0 |
| 319 | 330 | */ |
| 320 | 331 | function twentythirteen_entry_meta() { |
| 321 | - if ( is_sticky() && is_home() && ! is_paged() ) |
|
| 322 | - echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>'; |
|
| 332 | + if ( is_sticky() && is_home() && ! is_paged() ) { |
|
| 333 | + echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>'; |
|
| 334 | + } |
|
| 323 | 335 | |
| 324 | - if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) |
|
| 325 | - twentythirteen_entry_date(); |
|
| 336 | + if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) { |
|
| 337 | + twentythirteen_entry_date(); |
|
| 338 | + } |
|
| 326 | 339 | |
| 327 | 340 | // Translators: used between list items, there is a space after the comma. |
| 328 | 341 | $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); |
@@ -359,10 +372,11 @@ discard block |
||
| 359 | 372 | * @return string The HTML-formatted post date. |
| 360 | 373 | */ |
| 361 | 374 | function twentythirteen_entry_date( $echo = true ) { |
| 362 | - if ( has_post_format( array( 'chat', 'status' ) ) ) |
|
| 363 | - $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); |
|
| 364 | - else |
|
| 365 | - $format_prefix = '%2$s'; |
|
| 375 | + if ( has_post_format( array( 'chat', 'status' ) ) ) { |
|
| 376 | + $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); |
|
| 377 | + } else { |
|
| 378 | + $format_prefix = '%2$s'; |
|
| 379 | + } |
|
| 366 | 380 | |
| 367 | 381 | $date = sprintf( '<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>', |
| 368 | 382 | esc_url( get_permalink() ), |
@@ -371,8 +385,9 @@ discard block |
||
| 371 | 385 | esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) ) |
| 372 | 386 | ); |
| 373 | 387 | |
| 374 | - if ( $echo ) |
|
| 375 | - echo $date; |
|
| 388 | + if ( $echo ) { |
|
| 389 | + echo $date; |
|
| 390 | + } |
|
| 376 | 391 | |
| 377 | 392 | return $date; |
| 378 | 393 | } |
@@ -426,12 +441,14 @@ discard block |
||
| 426 | 441 | } |
| 427 | 442 | |
| 428 | 443 | // get the URL of the next image attachment... |
| 429 | - if ( $next_id ) |
|
| 430 | - $next_attachment_url = get_attachment_link( $next_id ); |
|
| 444 | + if ( $next_id ) { |
|
| 445 | + $next_attachment_url = get_attachment_link( $next_id ); |
|
| 446 | + } |
|
| 431 | 447 | |
| 432 | 448 | // or get the URL of the first image attachment. |
| 433 | - else |
|
| 434 | - $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); |
|
| 449 | + else { |
|
| 450 | + $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); |
|
| 451 | + } |
|
| 435 | 452 | } |
| 436 | 453 | |
| 437 | 454 | printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', |
@@ -496,14 +513,17 @@ discard block |
||
| 496 | 513 | * @return array The filtered body class list. |
| 497 | 514 | */ |
| 498 | 515 | function twentythirteen_body_class( $classes ) { |
| 499 | - if ( ! is_multi_author() ) |
|
| 500 | - $classes[] = 'single-author'; |
|
| 516 | + if ( ! is_multi_author() ) { |
|
| 517 | + $classes[] = 'single-author'; |
|
| 518 | + } |
|
| 501 | 519 | |
| 502 | - if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) |
|
| 503 | - $classes[] = 'sidebar'; |
|
| 520 | + if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) { |
|
| 521 | + $classes[] = 'sidebar'; |
|
| 522 | + } |
|
| 504 | 523 | |
| 505 | - if ( ! get_option( 'show_avatars' ) ) |
|
| 506 | - $classes[] = 'no-avatars'; |
|
| 524 | + if ( ! get_option( 'show_avatars' ) ) { |
|
| 525 | + $classes[] = 'no-avatars'; |
|
| 526 | + } |
|
| 507 | 527 | |
| 508 | 528 | return $classes; |
| 509 | 529 | } |
@@ -517,11 +537,12 @@ discard block |
||
| 517 | 537 | function twentythirteen_content_width() { |
| 518 | 538 | global $content_width; |
| 519 | 539 | |
| 520 | - if ( is_attachment() ) |
|
| 521 | - $content_width = 724; |
|
| 522 | - elseif ( has_post_format( 'audio' ) ) |
|
| 523 | - $content_width = 484; |
|
| 524 | -} |
|
| 540 | + if ( is_attachment() ) { |
|
| 541 | + $content_width = 724; |
|
| 542 | + } elseif ( has_post_format( 'audio' ) ) { |
|
| 543 | + $content_width = 484; |
|
| 544 | + } |
|
| 545 | + } |
|
| 525 | 546 | add_action( 'template_redirect', 'twentythirteen_content_width' ); |
| 526 | 547 | |
| 527 | 548 | /** |
@@ -28,19 +28,19 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @see twentythirteen_content_width() for template-specific adjustments. |
| 30 | 30 | */ |
| 31 | -if ( ! isset( $content_width ) ) |
|
| 31 | +if ( ! isset($content_width)) |
|
| 32 | 32 | $content_width = 604; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Add support for a custom header image. |
| 36 | 36 | */ |
| 37 | -require get_template_directory() . '/inc/custom-header.php'; |
|
| 37 | +require get_template_directory().'/inc/custom-header.php'; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Twenty Thirteen only works in WordPress 3.6 or later. |
| 41 | 41 | */ |
| 42 | -if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) |
|
| 43 | - require get_template_directory() . '/inc/back-compat.php'; |
|
| 42 | +if (version_compare($GLOBALS['wp_version'], '3.6-alpha', '<')) |
|
| 43 | + require get_template_directory().'/inc/back-compat.php'; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Twenty Thirteen setup. |
@@ -66,50 +66,50 @@ discard block |
||
| 66 | 66 | * replace to change 'twentythirteen' to the name of your theme in all |
| 67 | 67 | * template files. |
| 68 | 68 | */ |
| 69 | - load_theme_textdomain( 'twentythirteen' ); |
|
| 69 | + load_theme_textdomain('twentythirteen'); |
|
| 70 | 70 | |
| 71 | 71 | /* |
| 72 | 72 | * This theme styles the visual editor to resemble the theme style, |
| 73 | 73 | * specifically font, colors, icons, and column width. |
| 74 | 74 | */ |
| 75 | - add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url() ) ); |
|
| 75 | + add_editor_style(array('css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url())); |
|
| 76 | 76 | |
| 77 | 77 | // Adds RSS feed links to <head> for posts and comments. |
| 78 | - add_theme_support( 'automatic-feed-links' ); |
|
| 78 | + add_theme_support('automatic-feed-links'); |
|
| 79 | 79 | |
| 80 | 80 | /* |
| 81 | 81 | * Switches default core markup for search form, comment form, |
| 82 | 82 | * and comments to output valid HTML5. |
| 83 | 83 | */ |
| 84 | - add_theme_support( 'html5', array( |
|
| 84 | + add_theme_support('html5', array( |
|
| 85 | 85 | 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' |
| 86 | - ) ); |
|
| 86 | + )); |
|
| 87 | 87 | |
| 88 | 88 | /* |
| 89 | 89 | * This theme supports all available post formats by default. |
| 90 | 90 | * See https://codex.wordpress.org/Post_Formats |
| 91 | 91 | */ |
| 92 | - add_theme_support( 'post-formats', array( |
|
| 92 | + add_theme_support('post-formats', array( |
|
| 93 | 93 | 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' |
| 94 | - ) ); |
|
| 94 | + )); |
|
| 95 | 95 | |
| 96 | 96 | // This theme uses wp_nav_menu() in one location. |
| 97 | - register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) ); |
|
| 97 | + register_nav_menu('primary', __('Navigation Menu', 'twentythirteen')); |
|
| 98 | 98 | |
| 99 | 99 | /* |
| 100 | 100 | * This theme uses a custom image size for featured images, displayed on |
| 101 | 101 | * "standard" posts and pages. |
| 102 | 102 | */ |
| 103 | - add_theme_support( 'post-thumbnails' ); |
|
| 104 | - set_post_thumbnail_size( 604, 270, true ); |
|
| 103 | + add_theme_support('post-thumbnails'); |
|
| 104 | + set_post_thumbnail_size(604, 270, true); |
|
| 105 | 105 | |
| 106 | 106 | // This theme uses its own gallery styles. |
| 107 | - add_filter( 'use_default_gallery_style', '__return_false' ); |
|
| 107 | + add_filter('use_default_gallery_style', '__return_false'); |
|
| 108 | 108 | |
| 109 | 109 | // Indicate widget sidebars can use selective refresh in the Customizer. |
| 110 | - add_theme_support( 'customize-selective-refresh-widgets' ); |
|
| 110 | + add_theme_support('customize-selective-refresh-widgets'); |
|
| 111 | 111 | } |
| 112 | -add_action( 'after_setup_theme', 'twentythirteen_setup' ); |
|
| 112 | +add_action('after_setup_theme', 'twentythirteen_setup'); |
|
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Return the Google font stylesheet URL, if available. |
@@ -128,28 +128,28 @@ discard block |
||
| 128 | 128 | * supported by Source Sans Pro, translate this to 'off'. Do not translate |
| 129 | 129 | * into your own language. |
| 130 | 130 | */ |
| 131 | - $source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' ); |
|
| 131 | + $source_sans_pro = _x('on', 'Source Sans Pro font: on or off', 'twentythirteen'); |
|
| 132 | 132 | |
| 133 | 133 | /* Translators: If there are characters in your language that are not |
| 134 | 134 | * supported by Bitter, translate this to 'off'. Do not translate into your |
| 135 | 135 | * own language. |
| 136 | 136 | */ |
| 137 | - $bitter = _x( 'on', 'Bitter font: on or off', 'twentythirteen' ); |
|
| 137 | + $bitter = _x('on', 'Bitter font: on or off', 'twentythirteen'); |
|
| 138 | 138 | |
| 139 | - if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) { |
|
| 139 | + if ('off' !== $source_sans_pro || 'off' !== $bitter) { |
|
| 140 | 140 | $font_families = array(); |
| 141 | 141 | |
| 142 | - if ( 'off' !== $source_sans_pro ) |
|
| 142 | + if ('off' !== $source_sans_pro) |
|
| 143 | 143 | $font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic'; |
| 144 | 144 | |
| 145 | - if ( 'off' !== $bitter ) |
|
| 145 | + if ('off' !== $bitter) |
|
| 146 | 146 | $font_families[] = 'Bitter:400,700'; |
| 147 | 147 | |
| 148 | 148 | $query_args = array( |
| 149 | - 'family' => urlencode( implode( '|', $font_families ) ), |
|
| 150 | - 'subset' => urlencode( 'latin,latin-ext' ), |
|
| 149 | + 'family' => urlencode(implode('|', $font_families)), |
|
| 150 | + 'subset' => urlencode('latin,latin-ext'), |
|
| 151 | 151 | ); |
| 152 | - $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); |
|
| 152 | + $fonts_url = add_query_arg($query_args, 'https://fonts.googleapis.com/css'); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | return $fonts_url; |
@@ -165,30 +165,30 @@ discard block |
||
| 165 | 165 | * Adds JavaScript to pages with the comment form to support |
| 166 | 166 | * sites with threaded comments (when in use). |
| 167 | 167 | */ |
| 168 | - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) |
|
| 169 | - wp_enqueue_script( 'comment-reply' ); |
|
| 168 | + if (is_singular() && comments_open() && get_option('thread_comments')) |
|
| 169 | + wp_enqueue_script('comment-reply'); |
|
| 170 | 170 | |
| 171 | 171 | // Adds Masonry to handle vertical alignment of footer widgets. |
| 172 | - if ( is_active_sidebar( 'sidebar-1' ) ) |
|
| 173 | - wp_enqueue_script( 'jquery-masonry' ); |
|
| 172 | + if (is_active_sidebar('sidebar-1')) |
|
| 173 | + wp_enqueue_script('jquery-masonry'); |
|
| 174 | 174 | |
| 175 | 175 | // Loads JavaScript file with functionality specific to Twenty Thirteen. |
| 176 | - wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true ); |
|
| 176 | + wp_enqueue_script('twentythirteen-script', get_template_directory_uri().'/js/functions.js', array('jquery'), '20160717', true); |
|
| 177 | 177 | |
| 178 | 178 | // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. |
| 179 | - wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); |
|
| 179 | + wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null); |
|
| 180 | 180 | |
| 181 | 181 | // Add Genericons font, used in the main stylesheet. |
| 182 | - wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03' ); |
|
| 182 | + wp_enqueue_style('genericons', get_template_directory_uri().'/genericons/genericons.css', array(), '3.03'); |
|
| 183 | 183 | |
| 184 | 184 | // Loads our main stylesheet. |
| 185 | - wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18' ); |
|
| 185 | + wp_enqueue_style('twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18'); |
|
| 186 | 186 | |
| 187 | 187 | // Loads the Internet Explorer specific stylesheet. |
| 188 | - wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' ); |
|
| 189 | - wp_style_add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' ); |
|
| 188 | + wp_enqueue_style('twentythirteen-ie', get_template_directory_uri().'/css/ie.css', array('twentythirteen-style'), '2013-07-18'); |
|
| 189 | + wp_style_add_data('twentythirteen-ie', 'conditional', 'lt IE 9'); |
|
| 190 | 190 | } |
| 191 | -add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' ); |
|
| 191 | +add_action('wp_enqueue_scripts', 'twentythirteen_scripts_styles'); |
|
| 192 | 192 | |
| 193 | 193 | /** |
| 194 | 194 | * Add preconnect for Google Fonts. |
@@ -199,9 +199,9 @@ discard block |
||
| 199 | 199 | * @param string $relation_type The relation type the URLs are printed. |
| 200 | 200 | * @return array URLs to print for resource hints. |
| 201 | 201 | */ |
| 202 | -function twentythirteen_resource_hints( $urls, $relation_type ) { |
|
| 203 | - if ( wp_style_is( 'twentythirteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { |
|
| 204 | - if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { |
|
| 202 | +function twentythirteen_resource_hints($urls, $relation_type) { |
|
| 203 | + if (wp_style_is('twentythirteen-fonts', 'queue') && 'preconnect' === $relation_type) { |
|
| 204 | + if (version_compare($GLOBALS['wp_version'], '4.7-alpha', '>=')) { |
|
| 205 | 205 | $urls[] = array( |
| 206 | 206 | 'href' => 'https://fonts.gstatic.com', |
| 207 | 207 | 'crossorigin', |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | return $urls; |
| 215 | 215 | } |
| 216 | -add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 ); |
|
| 216 | +add_filter('wp_resource_hints', 'twentythirteen_resource_hints', 10, 2); |
|
| 217 | 217 | |
| 218 | 218 | /** |
| 219 | 219 | * Filter the page title. |
@@ -227,27 +227,27 @@ discard block |
||
| 227 | 227 | * @param string $sep Optional separator. |
| 228 | 228 | * @return string The filtered title. |
| 229 | 229 | */ |
| 230 | -function twentythirteen_wp_title( $title, $sep ) { |
|
| 230 | +function twentythirteen_wp_title($title, $sep) { |
|
| 231 | 231 | global $paged, $page; |
| 232 | 232 | |
| 233 | - if ( is_feed() ) |
|
| 233 | + if (is_feed()) |
|
| 234 | 234 | return $title; |
| 235 | 235 | |
| 236 | 236 | // Add the site name. |
| 237 | - $title .= get_bloginfo( 'name', 'display' ); |
|
| 237 | + $title .= get_bloginfo('name', 'display'); |
|
| 238 | 238 | |
| 239 | 239 | // Add the site description for the home/front page. |
| 240 | - $site_description = get_bloginfo( 'description', 'display' ); |
|
| 241 | - if ( $site_description && ( is_home() || is_front_page() ) ) |
|
| 240 | + $site_description = get_bloginfo('description', 'display'); |
|
| 241 | + if ($site_description && (is_home() || is_front_page())) |
|
| 242 | 242 | $title = "$title $sep $site_description"; |
| 243 | 243 | |
| 244 | 244 | // Add a page number if necessary. |
| 245 | - if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) |
|
| 246 | - $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) ); |
|
| 245 | + if (($paged >= 2 || $page >= 2) && ! is_404()) |
|
| 246 | + $title = "$title $sep ".sprintf(__('Page %s', 'twentythirteen'), max($paged, $page)); |
|
| 247 | 247 | |
| 248 | 248 | return $title; |
| 249 | 249 | } |
| 250 | -add_filter( 'wp_title', 'twentythirteen_wp_title', 10, 2 ); |
|
| 250 | +add_filter('wp_title', 'twentythirteen_wp_title', 10, 2); |
|
| 251 | 251 | |
| 252 | 252 | /** |
| 253 | 253 | * Register two widget areas. |
@@ -255,29 +255,29 @@ discard block |
||
| 255 | 255 | * @since Twenty Thirteen 1.0 |
| 256 | 256 | */ |
| 257 | 257 | function twentythirteen_widgets_init() { |
| 258 | - register_sidebar( array( |
|
| 259 | - 'name' => __( 'Main Widget Area', 'twentythirteen' ), |
|
| 258 | + register_sidebar(array( |
|
| 259 | + 'name' => __('Main Widget Area', 'twentythirteen'), |
|
| 260 | 260 | 'id' => 'sidebar-1', |
| 261 | - 'description' => __( 'Appears in the footer section of the site.', 'twentythirteen' ), |
|
| 261 | + 'description' => __('Appears in the footer section of the site.', 'twentythirteen'), |
|
| 262 | 262 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 263 | 263 | 'after_widget' => '</aside>', |
| 264 | 264 | 'before_title' => '<h3 class="widget-title">', |
| 265 | 265 | 'after_title' => '</h3>', |
| 266 | - ) ); |
|
| 266 | + )); |
|
| 267 | 267 | |
| 268 | - register_sidebar( array( |
|
| 269 | - 'name' => __( 'Secondary Widget Area', 'twentythirteen' ), |
|
| 268 | + register_sidebar(array( |
|
| 269 | + 'name' => __('Secondary Widget Area', 'twentythirteen'), |
|
| 270 | 270 | 'id' => 'sidebar-2', |
| 271 | - 'description' => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ), |
|
| 271 | + 'description' => __('Appears on posts and pages in the sidebar.', 'twentythirteen'), |
|
| 272 | 272 | 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
| 273 | 273 | 'after_widget' => '</aside>', |
| 274 | 274 | 'before_title' => '<h3 class="widget-title">', |
| 275 | 275 | 'after_title' => '</h3>', |
| 276 | - ) ); |
|
| 276 | + )); |
|
| 277 | 277 | } |
| 278 | -add_action( 'widgets_init', 'twentythirteen_widgets_init' ); |
|
| 278 | +add_action('widgets_init', 'twentythirteen_widgets_init'); |
|
| 279 | 279 | |
| 280 | -if ( ! function_exists( 'twentythirteen_paging_nav' ) ) : |
|
| 280 | +if ( ! function_exists('twentythirteen_paging_nav')) : |
|
| 281 | 281 | /** |
| 282 | 282 | * Display navigation to next/previous set of posts when applicable. |
| 283 | 283 | * |
@@ -287,19 +287,19 @@ discard block |
||
| 287 | 287 | global $wp_query; |
| 288 | 288 | |
| 289 | 289 | // Don't print empty markup if there's only one page. |
| 290 | - if ( $wp_query->max_num_pages < 2 ) |
|
| 290 | + if ($wp_query->max_num_pages < 2) |
|
| 291 | 291 | return; |
| 292 | 292 | ?> |
| 293 | 293 | <nav class="navigation paging-navigation" role="navigation"> |
| 294 | - <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1> |
|
| 294 | + <h1 class="screen-reader-text"><?php _e('Posts navigation', 'twentythirteen'); ?></h1> |
|
| 295 | 295 | <div class="nav-links"> |
| 296 | 296 | |
| 297 | - <?php if ( get_next_posts_link() ) : ?> |
|
| 298 | - <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentythirteen' ) ); ?></div> |
|
| 297 | + <?php if (get_next_posts_link()) : ?> |
|
| 298 | + <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">←</span> Older posts', 'twentythirteen')); ?></div> |
|
| 299 | 299 | <?php endif; ?> |
| 300 | 300 | |
| 301 | - <?php if ( get_previous_posts_link() ) : ?> |
|
| 302 | - <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?></div> |
|
| 301 | + <?php if (get_previous_posts_link()) : ?> |
|
| 302 | + <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">→</span>', 'twentythirteen')); ?></div> |
|
| 303 | 303 | <?php endif; ?> |
| 304 | 304 | |
| 305 | 305 | </div><!-- .nav-links --> |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | } |
| 309 | 309 | endif; |
| 310 | 310 | |
| 311 | -if ( ! function_exists( 'twentythirteen_post_nav' ) ) : |
|
| 311 | +if ( ! function_exists('twentythirteen_post_nav')) : |
|
| 312 | 312 | /** |
| 313 | 313 | * Display navigation to next/previous post when applicable. |
| 314 | 314 | * |
@@ -318,18 +318,18 @@ discard block |
||
| 318 | 318 | global $post; |
| 319 | 319 | |
| 320 | 320 | // Don't print empty markup if there's nowhere to navigate. |
| 321 | - $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); |
|
| 322 | - $next = get_adjacent_post( false, '', false ); |
|
| 321 | + $previous = (is_attachment()) ? get_post($post->post_parent) : get_adjacent_post(false, '', true); |
|
| 322 | + $next = get_adjacent_post(false, '', false); |
|
| 323 | 323 | |
| 324 | - if ( ! $next && ! $previous ) |
|
| 324 | + if ( ! $next && ! $previous) |
|
| 325 | 325 | return; |
| 326 | 326 | ?> |
| 327 | 327 | <nav class="navigation post-navigation" role="navigation"> |
| 328 | - <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1> |
|
| 328 | + <h1 class="screen-reader-text"><?php _e('Post navigation', 'twentythirteen'); ?></h1> |
|
| 329 | 329 | <div class="nav-links"> |
| 330 | 330 | |
| 331 | - <?php previous_post_link( '%link', _x( '<span class="meta-nav">←</span> %title', 'Previous post link', 'twentythirteen' ) ); ?> |
|
| 332 | - <?php next_post_link( '%link', _x( '%title <span class="meta-nav">→</span>', 'Next post link', 'twentythirteen' ) ); ?> |
|
| 331 | + <?php previous_post_link('%link', _x('<span class="meta-nav">←</span> %title', 'Previous post link', 'twentythirteen')); ?> |
|
| 332 | + <?php next_post_link('%link', _x('%title <span class="meta-nav">→</span>', 'Next post link', 'twentythirteen')); ?> |
|
| 333 | 333 | |
| 334 | 334 | </div><!-- .nav-links --> |
| 335 | 335 | </nav><!-- .navigation --> |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | } |
| 338 | 338 | endif; |
| 339 | 339 | |
| 340 | -if ( ! function_exists( 'twentythirteen_entry_meta' ) ) : |
|
| 340 | +if ( ! function_exists('twentythirteen_entry_meta')) : |
|
| 341 | 341 | /** |
| 342 | 342 | * Print HTML with meta information for current post: categories, tags, permalink, author, and date. |
| 343 | 343 | * |
@@ -346,36 +346,36 @@ discard block |
||
| 346 | 346 | * @since Twenty Thirteen 1.0 |
| 347 | 347 | */ |
| 348 | 348 | function twentythirteen_entry_meta() { |
| 349 | - if ( is_sticky() && is_home() && ! is_paged() ) |
|
| 350 | - echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>'; |
|
| 349 | + if (is_sticky() && is_home() && ! is_paged()) |
|
| 350 | + echo '<span class="featured-post">'.esc_html__('Sticky', 'twentythirteen').'</span>'; |
|
| 351 | 351 | |
| 352 | - if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) |
|
| 352 | + if ( ! has_post_format('link') && 'post' == get_post_type()) |
|
| 353 | 353 | twentythirteen_entry_date(); |
| 354 | 354 | |
| 355 | 355 | // Translators: used between list items, there is a space after the comma. |
| 356 | - $categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) ); |
|
| 357 | - if ( $categories_list ) { |
|
| 358 | - echo '<span class="categories-links">' . $categories_list . '</span>'; |
|
| 356 | + $categories_list = get_the_category_list(__(', ', 'twentythirteen')); |
|
| 357 | + if ($categories_list) { |
|
| 358 | + echo '<span class="categories-links">'.$categories_list.'</span>'; |
|
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | // Translators: used between list items, there is a space after the comma. |
| 362 | - $tag_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) ); |
|
| 363 | - if ( $tag_list ) { |
|
| 364 | - echo '<span class="tags-links">' . $tag_list . '</span>'; |
|
| 362 | + $tag_list = get_the_tag_list('', __(', ', 'twentythirteen')); |
|
| 363 | + if ($tag_list) { |
|
| 364 | + echo '<span class="tags-links">'.$tag_list.'</span>'; |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | // Post author |
| 368 | - if ( 'post' == get_post_type() ) { |
|
| 369 | - printf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', |
|
| 370 | - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), |
|
| 371 | - esc_attr( sprintf( __( 'View all posts by %s', 'twentythirteen' ), get_the_author() ) ), |
|
| 368 | + if ('post' == get_post_type()) { |
|
| 369 | + printf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', |
|
| 370 | + esc_url(get_author_posts_url(get_the_author_meta('ID'))), |
|
| 371 | + esc_attr(sprintf(__('View all posts by %s', 'twentythirteen'), get_the_author())), |
|
| 372 | 372 | get_the_author() |
| 373 | 373 | ); |
| 374 | 374 | } |
| 375 | 375 | } |
| 376 | 376 | endif; |
| 377 | 377 | |
| 378 | -if ( ! function_exists( 'twentythirteen_entry_date' ) ) : |
|
| 378 | +if ( ! function_exists('twentythirteen_entry_date')) : |
|
| 379 | 379 | /** |
| 380 | 380 | * Print HTML with date information for current post. |
| 381 | 381 | * |
@@ -386,27 +386,27 @@ discard block |
||
| 386 | 386 | * @param boolean $echo (optional) Whether to echo the date. Default true. |
| 387 | 387 | * @return string The HTML-formatted post date. |
| 388 | 388 | */ |
| 389 | -function twentythirteen_entry_date( $echo = true ) { |
|
| 390 | - if ( has_post_format( array( 'chat', 'status' ) ) ) |
|
| 391 | - $format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' ); |
|
| 389 | +function twentythirteen_entry_date($echo = true) { |
|
| 390 | + if (has_post_format(array('chat', 'status'))) |
|
| 391 | + $format_prefix = _x('%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen'); |
|
| 392 | 392 | else |
| 393 | 393 | $format_prefix = '%2$s'; |
| 394 | 394 | |
| 395 | - $date = sprintf( '<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>', |
|
| 396 | - esc_url( get_permalink() ), |
|
| 397 | - esc_attr( sprintf( __( 'Permalink to %s', 'twentythirteen' ), the_title_attribute( 'echo=0' ) ) ), |
|
| 398 | - esc_attr( get_the_date( 'c' ) ), |
|
| 399 | - esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) ) |
|
| 395 | + $date = sprintf('<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>', |
|
| 396 | + esc_url(get_permalink()), |
|
| 397 | + esc_attr(sprintf(__('Permalink to %s', 'twentythirteen'), the_title_attribute('echo=0'))), |
|
| 398 | + esc_attr(get_the_date('c')), |
|
| 399 | + esc_html(sprintf($format_prefix, get_post_format_string(get_post_format()), get_the_date())) |
|
| 400 | 400 | ); |
| 401 | 401 | |
| 402 | - if ( $echo ) |
|
| 402 | + if ($echo) |
|
| 403 | 403 | echo $date; |
| 404 | 404 | |
| 405 | 405 | return $date; |
| 406 | 406 | } |
| 407 | 407 | endif; |
| 408 | 408 | |
| 409 | -if ( ! function_exists( 'twentythirteen_the_attached_image' ) ) : |
|
| 409 | +if ( ! function_exists('twentythirteen_the_attached_image')) : |
|
| 410 | 410 | /** |
| 411 | 411 | * Print the attached image with a link to the next attached image. |
| 412 | 412 | * |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | * @type int The attachment width in pixels. |
| 424 | 424 | * } |
| 425 | 425 | */ |
| 426 | - $attachment_size = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) ); |
|
| 426 | + $attachment_size = apply_filters('twentythirteen_attachment_size', array(724, 724)); |
|
| 427 | 427 | $next_attachment_url = wp_get_attachment_url(); |
| 428 | 428 | $post = get_post(); |
| 429 | 429 | |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | * looking at the last image in a gallery), or, in a gallery of one, just the |
| 434 | 434 | * link to that image file. |
| 435 | 435 | */ |
| 436 | - $attachment_ids = get_posts( array( |
|
| 436 | + $attachment_ids = get_posts(array( |
|
| 437 | 437 | 'post_parent' => $post->post_parent, |
| 438 | 438 | 'fields' => 'ids', |
| 439 | 439 | 'numberposts' => -1, |
@@ -442,30 +442,30 @@ discard block |
||
| 442 | 442 | 'post_mime_type' => 'image', |
| 443 | 443 | 'order' => 'ASC', |
| 444 | 444 | 'orderby' => 'menu_order ID', |
| 445 | - ) ); |
|
| 445 | + )); |
|
| 446 | 446 | |
| 447 | 447 | // If there is more than 1 attachment in a gallery... |
| 448 | - if ( count( $attachment_ids ) > 1 ) { |
|
| 449 | - foreach ( $attachment_ids as $idx => $attachment_id ) { |
|
| 450 | - if ( $attachment_id == $post->ID ) { |
|
| 451 | - $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ]; |
|
| 448 | + if (count($attachment_ids) > 1) { |
|
| 449 | + foreach ($attachment_ids as $idx => $attachment_id) { |
|
| 450 | + if ($attachment_id == $post->ID) { |
|
| 451 | + $next_id = $attachment_ids[($idx + 1) % count($attachment_ids)]; |
|
| 452 | 452 | break; |
| 453 | 453 | } |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | // get the URL of the next image attachment... |
| 457 | - if ( $next_id ) |
|
| 458 | - $next_attachment_url = get_attachment_link( $next_id ); |
|
| 457 | + if ($next_id) |
|
| 458 | + $next_attachment_url = get_attachment_link($next_id); |
|
| 459 | 459 | |
| 460 | 460 | // or get the URL of the first image attachment. |
| 461 | 461 | else |
| 462 | - $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); |
|
| 462 | + $next_attachment_url = get_attachment_link(reset($attachment_ids)); |
|
| 463 | 463 | } |
| 464 | 464 | |
| 465 | - printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', |
|
| 466 | - esc_url( $next_attachment_url ), |
|
| 467 | - the_title_attribute( array( 'echo' => false ) ), |
|
| 468 | - wp_get_attachment_image( $post->ID, $attachment_size ) |
|
| 465 | + printf('<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', |
|
| 466 | + esc_url($next_attachment_url), |
|
| 467 | + the_title_attribute(array('echo' => false)), |
|
| 468 | + wp_get_attachment_image($post->ID, $attachment_size) |
|
| 469 | 469 | ); |
| 470 | 470 | } |
| 471 | 471 | endif; |
@@ -484,12 +484,12 @@ discard block |
||
| 484 | 484 | */ |
| 485 | 485 | function twentythirteen_get_link_url() { |
| 486 | 486 | $content = get_the_content(); |
| 487 | - $has_url = get_url_in_content( $content ); |
|
| 487 | + $has_url = get_url_in_content($content); |
|
| 488 | 488 | |
| 489 | - return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); |
|
| 489 | + return ($has_url) ? $has_url : apply_filters('the_permalink', get_permalink()); |
|
| 490 | 490 | } |
| 491 | 491 | |
| 492 | -if ( ! function_exists( 'twentythirteen_excerpt_more' ) && ! is_admin() ) : |
|
| 492 | +if ( ! function_exists('twentythirteen_excerpt_more') && ! is_admin()) : |
|
| 493 | 493 | /** |
| 494 | 494 | * Replaces "[...]" (appended to automatically generated excerpts) with ... |
| 495 | 495 | * and a Continue reading link. |
@@ -499,15 +499,15 @@ discard block |
||
| 499 | 499 | * @param string $more Default Read More excerpt link. |
| 500 | 500 | * @return string Filtered Read More excerpt link. |
| 501 | 501 | */ |
| 502 | -function twentythirteen_excerpt_more( $more ) { |
|
| 503 | - $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>', |
|
| 504 | - esc_url( get_permalink( get_the_ID() ) ), |
|
| 502 | +function twentythirteen_excerpt_more($more) { |
|
| 503 | + $link = sprintf('<a href="%1$s" class="more-link">%2$s</a>', |
|
| 504 | + esc_url(get_permalink(get_the_ID())), |
|
| 505 | 505 | /* translators: %s: Name of current post */ |
| 506 | - sprintf( __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' ) |
|
| 506 | + sprintf(__('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), '<span class="screen-reader-text">'.get_the_title(get_the_ID()).'</span>') |
|
| 507 | 507 | ); |
| 508 | - return ' … ' . $link; |
|
| 508 | + return ' … '.$link; |
|
| 509 | 509 | } |
| 510 | -add_filter( 'excerpt_more', 'twentythirteen_excerpt_more' ); |
|
| 510 | +add_filter('excerpt_more', 'twentythirteen_excerpt_more'); |
|
| 511 | 511 | endif; |
| 512 | 512 | |
| 513 | 513 | /** |
@@ -523,19 +523,19 @@ discard block |
||
| 523 | 523 | * @param array $classes A list of existing body class values. |
| 524 | 524 | * @return array The filtered body class list. |
| 525 | 525 | */ |
| 526 | -function twentythirteen_body_class( $classes ) { |
|
| 527 | - if ( ! is_multi_author() ) |
|
| 526 | +function twentythirteen_body_class($classes) { |
|
| 527 | + if ( ! is_multi_author()) |
|
| 528 | 528 | $classes[] = 'single-author'; |
| 529 | 529 | |
| 530 | - if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) |
|
| 530 | + if (is_active_sidebar('sidebar-2') && ! is_attachment() && ! is_404()) |
|
| 531 | 531 | $classes[] = 'sidebar'; |
| 532 | 532 | |
| 533 | - if ( ! get_option( 'show_avatars' ) ) |
|
| 533 | + if ( ! get_option('show_avatars')) |
|
| 534 | 534 | $classes[] = 'no-avatars'; |
| 535 | 535 | |
| 536 | 536 | return $classes; |
| 537 | 537 | } |
| 538 | -add_filter( 'body_class', 'twentythirteen_body_class' ); |
|
| 538 | +add_filter('body_class', 'twentythirteen_body_class'); |
|
| 539 | 539 | |
| 540 | 540 | /** |
| 541 | 541 | * Adjust content_width value for video post formats and attachment templates. |
@@ -545,12 +545,12 @@ discard block |
||
| 545 | 545 | function twentythirteen_content_width() { |
| 546 | 546 | global $content_width; |
| 547 | 547 | |
| 548 | - if ( is_attachment() ) |
|
| 548 | + if (is_attachment()) |
|
| 549 | 549 | $content_width = 724; |
| 550 | - elseif ( has_post_format( 'audio' ) ) |
|
| 550 | + elseif (has_post_format('audio')) |
|
| 551 | 551 | $content_width = 484; |
| 552 | 552 | } |
| 553 | -add_action( 'template_redirect', 'twentythirteen_content_width' ); |
|
| 553 | +add_action('template_redirect', 'twentythirteen_content_width'); |
|
| 554 | 554 | |
| 555 | 555 | /** |
| 556 | 556 | * Add postMessage support for site title and description for the Customizer. |
@@ -559,25 +559,25 @@ discard block |
||
| 559 | 559 | * |
| 560 | 560 | * @param WP_Customize_Manager $wp_customize Customizer object. |
| 561 | 561 | */ |
| 562 | -function twentythirteen_customize_register( $wp_customize ) { |
|
| 563 | - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
|
| 564 | - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
|
| 565 | - $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; |
|
| 562 | +function twentythirteen_customize_register($wp_customize) { |
|
| 563 | + $wp_customize->get_setting('blogname')->transport = 'postMessage'; |
|
| 564 | + $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; |
|
| 565 | + $wp_customize->get_setting('header_textcolor')->transport = 'postMessage'; |
|
| 566 | 566 | |
| 567 | - if ( isset( $wp_customize->selective_refresh ) ) { |
|
| 568 | - $wp_customize->selective_refresh->add_partial( 'blogname', array( |
|
| 567 | + if (isset($wp_customize->selective_refresh)) { |
|
| 568 | + $wp_customize->selective_refresh->add_partial('blogname', array( |
|
| 569 | 569 | 'selector' => '.site-title', |
| 570 | 570 | 'container_inclusive' => false, |
| 571 | 571 | 'render_callback' => 'twentythirteen_customize_partial_blogname', |
| 572 | - ) ); |
|
| 573 | - $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
|
| 572 | + )); |
|
| 573 | + $wp_customize->selective_refresh->add_partial('blogdescription', array( |
|
| 574 | 574 | 'selector' => '.site-description', |
| 575 | 575 | 'container_inclusive' => false, |
| 576 | 576 | 'render_callback' => 'twentythirteen_customize_partial_blogdescription', |
| 577 | - ) ); |
|
| 577 | + )); |
|
| 578 | 578 | } |
| 579 | 579 | } |
| 580 | -add_action( 'customize_register', 'twentythirteen_customize_register' ); |
|
| 580 | +add_action('customize_register', 'twentythirteen_customize_register'); |
|
| 581 | 581 | |
| 582 | 582 | /** |
| 583 | 583 | * Render the site title for the selective refresh partial. |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | * @return void |
| 589 | 589 | */ |
| 590 | 590 | function twentythirteen_customize_partial_blogname() { |
| 591 | - bloginfo( 'name' ); |
|
| 591 | + bloginfo('name'); |
|
| 592 | 592 | } |
| 593 | 593 | |
| 594 | 594 | /** |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | * @return void |
| 601 | 601 | */ |
| 602 | 602 | function twentythirteen_customize_partial_blogdescription() { |
| 603 | - bloginfo( 'description' ); |
|
| 603 | + bloginfo('description'); |
|
| 604 | 604 | } |
| 605 | 605 | |
| 606 | 606 | /** |
@@ -612,6 +612,6 @@ discard block |
||
| 612 | 612 | * @since Twenty Thirteen 1.0 |
| 613 | 613 | */ |
| 614 | 614 | function twentythirteen_customize_preview_js() { |
| 615 | - wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true ); |
|
| 615 | + wp_enqueue_script('twentythirteen-customizer', get_template_directory_uri().'/js/theme-customizer.js', array('customize-preview'), '20141120', true); |
|
| 616 | 616 | } |
| 617 | -add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' ); |
|
| 617 | +add_action('customize_preview_init', 'twentythirteen_customize_preview_js'); |
|
@@ -12,27 +12,27 @@ |
||
| 12 | 12 | <div class="entry-content"> |
| 13 | 13 | <?php |
| 14 | 14 | /* translators: %s: Name of current post */ |
| 15 | - the_content( sprintf( |
|
| 16 | - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), |
|
| 17 | - the_title( '<span class="screen-reader-text">', '</span>', false ) |
|
| 18 | - ) ); |
|
| 15 | + the_content(sprintf( |
|
| 16 | + __('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), |
|
| 17 | + the_title('<span class="screen-reader-text">', '</span>', false) |
|
| 18 | + )); |
|
| 19 | 19 | |
| 20 | - wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); |
|
| 20 | + wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); |
|
| 21 | 21 | ?> |
| 22 | 22 | </div><!-- .entry-content --> |
| 23 | 23 | |
| 24 | 24 | <footer class="entry-meta"> |
| 25 | - <?php if ( is_single() ) : ?> |
|
| 25 | + <?php if (is_single()) : ?> |
|
| 26 | 26 | <?php twentythirteen_entry_meta(); ?> |
| 27 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 27 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 28 | 28 | |
| 29 | - <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?> |
|
| 30 | - <?php get_template_part( 'author-bio' ); ?> |
|
| 29 | + <?php if (get_the_author_meta('description') && is_multi_author()) : ?> |
|
| 30 | + <?php get_template_part('author-bio'); ?> |
|
| 31 | 31 | <?php endif; ?> |
| 32 | 32 | |
| 33 | 33 | <?php else : ?> |
| 34 | 34 | <?php twentythirteen_entry_date(); ?> |
| 35 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 35 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 36 | 36 | <?php endif; // is_single() ?> |
| 37 | 37 | </footer><!-- .entry-meta --> |
| 38 | 38 | </article><!-- #post --> |
@@ -30,8 +30,11 @@ |
||
| 30 | 30 | <?php get_template_part( 'author-bio' ); ?> |
| 31 | 31 | <?php endif; ?> |
| 32 | 32 | |
| 33 | - <?php else : ?> |
|
| 34 | - <?php twentythirteen_entry_date(); ?> |
|
| 33 | + <?php else { |
|
| 34 | + : ?> |
|
| 35 | + <?php twentythirteen_entry_date(); |
|
| 36 | +} |
|
| 37 | +?> |
|
| 35 | 38 | <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
| 36 | 39 | <?php endif; // is_single() ?> |
| 37 | 40 | </footer><!-- .entry-meta --> |
@@ -14,24 +14,24 @@ |
||
| 14 | 14 | <div id="primary" class="content-area"> |
| 15 | 15 | <div id="content" class="site-content" role="main"> |
| 16 | 16 | |
| 17 | - <?php if ( have_posts() ) : ?> |
|
| 17 | + <?php if (have_posts()) : ?> |
|
| 18 | 18 | <header class="archive-header"> |
| 19 | - <h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentythirteen' ), single_cat_title( '', false ) ); ?></h1> |
|
| 19 | + <h1 class="archive-title"><?php printf(__('Category Archives: %s', 'twentythirteen'), single_cat_title('', false)); ?></h1> |
|
| 20 | 20 | |
| 21 | - <?php if ( category_description() ) : // Show an optional category description ?> |
|
| 21 | + <?php if (category_description()) : // Show an optional category description ?> |
|
| 22 | 22 | <div class="archive-meta"><?php echo category_description(); ?></div> |
| 23 | 23 | <?php endif; ?> |
| 24 | 24 | </header><!-- .archive-header --> |
| 25 | 25 | |
| 26 | 26 | <?php /* The loop */ ?> |
| 27 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 28 | - <?php get_template_part( 'content', get_post_format() ); ?> |
|
| 27 | + <?php while (have_posts()) : the_post(); ?> |
|
| 28 | + <?php get_template_part('content', get_post_format()); ?> |
|
| 29 | 29 | <?php endwhile; ?> |
| 30 | 30 | |
| 31 | 31 | <?php twentythirteen_paging_nav(); ?> |
| 32 | 32 | |
| 33 | 33 | <?php else : ?> |
| 34 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 34 | + <?php get_template_part('content', 'none'); ?> |
|
| 35 | 35 | <?php endif; ?> |
| 36 | 36 | |
| 37 | 37 | </div><!-- #content --> |
@@ -51,8 +51,11 @@ |
||
| 51 | 51 | |
| 52 | 52 | <?php twentythirteen_paging_nav(); ?> |
| 53 | 53 | |
| 54 | - <?php else : ?> |
|
| 55 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 54 | + <?php else { |
|
| 55 | + : ?> |
|
| 56 | + <?php get_template_part( 'content', 'none' ); |
|
| 57 | +} |
|
| 58 | +?> |
|
| 56 | 59 | <?php endif; ?> |
| 57 | 60 | |
| 58 | 61 | </div><!-- #content --> |
@@ -11,32 +11,32 @@ |
||
| 11 | 11 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 12 | 12 | <header class="entry-header"> |
| 13 | 13 | <h1 class="entry-title"> |
| 14 | - <a href="<?php echo esc_url( twentythirteen_get_link_url() ); ?>"><?php the_title(); ?></a> |
|
| 14 | + <a href="<?php echo esc_url(twentythirteen_get_link_url()); ?>"><?php the_title(); ?></a> |
|
| 15 | 15 | </h1> |
| 16 | 16 | |
| 17 | 17 | <div class="entry-meta"> |
| 18 | 18 | <?php twentythirteen_entry_date(); ?> |
| 19 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 19 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 20 | 20 | </div><!-- .entry-meta --> |
| 21 | 21 | </header><!-- .entry-header --> |
| 22 | 22 | |
| 23 | 23 | <div class="entry-content"> |
| 24 | 24 | <?php |
| 25 | 25 | /* translators: %s: Name of current post */ |
| 26 | - the_content( sprintf( |
|
| 27 | - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), |
|
| 28 | - the_title( '<span class="screen-reader-text">', '</span>', false ) |
|
| 29 | - ) ); |
|
| 26 | + the_content(sprintf( |
|
| 27 | + __('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), |
|
| 28 | + the_title('<span class="screen-reader-text">', '</span>', false) |
|
| 29 | + )); |
|
| 30 | 30 | |
| 31 | - wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); |
|
| 31 | + wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); |
|
| 32 | 32 | ?> |
| 33 | 33 | </div><!-- .entry-content --> |
| 34 | 34 | |
| 35 | - <?php if ( is_single() ) : ?> |
|
| 35 | + <?php if (is_single()) : ?> |
|
| 36 | 36 | <footer class="entry-meta"> |
| 37 | 37 | <?php twentythirteen_entry_meta(); ?> |
| 38 | - <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?> |
|
| 39 | - <?php get_template_part( 'author-bio' ); ?> |
|
| 38 | + <?php if (get_the_author_meta('description') && is_multi_author()) : ?> |
|
| 39 | + <?php get_template_part('author-bio'); ?> |
|
| 40 | 40 | <?php endif; ?> |
| 41 | 41 | </footer><!-- .entry-meta --> |
| 42 | 42 | <?php endif; // is_single() ?> |
@@ -17,11 +17,11 @@ discard block |
||
| 17 | 17 | <div id="content" class="site-content" role="main"> |
| 18 | 18 | |
| 19 | 19 | <?php /* The loop */ ?> |
| 20 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 20 | + <?php while (have_posts()) : the_post(); ?> |
|
| 21 | 21 | |
| 22 | 22 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 23 | 23 | <header class="entry-header"> |
| 24 | - <?php if ( has_post_thumbnail() && ! post_password_required() ) : ?> |
|
| 24 | + <?php if (has_post_thumbnail() && ! post_password_required()) : ?> |
|
| 25 | 25 | <div class="entry-thumbnail"> |
| 26 | 26 | <?php the_post_thumbnail(); ?> |
| 27 | 27 | </div> |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | <div class="entry-content"> |
| 34 | 34 | <?php the_content(); ?> |
| 35 | - <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> |
|
| 35 | + <?php wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); ?> |
|
| 36 | 36 | </div><!-- .entry-content --> |
| 37 | 37 | |
| 38 | 38 | <footer class="entry-meta"> |
| 39 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 39 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 40 | 40 | </footer><!-- .entry-meta --> |
| 41 | 41 | </article><!-- #post --> |
| 42 | 42 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 12 | 12 | <header class="entry-header"> |
| 13 | - <?php if ( is_single() ) : ?> |
|
| 13 | + <?php if (is_single()) : ?> |
|
| 14 | 14 | <h1 class="entry-title"><?php the_title(); ?></h1> |
| 15 | 15 | <?php else : ?> |
| 16 | 16 | <h1 class="entry-title"> |
@@ -22,27 +22,27 @@ discard block |
||
| 22 | 22 | <div class="entry-content"> |
| 23 | 23 | <?php |
| 24 | 24 | /* translators: %s: Name of current post */ |
| 25 | - the_content( sprintf( |
|
| 26 | - __( 'Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen' ), |
|
| 27 | - the_title( '<span class="screen-reader-text">', '</span>', false ) |
|
| 28 | - ) ); |
|
| 25 | + the_content(sprintf( |
|
| 26 | + __('Continue reading %s <span class="meta-nav">→</span>', 'twentythirteen'), |
|
| 27 | + the_title('<span class="screen-reader-text">', '</span>', false) |
|
| 28 | + )); |
|
| 29 | 29 | |
| 30 | - wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); |
|
| 30 | + wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); |
|
| 31 | 31 | ?> |
| 32 | 32 | </div><!-- .entry-content --> |
| 33 | 33 | |
| 34 | 34 | <footer class="entry-meta"> |
| 35 | 35 | <?php twentythirteen_entry_meta(); ?> |
| 36 | 36 | |
| 37 | - <?php if ( comments_open() && ! is_single() ) : ?> |
|
| 37 | + <?php if (comments_open() && ! is_single()) : ?> |
|
| 38 | 38 | <span class="comments-link"> |
| 39 | - <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a comment', 'twentythirteen' ) . '</span>', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?> |
|
| 39 | + <?php comments_popup_link('<span class="leave-reply">'.__('Leave a comment', 'twentythirteen').'</span>', __('One comment so far', 'twentythirteen'), __('View all % comments', 'twentythirteen')); ?> |
|
| 40 | 40 | </span><!-- .comments-link --> |
| 41 | 41 | <?php endif; // comments_open() ?> |
| 42 | - <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> |
|
| 42 | + <?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?> |
|
| 43 | 43 | |
| 44 | - <?php if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) : ?> |
|
| 45 | - <?php get_template_part( 'author-bio' ); ?> |
|
| 44 | + <?php if (is_single() && get_the_author_meta('description') && is_multi_author()) : ?> |
|
| 45 | + <?php get_template_part('author-bio'); ?> |
|
| 46 | 46 | <?php endif; ?> |
| 47 | 47 | </footer><!-- .entry-meta --> |
| 48 | 48 | </article><!-- #post --> |
@@ -12,9 +12,12 @@ |
||
| 12 | 12 | <header class="entry-header"> |
| 13 | 13 | <?php if ( is_single() ) : ?> |
| 14 | 14 | <h1 class="entry-title"><?php the_title(); ?></h1> |
| 15 | - <?php else : ?> |
|
| 15 | + <?php else { |
|
| 16 | + : ?> |
|
| 16 | 17 | <h1 class="entry-title"> |
| 17 | - <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> |
|
| 18 | + <a href="<?php the_permalink(); |
|
| 19 | +} |
|
| 20 | +?>" rel="bookmark"><?php the_title(); ?></a> |
|
| 18 | 21 | </h1> |
| 19 | 22 | <?php endif; // is_single() ?> |
| 20 | 23 | </header><!-- .entry-header --> |
@@ -12,21 +12,21 @@ |
||
| 12 | 12 | <div id="primary" class="content-area"> |
| 13 | 13 | <div id="content" class="site-content" role="main"> |
| 14 | 14 | |
| 15 | - <?php if ( have_posts() ) : ?> |
|
| 15 | + <?php if (have_posts()) : ?> |
|
| 16 | 16 | |
| 17 | 17 | <header class="page-header"> |
| 18 | - <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentythirteen' ), get_search_query() ); ?></h1> |
|
| 18 | + <h1 class="page-title"><?php printf(__('Search Results for: %s', 'twentythirteen'), get_search_query()); ?></h1> |
|
| 19 | 19 | </header> |
| 20 | 20 | |
| 21 | 21 | <?php /* The loop */ ?> |
| 22 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 23 | - <?php get_template_part( 'content', get_post_format() ); ?> |
|
| 22 | + <?php while (have_posts()) : the_post(); ?> |
|
| 23 | + <?php get_template_part('content', get_post_format()); ?> |
|
| 24 | 24 | <?php endwhile; ?> |
| 25 | 25 | |
| 26 | 26 | <?php twentythirteen_paging_nav(); ?> |
| 27 | 27 | |
| 28 | 28 | <?php else : ?> |
| 29 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 29 | + <?php get_template_part('content', 'none'); ?> |
|
| 30 | 30 | <?php endif; ?> |
| 31 | 31 | |
| 32 | 32 | </div><!-- #content --> |
@@ -51,8 +51,11 @@ |
||
| 51 | 51 | |
| 52 | 52 | <?php twentythirteen_paging_nav(); ?> |
| 53 | 53 | |
| 54 | - <?php else : ?> |
|
| 55 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 54 | + <?php else { |
|
| 55 | + : ?> |
|
| 56 | + <?php get_template_part( 'content', 'none' ); |
|
| 57 | +} |
|
| 58 | +?> |
|
| 56 | 59 | <?php endif; ?> |
| 57 | 60 | |
| 58 | 61 | </div><!-- #content --> |
@@ -18,20 +18,20 @@ |
||
| 18 | 18 | <div id="primary" class="content-area"> |
| 19 | 19 | <div id="content" class="site-content" role="main"> |
| 20 | 20 | |
| 21 | - <?php if ( have_posts() ) : ?> |
|
| 21 | + <?php if (have_posts()) : ?> |
|
| 22 | 22 | <header class="archive-header"> |
| 23 | - <h1 class="archive-title"><?php printf( __( '%s Archives', 'twentythirteen' ), '<span>' . esc_html( get_post_format_string( get_post_format() ) ) . '</span>' ); ?></h1> |
|
| 23 | + <h1 class="archive-title"><?php printf(__('%s Archives', 'twentythirteen'), '<span>'.esc_html(get_post_format_string(get_post_format())).'</span>'); ?></h1> |
|
| 24 | 24 | </header><!-- .archive-header --> |
| 25 | 25 | |
| 26 | 26 | <?php /* The loop */ ?> |
| 27 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 28 | - <?php get_template_part( 'content', get_post_format() ); ?> |
|
| 27 | + <?php while (have_posts()) : the_post(); ?> |
|
| 28 | + <?php get_template_part('content', get_post_format()); ?> |
|
| 29 | 29 | <?php endwhile; ?> |
| 30 | 30 | |
| 31 | 31 | <?php twentythirteen_paging_nav(); ?> |
| 32 | 32 | |
| 33 | 33 | <?php else : ?> |
| 34 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 34 | + <?php get_template_part('content', 'none'); ?> |
|
| 35 | 35 | <?php endif; ?> |
| 36 | 36 | |
| 37 | 37 | </div><!-- #content --> |
@@ -51,8 +51,11 @@ |
||
| 51 | 51 | |
| 52 | 52 | <?php twentythirteen_paging_nav(); ?> |
| 53 | 53 | |
| 54 | - <?php else : ?> |
|
| 55 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 54 | + <?php else { |
|
| 55 | + : ?> |
|
| 56 | + <?php get_template_part( 'content', 'none' ); |
|
| 57 | +} |
|
| 58 | +?> |
|
| 56 | 59 | <?php endif; ?> |
| 57 | 60 | |
| 58 | 61 | </div><!-- #content --> |
@@ -16,24 +16,24 @@ |
||
| 16 | 16 | <div id="primary" class="content-area"> |
| 17 | 17 | <div id="content" class="site-content" role="main"> |
| 18 | 18 | |
| 19 | - <?php if ( have_posts() ) : ?> |
|
| 19 | + <?php if (have_posts()) : ?> |
|
| 20 | 20 | <header class="archive-header"> |
| 21 | - <h1 class="archive-title"><?php printf( __( 'Tag Archives: %s', 'twentythirteen' ), single_tag_title( '', false ) ); ?></h1> |
|
| 21 | + <h1 class="archive-title"><?php printf(__('Tag Archives: %s', 'twentythirteen'), single_tag_title('', false)); ?></h1> |
|
| 22 | 22 | |
| 23 | - <?php if ( tag_description() ) : // Show an optional tag description ?> |
|
| 23 | + <?php if (tag_description()) : // Show an optional tag description ?> |
|
| 24 | 24 | <div class="archive-meta"><?php echo tag_description(); ?></div> |
| 25 | 25 | <?php endif; ?> |
| 26 | 26 | </header><!-- .archive-header --> |
| 27 | 27 | |
| 28 | 28 | <?php /* The loop */ ?> |
| 29 | - <?php while ( have_posts() ) : the_post(); ?> |
|
| 30 | - <?php get_template_part( 'content', get_post_format() ); ?> |
|
| 29 | + <?php while (have_posts()) : the_post(); ?> |
|
| 30 | + <?php get_template_part('content', get_post_format()); ?> |
|
| 31 | 31 | <?php endwhile; ?> |
| 32 | 32 | |
| 33 | 33 | <?php twentythirteen_paging_nav(); ?> |
| 34 | 34 | |
| 35 | 35 | <?php else : ?> |
| 36 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 36 | + <?php get_template_part('content', 'none'); ?> |
|
| 37 | 37 | <?php endif; ?> |
| 38 | 38 | |
| 39 | 39 | </div><!-- #content --> |
@@ -51,8 +51,11 @@ |
||
| 51 | 51 | |
| 52 | 52 | <?php twentythirteen_paging_nav(); ?> |
| 53 | 53 | |
| 54 | - <?php else : ?> |
|
| 55 | - <?php get_template_part( 'content', 'none' ); ?> |
|
| 54 | + <?php else { |
|
| 55 | + : ?> |
|
| 56 | + <?php get_template_part( 'content', 'none' ); |
|
| 57 | +} |
|
| 58 | +?> |
|
| 56 | 59 | <?php endif; ?> |
| 57 | 60 | |
| 58 | 61 | </div><!-- #content --> |