@@ -30,18 +30,18 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | // add_shortcode('announcement','announcement_slider');
|
| 32 | 32 | |
| 33 | -function announcement_slider($atts, $content = null){
|
|
| 33 | +function announcement_slider($atts, $content = null) {
|
|
| 34 | 34 | |
| 35 | 35 | ob_start(); |
| 36 | 36 | |
| 37 | 37 | echo '<div class="marquee-container"> |
| 38 | 38 | <div class="marquee">'; |
| 39 | - if( have_rows('announcement', 'option') ):
|
|
| 40 | - while ( have_rows('announcement', 'option') ) : the_row();
|
|
| 39 | + if (have_rows('announcement', 'option')):
|
|
| 40 | + while (have_rows('announcement', 'option')) : the_row();
|
|
| 41 | 41 | $message = get_sub_field('messages');
|
| 42 | 42 | $message_link = get_sub_field('link');
|
| 43 | 43 | |
| 44 | - echo '<a href=" ' . $message_link .' " " title="Click to read full message"> ' . $message .' </a> <span>-</span>'; |
|
| 44 | + echo '<a href=" '.$message_link.' " " title="Click to read full message"> '.$message.' </a> <span>-</span>'; |
|
| 45 | 45 | endwhile; |
| 46 | 46 | else : |
| 47 | 47 | echo '<div class="col-xs-12">No Messages to Show!</div>'; |
@@ -52,20 +52,20 @@ discard block |
||
| 52 | 52 | return $output; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - add_shortcode('announcement','announcement_slider');
|
|
| 55 | + add_shortcode('announcement', 'announcement_slider');
|
|
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * Shortcode: Recent Post Slider |
| 60 | 60 | */ |
| 61 | -function recent_post_slider($atts, $content = null){
|
|
| 61 | +function recent_post_slider($atts, $content = null) {
|
|
| 62 | 62 | |
| 63 | 63 | ob_start(); |
| 64 | 64 | |
| 65 | 65 | echo '<div class="post-slider row"><div id="recent-posts" class="owl-carousel">'; |
| 66 | 66 | |
| 67 | 67 | global $post; |
| 68 | - $post_query = new WP_Query( array( |
|
| 68 | + $post_query = new WP_Query(array( |
|
| 69 | 69 | 'post_type' => 'post', |
| 70 | 70 | 'posts_per_page' => 12, |
| 71 | 71 | 'order'=>'DESC', |
@@ -73,21 +73,21 @@ discard block |
||
| 73 | 73 | ) |
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | - if( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post(); |
|
| 77 | - $thumb_post = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_related_post'); |
|
| 76 | + if ($post_query->have_posts()) : while ($post_query->have_posts()) : $post_query->the_post(); |
|
| 77 | + $thumb_post = wp_get_attachment_image_src(get_post_thumbnail_id(), 'lighthouse_related_post'); |
|
| 78 | 78 | $url_post = $thumb_post[0]; |
| 79 | 79 | $content = get_the_content(); |
| 80 | 80 | |
| 81 | 81 | echo '<div class="col-xs-12"><div class="thumbnail thumbnail-hover">'; |
| 82 | - echo '<img class="img-responsive" src=" ' . $url_post . '">'; |
|
| 83 | - echo '<a href=" ' . get_permalink() .' " " title=" ' . get_the_title() .' " class="overlay"></a>'; |
|
| 82 | + echo '<img class="img-responsive" src=" '.$url_post.'">'; |
|
| 83 | + echo '<a href=" '.get_permalink().' " " title=" '.get_the_title().' " class="overlay"></a>'; |
|
| 84 | 84 | echo '</div>'; |
| 85 | 85 | echo '<div class="entry">'; |
| 86 | - echo '<h3><a href=" ' . get_permalink() . ' "> ' . get_the_title() . '</a></h3>'; |
|
| 87 | - echo '<span class="date"> <i class="fa fa-clock-o"></i> ' . get_the_time(get_option('date_format')) .'</span>';
|
|
| 88 | - echo '<div class="entry-content">' . wp_trim_words( $content , '27' ) . '</div>'; |
|
| 86 | + echo '<h3><a href=" '.get_permalink().' "> '.get_the_title().'</a></h3>'; |
|
| 87 | + echo '<span class="date"> <i class="fa fa-clock-o"></i> '.get_the_time(get_option('date_format')).'</span>';
|
|
| 88 | + echo '<div class="entry-content">'.wp_trim_words($content, '27').'</div>'; |
|
| 89 | 89 | echo '<div class="read-more">'; |
| 90 | - echo '<a href="' . get_permalink() . ' " class="btn read-more-btn">View Article</a>'; |
|
| 90 | + echo '<a href="'.get_permalink().' " class="btn read-more-btn">View Article</a>'; |
|
| 91 | 91 | echo '</div>'; |
| 92 | 92 | echo '</div></div>'; |
| 93 | 93 | |
@@ -101,26 +101,26 @@ discard block |
||
| 101 | 101 | return $output; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | -add_shortcode('recent_posts','recent_post_slider');
|
|
| 104 | +add_shortcode('recent_posts', 'recent_post_slider');
|
|
| 105 | 105 | |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * Shortcode: Member logo slider |
| 109 | 109 | */ |
| 110 | -function member_logo_slider($atts, $content = null){
|
|
| 110 | +function member_logo_slider($atts, $content = null) {
|
|
| 111 | 111 | |
| 112 | 112 | ob_start(); |
| 113 | 113 | |
| 114 | 114 | echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">'; |
| 115 | 115 | |
| 116 | - if( have_rows('members_logo', 'option') ):
|
|
| 117 | - while ( have_rows('members_logo', 'option') ) : the_row();
|
|
| 116 | + if (have_rows('members_logo', 'option')):
|
|
| 117 | + while (have_rows('members_logo', 'option')) : the_row();
|
|
| 118 | 118 | $logo_url = get_sub_field('logo');
|
| 119 | 119 | $company_link = get_sub_field('link');
|
| 120 | 120 | |
| 121 | 121 | echo '<div class="thumbnail thumbnail-hover">'; |
| 122 | - echo '<img class="img-responsive" src=" ' . $logo_url . '">'; |
|
| 123 | - echo '<a href=" ' . $company_link .' " " title=" ' . $company_link .' " class="link-full"></a>'; |
|
| 122 | + echo '<img class="img-responsive" src=" '.$logo_url.'">'; |
|
| 123 | + echo '<a href=" '.$company_link.' " " title=" '.$company_link.' " class="link-full"></a>'; |
|
| 124 | 124 | echo '</div>'; |
| 125 | 125 | |
| 126 | 126 | endwhile; |
@@ -133,13 +133,13 @@ discard block |
||
| 133 | 133 | return $output; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | -add_shortcode('members_logo','member_logo_slider');
|
|
| 136 | +add_shortcode('members_logo', 'member_logo_slider');
|
|
| 137 | 137 | |
| 138 | 138 | |
| 139 | 139 | /** |
| 140 | 140 | * Shortcode: Share Price |
| 141 | 141 | */ |
| 142 | -function share_price_feed($atts, $content = null){
|
|
| 142 | +function share_price_feed($atts, $content = null) {
|
|
| 143 | 143 | |
| 144 | 144 | ob_start(); |
| 145 | 145 | |
@@ -150,18 +150,18 @@ discard block |
||
| 150 | 150 | $xml = simplexml_load_file($url); |
| 151 | 151 | $price = $xml->CurrentPrice; |
| 152 | 152 | $change = $xml->Change; |
| 153 | - $change_pcent = $xml->PercentageChange; |
|
| 153 | + $change_pcent = $xml->PercentageChange; |
|
| 154 | 154 | $volume = $xml->Volume; |
| 155 | 155 | $Date = $xml->Date; |
| 156 | 156 | $time = $xml->time; |
| 157 | 157 | |
| 158 | 158 | echo '<div class="share_price_feed">'; |
| 159 | 159 | |
| 160 | - echo '<div class="feed_options"><div class="share_data_title">Share Price:</div><div class="share_data">' . $price . '</div></div>'; |
|
| 161 | - echo '<div class="feed_options"><div class="share_data_title">Change:</div><div class="share_data">' . $change . 'p</div></div>'; |
|
| 162 | - echo '<div class="feed_options"><div class="share_data_title">Volume:</div><div class="share_data">' . $volume . '</div></div>'; |
|
| 163 | - echo '<div class="feed_options"><div class="share_data_title">Date:</div><div class="share_data">' . $Date . '</div></div>'; |
|
| 164 | - echo '<div class="feed_options"><div class="share_data_title">Time:</div><div class="share_data">' . $time . '</div></div>'; |
|
| 160 | + echo '<div class="feed_options"><div class="share_data_title">Share Price:</div><div class="share_data">'.$price.'</div></div>'; |
|
| 161 | + echo '<div class="feed_options"><div class="share_data_title">Change:</div><div class="share_data">'.$change.'p</div></div>'; |
|
| 162 | + echo '<div class="feed_options"><div class="share_data_title">Volume:</div><div class="share_data">'.$volume.'</div></div>'; |
|
| 163 | + echo '<div class="feed_options"><div class="share_data_title">Date:</div><div class="share_data">'.$Date.'</div></div>'; |
|
| 164 | + echo '<div class="feed_options"><div class="share_data_title">Time:</div><div class="share_data">'.$time.'</div></div>'; |
|
| 165 | 165 | |
| 166 | 166 | echo '</div>'; |
| 167 | 167 | |
@@ -169,14 +169,14 @@ discard block |
||
| 169 | 169 | return $output; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | -add_shortcode('share_price','share_price_feed');
|
|
| 172 | +add_shortcode('share_price', 'share_price_feed');
|
|
| 173 | 173 | |
| 174 | 174 | |
| 175 | 175 | |
| 176 | 176 | /** |
| 177 | 177 | * Shortcode: RNS Feeds |
| 178 | 178 | */ |
| 179 | -function rns_feed_fn($atts, $content = null){
|
|
| 179 | +function rns_feed_fn($atts, $content = null) {
|
|
| 180 | 180 | |
| 181 | 181 | ob_start(); |
| 182 | 182 | |
@@ -199,4 +199,4 @@ discard block |
||
| 199 | 199 | return $output; |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | -add_shortcode('rns_feed','rns_feed_fn'); |
|
| 203 | 202 | \ No newline at end of file |
| 203 | +add_shortcode('rns_feed', 'rns_feed_fn'); |
|
| 204 | 204 | \ No newline at end of file |
@@ -43,8 +43,10 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | echo '<a href=" ' . $message_link .' " " title="Click to read full message"> ' . $message .' </a> <span>-</span>'; |
| 45 | 45 | endwhile; |
| 46 | - else : |
|
| 47 | - echo '<div class="col-xs-12">No Messages to Show!</div>'; |
|
| 46 | + else { |
|
| 47 | + : |
|
| 48 | + echo '<div class="col-xs-12">No Messages to Show!</div>'; |
|
| 49 | + } |
|
| 48 | 50 | endif; |
| 49 | 51 | echo '</div></div>'; |
| 50 | 52 | |
@@ -124,8 +126,10 @@ discard block |
||
| 124 | 126 | echo '</div>'; |
| 125 | 127 | |
| 126 | 128 | endwhile; |
| 127 | - else : |
|
| 128 | - echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>'; |
|
| 129 | + else { |
|
| 130 | + : |
|
| 131 | + echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>'; |
|
| 132 | + } |
|
| 129 | 133 | endif; |
| 130 | 134 | echo '</div></div>'; |
| 131 | 135 | |