Completed
Push — master ( 8db731...d4ab68 )
by Md. Mozahidur
03:02
created
includes/shortcodes.php 2 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
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 messages"> ' . $message .' </a>';
44
+		echo '<a href=" '.$message_link.' " " title="Click to read full messages"> '.$message.' </a>';
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,10 @@  discard block
 block discarded – undo
43 43
 
44 44
 		echo '<a href=" ' . $message_link .' " " title="Click to read full messages"> ' . $message .' </a>';
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
functions.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,55 +137,55 @@  discard block
 block discarded – undo
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-marquee-js', get_template_directory_uri() . '/js/jquery.marquee.min.js', array('jquery'), '', true );
150
+	wp_enqueue_script('lighthouse-marquee-js', get_template_directory_uri().'/js/jquery.marquee.min.js', array('jquery'), '', true);
151 151
 
152
-	wp_enqueue_script( 'lighthouse-navigation', get_template_directory_uri() . '/js/navigation.min.js', array(), '20120206', true );
152
+	wp_enqueue_script('lighthouse-navigation', get_template_directory_uri().'/js/navigation.min.js', array(), '20120206', true);
153 153
 
154
-	wp_enqueue_script( 'lighthouse-settings-js', get_template_directory_uri() . '/js/lighthouse-settings.min.js', array('jquery'), '20160220', true );
154
+	wp_enqueue_script('lighthouse-settings-js', get_template_directory_uri().'/js/lighthouse-settings.min.js', array('jquery'), '20160220', true);
155 155
 
156
-	wp_enqueue_script( 'lighthouse-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.min.js', array(), '20130115', true );
156
+	wp_enqueue_script('lighthouse-skip-link-focus-fix', get_template_directory_uri().'/js/skip-link-focus-fix.min.js', array(), '20130115', true);
157 157
 
158
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
159
-		wp_enqueue_script( 'comment-reply' );
158
+	if (is_singular() && comments_open() && get_option('thread_comments')) {
159
+		wp_enqueue_script('comment-reply');
160 160
 	}
161 161
 }
162
-add_action( 'wp_enqueue_scripts', 'lighthouse_scripts' );
162
+add_action('wp_enqueue_scripts', 'lighthouse_scripts');
163 163
 
164 164
 
165 165
 /**
166 166
  * Implement the Custom Header feature.
167 167
  */
168
-require get_template_directory() . '/inc/custom-header.php';
168
+require get_template_directory().'/inc/custom-header.php';
169 169
 
170 170
 /**
171 171
  * Custom template tags for this theme.
172 172
  */
173
-require get_template_directory() . '/inc/template-tags.php';
173
+require get_template_directory().'/inc/template-tags.php';
174 174
 
175 175
 /**
176 176
  * Custom functions that act independently of the theme templates.
177 177
  */
178
-require get_template_directory() . '/inc/extras.php';
178
+require get_template_directory().'/inc/extras.php';
179 179
 
180 180
 /**
181 181
  * Customizer additions.
182 182
  */
183
-require get_template_directory() . '/inc/customizer.php';
183
+require get_template_directory().'/inc/customizer.php';
184 184
 
185 185
 /**
186 186
  * Load Jetpack compatibility file.
187 187
  */
188
-require get_template_directory() . '/inc/jetpack.php';
188
+require get_template_directory().'/inc/jetpack.php';
189 189
 
190 190
 
191 191
 /**
@@ -193,19 +193,19 @@  discard block
 block discarded – undo
193 193
  */
194 194
 
195 195
 // ACF
196
-include_once( get_stylesheet_directory() . '/includes/acf/acf.php' );
196
+include_once(get_stylesheet_directory().'/includes/acf/acf.php');
197 197
 
198 198
 // ACF Settings
199
-include_once( get_stylesheet_directory() . '/includes/acf-settings.php' );
199
+include_once(get_stylesheet_directory().'/includes/acf-settings.php');
200 200
 
201 201
 // Widgets
202
-include_once( get_stylesheet_directory() . '/includes/widgets.php' );
202
+include_once(get_stylesheet_directory().'/includes/widgets.php');
203 203
 
204 204
 // Menus
205
-include_once( get_stylesheet_directory() . '/includes/menus.php' );
205
+include_once(get_stylesheet_directory().'/includes/menus.php');
206 206
 
207 207
 // Theme Settings
208
-include_once( get_stylesheet_directory() . '/includes/theme-settings.php' );
208
+include_once(get_stylesheet_directory().'/includes/theme-settings.php');
209 209
 
210 210
 // Shortcodes
211
-include_once( get_stylesheet_directory() . '/includes/shortcodes.php' );
211
+include_once(get_stylesheet_directory().'/includes/shortcodes.php');
Please login to merge, or discard this patch.