@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | * |
6 | 6 | */ |
7 | 7 | function lighthouse_menus() { |
8 | - register_nav_menus( |
|
9 | - array( |
|
10 | - 'header-menu-left' => __( 'Header menu left', 'nav menu location', 'lighthouse' ), |
|
11 | - 'header-menu-right' => __( 'Header menu right' , 'nav menu location', 'lighthouse'), |
|
12 | - 'footer-menu' => __( 'Footer menu' , 'nav menu location', 'lighthouse'), |
|
13 | - 'footer-menu-bottom' => __( 'Footer menu bottom' , 'nav menu location', 'lighthouse') |
|
14 | - ) |
|
15 | - ); |
|
8 | + register_nav_menus( |
|
9 | + array( |
|
10 | + 'header-menu-left' => __( 'Header menu left', 'nav menu location', 'lighthouse' ), |
|
11 | + 'header-menu-right' => __( 'Header menu right' , 'nav menu location', 'lighthouse'), |
|
12 | + 'footer-menu' => __( 'Footer menu' , 'nav menu location', 'lighthouse'), |
|
13 | + 'footer-menu-bottom' => __( 'Footer menu bottom' , 'nav menu location', 'lighthouse') |
|
14 | + ) |
|
15 | + ); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | add_action( 'init', 'lighthouse_menus' ); |
@@ -25,104 +25,104 @@ discard block |
||
25 | 25 | |
26 | 26 | //Left menu |
27 | 27 | function lighthouse_header_menu_left() { |
28 | - if ( has_nav_menu( 'header-menu-left' ) ) { |
|
29 | - wp_nav_menu( |
|
30 | - array( |
|
31 | - 'theme_location' => 'header-menu-left', |
|
32 | - 'menu' => '', |
|
33 | - 'container' => 'div', |
|
34 | - 'container_id' => 'header-menu-left-id', |
|
35 | - 'container_class' => 'header-menu-left-cl', |
|
36 | - 'menu_id' => 'header-menu-id', |
|
37 | - 'menu_class' => 'header-menu-cl', |
|
38 | - 'echo' => true, |
|
39 | - 'fallback_cb' => '', |
|
40 | - 'before' => '', |
|
41 | - 'after' => '', |
|
42 | - 'link_before' => '<span>', |
|
43 | - 'link_after' => '</span>', |
|
44 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
45 | - 'depth' => 0, |
|
46 | - 'walker' => '' |
|
47 | - ) |
|
48 | - ); |
|
49 | - } |
|
28 | + if ( has_nav_menu( 'header-menu-left' ) ) { |
|
29 | + wp_nav_menu( |
|
30 | + array( |
|
31 | + 'theme_location' => 'header-menu-left', |
|
32 | + 'menu' => '', |
|
33 | + 'container' => 'div', |
|
34 | + 'container_id' => 'header-menu-left-id', |
|
35 | + 'container_class' => 'header-menu-left-cl', |
|
36 | + 'menu_id' => 'header-menu-id', |
|
37 | + 'menu_class' => 'header-menu-cl', |
|
38 | + 'echo' => true, |
|
39 | + 'fallback_cb' => '', |
|
40 | + 'before' => '', |
|
41 | + 'after' => '', |
|
42 | + 'link_before' => '<span>', |
|
43 | + 'link_after' => '</span>', |
|
44 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
45 | + 'depth' => 0, |
|
46 | + 'walker' => '' |
|
47 | + ) |
|
48 | + ); |
|
49 | + } |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | //Right menu |
53 | 53 | function lighthouse_header_menu_right() { |
54 | - if ( has_nav_menu( 'header-menu-right' ) ) { |
|
55 | - wp_nav_menu( |
|
56 | - array( |
|
57 | - 'theme_location' => 'header-menu-right', |
|
58 | - 'menu' => '', |
|
59 | - 'container' => 'div', |
|
60 | - 'container_id' => 'header-menu-right-id', |
|
61 | - 'container_class' => 'header-menu-right-cl', |
|
62 | - 'menu_id' => 'header-menu-id', |
|
63 | - 'menu_class' => 'header-menu-cl', |
|
64 | - 'echo' => true, |
|
65 | - 'fallback_cb' => '', |
|
66 | - 'before' => '', |
|
67 | - 'after' => '', |
|
68 | - 'link_before' => '<span>', |
|
69 | - 'link_after' => '</span>', |
|
70 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
71 | - 'depth' => 0, |
|
72 | - 'walker' => '' |
|
73 | - ) |
|
74 | - ); |
|
75 | - } |
|
54 | + if ( has_nav_menu( 'header-menu-right' ) ) { |
|
55 | + wp_nav_menu( |
|
56 | + array( |
|
57 | + 'theme_location' => 'header-menu-right', |
|
58 | + 'menu' => '', |
|
59 | + 'container' => 'div', |
|
60 | + 'container_id' => 'header-menu-right-id', |
|
61 | + 'container_class' => 'header-menu-right-cl', |
|
62 | + 'menu_id' => 'header-menu-id', |
|
63 | + 'menu_class' => 'header-menu-cl', |
|
64 | + 'echo' => true, |
|
65 | + 'fallback_cb' => '', |
|
66 | + 'before' => '', |
|
67 | + 'after' => '', |
|
68 | + 'link_before' => '<span>', |
|
69 | + 'link_after' => '</span>', |
|
70 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
71 | + 'depth' => 0, |
|
72 | + 'walker' => '' |
|
73 | + ) |
|
74 | + ); |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | //Fotter menu |
79 | 79 | function lighthouse_footer_menu() { |
80 | - if ( has_nav_menu( 'footer-menu' ) ) { |
|
81 | - wp_nav_menu( |
|
82 | - array( |
|
83 | - 'theme_location' => 'footer-menu', |
|
84 | - 'menu' => '', |
|
85 | - 'container' => 'div', |
|
86 | - 'container_id' => 'footer-menu-id', |
|
87 | - 'container_class' => 'footer-menu-cl', |
|
88 | - 'menu_id' => 'footer-menu-id', |
|
89 | - 'menu_class' => 'footer-menu-cl', |
|
90 | - 'echo' => true, |
|
91 | - 'fallback_cb' => '', |
|
92 | - 'before' => '', |
|
93 | - 'after' => '', |
|
94 | - 'link_before' => '', |
|
95 | - 'link_after' => '', |
|
96 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
97 | - 'depth' => 0, |
|
98 | - 'walker' => '' |
|
99 | - ) |
|
100 | - ); |
|
101 | - } |
|
80 | + if ( has_nav_menu( 'footer-menu' ) ) { |
|
81 | + wp_nav_menu( |
|
82 | + array( |
|
83 | + 'theme_location' => 'footer-menu', |
|
84 | + 'menu' => '', |
|
85 | + 'container' => 'div', |
|
86 | + 'container_id' => 'footer-menu-id', |
|
87 | + 'container_class' => 'footer-menu-cl', |
|
88 | + 'menu_id' => 'footer-menu-id', |
|
89 | + 'menu_class' => 'footer-menu-cl', |
|
90 | + 'echo' => true, |
|
91 | + 'fallback_cb' => '', |
|
92 | + 'before' => '', |
|
93 | + 'after' => '', |
|
94 | + 'link_before' => '', |
|
95 | + 'link_after' => '', |
|
96 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
97 | + 'depth' => 0, |
|
98 | + 'walker' => '' |
|
99 | + ) |
|
100 | + ); |
|
101 | + } |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | //Menu footer-bottom |
105 | 105 | function lighthouse_footer_menu_bottom() { |
106 | - if ( has_nav_menu( 'footer-menu-bottom' ) ) { |
|
107 | - wp_nav_menu( |
|
108 | - array( |
|
109 | - 'theme_location' => 'footer-menu-bottom', |
|
110 | - 'menu' => '', |
|
111 | - 'container' => 'div', |
|
112 | - 'container_id' => 'footer-menu-bottom-id', |
|
113 | - 'container_class' => 'footer-menu-bottom-cl', |
|
114 | - 'menu_id' => 'footer-menu-id', |
|
115 | - 'menu_class' => 'footer-menu-cl', |
|
116 | - 'echo' => true, |
|
117 | - 'fallback_cb' => '', |
|
118 | - 'before' => '', |
|
119 | - 'after' => '', |
|
120 | - 'link_before' => '', |
|
121 | - 'link_after' => '', |
|
122 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
123 | - 'depth' => 0, |
|
124 | - 'walker' => '' |
|
125 | - ) |
|
126 | - ); |
|
127 | - } |
|
106 | + if ( has_nav_menu( 'footer-menu-bottom' ) ) { |
|
107 | + wp_nav_menu( |
|
108 | + array( |
|
109 | + 'theme_location' => 'footer-menu-bottom', |
|
110 | + 'menu' => '', |
|
111 | + 'container' => 'div', |
|
112 | + 'container_id' => 'footer-menu-bottom-id', |
|
113 | + 'container_class' => 'footer-menu-bottom-cl', |
|
114 | + 'menu_id' => 'footer-menu-id', |
|
115 | + 'menu_class' => 'footer-menu-cl', |
|
116 | + 'echo' => true, |
|
117 | + 'fallback_cb' => '', |
|
118 | + 'before' => '', |
|
119 | + 'after' => '', |
|
120 | + 'link_before' => '', |
|
121 | + 'link_after' => '', |
|
122 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
123 | + 'depth' => 0, |
|
124 | + 'walker' => '' |
|
125 | + ) |
|
126 | + ); |
|
127 | + } |
|
128 | 128 | } |
129 | 129 | \ No newline at end of file |
@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | function lighthouse_menus() { |
8 | 8 | register_nav_menus( |
9 | 9 | array( |
10 | - 'header-menu-left' => __( 'Header menu left', 'nav menu location', 'lighthouse' ), |
|
11 | - 'header-menu-right' => __( 'Header menu right' , 'nav menu location', 'lighthouse'), |
|
12 | - 'footer-menu' => __( 'Footer menu' , 'nav menu location', 'lighthouse'), |
|
13 | - 'footer-menu-bottom' => __( 'Footer menu bottom' , 'nav menu location', 'lighthouse') |
|
10 | + 'header-menu-left' => __('Header menu left', 'nav menu location', 'lighthouse'), |
|
11 | + 'header-menu-right' => __('Header menu right', 'nav menu location', 'lighthouse'), |
|
12 | + 'footer-menu' => __('Footer menu', 'nav menu location', 'lighthouse'), |
|
13 | + 'footer-menu-bottom' => __('Footer menu bottom', 'nav menu location', 'lighthouse') |
|
14 | 14 | ) |
15 | 15 | ); |
16 | 16 | } |
17 | 17 | |
18 | -add_action( 'init', 'lighthouse_menus' ); |
|
18 | +add_action('init', 'lighthouse_menus'); |
|
19 | 19 | |
20 | 20 | |
21 | 21 | /* |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | //Left menu |
27 | 27 | function lighthouse_header_menu_left() { |
28 | - if ( has_nav_menu( 'header-menu-left' ) ) { |
|
28 | + if (has_nav_menu('header-menu-left')) { |
|
29 | 29 | wp_nav_menu( |
30 | 30 | array( |
31 | 31 | 'theme_location' => 'header-menu-left', |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | //Right menu |
53 | 53 | function lighthouse_header_menu_right() { |
54 | - if ( has_nav_menu( 'header-menu-right' ) ) { |
|
54 | + if (has_nav_menu('header-menu-right')) { |
|
55 | 55 | wp_nav_menu( |
56 | 56 | array( |
57 | 57 | 'theme_location' => 'header-menu-right', |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | //Fotter menu |
79 | 79 | function lighthouse_footer_menu() { |
80 | - if ( has_nav_menu( 'footer-menu' ) ) { |
|
80 | + if (has_nav_menu('footer-menu')) { |
|
81 | 81 | wp_nav_menu( |
82 | 82 | array( |
83 | 83 | 'theme_location' => 'footer-menu', |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | //Menu footer-bottom |
105 | 105 | function lighthouse_footer_menu_bottom() { |
106 | - if ( has_nav_menu( 'footer-menu-bottom' ) ) { |
|
106 | + if (has_nav_menu('footer-menu-bottom')) { |
|
107 | 107 | wp_nav_menu( |
108 | 108 | array( |
109 | 109 | 'theme_location' => 'footer-menu-bottom', |
@@ -71,8 +71,10 @@ |
||
71 | 71 | |
72 | 72 | |
73 | 73 | endwhile; |
74 | - else : |
|
75 | - echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>'; |
|
74 | + else { |
|
75 | + : |
|
76 | + echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>'; |
|
77 | + } |
|
76 | 78 | endif; |
77 | 79 | echo '</div></div>'; |
78 | 80 |
@@ -3,14 +3,14 @@ discard block |
||
3 | 3 | /** |
4 | 4 | * Shortcode: Recent Post Slider |
5 | 5 | */ |
6 | -function recent_post_slider($atts, $content = null){ |
|
6 | +function recent_post_slider($atts, $content = null) { |
|
7 | 7 | |
8 | 8 | ob_start(); |
9 | 9 | |
10 | 10 | echo '<div class="post-slider row"><div id="recent-posts" class="owl-carousel">'; |
11 | 11 | |
12 | 12 | global $post; |
13 | - $post_query = new WP_Query( array( |
|
13 | + $post_query = new WP_Query(array( |
|
14 | 14 | 'post_type' => 'post', |
15 | 15 | 'posts_per_page' => 12, |
16 | 16 | 'order'=>'DESC', |
@@ -18,21 +18,21 @@ discard block |
||
18 | 18 | ) |
19 | 19 | ); |
20 | 20 | |
21 | - if( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post(); |
|
22 | - $thumb_post = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_related_post'); |
|
21 | + if ($post_query->have_posts()) : while ($post_query->have_posts()) : $post_query->the_post(); |
|
22 | + $thumb_post = wp_get_attachment_image_src(get_post_thumbnail_id(), 'lighthouse_related_post'); |
|
23 | 23 | $url_post = $thumb_post[0]; |
24 | 24 | $content = get_the_content(); |
25 | 25 | |
26 | 26 | echo '<div class="col-xs-12"><div class="thumbnail thumbnail-hover">'; |
27 | - echo '<img class="img-responsive" src=" ' . $url_post . '">'; |
|
28 | - echo '<a href=" ' . get_permalink() .' " " title=" ' . get_the_title() .' " class="overlay"></a>'; |
|
27 | + echo '<img class="img-responsive" src=" '.$url_post.'">'; |
|
28 | + echo '<a href=" '.get_permalink().' " " title=" '.get_the_title().' " class="overlay"></a>'; |
|
29 | 29 | echo '</div>'; |
30 | 30 | echo '<div class="entry">'; |
31 | - echo '<h3><a href=" ' . get_permalink() . ' "> ' . get_the_title() . '</a></h3>'; |
|
32 | - echo '<span class="date"> <i class="fa fa-clock-o"></i> ' . get_the_time(get_option('date_format')) .'</span>'; |
|
33 | - echo '<div class="entry-content">' . wp_trim_words( $content , '27' ) . '</div>'; |
|
31 | + echo '<h3><a href=" '.get_permalink().' "> '.get_the_title().'</a></h3>'; |
|
32 | + echo '<span class="date"> <i class="fa fa-clock-o"></i> '.get_the_time(get_option('date_format')).'</span>'; |
|
33 | + echo '<div class="entry-content">'.wp_trim_words($content, '27').'</div>'; |
|
34 | 34 | echo '<div class="read-more">'; |
35 | - echo '<a href="' . get_permalink() . ' " class="btn read-more-btn">View Article</a>'; |
|
35 | + echo '<a href="'.get_permalink().' " class="btn read-more-btn">View Article</a>'; |
|
36 | 36 | echo '</div>'; |
37 | 37 | echo '</div></div>'; |
38 | 38 | |
@@ -46,26 +46,26 @@ discard block |
||
46 | 46 | return $output; |
47 | 47 | } |
48 | 48 | |
49 | -add_shortcode('recent_posts','recent_post_slider'); |
|
49 | +add_shortcode('recent_posts', 'recent_post_slider'); |
|
50 | 50 | |
51 | 51 | |
52 | 52 | /** |
53 | 53 | * Shortcode: Recent Post Slider |
54 | 54 | */ |
55 | -function member_logo_slider($atts, $content = null){ |
|
55 | +function member_logo_slider($atts, $content = null) { |
|
56 | 56 | |
57 | 57 | ob_start(); |
58 | 58 | |
59 | 59 | echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">'; |
60 | 60 | |
61 | - if( have_rows('members_logo', 'option') ): |
|
62 | - while ( have_rows('members_logo', 'option') ) : the_row(); |
|
61 | + if (have_rows('members_logo', 'option')): |
|
62 | + while (have_rows('members_logo', 'option')) : the_row(); |
|
63 | 63 | $logo_url = get_sub_field('logo'); |
64 | 64 | $company_link = get_sub_field('link'); |
65 | 65 | |
66 | 66 | echo '<div class="thumbnail thumbnail-hover">'; |
67 | - echo '<img class="img-responsive" src=" ' . $logo_url . '">'; |
|
68 | - echo '<a href=" ' . $company_link .' " " title=" ' . $company_link .' " class="link-full"></a>'; |
|
67 | + echo '<img class="img-responsive" src=" '.$logo_url.'">'; |
|
68 | + echo '<a href=" '.$company_link.' " " title=" '.$company_link.' " class="link-full"></a>'; |
|
69 | 69 | echo '</div>'; |
70 | 70 | |
71 | 71 | endwhile; |
@@ -78,13 +78,13 @@ discard block |
||
78 | 78 | return $output; |
79 | 79 | } |
80 | 80 | |
81 | -add_shortcode('members_logo','member_logo_slider'); |
|
81 | +add_shortcode('members_logo', 'member_logo_slider'); |
|
82 | 82 | |
83 | 83 | |
84 | 84 | /** |
85 | 85 | * Shortcode: Share Price |
86 | 86 | */ |
87 | -function share_price_feed($atts, $content = null){ |
|
87 | +function share_price_feed($atts, $content = null) { |
|
88 | 88 | |
89 | 89 | ob_start(); |
90 | 90 | |
@@ -95,18 +95,18 @@ discard block |
||
95 | 95 | $xml = simplexml_load_file($url); |
96 | 96 | $price = $xml->CurrentPrice; |
97 | 97 | $change = $xml->Change; |
98 | - $change_pcent = $xml->PercentageChange; |
|
98 | + $change_pcent = $xml->PercentageChange; |
|
99 | 99 | $volume = $xml->Volume; |
100 | 100 | $Date = $xml->Date; |
101 | 101 | $time = $xml->time; |
102 | 102 | |
103 | 103 | echo '<div class="share_price_feed">'; |
104 | 104 | |
105 | - echo '<div class="feed_options"><div class="share_data_title">Share Price:</div><div class="share_data">' . $price . '</div></div>'; |
|
106 | - echo '<div class="feed_options"><div class="share_data_title">Change:</div><div class="share_data">' . $change . 'p</div></div>'; |
|
107 | - echo '<div class="feed_options"><div class="share_data_title">Volume:</div><div class="share_data">' . $volume . '</div></div>'; |
|
108 | - echo '<div class="feed_options"><div class="share_data_title">Date:</div><div class="share_data">' . $Date . '</div></div>'; |
|
109 | - echo '<div class="feed_options"><div class="share_data_title">Time:</div><div class="share_data">' . $time . '</div></div>'; |
|
105 | + echo '<div class="feed_options"><div class="share_data_title">Share Price:</div><div class="share_data">'.$price.'</div></div>'; |
|
106 | + echo '<div class="feed_options"><div class="share_data_title">Change:</div><div class="share_data">'.$change.'p</div></div>'; |
|
107 | + echo '<div class="feed_options"><div class="share_data_title">Volume:</div><div class="share_data">'.$volume.'</div></div>'; |
|
108 | + echo '<div class="feed_options"><div class="share_data_title">Date:</div><div class="share_data">'.$Date.'</div></div>'; |
|
109 | + echo '<div class="feed_options"><div class="share_data_title">Time:</div><div class="share_data">'.$time.'</div></div>'; |
|
110 | 110 | |
111 | 111 | echo '</div>'; |
112 | 112 | |
@@ -114,14 +114,14 @@ discard block |
||
114 | 114 | return $output; |
115 | 115 | } |
116 | 116 | |
117 | -add_shortcode('share_price','share_price_feed'); |
|
117 | +add_shortcode('share_price', 'share_price_feed'); |
|
118 | 118 | |
119 | 119 | |
120 | 120 | |
121 | 121 | /** |
122 | 122 | * Shortcode: RNS Feeds |
123 | 123 | */ |
124 | -function rns_feed_fn($atts, $content = null){ |
|
124 | +function rns_feed_fn($atts, $content = null) { |
|
125 | 125 | |
126 | 126 | ob_start(); |
127 | 127 | |
@@ -144,4 +144,4 @@ discard block |
||
144 | 144 | return $output; |
145 | 145 | } |
146 | 146 | |
147 | -add_shortcode('rns_feed','rns_feed_fn'); |
|
148 | 147 | \ No newline at end of file |
148 | +add_shortcode('rns_feed', 'rns_feed_fn'); |
|
149 | 149 | \ No newline at end of file |
@@ -64,31 +64,31 @@ |
||
64 | 64 | */ |
65 | 65 | function tinymce_settings( $settings ) { |
66 | 66 | |
67 | - // html elements being stripped |
|
67 | + // html elements being stripped |
|
68 | 68 | $settings['extended_valid_elements'] = 'div[*],article[*]'; |
69 | 69 | |
70 | - // only html elements to keep |
|
71 | - //$settings['valid_elements'] = 'a,strong/b,div,h1,h2,h3,section'; |
|
70 | + // only html elements to keep |
|
71 | + //$settings['valid_elements'] = 'a,strong/b,div,h1,h2,h3,section'; |
|
72 | 72 | |
73 | 73 | // paste elements to keep |
74 | 74 | //$opts = '*[*]'; |
75 | 75 | //$settings['paste_word_valid_elements'] = $opts; |
76 | 76 | |
77 | - // don't remove line breaks |
|
77 | + // don't remove line breaks |
|
78 | 78 | $settings['remove_linebreaks'] = false; |
79 | 79 | |
80 | 80 | $settings['allow_html_in_named_anchor'] = true; |
81 | 81 | |
82 | - // convert newline characters to BR |
|
82 | + // convert newline characters to BR |
|
83 | 83 | $settings['convert_newlines_to_brs'] = true; |
84 | 84 | |
85 | - // don't remove redundant BR |
|
85 | + // don't remove redundant BR |
|
86 | 86 | $settings['remove_redundant_brs'] = false; |
87 | 87 | |
88 | 88 | // only html elements to keep |
89 | 89 | //$settings['wpautop'] = false; |
90 | 90 | |
91 | - // pass back to wordpress |
|
91 | + // pass back to wordpress |
|
92 | 92 | |
93 | 93 | return $settings; |
94 | 94 | } |
@@ -3,11 +3,11 @@ discard block |
||
3 | 3 | /** |
4 | 4 | * Read More button in excerpt |
5 | 5 | */ |
6 | -function new_excerpt_more( $more ) { |
|
7 | - return '... <a class="readmore" href="' . get_permalink() . ' ">Read more <i class="fa fa-external-link"></i></a>'; |
|
6 | +function new_excerpt_more($more) { |
|
7 | + return '... <a class="readmore" href="'.get_permalink().' ">Read more <i class="fa fa-external-link"></i></a>'; |
|
8 | 8 | } |
9 | 9 | |
10 | -add_filter( 'excerpt_more', 'new_excerpt_more' ); |
|
10 | +add_filter('excerpt_more', 'new_excerpt_more'); |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * Custome Lenght of excerpt |
@@ -23,37 +23,37 @@ discard block |
||
23 | 23 | */ |
24 | 24 | function pagination($pages = '', $range = 4) |
25 | 25 | { |
26 | - $showitems = ($range * 2)+1; |
|
26 | + $showitems = ($range * 2) + 1; |
|
27 | 27 | |
28 | 28 | global $paged; |
29 | - if(empty($paged)) $paged = 1; |
|
29 | + if (empty($paged)) $paged = 1; |
|
30 | 30 | |
31 | - if($pages == '') |
|
31 | + if ($pages == '') |
|
32 | 32 | { |
33 | 33 | global $wp_query; |
34 | 34 | $pages = $wp_query->max_num_pages; |
35 | - if(!$pages) |
|
35 | + if ( ! $pages) |
|
36 | 36 | { |
37 | 37 | $pages = 1; |
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | - if(1 != $pages) |
|
41 | + if (1 != $pages) |
|
42 | 42 | { |
43 | 43 | echo "<div class=\"pagination\"><span>Page ".$paged." of ".$pages."</span>"; |
44 | - if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
45 | - if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
44 | + if ($paged > 2 && $paged > $range + 1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
45 | + if ($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
46 | 46 | |
47 | - for ($i=1; $i <= $pages; $i++) |
|
47 | + for ($i = 1; $i <= $pages; $i++) |
|
48 | 48 | { |
49 | - if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) |
|
49 | + if (1 != $pages && ( ! ($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) |
|
50 | 50 | { |
51 | - echo ($paged == $i)? "<span class=\"current\">".$i."</span>":"<a href='".get_pagenum_link($i)."' class=\"inactive\">".$i."</a>"; |
|
51 | + echo ($paged == $i) ? "<span class=\"current\">".$i."</span>" : "<a href='".get_pagenum_link($i)."' class=\"inactive\">".$i."</a>"; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | 55 | if ($paged < $pages && $showitems < $pages) echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; |
56 | - if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
56 | + if ($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
57 | 57 | echo "</div>\n"; |
58 | 58 | } |
59 | 59 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * stop wp removing div tags |
64 | 64 | */ |
65 | -function tinymce_settings( $settings ) { |
|
65 | +function tinymce_settings($settings) { |
|
66 | 66 | |
67 | 67 | // html elements being stripped |
68 | 68 | $settings['extended_valid_elements'] = 'div[*],article[*]'; |
@@ -93,4 +93,4 @@ discard block |
||
93 | 93 | return $settings; |
94 | 94 | } |
95 | 95 | |
96 | -add_filter( 'tiny_mce_before_init', 'tinymce_settings' ); |
|
97 | 96 | \ No newline at end of file |
97 | +add_filter('tiny_mce_before_init', 'tinymce_settings'); |
|
98 | 98 | \ No newline at end of file |
@@ -26,7 +26,9 @@ discard block |
||
26 | 26 | $showitems = ($range * 2)+1; |
27 | 27 | |
28 | 28 | global $paged; |
29 | - if(empty($paged)) $paged = 1; |
|
29 | + if(empty($paged)) { |
|
30 | + $paged = 1; |
|
31 | + } |
|
30 | 32 | |
31 | 33 | if($pages == '') |
32 | 34 | { |
@@ -41,8 +43,12 @@ discard block |
||
41 | 43 | if(1 != $pages) |
42 | 44 | { |
43 | 45 | echo "<div class=\"pagination\"><span>Page ".$paged." of ".$pages."</span>"; |
44 | - if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
45 | - if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
46 | + if($paged > 2 && $paged > $range+1 && $showitems < $pages) { |
|
47 | + echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
48 | + } |
|
49 | + if($paged > 1 && $showitems < $pages) { |
|
50 | + echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
51 | + } |
|
46 | 52 | |
47 | 53 | for ($i=1; $i <= $pages; $i++) |
48 | 54 | { |
@@ -52,8 +58,12 @@ discard block |
||
52 | 58 | } |
53 | 59 | } |
54 | 60 | |
55 | - if ($paged < $pages && $showitems < $pages) echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; |
|
56 | - if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
61 | + if ($paged < $pages && $showitems < $pages) { |
|
62 | + echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; |
|
63 | + } |
|
64 | + if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) { |
|
65 | + echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
66 | + } |
|
57 | 67 | echo "</div>\n"; |
58 | 68 | } |
59 | 69 | } |
@@ -3,76 +3,76 @@ |
||
3 | 3 | Sidebar widget area (theme default). |
4 | 4 | **/ |
5 | 5 | function lighthouse_widgets_init() { |
6 | - register_sidebar( array( |
|
7 | - 'name' => esc_html__( 'Sidebar', 'lighthouse' ), |
|
6 | + register_sidebar(array( |
|
7 | + 'name' => esc_html__('Sidebar', 'lighthouse'), |
|
8 | 8 | 'id' => 'sidebar-1', |
9 | 9 | 'description' => '', |
10 | 10 | 'before_widget' => '<section id="%1$s" class="widget %2$s">', |
11 | 11 | 'after_widget' => '</section>', |
12 | 12 | 'before_title' => '<h2 class="widget-title">', |
13 | 13 | 'after_title' => '</h2>', |
14 | - ) ); |
|
14 | + )); |
|
15 | 15 | } |
16 | 16 | |
17 | -add_action( 'widgets_init', 'lighthouse_widgets_init' ); |
|
17 | +add_action('widgets_init', 'lighthouse_widgets_init'); |
|
18 | 18 | |
19 | 19 | |
20 | 20 | //Footer widgets |
21 | 21 | function footer_widgets_init() { |
22 | 22 | |
23 | - register_sidebar( array( |
|
23 | + register_sidebar(array( |
|
24 | 24 | 'name' => 'Footer Widgets #1', |
25 | - 'description' => __( 'Widgets displayed at footer.', 'lighthouse' ), |
|
25 | + 'description' => __('Widgets displayed at footer.', 'lighthouse'), |
|
26 | 26 | 'id' => 'footer_widgets_1', |
27 | 27 | 'before_widget' => '<div id="%1$s" class="widget %2$s">', |
28 | 28 | 'after_widget' => '</div>', |
29 | 29 | 'before_title' => '<h3 class="widget-title">', |
30 | 30 | 'after_title' => '</h3>', |
31 | - ) ); |
|
32 | - register_sidebar( array( |
|
31 | + )); |
|
32 | + register_sidebar(array( |
|
33 | 33 | 'name' => 'Footer Widgets #2', |
34 | - 'description' => __( 'Widgets displayed at footer.', 'lighthouse' ), |
|
34 | + 'description' => __('Widgets displayed at footer.', 'lighthouse'), |
|
35 | 35 | 'id' => 'footer_widgets_2', |
36 | 36 | 'before_widget' => '<div id="%1$s" class="widget %2$s">', |
37 | 37 | 'after_widget' => '</div>', |
38 | 38 | 'before_title' => '<h3 class="widget-title">', |
39 | 39 | 'after_title' => '</h3>', |
40 | - ) ); |
|
41 | - register_sidebar( array( |
|
40 | + )); |
|
41 | + register_sidebar(array( |
|
42 | 42 | 'name' => 'Footer Widgets #3', |
43 | - 'description' => __( 'Widgets displayed at footer.', 'lighthouse' ), |
|
43 | + 'description' => __('Widgets displayed at footer.', 'lighthouse'), |
|
44 | 44 | 'id' => 'footer_widgets_3', |
45 | 45 | 'before_widget' => '<div id="%1$s" class="widget %2$s">', |
46 | 46 | 'after_widget' => '</div>', |
47 | 47 | 'before_title' => '<h3 class="widget-title">', |
48 | 48 | 'after_title' => '</h3>', |
49 | - ) ); |
|
50 | - register_sidebar( array( |
|
49 | + )); |
|
50 | + register_sidebar(array( |
|
51 | 51 | 'name' => 'Footer Widgets #4', |
52 | - 'description' => __( 'Widgets displayed at footer.', 'lighthouse' ), |
|
52 | + 'description' => __('Widgets displayed at footer.', 'lighthouse'), |
|
53 | 53 | 'id' => 'footer_widgets_4', |
54 | 54 | 'before_widget' => '<div id="%1$s" class="widget %2$s">', |
55 | 55 | 'after_widget' => '</div>', |
56 | 56 | 'before_title' => '<h3 class="widget-title">', |
57 | 57 | 'after_title' => '</h3>', |
58 | - ) ); |
|
58 | + )); |
|
59 | 59 | } |
60 | 60 | |
61 | -add_action( 'widgets_init', 'footer_widgets_init' ); |
|
61 | +add_action('widgets_init', 'footer_widgets_init'); |
|
62 | 62 | |
63 | 63 | |
64 | 64 | //Blog sidebar widgets |
65 | 65 | function blog_widgets_init() { |
66 | 66 | |
67 | - register_sidebar( array( |
|
67 | + register_sidebar(array( |
|
68 | 68 | 'name' => 'Blog Sidebar', |
69 | - 'description' => __( 'Widgets displayed at blog page.', 'lighthouse' ), |
|
69 | + 'description' => __('Widgets displayed at blog page.', 'lighthouse'), |
|
70 | 70 | 'id' => 'blog_widgets', |
71 | 71 | 'before_widget' => '<div id="%1$s" class="widget %2$s">', |
72 | 72 | 'after_widget' => '</div>', |
73 | 73 | 'before_title' => '<h3 class="widget-title">', |
74 | 74 | 'after_title' => '</h3>', |
75 | - ) ); |
|
75 | + )); |
|
76 | 76 | } |
77 | 77 | |
78 | -add_action( 'widgets_init', 'blog_widgets_init' ); |
|
79 | 78 | \ No newline at end of file |
79 | +add_action('widgets_init', 'blog_widgets_init'); |
|
80 | 80 | \ No newline at end of file |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <div class="container blog-wrapper"> |
10 | 10 | <div class="row"> |
11 | 11 | <div class="col-xs-12 content-header"> |
12 | - <?php the_title( '<h1>', '</h1>' ); ?> |
|
12 | + <?php the_title('<h1>', '</h1>'); ?> |
|
13 | 13 | <h4>Read the latest articles, commentary in our news blogs</h4> |
14 | 14 | </div> |
15 | 15 | </div> |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | <div class="row"> |
20 | 20 | <div class="col-md-9 content-listing"> |
21 | 21 | <?php |
22 | - $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; |
|
22 | + $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; |
|
23 | 23 | $args = array( |
24 | 24 | 'post_type' => 'post', |
25 | 25 | 'posts_per_page' => 6, |
26 | 26 | 'paged' => $paged |
27 | 27 | ); |
28 | - $loop = new WP_Query( $args ); |
|
29 | - while($loop->have_posts()) : $loop->the_post(); |
|
28 | + $loop = new WP_Query($args); |
|
29 | + while ($loop->have_posts()) : $loop->the_post(); |
|
30 | 30 | |
31 | 31 | $postid = get_the_ID(); |
32 | 32 | ?> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | <article id="post-<?php echo $postid; ?>"> |
35 | 35 | <div class="row blog-item"> |
36 | 36 | <?php |
37 | - $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_blog_listing'); |
|
37 | + $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'lighthouse_blog_listing'); |
|
38 | 38 | $url = $thumb[0]; |
39 | 39 | $content = get_the_content(); |
40 | 40 | ?> |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | <span class="date"><?php the_time(get_option('date_format')) ?></span> |
54 | 54 | </div> |
55 | 55 | <div class="entry-content"> |
56 | - <?php echo wp_trim_words( $content , '18' ) ?> |
|
56 | + <?php echo wp_trim_words($content, '18') ?> |
|
57 | 57 | </div> |
58 | 58 | <div class="read-more"> |
59 | 59 | <a href="<?php the_permalink() ?>" class="btn read-more-btn">Read More</a> |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | </div> |
75 | 75 | </div> |
76 | 76 | <div class="col-md-3 sidebar" role="complementary"> |
77 | - <?php dynamic_sidebar( 'blog_widgets' ); ?> |
|
77 | + <?php dynamic_sidebar('blog_widgets'); ?> |
|
78 | 78 | </div> |
79 | 79 | </div><!-- .row --> |
80 | 80 | </div><!-- .container --> |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template Name: Blog |
|
4 | - * |
|
5 | - * @package Lighthouse |
|
6 | - */ |
|
3 | + * Template Name: Blog |
|
4 | + * |
|
5 | + * @package Lighthouse |
|
6 | + */ |
|
7 | 7 | get_header(); ?> |
8 | 8 | <div class="title-wrapper"> |
9 | 9 | <div class="container blog-wrapper"> |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | <div class="row"> |
69 | 69 | <div class="col-xs-12"> |
70 | 70 | <?php if (function_exists("pagination")) { |
71 | - pagination($loop->max_num_pages); |
|
71 | + pagination($loop->max_num_pages); |
|
72 | 72 | } ?> |
73 | 73 | </div> |
74 | 74 | </div> |
@@ -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> |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template Name: Advice |
|
4 | - * |
|
5 | - * @package Lighthouse |
|
6 | - */ |
|
3 | + * Template Name: Advice |
|
4 | + * |
|
5 | + * @package Lighthouse |
|
6 | + */ |
|
7 | 7 | get_header(); ?> |
8 | 8 | |
9 | 9 | <div class="container full-width"> |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | <div class="row"> |
4 | 4 | <div class="col-xs-12"> |
5 | 5 | <div class="slider-inner"> |
6 | - <?php echo do_shortcode( '[masterslider id="1"]') ?> |
|
6 | + <?php echo do_shortcode('[masterslider id="1"]') ?> |
|
7 | 7 | </div> |
8 | 8 | <div class="messages"> |
9 | 9 | <p>Latest Financial Reports just added - View our 2016 Accounts here +</p> |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | <div class="col-xs-12"> |
177 | 177 | <h4>Members of the following groups, see how we already work with you:</h4> |
178 | 178 | |
179 | - <?php echo do_shortcode( '[members_logo]') ?> |
|
179 | + <?php echo do_shortcode('[members_logo]') ?> |
|
180 | 180 | </div> |
181 | 181 | </div> |
182 | 182 | </div> |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | </div> |
195 | 195 | <div class="row"> |
196 | 196 | <div class="col-xs-12"> |
197 | - <?php echo do_shortcode( '[recent_posts]') ?> |
|
197 | + <?php echo do_shortcode('[recent_posts]') ?> |
|
198 | 198 | </div> |
199 | 199 | </div> |
200 | 200 | </section> |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Lighthouse functions and definitions. |
|
4 | - * |
|
5 | - * @link https://developer.wordpress.org/themes/basics/theme-functions/ |
|
6 | - * |
|
7 | - * @package Lighthouse |
|
8 | - */ |
|
3 | + * Lighthouse functions and definitions. |
|
4 | + * |
|
5 | + * @link https://developer.wordpress.org/themes/basics/theme-functions/ |
|
6 | + * |
|
7 | + * @package Lighthouse |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | if ( ! function_exists( 'lighthouse_setup' ) ) : |
11 | 11 | /** |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * as indicating support for post thumbnails. |
17 | 17 | */ |
18 | 18 | function lighthouse_setup() { |
19 | - // This theme styles the visual editor to resemble the theme style. |
|
19 | + // This theme styles the visual editor to resemble the theme style. |
|
20 | 20 | $font_url_Questrial = 'https://fonts.googleapis.com/css?family=Questrial'; |
21 | 21 | |
22 | 22 | $font_url_Raleway = 'https://fonts.googleapis.com/css?family=Raleway:400,300,500,700,600,100'; |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * @package Lighthouse |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! function_exists( 'lighthouse_setup' ) ) : |
|
10 | +if ( ! function_exists('lighthouse_setup')) : |
|
11 | 11 | /** |
12 | 12 | * Sets up theme defaults and registers support for various WordPress features. |
13 | 13 | * |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | add_editor_style( |
27 | 27 | array( |
28 | - 'style.css', str_replace( ',', '%2C', $font_url_Questrial), str_replace( ',', '%2C', $font_url_Raleway), str_replace( ',', '%2C', $font_url_Montserrat) |
|
28 | + 'style.css', str_replace(',', '%2C', $font_url_Questrial), str_replace(',', '%2C', $font_url_Raleway), str_replace(',', '%2C', $font_url_Montserrat) |
|
29 | 29 | ) |
30 | 30 | ); |
31 | 31 | /* |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | * If you're building a theme based on Lighthouse, use a find and replace |
35 | 35 | * to change 'lighthouse' to the name of your theme in all the template files. |
36 | 36 | */ |
37 | - load_theme_textdomain( 'lighthouse', get_template_directory() . '/languages' ); |
|
37 | + load_theme_textdomain('lighthouse', get_template_directory().'/languages'); |
|
38 | 38 | |
39 | 39 | // Add default posts and comments RSS feed links to head. |
40 | - add_theme_support( 'automatic-feed-links' ); |
|
40 | + add_theme_support('automatic-feed-links'); |
|
41 | 41 | |
42 | 42 | /* |
43 | 43 | * Let WordPress manage the document title. |
@@ -45,20 +45,20 @@ discard block |
||
45 | 45 | * hard-coded <title> tag in the document head, and expect WordPress to |
46 | 46 | * provide it for us. |
47 | 47 | */ |
48 | - add_theme_support( 'title-tag' ); |
|
48 | + add_theme_support('title-tag'); |
|
49 | 49 | |
50 | 50 | /* |
51 | 51 | * Enable support for Post Thumbnails on posts and pages. |
52 | 52 | * |
53 | 53 | * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ |
54 | 54 | */ |
55 | - add_theme_support( 'post-thumbnails' ); |
|
55 | + add_theme_support('post-thumbnails'); |
|
56 | 56 | |
57 | - add_image_size( 'lighthouse_feature_img', 1000, 310, array( 'center', 'center' ) ); |
|
57 | + add_image_size('lighthouse_feature_img', 1000, 310, array('center', 'center')); |
|
58 | 58 | |
59 | - add_image_size( 'lighthouse_blog_listing', 714, 274, array( 'center', 'center' ) ); |
|
59 | + add_image_size('lighthouse_blog_listing', 714, 274, array('center', 'center')); |
|
60 | 60 | |
61 | - add_image_size( 'lighthouse_related_post', 475, 280, array( 'center', 'center' ) ); |
|
61 | + add_image_size('lighthouse_related_post', 475, 280, array('center', 'center')); |
|
62 | 62 | |
63 | 63 | |
64 | 64 | /* |
@@ -72,45 +72,45 @@ discard block |
||
72 | 72 | * |
73 | 73 | * @link https://codex.wordpress.org/Function_Reference/get_search_form |
74 | 74 | */ |
75 | - add_theme_support( 'html5', array( 'search-form' ) ); |
|
75 | + add_theme_support('html5', array('search-form')); |
|
76 | 76 | |
77 | 77 | // This theme uses wp_nav_menu() in one location. |
78 | - register_nav_menus( array( |
|
79 | - 'primary' => esc_html__( 'Primary', 'lighthouse' ), |
|
80 | - ) ); |
|
78 | + register_nav_menus(array( |
|
79 | + 'primary' => esc_html__('Primary', 'lighthouse'), |
|
80 | + )); |
|
81 | 81 | |
82 | 82 | /* |
83 | 83 | * Switch default core markup for search form, comment form, and comments |
84 | 84 | * to output valid HTML5. |
85 | 85 | */ |
86 | - add_theme_support( 'html5', array( |
|
86 | + add_theme_support('html5', array( |
|
87 | 87 | 'search-form', |
88 | 88 | 'comment-form', |
89 | 89 | 'comment-list', |
90 | 90 | 'gallery', |
91 | 91 | 'caption', |
92 | - ) ); |
|
92 | + )); |
|
93 | 93 | |
94 | 94 | /* |
95 | 95 | * Enable support for Post Formats. |
96 | 96 | * See https://developer.wordpress.org/themes/functionality/post-formats/ |
97 | 97 | */ |
98 | - add_theme_support( 'post-formats', array( |
|
98 | + add_theme_support('post-formats', array( |
|
99 | 99 | 'aside', |
100 | 100 | 'image', |
101 | 101 | 'video', |
102 | 102 | 'quote', |
103 | 103 | 'link', |
104 | - ) ); |
|
104 | + )); |
|
105 | 105 | |
106 | 106 | // Set up the WordPress core custom background feature. |
107 | - add_theme_support( 'custom-background', apply_filters( 'lighthouse_custom_background_args', array( |
|
107 | + add_theme_support('custom-background', apply_filters('lighthouse_custom_background_args', array( |
|
108 | 108 | 'default-color' => 'ffffff', |
109 | 109 | 'default-image' => '', |
110 | - ) ) ); |
|
110 | + ))); |
|
111 | 111 | } |
112 | 112 | endif; |
113 | -add_action( 'after_setup_theme', 'lighthouse_setup' ); |
|
113 | +add_action('after_setup_theme', 'lighthouse_setup'); |
|
114 | 114 | |
115 | 115 | /** |
116 | 116 | * Set the content width in pixels, based on the theme's design and stylesheet. |
@@ -120,16 +120,16 @@ discard block |
||
120 | 120 | * @global int $content_width |
121 | 121 | */ |
122 | 122 | function lighthouse_content_width() { |
123 | - $GLOBALS['content_width'] = apply_filters( 'lighthouse_content_width', 640 ); |
|
123 | + $GLOBALS['content_width'] = apply_filters('lighthouse_content_width', 640); |
|
124 | 124 | } |
125 | -add_action( 'after_setup_theme', 'lighthouse_content_width', 0 ); |
|
125 | +add_action('after_setup_theme', 'lighthouse_content_width', 0); |
|
126 | 126 | |
127 | 127 | /** |
128 | 128 | * Enqueue scripts and styles. |
129 | 129 | */ |
130 | 130 | function lighthouse_scripts() { |
131 | 131 | |
132 | - wp_enqueue_style( 'lighthouse-style', get_stylesheet_uri() ); |
|
132 | + wp_enqueue_style('lighthouse-style', get_stylesheet_uri()); |
|
133 | 133 | |
134 | 134 | wp_enqueue_style('lighthouse-google-fonts-questrial', 'https://fonts.googleapis.com/css?family=Questrial'); |
135 | 135 | |
@@ -137,53 +137,53 @@ discard block |
||
137 | 137 | |
138 | 138 | wp_enqueue_style('lighthouse-google-fonts-montserrat', 'https://fonts.googleapis.com/css?family=Montserrat:400,700'); |
139 | 139 | |
140 | - wp_enqueue_script( 'lighthouse-classList-js', 'https://cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js', array('jquery'), ''); |
|
140 | + wp_enqueue_script('lighthouse-classList-js', 'https://cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js', array('jquery'), ''); |
|
141 | 141 | |
142 | - wp_enqueue_script( 'lighthouse-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true ); |
|
142 | + wp_enqueue_script('lighthouse-bootstrap-js', get_template_directory_uri().'/js/bootstrap.min.js', array('jquery'), '', true); |
|
143 | 143 | |
144 | - wp_enqueue_script( 'lighthouse-material-menu-js', get_template_directory_uri() . '/js/materialMenu.min.js', array('jquery'), '', true ); |
|
144 | + wp_enqueue_script('lighthouse-material-menu-js', get_template_directory_uri().'/js/materialMenu.min.js', array('jquery'), '', true); |
|
145 | 145 | |
146 | - wp_enqueue_script( 'lighthouse-owl-carousel-js', get_template_directory_uri() . '/js/owl-carousel.min.js', array('jquery'), '', true ); |
|
146 | + wp_enqueue_script('lighthouse-owl-carousel-js', get_template_directory_uri().'/js/owl-carousel.min.js', array('jquery'), '', true); |
|
147 | 147 | |
148 | - wp_enqueue_script( 'lighthouse-match-height-js', get_template_directory_uri() . '/js/jquery.matchHeight-min.js', array('jquery'), '', true ); |
|
148 | + wp_enqueue_script('lighthouse-match-height-js', get_template_directory_uri().'/js/jquery.matchHeight-min.js', array('jquery'), '', true); |
|
149 | 149 | |
150 | - wp_enqueue_script( 'lighthouse-navigation', get_template_directory_uri() . '/js/navigation.min.js', array(), '20120206', true ); |
|
150 | + wp_enqueue_script('lighthouse-navigation', get_template_directory_uri().'/js/navigation.min.js', array(), '20120206', true); |
|
151 | 151 | |
152 | - wp_enqueue_script( 'lighthouse-settings-js', get_template_directory_uri() . '/js/lighthouse-settings.min.js', array('jquery'), '20160220', true ); |
|
152 | + wp_enqueue_script('lighthouse-settings-js', get_template_directory_uri().'/js/lighthouse-settings.min.js', array('jquery'), '20160220', true); |
|
153 | 153 | |
154 | - wp_enqueue_script( 'lighthouse-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.min.js', array(), '20130115', true ); |
|
154 | + wp_enqueue_script('lighthouse-skip-link-focus-fix', get_template_directory_uri().'/js/skip-link-focus-fix.min.js', array(), '20130115', true); |
|
155 | 155 | |
156 | - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { |
|
157 | - wp_enqueue_script( 'comment-reply' ); |
|
156 | + if (is_singular() && comments_open() && get_option('thread_comments')) { |
|
157 | + wp_enqueue_script('comment-reply'); |
|
158 | 158 | } |
159 | 159 | } |
160 | -add_action( 'wp_enqueue_scripts', 'lighthouse_scripts' ); |
|
160 | +add_action('wp_enqueue_scripts', 'lighthouse_scripts'); |
|
161 | 161 | |
162 | 162 | |
163 | 163 | /** |
164 | 164 | * Implement the Custom Header feature. |
165 | 165 | */ |
166 | -require get_template_directory() . '/inc/custom-header.php'; |
|
166 | +require get_template_directory().'/inc/custom-header.php'; |
|
167 | 167 | |
168 | 168 | /** |
169 | 169 | * Custom template tags for this theme. |
170 | 170 | */ |
171 | -require get_template_directory() . '/inc/template-tags.php'; |
|
171 | +require get_template_directory().'/inc/template-tags.php'; |
|
172 | 172 | |
173 | 173 | /** |
174 | 174 | * Custom functions that act independently of the theme templates. |
175 | 175 | */ |
176 | -require get_template_directory() . '/inc/extras.php'; |
|
176 | +require get_template_directory().'/inc/extras.php'; |
|
177 | 177 | |
178 | 178 | /** |
179 | 179 | * Customizer additions. |
180 | 180 | */ |
181 | -require get_template_directory() . '/inc/customizer.php'; |
|
181 | +require get_template_directory().'/inc/customizer.php'; |
|
182 | 182 | |
183 | 183 | /** |
184 | 184 | * Load Jetpack compatibility file. |
185 | 185 | */ |
186 | -require get_template_directory() . '/inc/jetpack.php'; |
|
186 | +require get_template_directory().'/inc/jetpack.php'; |
|
187 | 187 | |
188 | 188 | |
189 | 189 | /** |
@@ -191,19 +191,19 @@ discard block |
||
191 | 191 | */ |
192 | 192 | |
193 | 193 | // ACF |
194 | -include_once( get_stylesheet_directory() . '/includes/acf/acf.php' ); |
|
194 | +include_once(get_stylesheet_directory().'/includes/acf/acf.php'); |
|
195 | 195 | |
196 | 196 | // ACF Settings |
197 | -include_once( get_stylesheet_directory() . '/includes/acf-settings.php' ); |
|
197 | +include_once(get_stylesheet_directory().'/includes/acf-settings.php'); |
|
198 | 198 | |
199 | 199 | // Widgets |
200 | -include_once( get_stylesheet_directory() . '/includes/widgets.php' ); |
|
200 | +include_once(get_stylesheet_directory().'/includes/widgets.php'); |
|
201 | 201 | |
202 | 202 | // Menus |
203 | -include_once( get_stylesheet_directory() . '/includes/menus.php' ); |
|
203 | +include_once(get_stylesheet_directory().'/includes/menus.php'); |
|
204 | 204 | |
205 | 205 | // Theme Settings |
206 | -include_once( get_stylesheet_directory() . '/includes/theme-settings.php' ); |
|
206 | +include_once(get_stylesheet_directory().'/includes/theme-settings.php'); |
|
207 | 207 | |
208 | 208 | // Shortcodes |
209 | -include_once( get_stylesheet_directory() . '/includes/shortcodes.php' ); |
|
209 | +include_once(get_stylesheet_directory().'/includes/shortcodes.php'); |