@@ -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 --> |
@@ -68,7 +68,7 @@ |
||
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> |
@@ -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> |
@@ -12,17 +12,17 @@ discard block |
||
12 | 12 | ?><!DOCTYPE html> |
13 | 13 | <html <?php language_attributes(); ?>> |
14 | 14 | <head> |
15 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
15 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
16 | 16 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
17 | 17 | <link rel="profile" href="http://gmpg.org/xfn/11"> |
18 | - <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> |
|
18 | + <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>"> |
|
19 | 19 | |
20 | 20 | <?php wp_head(); ?> |
21 | 21 | </head> |
22 | 22 | |
23 | 23 | <body <?php body_class(); ?>> |
24 | 24 | <div id="page" class="site"> |
25 | - <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'lighthouse' ); ?></a> |
|
25 | + <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e('Skip to content', 'lighthouse'); ?></a> |
|
26 | 26 | |
27 | 27 | <header id="masthead" class="site-header panel-top panel-fixed" role="banner"> |
28 | 28 | <div class="container"> |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $xml = simplexml_load_file($url); |
50 | 50 | $price = $xml->CurrentPrice; |
51 | 51 | $change = $xml->Change; |
52 | - $change_pcent = $xml->PercentageChange; |
|
52 | + $change_pcent = $xml->PercentageChange; |
|
53 | 53 | $volume = $xml->Volume; |
54 | 54 | |
55 | 55 | echo "Share Price: "; |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | <button id="textplus">A+</button> |
70 | 70 | <button id="textminus">A-</button> |
71 | 71 | </div> |
72 | - <form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>"> |
|
72 | + <form role="search" method="get" action="<?php echo esc_url(home_url('/')); ?>"> |
|
73 | 73 | <div class="search-wrap"> |
74 | - <label class="screen-reader-text" for="s"><?php _e( 'Search for:', 'presentation' ); ?></label> |
|
74 | + <label class="screen-reader-text" for="s"><?php _e('Search for:', 'presentation'); ?></label> |
|
75 | 75 | <button type="submit"> |
76 | 76 | <i class="fa fa-search"></i> |
77 | 77 | </button> |
78 | - <input type="search" placeholder="<?php echo esc_attr( 'Search', 'presentation' ); ?>" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" /> |
|
78 | + <input type="search" placeholder="<?php echo esc_attr('Search', 'presentation'); ?>" name="s" value="<?php echo esc_attr(get_search_query()); ?>" /> |
|
79 | 79 | </div> |
80 | 80 | </form> |
81 | 81 | </div> |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | </div> |
89 | 89 | </div> |
90 | 90 | <div class="col-sm-12 col-md-2 col-lg-2 header-center-area"> |
91 | - <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> |
|
92 | - <img src="<?php echo( get_header_image() ); ?>" alt="<?php echo( get_bloginfo( 'title' ) ); ?>" /> |
|
91 | + <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"> |
|
92 | + <img src="<?php echo(get_header_image()); ?>" alt="<?php echo(get_bloginfo('title')); ?>" /> |
|
93 | 93 | </a> |
94 | 94 | |
95 | 95 | <div class="iv-module live-search"> |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | <div class="container"> |
103 | 103 | <div class="row"> |
104 | 104 | <div class="col-md-12"> |
105 | - <form method="get" action="<?php echo esc_url( home_url( '/' ) );?>"> |
|
106 | - <label for="s"><?php _e('Type & hit enter to search', 'ivan_domain');?></label> |
|
107 | - <input type="search" name="s" id="s" placeholder="<?php echo esc_attr__('Type & hit enter to search', 'lighthouse');?>" /> |
|
105 | + <form method="get" action="<?php echo esc_url(home_url('/')); ?>"> |
|
106 | + <label for="s"><?php _e('Type & hit enter to search', 'ivan_domain'); ?></label> |
|
107 | + <input type="search" name="s" id="s" placeholder="<?php echo esc_attr__('Type & hit enter to search', 'lighthouse'); ?>" /> |
|
108 | 108 | <a class="submit-form" href="#"><i class="fa fa-search"></i></a> |
109 | 109 | <div class="clearfix"></div> |
110 | 110 | </form> |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | <div class="container"> |
132 | 132 | <div class="row"> |
133 | 133 | <div class="col-md-12"> |
134 | - <form method="get" action="<?php echo esc_url( home_url( '/' ) );?>"> |
|
135 | - <label for="s"><?php _e('Type & hit enter', 'ivan_domain');?></label> |
|
136 | - <input type="search" name="s" id="s" placeholder="<?php echo esc_attr__('Type & hit enter', 'lighthouse');?>" /> |
|
134 | + <form method="get" action="<?php echo esc_url(home_url('/')); ?>"> |
|
135 | + <label for="s"><?php _e('Type & hit enter', 'ivan_domain'); ?></label> |
|
136 | + <input type="search" name="s" id="s" placeholder="<?php echo esc_attr__('Type & hit enter', 'lighthouse'); ?>" /> |
|
137 | 137 | <a class="submit-form" href="#"><i class="fa fa-search"></i></a> |
138 | 138 | <div class="clearfix"></div> |
139 | 139 | </form> |