@@ -14,32 +14,32 @@ discard block |
||
14 | 14 | |
15 | 15 | <section class="error-404 not-found"> |
16 | 16 | <header class="page-header"> |
17 | - <h1 class="page-title"><?php esc_html_e( 'Oops! That page can’t be found.', 'lighthouse' ); ?></h1> |
|
17 | + <h1 class="page-title"><?php esc_html_e('Oops! That page can’t be found.', 'lighthouse'); ?></h1> |
|
18 | 18 | </header><!-- .page-header --> |
19 | 19 | |
20 | 20 | <div class="page-content"> |
21 | - <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'lighthouse' ); ?></p> |
|
21 | + <p><?php esc_html_e('It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'lighthouse'); ?></p> |
|
22 | 22 | |
23 | 23 | <?php |
24 | 24 | get_search_form(); |
25 | 25 | |
26 | - the_widget( 'WP_Widget_Recent_Posts' ); |
|
26 | + the_widget('WP_Widget_Recent_Posts'); |
|
27 | 27 | |
28 | 28 | // Only show the widget if site has multiple categories. |
29 | - if ( lighthouse_categorized_blog() ) : |
|
29 | + if (lighthouse_categorized_blog()) : |
|
30 | 30 | ?> |
31 | 31 | |
32 | 32 | <div class="widget widget_categories"> |
33 | - <h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'lighthouse' ); ?></h2> |
|
33 | + <h2 class="widget-title"><?php esc_html_e('Most Used Categories', 'lighthouse'); ?></h2> |
|
34 | 34 | <ul> |
35 | 35 | <?php |
36 | - wp_list_categories( array( |
|
36 | + wp_list_categories(array( |
|
37 | 37 | 'orderby' => 'count', |
38 | 38 | 'order' => 'DESC', |
39 | 39 | 'show_count' => 1, |
40 | 40 | 'title_li' => '', |
41 | 41 | 'number' => 10, |
42 | - ) ); |
|
42 | + )); |
|
43 | 43 | ?> |
44 | 44 | </ul> |
45 | 45 | </div><!-- .widget --> |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | endif; |
49 | 49 | |
50 | 50 | /* translators: %1$s: smiley */ |
51 | - $archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'lighthouse' ), convert_smilies( ':)' ) ) . '</p>'; |
|
52 | - the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" ); |
|
51 | + $archive_content = '<p>'.sprintf(esc_html__('Try looking in the monthly archives. %1$s', 'lighthouse'), convert_smilies(':)')).'</p>'; |
|
52 | + the_widget('WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content"); |
|
53 | 53 | |
54 | - the_widget( 'WP_Widget_Tag_Cloud' ); |
|
54 | + the_widget('WP_Widget_Tag_Cloud'); |
|
55 | 55 | ?> |
56 | 56 | |
57 | 57 | </div><!-- .page-content --> |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The template for displaying 404 pages (not found). |
|
4 | - * |
|
5 | - * @link https://codex.wordpress.org/Creating_an_Error_404_Page |
|
6 | - * |
|
7 | - * @package Lighthouse |
|
8 | - */ |
|
3 | + * The template for displaying 404 pages (not found). |
|
4 | + * |
|
5 | + * @link https://codex.wordpress.org/Creating_an_Error_404_Page |
|
6 | + * |
|
7 | + * @package Lighthouse |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | get_header(); ?> |
11 | 11 |
@@ -13,25 +13,25 @@ discard block |
||
13 | 13 | <main id="main" class="site-main" role="main"> |
14 | 14 | |
15 | 15 | <?php |
16 | - if ( have_posts() ) : ?> |
|
16 | + if (have_posts()) : ?> |
|
17 | 17 | |
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 | |
25 | 25 | <?php |
26 | 26 | /* Start the Loop */ |
27 | - while ( have_posts() ) : the_post(); |
|
27 | + while (have_posts()) : the_post(); |
|
28 | 28 | |
29 | 29 | /* |
30 | 30 | * Include the Post-Format-specific template for the content. |
31 | 31 | * If you want to override this in a child theme, then include a file |
32 | 32 | * called content-___.php (where ___ is the Post Format name) and that will be used instead. |
33 | 33 | */ |
34 | - get_template_part( 'template-parts/content', get_post_format() ); |
|
34 | + get_template_part('template-parts/content', get_post_format()); |
|
35 | 35 | |
36 | 36 | endwhile; |
37 | 37 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | else : |
41 | 41 | |
42 | - get_template_part( 'template-parts/content', 'none' ); |
|
42 | + get_template_part('template-parts/content', 'none'); |
|
43 | 43 | |
44 | 44 | endif; ?> |
45 | 45 |
@@ -34,8 +34,10 @@ |
||
34 | 34 | the_post(); |
35 | 35 | if ( is_search() ) : |
36 | 36 | get_template_part( 'template-parts/content', 'search' ); |
37 | - else : |
|
37 | + else { |
|
38 | + : |
|
38 | 39 | get_template_part( 'template-parts/content', get_post_format() ); |
40 | + } |
|
39 | 41 | endif; |
40 | 42 | } |
41 | 43 | } |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template Name: Home |
|
4 | - * |
|
5 | - * @package Lighthouse |
|
6 | - */ |
|
3 | + * Template Name: Home |
|
4 | + * |
|
5 | + * @package Lighthouse |
|
6 | + */ |
|
7 | 7 | ?><!DOCTYPE html> |
8 | 8 | <html <?php language_attributes(); ?>> |
9 | 9 | <head> |
@@ -9,7 +9,7 @@ |
||
9 | 9 | <div class="container"> |
10 | 10 | <div class="row"> |
11 | 11 | <main id="main" class="site-main" role="main"> |
12 | - <?php while ( have_posts() ) : the_post(); ?> |
|
12 | + <?php while (have_posts()) : the_post(); ?> |
|
13 | 13 | <section class="home-content"> |
14 | 14 | <?php the_content(); ?> |
15 | 15 | </section> |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | <main id="main" class="site-main" role="main"> |
19 | 19 | |
20 | 20 | <?php |
21 | - if ( have_posts() ) : |
|
21 | + if (have_posts()) : |
|
22 | 22 | |
23 | - if ( is_home() && ! is_front_page() ) : ?> |
|
23 | + if (is_home() && ! is_front_page()) : ?> |
|
24 | 24 | <header> |
25 | 25 | <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1> |
26 | 26 | </header> |
@@ -29,14 +29,14 @@ discard block |
||
29 | 29 | endif; |
30 | 30 | |
31 | 31 | /* Start the Loop */ |
32 | - while ( have_posts() ) : the_post(); |
|
32 | + while (have_posts()) : the_post(); |
|
33 | 33 | |
34 | 34 | /* |
35 | 35 | * Include the Post-Format-specific template for the content. |
36 | 36 | * If you want to override this in a child theme, then include a file |
37 | 37 | * called content-___.php (where ___ is the Post Format name) and that will be used instead. |
38 | 38 | */ |
39 | - get_template_part( 'template-parts/content', get_post_format() ); |
|
39 | + get_template_part('template-parts/content', get_post_format()); |
|
40 | 40 | |
41 | 41 | endwhile; |
42 | 42 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | else : |
46 | 46 | |
47 | - get_template_part( 'template-parts/content', 'none' ); |
|
47 | + get_template_part('template-parts/content', 'none'); |
|
48 | 48 | |
49 | 49 | endif; ?> |
50 | 50 |
@@ -34,8 +34,10 @@ |
||
34 | 34 | the_post(); |
35 | 35 | if ( is_search() ) : |
36 | 36 | get_template_part( 'template-parts/content', 'search' ); |
37 | - else : |
|
37 | + else { |
|
38 | + : |
|
38 | 39 | get_template_part( 'template-parts/content', get_post_format() ); |
40 | + } |
|
39 | 41 | endif; |
40 | 42 | } |
41 | 43 | } |
@@ -7,11 +7,11 @@ |
||
7 | 7 | * @package Lighthouse |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! is_active_sidebar( 'sidebar-1' ) ) { |
|
10 | +if ( ! is_active_sidebar('sidebar-1')) { |
|
11 | 11 | return; |
12 | 12 | } |
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <aside id="secondary" class="widget-area" role="complementary"> |
16 | - <?php dynamic_sidebar( 'sidebar-1' ); ?> |
|
16 | + <?php dynamic_sidebar('sidebar-1'); ?> |
|
17 | 17 | </aside><!-- #secondary --> |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
13 | 13 | <header class="entry-header"> |
14 | 14 | <?php |
15 | - if ( is_single() ) { |
|
16 | - the_title( '<h1 class="entry-title">', '</h1>' ); |
|
15 | + if (is_single()) { |
|
16 | + the_title('<h1 class="entry-title">', '</h1>'); |
|
17 | 17 | } else { |
18 | - the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); |
|
18 | + the_title('<h2 class="entry-title"><a href="'.esc_url(get_permalink()).'" rel="bookmark">', '</a></h2>'); |
|
19 | 19 | } |
20 | 20 | |
21 | - if ( 'post' === get_post_type() ) : ?> |
|
21 | + if ('post' === get_post_type()) : ?> |
|
22 | 22 | <div class="entry-meta"> |
23 | 23 | <?php lighthouse_posted_on(); ?> |
24 | 24 | </div><!-- .entry-meta --> |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | |
29 | 29 | <div class="entry-content"> |
30 | 30 | <?php |
31 | - the_content( sprintf( |
|
31 | + the_content(sprintf( |
|
32 | 32 | /* translators: %s: Name of current post. */ |
33 | - wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'lighthouse' ), array( 'span' => array( 'class' => array() ) ) ), |
|
34 | - the_title( '<span class="screen-reader-text">"', '"</span>', false ) |
|
35 | - ) ); |
|
33 | + wp_kses(__('Continue reading %s <span class="meta-nav">→</span>', 'lighthouse'), array('span' => array('class' => array()))), |
|
34 | + the_title('<span class="screen-reader-text">"', '"</span>', false) |
|
35 | + )); |
|
36 | 36 | |
37 | - wp_link_pages( array( |
|
38 | - 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'lighthouse' ), |
|
37 | + wp_link_pages(array( |
|
38 | + 'before' => '<div class="page-links">'.esc_html__('Pages:', 'lighthouse'), |
|
39 | 39 | 'after' => '</div>', |
40 | - ) ); |
|
40 | + )); |
|
41 | 41 | ?> |
42 | 42 | </div><!-- .entry-content --> |
43 | 43 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template part for displaying posts. |
|
4 | - * |
|
5 | - * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | - * |
|
7 | - * @package Lighthouse |
|
8 | - */ |
|
3 | + * Template part for displaying posts. |
|
4 | + * |
|
5 | + * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | + * |
|
7 | + * @package Lighthouse |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | ?> |
11 | 11 |
@@ -11,17 +11,17 @@ discard block |
||
11 | 11 | |
12 | 12 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
13 | 13 | <header class="entry-header"> |
14 | - <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> |
|
14 | + <?php the_title('<h1 class="entry-title">', '</h1>'); ?> |
|
15 | 15 | </header><!-- .entry-header --> |
16 | 16 | |
17 | 17 | <div class="entry-content"> |
18 | 18 | <?php |
19 | 19 | the_content(); |
20 | 20 | |
21 | - wp_link_pages( array( |
|
22 | - 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'lighthouse' ), |
|
21 | + wp_link_pages(array( |
|
22 | + 'before' => '<div class="page-links">'.esc_html__('Pages:', 'lighthouse'), |
|
23 | 23 | 'after' => '</div>', |
24 | - ) ); |
|
24 | + )); |
|
25 | 25 | ?> |
26 | 26 | </div><!-- .entry-content --> |
27 | 27 | |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | edit_post_link( |
31 | 31 | sprintf( |
32 | 32 | /* translators: %s: Name of current post */ |
33 | - esc_html__( 'Edit %s', 'lighthouse' ), |
|
34 | - the_title( '<span class="screen-reader-text">"', '"</span>', false ) |
|
33 | + esc_html__('Edit %s', 'lighthouse'), |
|
34 | + the_title('<span class="screen-reader-text">"', '"</span>', false) |
|
35 | 35 | ), |
36 | 36 | '<span class="edit-link">', |
37 | 37 | '</span>' |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template part for displaying page content in page.php. |
|
4 | - * |
|
5 | - * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | - * |
|
7 | - * @package Lighthouse |
|
8 | - */ |
|
3 | + * Template part for displaying page content in page.php. |
|
4 | + * |
|
5 | + * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | + * |
|
7 | + * @package Lighthouse |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | ?> |
11 | 11 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template part for displaying a message that posts cannot be found. |
|
4 | - * |
|
5 | - * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | - * |
|
7 | - * @package Lighthouse |
|
8 | - */ |
|
3 | + * Template part for displaying a message that posts cannot be found. |
|
4 | + * |
|
5 | + * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | + * |
|
7 | + * @package Lighthouse |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | ?> |
11 | 11 |
@@ -11,24 +11,24 @@ |
||
11 | 11 | |
12 | 12 | <section class="no-results not-found"> |
13 | 13 | <header class="page-header"> |
14 | - <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lighthouse' ); ?></h1> |
|
14 | + <h1 class="page-title"><?php esc_html_e('Nothing Found', 'lighthouse'); ?></h1> |
|
15 | 15 | </header><!-- .page-header --> |
16 | 16 | |
17 | 17 | <div class="page-content"> |
18 | 18 | <?php |
19 | - if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> |
|
19 | + if (is_home() && current_user_can('publish_posts')) : ?> |
|
20 | 20 | |
21 | - <p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'lighthouse' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p> |
|
21 | + <p><?php printf(wp_kses(__('Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'lighthouse'), array('a' => array('href' => array()))), esc_url(admin_url('post-new.php'))); ?></p> |
|
22 | 22 | |
23 | - <?php elseif ( is_search() ) : ?> |
|
23 | + <?php elseif (is_search()) : ?> |
|
24 | 24 | |
25 | - <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'lighthouse' ); ?></p> |
|
25 | + <p><?php esc_html_e('Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'lighthouse'); ?></p> |
|
26 | 26 | <?php |
27 | 27 | get_search_form(); |
28 | 28 | |
29 | 29 | else : ?> |
30 | 30 | |
31 | - <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lighthouse' ); ?></p> |
|
31 | + <p><?php esc_html_e('It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lighthouse'); ?></p> |
|
32 | 32 | <?php |
33 | 33 | get_search_form(); |
34 | 34 |
@@ -26,9 +26,12 @@ |
||
26 | 26 | <?php |
27 | 27 | get_search_form(); |
28 | 28 | |
29 | - else : ?> |
|
29 | + else { |
|
30 | + : ?> |
|
30 | 31 | |
31 | - <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lighthouse' ); ?></p> |
|
32 | + <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'lighthouse' ); |
|
33 | + } |
|
34 | + ?></p> |
|
32 | 35 | <?php |
33 | 36 | get_search_form(); |
34 | 37 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template part for displaying results in search pages. |
|
4 | - * |
|
5 | - * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | - * |
|
7 | - * @package Lighthouse |
|
8 | - */ |
|
3 | + * Template part for displaying results in search pages. |
|
4 | + * |
|
5 | + * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 | + * |
|
7 | + * @package Lighthouse |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | ?> |
11 | 11 |
@@ -11,9 +11,9 @@ |
||
11 | 11 | |
12 | 12 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
13 | 13 | <header class="entry-header"> |
14 | - <?php the_title( sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' ); ?> |
|
14 | + <?php the_title(sprintf('<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h3>'); ?> |
|
15 | 15 | |
16 | - <?php if ( 'post' === get_post_type() ) : ?> |
|
16 | + <?php if ('post' === get_post_type()) : ?> |
|
17 | 17 | <div class="entry-meta"> |
18 | 18 | <?php lighthouse_posted_on(); ?> |
19 | 19 | </div><!-- .entry-meta --> |