@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | |
15 | 15 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
16 | 16 | <?php |
17 | - if ( is_sticky() && is_home() ) { |
|
18 | - echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); |
|
17 | + if (is_sticky() && is_home()) { |
|
18 | + echo twentyseventeen_get_svg(array('icon' => 'thumb-tack')); |
|
19 | 19 | } |
20 | 20 | ?> |
21 | 21 | <header class="entry-header"> |
22 | 22 | <?php |
23 | - if ( 'post' === get_post_type() ) { |
|
23 | + if ('post' === get_post_type()) { |
|
24 | 24 | echo '<div class="entry-meta">'; |
25 | - if ( is_single() ) { |
|
25 | + if (is_single()) { |
|
26 | 26 | twentyseventeen_posted_on(); |
27 | 27 | } else { |
28 | 28 | echo twentyseventeen_time_link(); |
@@ -31,39 +31,39 @@ discard block |
||
31 | 31 | echo '</div><!-- .entry-meta -->'; |
32 | 32 | }; |
33 | 33 | |
34 | - if ( is_single() ) { |
|
35 | - the_title( '<h1 class="entry-title">', '</h1>' ); |
|
34 | + if (is_single()) { |
|
35 | + the_title('<h1 class="entry-title">', '</h1>'); |
|
36 | 36 | } else { |
37 | - the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); |
|
37 | + the_title('<h2 class="entry-title"><a href="'.esc_url(get_permalink()).'" rel="bookmark">', '</a></h2>'); |
|
38 | 38 | } |
39 | 39 | ?> |
40 | 40 | </header><!-- .entry-header --> |
41 | 41 | |
42 | - <?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?> |
|
42 | + <?php if ('' !== get_the_post_thumbnail() && ! is_single()) : ?> |
|
43 | 43 | <div class="post-thumbnail"> |
44 | 44 | <a href="<?php the_permalink(); ?>"> |
45 | - <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?> |
|
45 | + <?php the_post_thumbnail('twentyseventeen-featured-image'); ?> |
|
46 | 46 | </a> |
47 | 47 | </div><!-- .post-thumbnail --> |
48 | 48 | <?php endif; ?> |
49 | 49 | |
50 | 50 | <div class="entry-content"> |
51 | 51 | |
52 | - <?php if ( is_single() || '' === get_the_post_thumbnail() ) { |
|
52 | + <?php if (is_single() || '' === get_the_post_thumbnail()) { |
|
53 | 53 | |
54 | 54 | // Only show content if is a single post, or if there's no featured image. |
55 | 55 | /* translators: %s: Name of current post */ |
56 | - the_content( sprintf( |
|
57 | - __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), |
|
56 | + the_content(sprintf( |
|
57 | + __('Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen'), |
|
58 | 58 | get_the_title() |
59 | - ) ); |
|
59 | + )); |
|
60 | 60 | |
61 | - wp_link_pages( array( |
|
62 | - 'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), |
|
61 | + wp_link_pages(array( |
|
62 | + 'before' => '<div class="page-links">'.__('Pages:', 'twentyseventeen'), |
|
63 | 63 | 'after' => '</div>', |
64 | 64 | 'link_before' => '<span class="page-number">', |
65 | 65 | 'link_after' => '</span>', |
66 | - ) ); |
|
66 | + )); |
|
67 | 67 | |
68 | 68 | }; |
69 | 69 | ?> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | </div><!-- .entry-content --> |
72 | 72 | |
73 | 73 | <?php |
74 | - if ( is_single() ) { |
|
74 | + if (is_single()) { |
|
75 | 75 | twentyseventeen_entry_footer(); |
76 | 76 | } |
77 | 77 | ?> |
@@ -17,20 +17,20 @@ |
||
17 | 17 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
18 | 18 | |
19 | 19 | <header class="entry-header"> |
20 | - <?php if ( 'post' === get_post_type() ) : ?> |
|
20 | + <?php if ('post' === get_post_type()) : ?> |
|
21 | 21 | <div class="entry-meta"> |
22 | 22 | <?php |
23 | 23 | echo twentyseventeen_time_link(); |
24 | 24 | twentyseventeen_edit_link(); |
25 | 25 | ?> |
26 | 26 | </div><!-- .entry-meta --> |
27 | - <?php elseif ( 'page' === get_post_type() && get_edit_post_link() ) : ?> |
|
27 | + <?php elseif ('page' === get_post_type() && get_edit_post_link()) : ?> |
|
28 | 28 | <div class="entry-meta"> |
29 | 29 | <?php twentyseventeen_edit_link(); ?> |
30 | 30 | </div><!-- .entry-meta --> |
31 | 31 | <?php endif; ?> |
32 | 32 | |
33 | - <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?> |
|
33 | + <?php the_title(sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>'); ?> |
|
34 | 34 | </header><!-- .entry-header --> |
35 | 35 | |
36 | 36 | <div class="entry-summary"> |
@@ -15,6 +15,6 @@ |
||
15 | 15 | <?php the_custom_header_markup(); ?> |
16 | 16 | </div> |
17 | 17 | |
18 | - <?php get_template_part( 'template-parts/header/site', 'branding' ); ?> |
|
18 | + <?php get_template_part('template-parts/header/site', 'branding'); ?> |
|
19 | 19 | |
20 | 20 | </div><!-- .custom-header --> |
@@ -15,23 +15,23 @@ |
||
15 | 15 | <?php the_custom_logo(); ?> |
16 | 16 | |
17 | 17 | <div class="site-branding-text"> |
18 | - <?php if ( is_front_page() ) : ?> |
|
19 | - <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> |
|
18 | + <?php if (is_front_page()) : ?> |
|
19 | + <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1> |
|
20 | 20 | <?php else : ?> |
21 | - <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> |
|
21 | + <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></p> |
|
22 | 22 | <?php endif; ?> |
23 | 23 | |
24 | 24 | <?php |
25 | - $description = get_bloginfo( 'description', 'display' ); |
|
25 | + $description = get_bloginfo('description', 'display'); |
|
26 | 26 | |
27 | - if ( $description || is_customize_preview() ) : |
|
27 | + if ($description || is_customize_preview()) : |
|
28 | 28 | ?> |
29 | 29 | <p class="site-description"><?php echo $description; ?></p> |
30 | 30 | <?php endif; ?> |
31 | 31 | </div><!-- .site-branding-text --> |
32 | 32 | |
33 | - <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?> |
|
34 | - <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a> |
|
33 | + <?php if ((twentyseventeen_is_frontpage() || (is_home() && is_front_page())) && ! has_nav_menu('top')) : ?> |
|
34 | + <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg(array('icon' => 'arrow-right')); ?><span class="screen-reader-text"><?php _e('Scroll down to content', 'twentyseventeen'); ?></span></a> |
|
35 | 35 | <?php endif; ?> |
36 | 36 | |
37 | 37 | </div><!-- .wrap --> |
@@ -17,8 +17,11 @@ |
||
17 | 17 | <div class="site-branding-text"> |
18 | 18 | <?php if ( is_front_page() ) : ?> |
19 | 19 | <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> |
20 | - <?php else : ?> |
|
21 | - <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> |
|
20 | + <?php else { |
|
21 | + : ?> |
|
22 | + <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); |
|
23 | +} |
|
24 | +?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> |
|
22 | 25 | <?php endif; ?> |
23 | 26 | |
24 | 27 | <?php |
@@ -12,17 +12,17 @@ discard block |
||
12 | 12 | |
13 | 13 | ?> |
14 | 14 | |
15 | -<article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> > |
|
15 | +<article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class('twentyseventeen-panel '); ?> > |
|
16 | 16 | |
17 | - <?php if ( has_post_thumbnail() ) : |
|
18 | - $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); |
|
17 | + <?php if (has_post_thumbnail()) : |
|
18 | + $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'twentyseventeen-featured-image'); |
|
19 | 19 | |
20 | 20 | // Calculate aspect ratio: h / w * 100%. |
21 | 21 | $ratio = $thumbnail[2] / $thumbnail[1] * 100; |
22 | 22 | ?> |
23 | 23 | |
24 | - <div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);"> |
|
25 | - <div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div> |
|
24 | + <div class="panel-image" style="background-image: url(<?php echo esc_url($thumbnail[0]); ?>);"> |
|
25 | + <div class="panel-image-prop" style="padding-top: <?php echo esc_attr($ratio); ?>%"></div> |
|
26 | 26 | </div><!-- .panel-image --> |
27 | 27 | |
28 | 28 | <?php endif; ?> |
@@ -30,42 +30,42 @@ discard block |
||
30 | 30 | <div class="panel-content"> |
31 | 31 | <div class="wrap"> |
32 | 32 | <header class="entry-header"> |
33 | - <?php the_title( '<h2 class="entry-title">', '</h2>' ); ?> |
|
33 | + <?php the_title('<h2 class="entry-title">', '</h2>'); ?> |
|
34 | 34 | |
35 | - <?php twentyseventeen_edit_link( get_the_ID() ); ?> |
|
35 | + <?php twentyseventeen_edit_link(get_the_ID()); ?> |
|
36 | 36 | |
37 | 37 | </header><!-- .entry-header --> |
38 | 38 | |
39 | 39 | <div class="entry-content"> |
40 | 40 | <?php |
41 | 41 | /* translators: %s: Name of current post */ |
42 | - the_content( sprintf( |
|
43 | - __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), |
|
42 | + the_content(sprintf( |
|
43 | + __('Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen'), |
|
44 | 44 | get_the_title() |
45 | - ) ); |
|
45 | + )); |
|
46 | 46 | ?> |
47 | 47 | </div><!-- .entry-content --> |
48 | 48 | |
49 | 49 | <?php |
50 | 50 | // Show recent blog posts if is blog posts page (Note that get_option returns a string, so we're casting the result as an int). |
51 | - if ( get_the_ID() === (int) get_option( 'page_for_posts' ) ) : ?> |
|
51 | + if (get_the_ID() === (int) get_option('page_for_posts')) : ?> |
|
52 | 52 | |
53 | 53 | <?php // Show four most recent posts. |
54 | - $recent_posts = new WP_Query( array( |
|
54 | + $recent_posts = new WP_Query(array( |
|
55 | 55 | 'posts_per_page' => 3, |
56 | 56 | 'post_status' => 'publish', |
57 | 57 | 'ignore_sticky_posts' => true, |
58 | 58 | 'no_found_rows' => true, |
59 | - ) ); |
|
59 | + )); |
|
60 | 60 | ?> |
61 | 61 | |
62 | - <?php if ( $recent_posts->have_posts() ) : ?> |
|
62 | + <?php if ($recent_posts->have_posts()) : ?> |
|
63 | 63 | |
64 | 64 | <div class="recent-posts"> |
65 | 65 | |
66 | 66 | <?php |
67 | - while ( $recent_posts->have_posts() ) : $recent_posts->the_post(); |
|
68 | - get_template_part( 'template-parts/post/content', 'excerpt' ); |
|
67 | + while ($recent_posts->have_posts()) : $recent_posts->the_post(); |
|
68 | + get_template_part('template-parts/post/content', 'excerpt'); |
|
69 | 69 | endwhile; |
70 | 70 | wp_reset_postdata(); |
71 | 71 | ?> |
@@ -9,21 +9,21 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | ?> |
12 | -<article id="post-<?php the_ID(); ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> > |
|
12 | +<article id="post-<?php the_ID(); ?>" <?php post_class('twentyseventeen-panel '); ?> > |
|
13 | 13 | |
14 | - <?php if ( has_post_thumbnail() ) : |
|
15 | - $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); |
|
14 | + <?php if (has_post_thumbnail()) : |
|
15 | + $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'twentyseventeen-featured-image'); |
|
16 | 16 | |
17 | - $post_thumbnail_id = get_post_thumbnail_id( $post->ID ); |
|
17 | + $post_thumbnail_id = get_post_thumbnail_id($post->ID); |
|
18 | 18 | |
19 | - $thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); |
|
19 | + $thumbnail_attributes = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'twentyseventeen-featured-image'); |
|
20 | 20 | |
21 | 21 | // Calculate aspect ratio: h / w * 100%. |
22 | 22 | $ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100; |
23 | 23 | ?> |
24 | 24 | |
25 | - <div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);"> |
|
26 | - <div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div> |
|
25 | + <div class="panel-image" style="background-image: url(<?php echo esc_url($thumbnail[0]); ?>);"> |
|
26 | + <div class="panel-image-prop" style="padding-top: <?php echo esc_attr($ratio); ?>%"></div> |
|
27 | 27 | </div><!-- .panel-image --> |
28 | 28 | |
29 | 29 | <?php endif; ?> |
@@ -31,19 +31,19 @@ discard block |
||
31 | 31 | <div class="panel-content"> |
32 | 32 | <div class="wrap"> |
33 | 33 | <header class="entry-header"> |
34 | - <?php the_title( '<h2 class="entry-title">', '</h2>' ); ?> |
|
34 | + <?php the_title('<h2 class="entry-title">', '</h2>'); ?> |
|
35 | 35 | |
36 | - <?php twentyseventeen_edit_link( get_the_ID() ); ?> |
|
36 | + <?php twentyseventeen_edit_link(get_the_ID()); ?> |
|
37 | 37 | |
38 | 38 | </header><!-- .entry-header --> |
39 | 39 | |
40 | 40 | <div class="entry-content"> |
41 | 41 | <?php |
42 | 42 | /* translators: %s: Name of current post */ |
43 | - the_content( sprintf( |
|
44 | - __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), |
|
43 | + the_content(sprintf( |
|
44 | + __('Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen'), |
|
45 | 45 | get_the_title() |
46 | - ) ); |
|
46 | + )); |
|
47 | 47 | ?> |
48 | 48 | </div><!-- .entry-content --> |
49 | 49 |
@@ -14,17 +14,17 @@ |
||
14 | 14 | |
15 | 15 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
16 | 16 | <header class="entry-header"> |
17 | - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
|
18 | - <?php twentyseventeen_edit_link( get_the_ID() ); ?> |
|
17 | + <?php the_title('<h1 class="entry-title">', '</h1>'); ?> |
|
18 | + <?php twentyseventeen_edit_link(get_the_ID()); ?> |
|
19 | 19 | </header><!-- .entry-header --> |
20 | 20 | <div class="entry-content"> |
21 | 21 | <?php |
22 | 22 | the_content(); |
23 | 23 | |
24 | - wp_link_pages( array( |
|
25 | - 'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), |
|
24 | + wp_link_pages(array( |
|
25 | + 'before' => '<div class="page-links">'.__('Pages:', 'twentyseventeen'), |
|
26 | 26 | 'after' => '</div>', |
27 | - ) ); |
|
27 | + )); |
|
28 | 28 | ?> |
29 | 29 | </div><!-- .entry-content --> |
30 | 30 | </article><!-- #post-## --> |
@@ -9,21 +9,21 @@ |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | ?> |
12 | -<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Top Menu', 'twentyseventeen' ); ?>"> |
|
12 | +<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e('Top Menu', 'twentyseventeen'); ?>"> |
|
13 | 13 | <button class="menu-toggle" aria-controls="top-menu" aria-expanded="false"> |
14 | 14 | <?php |
15 | - echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) ); |
|
16 | - echo twentyseventeen_get_svg( array( 'icon' => 'close' ) ); |
|
17 | - _e( 'Menu', 'twentyseventeen' ); |
|
15 | + echo twentyseventeen_get_svg(array('icon' => 'bars')); |
|
16 | + echo twentyseventeen_get_svg(array('icon' => 'close')); |
|
17 | + _e('Menu', 'twentyseventeen'); |
|
18 | 18 | ?> |
19 | 19 | </button> |
20 | 20 | |
21 | - <?php wp_nav_menu( array( |
|
21 | + <?php wp_nav_menu(array( |
|
22 | 22 | 'theme_location' => 'top', |
23 | 23 | 'menu_id' => 'top-menu', |
24 | - ) ); ?> |
|
24 | + )); ?> |
|
25 | 25 | |
26 | - <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && has_custom_header() ) : ?> |
|
27 | - <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a> |
|
26 | + <?php if ((twentyseventeen_is_frontpage() || (is_home() && is_front_page())) && has_custom_header()) : ?> |
|
27 | + <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg(array('icon' => 'arrow-right')); ?><span class="screen-reader-text"><?php _e('Scroll down to content', 'twentyseventeen'); ?></span></a> |
|
28 | 28 | <?php endif; ?> |
29 | 29 | </nav><!-- #site-navigation --> |
@@ -11,20 +11,20 @@ |
||
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <?php |
14 | -if ( is_active_sidebar( 'sidebar-2' ) || |
|
15 | - is_active_sidebar( 'sidebar-3' ) ) : |
|
14 | +if (is_active_sidebar('sidebar-2') || |
|
15 | + is_active_sidebar('sidebar-3')) : |
|
16 | 16 | ?> |
17 | 17 | |
18 | 18 | <aside class="widget-area" role="complementary"> |
19 | 19 | <?php |
20 | - if ( is_active_sidebar( 'sidebar-2' ) ) { ?> |
|
20 | + if (is_active_sidebar('sidebar-2')) { ?> |
|
21 | 21 | <div class="widget-column footer-widget-1"> |
22 | - <?php dynamic_sidebar( 'sidebar-2' ); ?> |
|
22 | + <?php dynamic_sidebar('sidebar-2'); ?> |
|
23 | 23 | </div> |
24 | 24 | <?php } |
25 | - if ( is_active_sidebar( 'sidebar-3' ) ) { ?> |
|
25 | + if (is_active_sidebar('sidebar-3')) { ?> |
|
26 | 26 | <div class="widget-column footer-widget-2"> |
27 | - <?php dynamic_sidebar( 'sidebar-3' ); ?> |
|
27 | + <?php dynamic_sidebar('sidebar-3'); ?> |
|
28 | 28 | </div> |
29 | 29 | <?php } ?> |
30 | 30 | </aside><!-- .widget-area --> |