@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | 'posts' => array( |
28 | 28 | 'front' => array( |
29 | 29 | 'post_type' => 'page', |
30 | - 'post_title' => esc_html_x( 'Create your website with blocks', 'Theme starter content', 'twentytwentyone' ), |
|
30 | + 'post_title' => esc_html_x('Create your website with blocks', 'Theme starter content', 'twentytwentyone'), |
|
31 | 31 | 'post_content' => ' |
32 | 32 | <!-- wp:heading {"align":"wide","fontSize":"gigantic","style":{"typography":{"lineHeight":"1.1"}}} --> |
33 | - <h2 class="alignwide has-text-align-wide has-gigantic-font-size" style="line-height:1.1">' . esc_html_x( 'Create your website with blocks', 'Theme starter content', 'twentytwentyone' ) . '</h2> |
|
33 | + <h2 class="alignwide has-text-align-wide has-gigantic-font-size" style="line-height:1.1">' . esc_html_x('Create your website with blocks', 'Theme starter content', 'twentytwentyone').'</h2> |
|
34 | 34 | <!-- /wp:heading --> |
35 | 35 | |
36 | 36 | <!-- wp:spacer --> |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | <!-- wp:columns {"verticalAlignment":"center","align":"wide","className":"is-style-twentytwentyone-columns-overlap"} --> |
41 | 41 | <div class="wp-block-columns alignwide are-vertically-aligned-center is-style-twentytwentyone-columns-overlap"><!-- wp:column {"verticalAlignment":"center"} --> |
42 | 42 | <div class="wp-block-column is-vertically-aligned-center"><!-- wp:image {"align":"full","sizeSlug":"large"} --> |
43 | - <figure class="wp-block-image alignfull size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/roses-tremieres-hollyhocks-1884.jpg" alt="' . esc_attr__( '“Roses Trémières” by Berthe Morisot', 'twentytwentyone' ) . '"/></figure> |
|
43 | + <figure class="wp-block-image alignfull size-large"><img src="' . esc_url(get_template_directory_uri()).'/assets/images/roses-tremieres-hollyhocks-1884.jpg" alt="'.esc_attr__('“Roses Trémières” by Berthe Morisot', 'twentytwentyone').'"/></figure> |
|
44 | 44 | <!-- /wp:image --> |
45 | 45 | |
46 | 46 | <!-- wp:spacer --> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | <!-- /wp:spacer --> |
49 | 49 | |
50 | 50 | <!-- wp:image {"align":"full","sizeSlug":"large","className":"is-style-twentytwentyone-image-frame"} --> |
51 | - <figure class="wp-block-image alignfull size-large is-style-twentytwentyone-image-frame"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/in-the-bois-de-boulogne.jpg" alt="' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'twentytwentyone' ) . '"/></figure> |
|
51 | + <figure class="wp-block-image alignfull size-large is-style-twentytwentyone-image-frame"><img src="' . esc_url(get_template_directory_uri()).'/assets/images/in-the-bois-de-boulogne.jpg" alt="'.esc_attr__('“In the Bois de Boulogne” by Berthe Morisot', 'twentytwentyone').'"/></figure> |
|
52 | 52 | <!-- /wp:image --></div> |
53 | 53 | <!-- /wp:column --> |
54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | <!-- /wp:spacer --> |
59 | 59 | |
60 | 60 | <!-- wp:image {"sizeSlug":"large","className":"alignfull size-full is-style-twentytwentyone-border"} --> |
61 | - <figure class="wp-block-image size-large alignfull size-full is-style-twentytwentyone-border"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/young-woman-in-mauve.jpg" alt="' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'twentytwentyone' ) . '"/></figure> |
|
61 | + <figure class="wp-block-image size-large alignfull size-full is-style-twentytwentyone-border"><img src="' . esc_url(get_template_directory_uri()).'/assets/images/young-woman-in-mauve.jpg" alt="'.esc_attr__('“Young Woman in Mauve” by Berthe Morisot', 'twentytwentyone').'"/></figure> |
|
62 | 62 | <!-- /wp:image --></div> |
63 | 63 | <!-- /wp:column --></div> |
64 | 64 | <!-- /wp:columns --> |
@@ -70,31 +70,31 @@ discard block |
||
70 | 70 | <!-- wp:columns {"verticalAlignment":"top","align":"wide"} --> |
71 | 71 | <div class="wp-block-columns alignwide are-vertically-aligned-top"><!-- wp:column {"verticalAlignment":"top"} --> |
72 | 72 | <div class="wp-block-column is-vertically-aligned-top"><!-- wp:heading {"level":3} --> |
73 | - <h3>' . esc_html_x( 'Add block patterns', 'Theme starter content', 'twentytwentyone' ) . '</h3> |
|
73 | + <h3>' . esc_html_x('Add block patterns', 'Theme starter content', 'twentytwentyone').'</h3> |
|
74 | 74 | <!-- /wp:heading --> |
75 | 75 | |
76 | 76 | <!-- wp:paragraph --> |
77 | - <p>' . esc_html_x( 'Block patterns are pre-designed groups of blocks. To add one, select the Add Block button [+] in the toolbar at the top of the editor. Switch to the Patterns tab underneath the search bar, and choose a pattern.', 'Theme starter content', 'twentytwentyone' ) . '</p> |
|
77 | + <p>' . esc_html_x('Block patterns are pre-designed groups of blocks. To add one, select the Add Block button [+] in the toolbar at the top of the editor. Switch to the Patterns tab underneath the search bar, and choose a pattern.', 'Theme starter content', 'twentytwentyone').'</p> |
|
78 | 78 | <!-- /wp:paragraph --></div> |
79 | 79 | <!-- /wp:column --> |
80 | 80 | |
81 | 81 | <!-- wp:column {"verticalAlignment":"top"} --> |
82 | 82 | <div class="wp-block-column is-vertically-aligned-top"><!-- wp:heading {"level":3} --> |
83 | - <h3>' . esc_html_x( 'Frame your images', 'Theme starter content', 'twentytwentyone' ) . '</h3> |
|
83 | + <h3>' . esc_html_x('Frame your images', 'Theme starter content', 'twentytwentyone').'</h3> |
|
84 | 84 | <!-- /wp:heading --> |
85 | 85 | |
86 | 86 | <!-- wp:paragraph --> |
87 | - <p>' . esc_html_x( 'Twenty Twenty-One includes stylish borders for your content. With an Image block selected, open the "Styles" panel within the Editor sidebar. Select the "Frame" block style to activate it.', 'Theme starter content', 'twentytwentyone' ) . '</p> |
|
87 | + <p>' . esc_html_x('Twenty Twenty-One includes stylish borders for your content. With an Image block selected, open the "Styles" panel within the Editor sidebar. Select the "Frame" block style to activate it.', 'Theme starter content', 'twentytwentyone').'</p> |
|
88 | 88 | <!-- /wp:paragraph --></div> |
89 | 89 | <!-- /wp:column --> |
90 | 90 | |
91 | 91 | <!-- wp:column {"verticalAlignment":"top"} --> |
92 | 92 | <div class="wp-block-column is-vertically-aligned-top"><!-- wp:heading {"level":3} --> |
93 | - <h3>' . esc_html_x( 'Overlap columns', 'Theme starter content', 'twentytwentyone' ) . '</h3> |
|
93 | + <h3>' . esc_html_x('Overlap columns', 'Theme starter content', 'twentytwentyone').'</h3> |
|
94 | 94 | <!-- /wp:heading --> |
95 | 95 | |
96 | 96 | <!-- wp:paragraph --> |
97 | - <p>' . esc_html_x( 'Twenty Twenty-One also includes an overlap style for column blocks. With a Columns block selected, open the "Styles" panel within the Editor sidebar. Choose the "Overlap" block style to try it out.', 'Theme starter content', 'twentytwentyone' ) . '</p> |
|
97 | + <p>' . esc_html_x('Twenty Twenty-One also includes an overlap style for column blocks. With a Columns block selected, open the "Styles" panel within the Editor sidebar. Choose the "Overlap" block style to try it out.', 'Theme starter content', 'twentytwentyone').'</p> |
|
98 | 98 | <!-- /wp:paragraph --></div> |
99 | 99 | <!-- /wp:column --></div> |
100 | 100 | <!-- /wp:columns --> |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | <!-- /wp:spacer --> |
110 | 110 | |
111 | 111 | <!-- wp:paragraph {"fontSize":"huge"} --> |
112 | - <p class="has-huge-font-size">' . esc_html_x( 'Need help?', 'Theme starter content', 'twentytwentyone' ) . '</p> |
|
112 | + <p class="has-huge-font-size">' . esc_html_x('Need help?', 'Theme starter content', 'twentytwentyone').'</p> |
|
113 | 113 | <!-- /wp:paragraph --> |
114 | 114 | |
115 | 115 | <!-- wp:spacer {"height":75} --> |
@@ -119,13 +119,13 @@ discard block |
||
119 | 119 | <!-- wp:columns --> |
120 | 120 | <div class="wp-block-columns"><!-- wp:column --> |
121 | 121 | <div class="wp-block-column"><!-- wp:paragraph --> |
122 | - <p><a href="https://wordpress.org/support/article/twenty-twenty-one/">' . esc_html_x( 'Read the Theme Documentation', 'Theme starter content', 'twentytwentyone' ) . '</a></p> |
|
122 | + <p><a href="https://wordpress.org/support/article/twenty-twenty-one/">' . esc_html_x('Read the Theme Documentation', 'Theme starter content', 'twentytwentyone').'</a></p> |
|
123 | 123 | <!-- /wp:paragraph --></div> |
124 | 124 | <!-- /wp:column --> |
125 | 125 | |
126 | 126 | <!-- wp:column --> |
127 | 127 | <div class="wp-block-column"><!-- wp:paragraph --> |
128 | - <p><a href="https://wordpress.org/support/theme/twentytwentyone/">' . esc_html_x( 'Check out the Support Forums', 'Theme starter content', 'twentytwentyone' ) . '</a></p> |
|
128 | + <p><a href="https://wordpress.org/support/theme/twentytwentyone/">' . esc_html_x('Check out the Support Forums', 'Theme starter content', 'twentytwentyone').'</a></p> |
|
129 | 129 | <!-- /wp:paragraph --></div> |
130 | 130 | <!-- /wp:column --></div> |
131 | 131 | <!-- /wp:columns --> |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | 'nav_menus' => array( |
152 | 152 | // Assign a menu to the "primary" location. |
153 | 153 | 'primary' => array( |
154 | - 'name' => esc_html__( 'Primary menu', 'twentytwentyone' ), |
|
154 | + 'name' => esc_html__('Primary menu', 'twentytwentyone'), |
|
155 | 155 | 'items' => array( |
156 | 156 | 'link_home', // Note that the core "home" page is actually a link in case a static front page is not used. |
157 | 157 | 'page_about', |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | // Assign a menu to the "footer" location. |
164 | 164 | 'footer' => array( |
165 | - 'name' => esc_html__( 'Secondary menu', 'twentytwentyone' ), |
|
165 | + 'name' => esc_html__('Secondary menu', 'twentytwentyone'), |
|
166 | 166 | 'items' => array( |
167 | 167 | 'link_facebook', |
168 | 168 | 'link_twitter', |
@@ -180,5 +180,5 @@ discard block |
||
180 | 180 | * |
181 | 181 | * @param array $starter_content Array of starter content. |
182 | 182 | */ |
183 | - return apply_filters( 'twenty_twenty_one_starter_content', $starter_content ); |
|
183 | + return apply_filters('twenty_twenty_one_starter_content', $starter_content); |
|
184 | 184 | } |
@@ -12,12 +12,12 @@ |
||
12 | 12 | get_header(); |
13 | 13 | |
14 | 14 | /* Start the Loop */ |
15 | -while ( have_posts() ) : |
|
15 | +while (have_posts()) : |
|
16 | 16 | the_post(); |
17 | - get_template_part( 'template-parts/content/content-page' ); |
|
17 | + get_template_part('template-parts/content/content-page'); |
|
18 | 18 | |
19 | 19 | // If comments are open or there is at least one comment, load up the comment template. |
20 | - if ( comments_open() || get_comments_number() ) { |
|
20 | + if (comments_open() || get_comments_number()) { |
|
21 | 21 | comments_template(); |
22 | 22 | } |
23 | 23 | endwhile; // End of the loop. |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | get_header(); |
11 | 11 | |
12 | 12 | // Start the loop. |
13 | -while ( have_posts() ) { |
|
13 | +while (have_posts()) { |
|
14 | 14 | the_post(); |
15 | 15 | ?> |
16 | 16 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
17 | 17 | <header class="entry-header alignwide"> |
18 | - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
|
18 | + <?php the_title('<h1 class="entry-title">', '</h1>'); ?> |
|
19 | 19 | </header><!-- .entry-header --> |
20 | 20 | |
21 | 21 | <div class="entry-content"> |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @param string $image_size Image size. Default 'full'. |
30 | 30 | */ |
31 | - $image_size = apply_filters( 'twenty_twenty_one_attachment_size', 'full' ); |
|
32 | - echo wp_get_attachment_image( get_the_ID(), $image_size ); |
|
31 | + $image_size = apply_filters('twenty_twenty_one_attachment_size', 'full'); |
|
32 | + echo wp_get_attachment_image(get_the_ID(), $image_size); |
|
33 | 33 | ?> |
34 | 34 | |
35 | - <?php if ( wp_get_attachment_caption() ) : ?> |
|
36 | - <figcaption class="wp-caption-text"><?php echo wp_kses_post( wp_get_attachment_caption() ); ?></figcaption> |
|
35 | + <?php if (wp_get_attachment_caption()) : ?> |
|
36 | + <figcaption class="wp-caption-text"><?php echo wp_kses_post(wp_get_attachment_caption()); ?></figcaption> |
|
37 | 37 | <?php endif; ?> |
38 | 38 | </figure><!-- .wp-block-image --> |
39 | 39 | |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | |
43 | 43 | wp_link_pages( |
44 | 44 | array( |
45 | - 'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">', |
|
45 | + 'before' => '<nav class="page-links" aria-label="'.esc_attr__('Page', 'twentytwentyone').'">', |
|
46 | 46 | 'after' => '</nav>', |
47 | 47 | /* translators: %: Page number. */ |
48 | - 'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ), |
|
48 | + 'pagelink' => esc_html__('Page %', 'twentytwentyone'), |
|
49 | 49 | ) |
50 | 50 | ); |
51 | 51 | ?> |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | <footer class="entry-footer default-max-width"> |
55 | 55 | <?php |
56 | 56 | // Check if there is a parent, then add the published in link. |
57 | - if ( wp_get_post_parent_id( $post ) ) { |
|
57 | + if (wp_get_post_parent_id($post)) { |
|
58 | 58 | echo '<span class="posted-on">'; |
59 | 59 | printf( |
60 | 60 | /* translators: %s: Parent post. */ |
61 | - esc_html__( 'Published in %s', 'twentytwentyone' ), |
|
62 | - '<a href="' . esc_url( get_the_permalink( wp_get_post_parent_id( $post ) ) ) . '">' . esc_html( get_the_title( wp_get_post_parent_id( $post ) ) ) . '</a>' |
|
61 | + esc_html__('Published in %s', 'twentytwentyone'), |
|
62 | + '<a href="'.esc_url(get_the_permalink(wp_get_post_parent_id($post))).'">'.esc_html(get_the_title(wp_get_post_parent_id($post))).'</a>' |
|
63 | 63 | ); |
64 | 64 | echo '</span>'; |
65 | 65 | } else { |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | edit_post_link( |
68 | 68 | sprintf( |
69 | 69 | /* translators: %s: Post title. Only visible to screen readers. */ |
70 | - esc_html__( 'Edit %s', 'twentytwentyone' ), |
|
71 | - '<span class="screen-reader-text">' . get_the_title() . '</span>' |
|
70 | + esc_html__('Edit %s', 'twentytwentyone'), |
|
71 | + '<span class="screen-reader-text">'.get_the_title().'</span>' |
|
72 | 72 | ), |
73 | 73 | '<span class="edit-link">', |
74 | 74 | '</span>' |
@@ -77,23 +77,23 @@ discard block |
||
77 | 77 | |
78 | 78 | // Retrieve attachment metadata. |
79 | 79 | $metadata = wp_get_attachment_metadata(); |
80 | - if ( $metadata ) { |
|
80 | + if ($metadata) { |
|
81 | 81 | printf( |
82 | 82 | '<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s × %4$s</a></span>', |
83 | - esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentytwentyone' ), // phpcs:ignore WordPress.Security.EscapeOutput |
|
84 | - esc_url( wp_get_attachment_url() ), |
|
85 | - absint( $metadata['width'] ), |
|
86 | - absint( $metadata['height'] ) |
|
83 | + esc_html_x('Full size', 'Used before full size attachment link.', 'twentytwentyone'), // phpcs:ignore WordPress.Security.EscapeOutput |
|
84 | + esc_url(wp_get_attachment_url()), |
|
85 | + absint($metadata['width']), |
|
86 | + absint($metadata['height']) |
|
87 | 87 | ); |
88 | 88 | } |
89 | 89 | |
90 | - if ( wp_get_post_parent_id( $post ) ) { |
|
90 | + if (wp_get_post_parent_id($post)) { |
|
91 | 91 | // Edit post link. |
92 | 92 | edit_post_link( |
93 | 93 | sprintf( |
94 | 94 | /* translators: %s: Post title. Only visible to screen readers. */ |
95 | - esc_html__( 'Edit %s', 'twentytwentyone' ), |
|
96 | - '<span class="screen-reader-text">' . get_the_title() . '</span>' |
|
95 | + esc_html__('Edit %s', 'twentytwentyone'), |
|
96 | + '<span class="screen-reader-text">'.get_the_title().'</span>' |
|
97 | 97 | ), |
98 | 98 | '<span class="edit-link">', |
99 | 99 | '</span><br>' |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | </article><!-- #post-<?php the_ID(); ?> --> |
105 | 105 | <?php |
106 | 106 | // If comments are open or there is at least one comment, load up the comment template. |
107 | - if ( comments_open() || get_comments_number() ) { |
|
107 | + if (comments_open() || get_comments_number()) { |
|
108 | 108 | comments_template(); |
109 | 109 | } |
110 | 110 | } // End the loop. |
@@ -14,24 +14,24 @@ |
||
14 | 14 | $description = get_the_archive_description(); |
15 | 15 | ?> |
16 | 16 | |
17 | -<?php if ( have_posts() ) : ?> |
|
17 | +<?php if (have_posts()) : ?> |
|
18 | 18 | |
19 | 19 | <header class="page-header alignwide"> |
20 | - <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?> |
|
21 | - <?php if ( $description ) : ?> |
|
22 | - <div class="archive-description"><?php echo wp_kses_post( wpautop( $description ) ); ?></div> |
|
20 | + <?php the_archive_title('<h1 class="page-title">', '</h1>'); ?> |
|
21 | + <?php if ($description) : ?> |
|
22 | + <div class="archive-description"><?php echo wp_kses_post(wpautop($description)); ?></div> |
|
23 | 23 | <?php endif; ?> |
24 | 24 | </header><!-- .page-header --> |
25 | 25 | |
26 | - <?php while ( have_posts() ) : ?> |
|
26 | + <?php while (have_posts()) : ?> |
|
27 | 27 | <?php the_post(); ?> |
28 | - <?php get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) ); ?> |
|
28 | + <?php get_template_part('template-parts/content/content', get_theme_mod('display_excerpt_or_full_post', 'excerpt')); ?> |
|
29 | 29 | <?php endwhile; ?> |
30 | 30 | |
31 | 31 | <?php twenty_twenty_one_the_posts_navigation(); ?> |
32 | 32 | |
33 | 33 | <?php else : ?> |
34 | - <?php get_template_part( 'template-parts/content/content-none' ); ?> |
|
34 | + <?php get_template_part('template-parts/content/content-none'); ?> |
|
35 | 35 | <?php endif; ?> |
36 | 36 | |
37 | 37 | <?php get_footer(); ?> |
@@ -30,8 +30,11 @@ |
||
30 | 30 | |
31 | 31 | <?php twenty_twenty_one_the_posts_navigation(); ?> |
32 | 32 | |
33 | -<?php else : ?> |
|
34 | - <?php get_template_part( 'template-parts/content/content-none' ); ?> |
|
33 | +<?php else { |
|
34 | + : ?> |
|
35 | + <?php get_template_part( 'template-parts/content/content-none' ); |
|
36 | +} |
|
37 | +?> |
|
35 | 38 | <?php endif; ?> |
36 | 39 | |
37 | 40 | <?php get_footer(); ?> |
@@ -16,20 +16,20 @@ discard block |
||
16 | 16 | |
17 | 17 | get_header(); ?> |
18 | 18 | |
19 | -<?php if ( is_home() && ! is_front_page() && ! empty( single_post_title( '', false ) ) ) : ?> |
|
19 | +<?php if (is_home() && ! is_front_page() && ! empty(single_post_title('', false))) : ?> |
|
20 | 20 | <header class="page-header alignwide"> |
21 | 21 | <h1 class="page-title"><?php single_post_title(); ?></h1> |
22 | 22 | </header><!-- .page-header --> |
23 | 23 | <?php endif; ?> |
24 | 24 | |
25 | 25 | <?php |
26 | -if ( have_posts() ) { |
|
26 | +if (have_posts()) { |
|
27 | 27 | |
28 | 28 | // Load posts loop. |
29 | - while ( have_posts() ) { |
|
29 | + while (have_posts()) { |
|
30 | 30 | the_post(); |
31 | 31 | |
32 | - get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) ); |
|
32 | + get_template_part('template-parts/content/content', get_theme_mod('display_excerpt_or_full_post', 'excerpt')); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // Previous/next page navigation. |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } else { |
39 | 39 | |
40 | 40 | // If no content, include the "No posts found" template. |
41 | - get_template_part( 'template-parts/content/content-none' ); |
|
41 | + get_template_part('template-parts/content/content-none'); |
|
42 | 42 | |
43 | 43 | } |
44 | 44 |
@@ -11,15 +11,15 @@ discard block |
||
11 | 11 | |
12 | 12 | get_header(); |
13 | 13 | |
14 | -if ( have_posts() ) { |
|
14 | +if (have_posts()) { |
|
15 | 15 | ?> |
16 | 16 | <header class="page-header alignwide"> |
17 | 17 | <h1 class="page-title"> |
18 | 18 | <?php |
19 | 19 | printf( |
20 | 20 | /* translators: %s: Search term. */ |
21 | - esc_html__( 'Results for "%s"', 'twentytwentyone' ), |
|
22 | - '<span class="page-description search-term">' . esc_html( get_search_query() ) . '</span>' |
|
21 | + esc_html__('Results for "%s"', 'twentytwentyone'), |
|
22 | + '<span class="page-description search-term">'.esc_html(get_search_query()).'</span>' |
|
23 | 23 | ); |
24 | 24 | ?> |
25 | 25 | </h1> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | </div><!-- .search-result-count --> |
44 | 44 | <?php |
45 | 45 | // Start the Loop. |
46 | - while ( have_posts() ) { |
|
46 | + while (have_posts()) { |
|
47 | 47 | the_post(); |
48 | 48 | |
49 | 49 | /* |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * If you want to override this in a child theme, then include a file |
52 | 52 | * called content-___.php (where ___ is the Post Format name) and that will be used instead. |
53 | 53 | */ |
54 | - get_template_part( 'template-parts/content/content-excerpt', get_post_format() ); |
|
54 | + get_template_part('template-parts/content/content-excerpt', get_post_format()); |
|
55 | 55 | } // End the loop. |
56 | 56 | |
57 | 57 | // Previous/next page navigation. |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | // If no content, include the "No posts found" template. |
61 | 61 | } else { |
62 | - get_template_part( 'template-parts/content/content-none' ); |
|
62 | + get_template_part('template-parts/content/content-none'); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | get_footer(); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | <!doctype html> |
16 | 16 | <html <?php language_attributes(); ?> <?php twentytwentyone_the_html_classes(); ?>> |
17 | 17 | <head> |
18 | - <meta charset="<?php bloginfo( 'charset' ); ?>" /> |
|
18 | + <meta charset="<?php bloginfo('charset'); ?>" /> |
|
19 | 19 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
20 | 20 | <?php wp_head(); ?> |
21 | 21 | </head> |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | <body <?php body_class(); ?>> |
24 | 24 | <?php wp_body_open(); ?> |
25 | 25 | <div id="page" class="site"> |
26 | - <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'twentytwentyone' ); ?></a> |
|
26 | + <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e('Skip to content', 'twentytwentyone'); ?></a> |
|
27 | 27 | |
28 | - <?php get_template_part( 'template-parts/header/site-header' ); ?> |
|
28 | + <?php get_template_part('template-parts/header/site-header'); ?> |
|
29 | 29 | |
30 | 30 | <div id="content" class="site-content"> |
31 | 31 | <div id="primary" class="content-area"> |
@@ -17,27 +17,27 @@ discard block |
||
17 | 17 | * the visitor has not yet entered the password, |
18 | 18 | * return early without loading the comments. |
19 | 19 | */ |
20 | -if ( post_password_required() ) { |
|
20 | +if (post_password_required()) { |
|
21 | 21 | return; |
22 | 22 | } |
23 | 23 | |
24 | 24 | $twenty_twenty_one_comment_count = get_comments_number(); |
25 | 25 | ?> |
26 | 26 | |
27 | -<div id="comments" class="comments-area default-max-width <?php echo get_option( 'show_avatars' ) ? 'show-avatars' : ''; ?>"> |
|
27 | +<div id="comments" class="comments-area default-max-width <?php echo get_option('show_avatars') ? 'show-avatars' : ''; ?>"> |
|
28 | 28 | |
29 | 29 | <?php |
30 | - if ( have_comments() ) : |
|
30 | + if (have_comments()) : |
|
31 | 31 | ?> |
32 | 32 | <h2 class="comments-title"> |
33 | - <?php if ( '1' === $twenty_twenty_one_comment_count ) : ?> |
|
34 | - <?php esc_html_e( '1 comment', 'twentytwentyone' ); ?> |
|
33 | + <?php if ('1' === $twenty_twenty_one_comment_count) : ?> |
|
34 | + <?php esc_html_e('1 comment', 'twentytwentyone'); ?> |
|
35 | 35 | <?php else : ?> |
36 | 36 | <?php |
37 | 37 | printf( |
38 | 38 | /* translators: %s: Comment count number. */ |
39 | - esc_html( _nx( '%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ), |
|
40 | - esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) ) |
|
39 | + esc_html(_nx('%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone')), |
|
40 | + esc_html(number_format_i18n($twenty_twenty_one_comment_count)) |
|
41 | 41 | ); |
42 | 42 | ?> |
43 | 43 | <?php endif; ?> |
@@ -58,31 +58,31 @@ discard block |
||
58 | 58 | <?php |
59 | 59 | the_comments_pagination( |
60 | 60 | array( |
61 | - 'before_page_number' => esc_html__( 'Page', 'twentytwentyone' ) . ' ', |
|
61 | + 'before_page_number' => esc_html__('Page', 'twentytwentyone').' ', |
|
62 | 62 | 'mid_size' => 0, |
63 | 63 | 'prev_text' => sprintf( |
64 | 64 | '%s <span class="nav-prev-text">%s</span>', |
65 | - is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), |
|
66 | - esc_html__( 'Older comments', 'twentytwentyone' ) |
|
65 | + is_rtl() ? twenty_twenty_one_get_icon_svg('ui', 'arrow_right') : twenty_twenty_one_get_icon_svg('ui', 'arrow_left'), |
|
66 | + esc_html__('Older comments', 'twentytwentyone') |
|
67 | 67 | ), |
68 | 68 | 'next_text' => sprintf( |
69 | 69 | '<span class="nav-next-text">%s</span> %s', |
70 | - esc_html__( 'Newer comments', 'twentytwentyone' ), |
|
71 | - is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) |
|
70 | + esc_html__('Newer comments', 'twentytwentyone'), |
|
71 | + is_rtl() ? twenty_twenty_one_get_icon_svg('ui', 'arrow_left') : twenty_twenty_one_get_icon_svg('ui', 'arrow_right') |
|
72 | 72 | ), |
73 | 73 | ) |
74 | 74 | ); |
75 | 75 | ?> |
76 | 76 | |
77 | - <?php if ( ! comments_open() ) : ?> |
|
78 | - <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'twentytwentyone' ); ?></p> |
|
77 | + <?php if ( ! comments_open()) : ?> |
|
78 | + <p class="no-comments"><?php esc_html_e('Comments are closed.', 'twentytwentyone'); ?></p> |
|
79 | 79 | <?php endif; ?> |
80 | 80 | <?php endif; ?> |
81 | 81 | |
82 | 82 | <?php |
83 | 83 | comment_form( |
84 | 84 | array( |
85 | - 'title_reply' => esc_html__( 'Leave a comment', 'twentytwentyone' ), |
|
85 | + 'title_reply' => esc_html__('Leave a comment', 'twentytwentyone'), |
|
86 | 86 | 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">', |
87 | 87 | 'title_reply_after' => '</h2>', |
88 | 88 | ) |
@@ -32,13 +32,15 @@ |
||
32 | 32 | <h2 class="comments-title"> |
33 | 33 | <?php if ( '1' === $twenty_twenty_one_comment_count ) : ?> |
34 | 34 | <?php esc_html_e( '1 comment', 'twentytwentyone' ); ?> |
35 | - <?php else : ?> |
|
35 | + <?php else { |
|
36 | + : ?> |
|
36 | 37 | <?php |
37 | 38 | printf( |
38 | 39 | /* translators: %s: Comment count number. */ |
39 | 40 | esc_html( _nx( '%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ), |
40 | 41 | esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) ) |
41 | 42 | ); |
43 | +} |
|
42 | 44 | ?> |
43 | 45 | <?php endif; ?> |
44 | 46 | </h2><!-- .comments-title --> |
@@ -12,37 +12,37 @@ |
||
12 | 12 | get_header(); |
13 | 13 | |
14 | 14 | /* Start the Loop */ |
15 | -while ( have_posts() ) : |
|
15 | +while (have_posts()) : |
|
16 | 16 | the_post(); |
17 | 17 | |
18 | - get_template_part( 'template-parts/content/content-single' ); |
|
18 | + get_template_part('template-parts/content/content-single'); |
|
19 | 19 | |
20 | - if ( is_attachment() ) { |
|
20 | + if (is_attachment()) { |
|
21 | 21 | // Parent post navigation. |
22 | 22 | the_post_navigation( |
23 | 23 | array( |
24 | 24 | /* translators: %s: Parent post link. */ |
25 | - 'prev_text' => sprintf( __( '<span class="meta-nav">Published in</span><span class="post-title">%s</span>', 'twentytwentyone' ), '%title' ), |
|
25 | + 'prev_text' => sprintf(__('<span class="meta-nav">Published in</span><span class="post-title">%s</span>', 'twentytwentyone'), '%title'), |
|
26 | 26 | ) |
27 | 27 | ); |
28 | 28 | } |
29 | 29 | |
30 | 30 | // If comments are open or there is at least one comment, load up the comment template. |
31 | - if ( comments_open() || get_comments_number() ) { |
|
31 | + if (comments_open() || get_comments_number()) { |
|
32 | 32 | comments_template(); |
33 | 33 | } |
34 | 34 | |
35 | 35 | // Previous/next post navigation. |
36 | - $twentytwentyone_next = is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ); |
|
37 | - $twentytwentyone_prev = is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ); |
|
36 | + $twentytwentyone_next = is_rtl() ? twenty_twenty_one_get_icon_svg('ui', 'arrow_left') : twenty_twenty_one_get_icon_svg('ui', 'arrow_right'); |
|
37 | + $twentytwentyone_prev = is_rtl() ? twenty_twenty_one_get_icon_svg('ui', 'arrow_right') : twenty_twenty_one_get_icon_svg('ui', 'arrow_left'); |
|
38 | 38 | |
39 | - $twentytwentyone_next_label = esc_html__( 'Next post', 'twentytwentyone' ); |
|
40 | - $twentytwentyone_previous_label = esc_html__( 'Previous post', 'twentytwentyone' ); |
|
39 | + $twentytwentyone_next_label = esc_html__('Next post', 'twentytwentyone'); |
|
40 | + $twentytwentyone_previous_label = esc_html__('Previous post', 'twentytwentyone'); |
|
41 | 41 | |
42 | 42 | the_post_navigation( |
43 | 43 | array( |
44 | - 'next_text' => '<p class="meta-nav">' . $twentytwentyone_next_label . $twentytwentyone_next . '</p><p class="post-title">%title</p>', |
|
45 | - 'prev_text' => '<p class="meta-nav">' . $twentytwentyone_prev . $twentytwentyone_previous_label . '</p><p class="post-title">%title</p>', |
|
44 | + 'next_text' => '<p class="meta-nav">'.$twentytwentyone_next_label.$twentytwentyone_next.'</p><p class="post-title">%title</p>', |
|
45 | + 'prev_text' => '<p class="meta-nav">'.$twentytwentyone_prev.$twentytwentyone_previous_label.'</p><p class="post-title">%title</p>', |
|
46 | 46 | ) |
47 | 47 | ); |
48 | 48 | endwhile; // End of the loop. |