@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */ |
4 | -define( 'ABSPATH', dirname( __FILE__ ) . '/src/' ); |
|
4 | +define('ABSPATH', dirname(__FILE__).'/src/'); |
|
5 | 5 | |
6 | 6 | /* |
7 | 7 | * Path to the theme to test with. |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * The 'default' theme is symlinked from test/phpunit/data/themedir1/default into |
10 | 10 | * the themes directory of the WordPress install defined above. |
11 | 11 | */ |
12 | -define( 'WP_DEFAULT_THEME', 'default' ); |
|
12 | +define('WP_DEFAULT_THEME', 'default'); |
|
13 | 13 | |
14 | 14 | // Test with multisite enabled. |
15 | 15 | // Alternatively, use the tests/phpunit/multisite.xml configuration file. |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | // define( 'WP_TESTS_FORCE_KNOWN_BUGS', true ); |
21 | 21 | |
22 | 22 | // Test with WordPress debug mode (default). |
23 | -define( 'WP_DEBUG', true ); |
|
23 | +define('WP_DEBUG', true); |
|
24 | 24 | |
25 | 25 | // ** MySQL settings ** // |
26 | 26 | |
@@ -31,19 +31,19 @@ discard block |
||
31 | 31 | // These tests will DROP ALL TABLES in the database with the prefix named below. |
32 | 32 | // DO NOT use a production database or one that is shared with something else. |
33 | 33 | |
34 | -define( 'DB_NAME', 'youremptytestdbnamehere' ); |
|
35 | -define( 'DB_USER', 'yourusernamehere' ); |
|
36 | -define( 'DB_PASSWORD', 'yourpasswordhere' ); |
|
37 | -define( 'DB_HOST', 'localhost' ); |
|
38 | -define( 'DB_CHARSET', 'utf8' ); |
|
39 | -define( 'DB_COLLATE', '' ); |
|
34 | +define('DB_NAME', 'youremptytestdbnamehere'); |
|
35 | +define('DB_USER', 'yourusernamehere'); |
|
36 | +define('DB_PASSWORD', 'yourpasswordhere'); |
|
37 | +define('DB_HOST', 'localhost'); |
|
38 | +define('DB_CHARSET', 'utf8'); |
|
39 | +define('DB_COLLATE', ''); |
|
40 | 40 | |
41 | -$table_prefix = 'wptests_'; // Only numbers, letters, and underscores please! |
|
41 | +$table_prefix = 'wptests_'; // Only numbers, letters, and underscores please! |
|
42 | 42 | |
43 | -define( 'WP_TESTS_DOMAIN', 'example.org' ); |
|
44 | -define( 'WP_TESTS_EMAIL', '[email protected]' ); |
|
45 | -define( 'WP_TESTS_TITLE', 'Test Blog' ); |
|
43 | +define('WP_TESTS_DOMAIN', 'example.org'); |
|
44 | +define('WP_TESTS_EMAIL', '[email protected]'); |
|
45 | +define('WP_TESTS_TITLE', 'Test Blog'); |
|
46 | 46 | |
47 | -define( 'WP_PHP_BINARY', 'php' ); |
|
47 | +define('WP_PHP_BINARY', 'php'); |
|
48 | 48 | |
49 | -define( 'WPLANG', '' ); |
|
49 | +define('WPLANG', ''); |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | <div class="wrap"> |
16 | 16 | |
17 | 17 | <header class="page-header"> |
18 | - <?php if ( have_posts() ) : ?> |
|
19 | - <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' ); ?></h1> |
|
18 | + <?php if (have_posts()) : ?> |
|
19 | + <h1 class="page-title"><?php printf(__('Search Results for: %s', 'twentyseventeen'), '<span>'.get_search_query().'</span>'); ?></h1> |
|
20 | 20 | <?php else : ?> |
21 | - <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1> |
|
21 | + <h1 class="page-title"><?php _e('Nothing Found', 'twentyseventeen'); ?></h1> |
|
22 | 22 | <?php endif; ?> |
23 | 23 | </header><!-- .page-header --> |
24 | 24 | |
@@ -26,28 +26,28 @@ discard block |
||
26 | 26 | <main id="main" class="site-main" role="main"> |
27 | 27 | |
28 | 28 | <?php |
29 | - if ( have_posts() ) : |
|
29 | + if (have_posts()) : |
|
30 | 30 | /* Start the Loop */ |
31 | - while ( have_posts() ) : the_post(); |
|
31 | + while (have_posts()) : the_post(); |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Run the loop for the search to output the results. |
35 | 35 | * If you want to overload this in a child theme then include a file |
36 | 36 | * called content-search.php and that will be used instead. |
37 | 37 | */ |
38 | - get_template_part( 'template-parts/post/content', 'excerpt' ); |
|
38 | + get_template_part('template-parts/post/content', 'excerpt'); |
|
39 | 39 | |
40 | 40 | endwhile; // End of the loop. |
41 | 41 | |
42 | - the_posts_pagination( array( |
|
43 | - 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>', |
|
44 | - 'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), |
|
45 | - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>', |
|
46 | - ) ); |
|
42 | + the_posts_pagination(array( |
|
43 | + 'prev_text' => twentyseventeen_get_svg(array('icon' => 'arrow-left')).'<span class="screen-reader-text">'.__('Previous page', 'twentyseventeen').'</span>', |
|
44 | + 'next_text' => '<span class="screen-reader-text">'.__('Next page', 'twentyseventeen').'</span>'.twentyseventeen_get_svg(array('icon' => 'arrow-right')), |
|
45 | + 'before_page_number' => '<span class="meta-nav screen-reader-text">'.__('Page', 'twentyseventeen').' </span>', |
|
46 | + )); |
|
47 | 47 | |
48 | 48 | else : ?> |
49 | 49 | |
50 | - <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyseventeen' ); ?></p> |
|
50 | + <p><?php _e('Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyseventeen'); ?></p> |
|
51 | 51 | <?php |
52 | 52 | get_search_form(); |
53 | 53 |
@@ -17,8 +17,11 @@ discard block |
||
17 | 17 | <header class="page-header"> |
18 | 18 | <?php if ( have_posts() ) : ?> |
19 | 19 | <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' ); ?></h1> |
20 | - <?php else : ?> |
|
21 | - <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1> |
|
20 | + <?php else { |
|
21 | + : ?> |
|
22 | + <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); |
|
23 | +} |
|
24 | +?></h1> |
|
22 | 25 | <?php endif; ?> |
23 | 26 | </header><!-- .page-header --> |
24 | 27 | |
@@ -45,9 +48,12 @@ discard block |
||
45 | 48 | 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>', |
46 | 49 | ) ); |
47 | 50 | |
48 | - else : ?> |
|
51 | + else { |
|
52 | + : ?> |
|
49 | 53 | |
50 | - <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyseventeen' ); ?></p> |
|
54 | + <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyseventeen' ); |
|
55 | + } |
|
56 | + ?></p> |
|
51 | 57 | <?php |
52 | 58 | get_search_form(); |
53 | 59 |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | |
15 | 15 | <div class="wrap"> |
16 | 16 | |
17 | - <?php if ( have_posts() ) : ?> |
|
17 | + <?php if (have_posts()) : ?> |
|
18 | 18 | <header class="page-header"> |
19 | 19 | <?php |
20 | - the_archive_title( '<h1 class="page-title">', '</h1>' ); |
|
21 | - the_archive_description( '<div class="taxonomy-description">', '</div>' ); |
|
20 | + the_archive_title('<h1 class="page-title">', '</h1>'); |
|
21 | + the_archive_description('<div class="taxonomy-description">', '</div>'); |
|
22 | 22 | ?> |
23 | 23 | </header><!-- .page-header --> |
24 | 24 | <?php endif; ?> |
@@ -27,29 +27,29 @@ discard block |
||
27 | 27 | <main id="main" class="site-main" role="main"> |
28 | 28 | |
29 | 29 | <?php |
30 | - if ( have_posts() ) : ?> |
|
30 | + if (have_posts()) : ?> |
|
31 | 31 | <?php |
32 | 32 | /* Start the Loop */ |
33 | - while ( have_posts() ) : the_post(); |
|
33 | + while (have_posts()) : the_post(); |
|
34 | 34 | |
35 | 35 | /* |
36 | 36 | * Include the Post-Format-specific template for the content. |
37 | 37 | * If you want to override this in a child theme, then include a file |
38 | 38 | * called content-___.php (where ___ is the Post Format name) and that will be used instead. |
39 | 39 | */ |
40 | - get_template_part( 'template-parts/post/content', get_post_format() ); |
|
40 | + get_template_part('template-parts/post/content', get_post_format()); |
|
41 | 41 | |
42 | 42 | endwhile; |
43 | 43 | |
44 | - the_posts_pagination( array( |
|
45 | - 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>', |
|
46 | - 'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), |
|
47 | - 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>', |
|
48 | - ) ); |
|
44 | + the_posts_pagination(array( |
|
45 | + 'prev_text' => twentyseventeen_get_svg(array('icon' => 'arrow-left')).'<span class="screen-reader-text">'.__('Previous page', 'twentyseventeen').'</span>', |
|
46 | + 'next_text' => '<span class="screen-reader-text">'.__('Next page', 'twentyseventeen').'</span>'.twentyseventeen_get_svg(array('icon' => 'arrow-right')), |
|
47 | + 'before_page_number' => '<span class="meta-nav screen-reader-text">'.__('Page', 'twentyseventeen').' </span>', |
|
48 | + )); |
|
49 | 49 | |
50 | 50 | else : |
51 | 51 | |
52 | - get_template_part( 'template-parts/post/content', 'none' ); |
|
52 | + get_template_part('template-parts/post/content', 'none'); |
|
53 | 53 | |
54 | 54 | endif; ?> |
55 | 55 |
@@ -52,8 +52,10 @@ |
||
52 | 52 | ) ); |
53 | 53 | |
54 | 54 | // If no content, include the "No posts found" template. |
55 | - else : |
|
55 | + else { |
|
56 | + : |
|
56 | 57 | get_template_part( 'content', 'none' ); |
58 | + } |
|
57 | 59 | |
58 | 60 | endif; |
59 | 61 | ?> |
@@ -18,19 +18,19 @@ |
||
18 | 18 | |
19 | 19 | <?php |
20 | 20 | /* Start the Loop */ |
21 | - while ( have_posts() ) : the_post(); |
|
21 | + while (have_posts()) : the_post(); |
|
22 | 22 | |
23 | - get_template_part( 'template-parts/post/content', get_post_format() ); |
|
23 | + get_template_part('template-parts/post/content', get_post_format()); |
|
24 | 24 | |
25 | 25 | // If comments are open or we have at least one comment, load up the comment template. |
26 | - if ( comments_open() || get_comments_number() ) : |
|
26 | + if (comments_open() || get_comments_number()) : |
|
27 | 27 | comments_template(); |
28 | 28 | endif; |
29 | 29 | |
30 | - the_post_navigation( array( |
|
31 | - 'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Previous', 'twentyseventeen' ) . '</span> <span class="nav-title"><span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '</span>%title</span>', |
|
32 | - 'next_text' => '<span class="screen-reader-text">' . __( 'Next Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Next', 'twentyseventeen' ) . '</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '</span></span>', |
|
33 | - ) ); |
|
30 | + the_post_navigation(array( |
|
31 | + 'prev_text' => '<span class="screen-reader-text">'.__('Previous Post', 'twentyseventeen').'</span><span aria-hidden="true" class="nav-subtitle">'.__('Previous', 'twentyseventeen').'</span> <span class="nav-title"><span class="nav-title-icon-wrapper">'.twentyseventeen_get_svg(array('icon' => 'arrow-left')).'</span>%title</span>', |
|
32 | + 'next_text' => '<span class="screen-reader-text">'.__('Next Post', 'twentyseventeen').'</span><span aria-hidden="true" class="nav-subtitle">'.__('Next', 'twentyseventeen').'</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">'.twentyseventeen_get_svg(array('icon' => 'arrow-right')).'</span></span>', |
|
33 | + )); |
|
34 | 34 | |
35 | 35 | endwhile; // End of the loop. |
36 | 36 | ?> |
@@ -10,11 +10,11 @@ |
||
10 | 10 | * @version 1.0 |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! is_active_sidebar( 'sidebar-1' ) ) { |
|
13 | +if ( ! is_active_sidebar('sidebar-1')) { |
|
14 | 14 | return; |
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | |
18 | 18 | <aside id="secondary" class="widget-area" role="complementary"> |
19 | - <?php dynamic_sidebar( 'sidebar-1' ); ?> |
|
19 | + <?php dynamic_sidebar('sidebar-1'); ?> |
|
20 | 20 | </aside><!-- #secondary --> |
@@ -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,18 +31,18 @@ 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() && ! get_post_gallery() ) : ?> |
|
42 | + <?php if ('' !== get_the_post_thumbnail() && ! is_single() && ! get_post_gallery()) : ?> |
|
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; ?> |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | <div class="entry-content"> |
51 | 51 | |
52 | 52 | <?php |
53 | - if ( ! is_single() ) { |
|
53 | + if ( ! is_single()) { |
|
54 | 54 | |
55 | 55 | // If not a single post, highlight the gallery. |
56 | - if ( get_post_gallery() ) { |
|
56 | + if (get_post_gallery()) { |
|
57 | 57 | echo '<div class="entry-gallery">'; |
58 | 58 | echo get_post_gallery(); |
59 | 59 | echo '</div>'; |
@@ -61,20 +61,20 @@ discard block |
||
61 | 61 | |
62 | 62 | }; |
63 | 63 | |
64 | - if ( is_single() || ! get_post_gallery() ) { |
|
64 | + if (is_single() || ! get_post_gallery()) { |
|
65 | 65 | |
66 | 66 | /* translators: %s: Name of current post */ |
67 | - the_content( sprintf( |
|
68 | - __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), |
|
67 | + the_content(sprintf( |
|
68 | + __('Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen'), |
|
69 | 69 | get_the_title() |
70 | - ) ); |
|
70 | + )); |
|
71 | 71 | |
72 | - wp_link_pages( array( |
|
73 | - 'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), |
|
72 | + wp_link_pages(array( |
|
73 | + 'before' => '<div class="page-links">'.__('Pages:', 'twentyseventeen'), |
|
74 | 74 | 'after' => '</div>', |
75 | 75 | 'link_before' => '<span class="page-number">', |
76 | 76 | 'link_after' => '</span>', |
77 | - ) ); |
|
77 | + )); |
|
78 | 78 | |
79 | 79 | }; |
80 | 80 | ?> |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | </div><!-- .entry-content --> |
83 | 83 | |
84 | 84 | <?php |
85 | - if ( is_single() ) { |
|
85 | + if (is_single()) { |
|
86 | 86 | twentyseventeen_entry_footer(); |
87 | 87 | } |
88 | 88 | ?> |
@@ -14,17 +14,17 @@ |
||
14 | 14 | |
15 | 15 | <section class="no-results not-found"> |
16 | 16 | <header class="page-header"> |
17 | - <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1> |
|
17 | + <h1 class="page-title"><?php _e('Nothing Found', 'twentyseventeen'); ?></h1> |
|
18 | 18 | </header> |
19 | 19 | <div class="page-content"> |
20 | 20 | <?php |
21 | - if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> |
|
21 | + if (is_home() && current_user_can('publish_posts')) : ?> |
|
22 | 22 | |
23 | - <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p> |
|
23 | + <p><?php printf(__('Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen'), esc_url(admin_url('post-new.php'))); ?></p> |
|
24 | 24 | |
25 | 25 | <?php else : ?> |
26 | 26 | |
27 | - <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyseventeen' ); ?></p> |
|
27 | + <p><?php _e('It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyseventeen'); ?></p> |
|
28 | 28 | <?php |
29 | 29 | get_search_form(); |
30 | 30 |
@@ -22,9 +22,12 @@ |
||
22 | 22 | |
23 | 23 | <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p> |
24 | 24 | |
25 | - <?php else : ?> |
|
25 | + <?php else { |
|
26 | + : ?> |
|
26 | 27 | |
27 | - <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyseventeen' ); ?></p> |
|
28 | + <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyseventeen' ); |
|
29 | +} |
|
30 | +?></p> |
|
28 | 31 | <?php |
29 | 32 | get_search_form(); |
30 | 33 |
@@ -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,28 +31,28 @@ 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 | 42 | <?php |
43 | - $content = apply_filters( 'the_content', get_the_content() ); |
|
43 | + $content = apply_filters('the_content', get_the_content()); |
|
44 | 44 | $video = false; |
45 | 45 | |
46 | 46 | // Only get video from the content if a playlist isn't present. |
47 | - if ( false === strpos( $content, 'wp-playlist-script' ) ) { |
|
48 | - $video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) ); |
|
47 | + if (false === strpos($content, 'wp-playlist-script')) { |
|
48 | + $video = get_media_embedded_in_content($content, array('video', 'object', 'embed', 'iframe')); |
|
49 | 49 | } |
50 | 50 | ?> |
51 | 51 | |
52 | - <?php if ( '' !== get_the_post_thumbnail() && ! is_single() && empty( $video ) ) : ?> |
|
52 | + <?php if ('' !== get_the_post_thumbnail() && ! is_single() && empty($video)) : ?> |
|
53 | 53 | <div class="post-thumbnail"> |
54 | 54 | <a href="<?php the_permalink(); ?>"> |
55 | - <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?> |
|
55 | + <?php the_post_thumbnail('twentyseventeen-featured-image'); ?> |
|
56 | 56 | </a> |
57 | 57 | </div><!-- .post-thumbnail --> |
58 | 58 | <?php endif; ?> |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | <div class="entry-content"> |
61 | 61 | |
62 | 62 | <?php |
63 | - if ( ! is_single() ) { |
|
63 | + if ( ! is_single()) { |
|
64 | 64 | |
65 | 65 | // If not a single post, highlight the video file. |
66 | - if ( ! empty( $video ) ) { |
|
67 | - foreach ( $video as $video_html ) { |
|
66 | + if ( ! empty($video)) { |
|
67 | + foreach ($video as $video_html) { |
|
68 | 68 | echo '<div class="entry-video">'; |
69 | 69 | echo $video_html; |
70 | 70 | echo '</div>'; |
@@ -73,27 +73,27 @@ discard block |
||
73 | 73 | |
74 | 74 | }; |
75 | 75 | |
76 | - if ( is_single() || empty( $video ) ) { |
|
76 | + if (is_single() || empty($video)) { |
|
77 | 77 | |
78 | 78 | /* translators: %s: Name of current post */ |
79 | - the_content( sprintf( |
|
80 | - __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), |
|
79 | + the_content(sprintf( |
|
80 | + __('Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen'), |
|
81 | 81 | get_the_title() |
82 | - ) ); |
|
82 | + )); |
|
83 | 83 | |
84 | - wp_link_pages( array( |
|
85 | - 'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), |
|
84 | + wp_link_pages(array( |
|
85 | + 'before' => '<div class="page-links">'.__('Pages:', 'twentyseventeen'), |
|
86 | 86 | 'after' => '</div>', |
87 | 87 | 'link_before' => '<span class="page-number">', |
88 | 88 | 'link_after' => '</span>', |
89 | - ) ); |
|
89 | + )); |
|
90 | 90 | }; |
91 | 91 | ?> |
92 | 92 | |
93 | 93 | </div><!-- .entry-content --> |
94 | 94 | |
95 | 95 | <?php |
96 | - if ( is_single() ) { |
|
96 | + if (is_single()) { |
|
97 | 97 | twentyseventeen_entry_footer(); |
98 | 98 | } |
99 | 99 | ?> |
@@ -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 | endif; |
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,18 +31,18 @@ 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; ?> |
@@ -50,22 +50,22 @@ discard block |
||
50 | 50 | <div class="entry-content"> |
51 | 51 | <?php |
52 | 52 | /* translators: %s: Name of current post */ |
53 | - the_content( sprintf( |
|
54 | - __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), |
|
53 | + the_content(sprintf( |
|
54 | + __('Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen'), |
|
55 | 55 | get_the_title() |
56 | - ) ); |
|
56 | + )); |
|
57 | 57 | |
58 | - wp_link_pages( array( |
|
59 | - 'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), |
|
58 | + wp_link_pages(array( |
|
59 | + 'before' => '<div class="page-links">'.__('Pages:', 'twentyseventeen'), |
|
60 | 60 | 'after' => '</div>', |
61 | 61 | 'link_before' => '<span class="page-number">', |
62 | 62 | 'link_after' => '</span>', |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | ?> |
65 | 65 | </div><!-- .entry-content --> |
66 | 66 | |
67 | 67 | <?php |
68 | - if ( is_single() ) { |
|
68 | + if (is_single()) { |
|
69 | 69 | twentyseventeen_entry_footer(); |
70 | 70 | } |
71 | 71 | ?> |