Completed
Push — master ( acfc89...556f73 )
by Md. Mozahidur
03:17 queued 10s
created
single.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying all single posts.
4
- *
5
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
6
- *
7
- * @package Lighthouse
8
- */
3
+	 * The template for displaying all single posts.
4
+	 *
5
+	 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
6
+	 *
7
+	 * @package Lighthouse
8
+	 */
9 9
 
10 10
 get_header(); ?>
11 11
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 							<?php
56 56
 							 $postslist = get_posts('numberposts=99&order=DESC&orderby=date');
57 57
 							 foreach ($postslist as $post) :
58
-							    setup_postdata($post);
58
+								setup_postdata($post);
59 59
 							 ?>
60 60
 							 <div class="col-xs-12">
61 61
 							 <div class="entry">
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 				<main id="main" class="site-main" role="main">
25 25
 
26 26
 				<?php
27
-				while ( have_posts() ) : the_post();
27
+				while (have_posts()) : the_post();
28 28
 
29
-					$thumb_feature = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_feature_img');
29
+					$thumb_feature = wp_get_attachment_image_src(get_post_thumbnail_id(), 'lighthouse_feature_img');
30 30
 					$url_feature = $thumb_feature[0];
31 31
 				?> 
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 				</div>
36 36
 
37 37
 				<?php
38
-				get_template_part( 'template-parts/content', get_post_format() );
38
+				get_template_part('template-parts/content', get_post_format());
39 39
 
40 40
 					//the_post_navigation();
41 41
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 								<div class="thumbnail thumbnail-hover">
64 64
 								<?php
65
-									$thumb_post = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_related_post');
65
+									$thumb_post = wp_get_attachment_image_src(get_post_thumbnail_id(), 'lighthouse_related_post');
66 66
 									$url_post = $thumb_post[0];
67 67
 								?>
68 68
 									<img class="img-responsive" src="<?php echo $url_post; ?>">
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 			</div>
86 86
 		<div class="col-md-3 sidebar" role="complementary">
87
-			<?php dynamic_sidebar( 'blog_widgets' ); ?>
87
+			<?php dynamic_sidebar('blog_widgets'); ?>
88 88
 		</div>
89 89
 		</div><!-- .row -->
90 90
 	</div><!-- #primary -->
Please login to merge, or discard this patch.
functions.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
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
 /**
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
  * Read More button in excerpt
179 179
  */
180 180
 function new_excerpt_more( $more ) {
181
-    return ' ';
181
+	return ' ';
182 182
 }
183 183
 add_filter( 'excerpt_more', 'new_excerpt_more' );
184 184
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
  * Custome Lenght of excerpt
187 187
  */
188 188
 function custom_excerpt_length( $length ) {
189
-    return 18;
189
+	return 18;
190 190
 }
191 191
 add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
192 192
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		echo '</div></div>';
231 231
 
232 232
 		endwhile;
233
-	    wp_reset_postdata();
233
+		wp_reset_postdata();
234 234
 	endif;
235 235
 		
236 236
 		echo '</div></div>';
Please login to merge, or discard this patch.
Spacing   +61 added lines, -61 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
  *
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 	 * If you're building a theme based on Lighthouse, use a find and replace
23 23
 	 * to change 'lighthouse' to the name of your theme in all the template files.
24 24
 	 */
25
-	load_theme_textdomain( 'lighthouse', get_template_directory() . '/languages' );
25
+	load_theme_textdomain('lighthouse', get_template_directory().'/languages');
26 26
 
27 27
 	// Add default posts and comments RSS feed links to head.
28
-	add_theme_support( 'automatic-feed-links' );
28
+	add_theme_support('automatic-feed-links');
29 29
 
30 30
 	/*
31 31
 	 * Let WordPress manage the document title.
@@ -33,32 +33,32 @@  discard block
 block discarded – undo
33 33
 	 * hard-coded <title> tag in the document head, and expect WordPress to
34 34
 	 * provide it for us.
35 35
 	 */
36
-	add_theme_support( 'title-tag' );
36
+	add_theme_support('title-tag');
37 37
 
38 38
 	/*
39 39
 	 * Enable support for Post Thumbnails on posts and pages.
40 40
 	 *
41 41
 	 * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
42 42
 	 */
43
-	add_theme_support( 'post-thumbnails' );
43
+	add_theme_support('post-thumbnails');
44 44
 
45
-	add_image_size( 'lighthouse_feature_img', 1000, 310, array( 'center', 'center' ) );
45
+	add_image_size('lighthouse_feature_img', 1000, 310, array('center', 'center'));
46 46
 
47
-	add_image_size( 'lighthouse_blog_listing', 714, 274, array( 'center', 'center' ) );
47
+	add_image_size('lighthouse_blog_listing', 714, 274, array('center', 'center'));
48 48
 
49
-	add_image_size( 'lighthouse_related_post', 475, 280, array( 'center', 'center' ) );
49
+	add_image_size('lighthouse_related_post', 475, 280, array('center', 'center'));
50 50
 
51 51
 	/*
52 52
 	 * Default HTML5 Form
53 53
 	 *
54 54
 	 * @link https://codex.wordpress.org/Function_Reference/get_search_form
55 55
 	 */
56
-	add_theme_support( 'html5', array( 'search-form' ) ); 
56
+	add_theme_support('html5', array('search-form')); 
57 57
 
58 58
 	// This theme uses wp_nav_menu() in one location.
59
-	register_nav_menus( array(
60
-		'primary' => esc_html__( 'Primary', 'lighthouse' ),
61
-	) );
59
+	register_nav_menus(array(
60
+		'primary' => esc_html__('Primary', 'lighthouse'),
61
+	));
62 62
 
63 63
 
64 64
 	/*
@@ -68,47 +68,47 @@  discard block
 block discarded – undo
68 68
 	function lighthouse_menus() {
69 69
 		register_nav_menus(
70 70
 			array(
71
-				'header-menu-left' => __( 'Header menu left', 'nav menu location', 'lighthouse' ),
72
-				'header-menu-right' => __( 'Header menu right' , 'nav menu location', 'lighthouse'),
73
-				'footer-menu' => __( 'Footer menu' , 'nav menu location', 'lighthouse'),
74
-				'footer-menu-bottom' => __( 'Footer menu bottom' , 'nav menu location', 'lighthouse')
71
+				'header-menu-left' => __('Header menu left', 'nav menu location', 'lighthouse'),
72
+				'header-menu-right' => __('Header menu right', 'nav menu location', 'lighthouse'),
73
+				'footer-menu' => __('Footer menu', 'nav menu location', 'lighthouse'),
74
+				'footer-menu-bottom' => __('Footer menu bottom', 'nav menu location', 'lighthouse')
75 75
 				)
76 76
 			);
77 77
 	}
78
-	add_action( 'init', 'lighthouse_menus' );
78
+	add_action('init', 'lighthouse_menus');
79 79
 
80 80
 	/*
81 81
 	 * Switch default core markup for search form, comment form, and comments
82 82
 	 * to output valid HTML5.
83 83
 	 */
84
-	add_theme_support( 'html5', array(
84
+	add_theme_support('html5', array(
85 85
 		'search-form',
86 86
 		'comment-form',
87 87
 		'comment-list',
88 88
 		'gallery',
89 89
 		'caption',
90
-	) );
90
+	));
91 91
 
92 92
 	/*
93 93
 	 * Enable support for Post Formats.
94 94
 	 * See https://developer.wordpress.org/themes/functionality/post-formats/
95 95
 	 */
96
-	add_theme_support( 'post-formats', array(
96
+	add_theme_support('post-formats', array(
97 97
 		'aside',
98 98
 		'image',
99 99
 		'video',
100 100
 		'quote',
101 101
 		'link',
102
-	) );
102
+	));
103 103
 
104 104
 	// Set up the WordPress core custom background feature.
105
-	add_theme_support( 'custom-background', apply_filters( 'lighthouse_custom_background_args', array(
105
+	add_theme_support('custom-background', apply_filters('lighthouse_custom_background_args', array(
106 106
 		'default-color' => 'ffffff',
107 107
 		'default-image' => '',
108
-	) ) );
108
+	)));
109 109
 }
110 110
 endif;
111
-add_action( 'after_setup_theme', 'lighthouse_setup' );
111
+add_action('after_setup_theme', 'lighthouse_setup');
112 112
 
113 113
 /**
114 114
  * Set the content width in pixels, based on the theme's design and stylesheet.
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
  * @global int $content_width
119 119
  */
120 120
 function lighthouse_content_width() {
121
-	$GLOBALS['content_width'] = apply_filters( 'lighthouse_content_width', 640 );
121
+	$GLOBALS['content_width'] = apply_filters('lighthouse_content_width', 640);
122 122
 }
123
-add_action( 'after_setup_theme', 'lighthouse_content_width', 0 );
123
+add_action('after_setup_theme', 'lighthouse_content_width', 0);
124 124
 
125 125
 /**
126 126
  * Register widget area.
@@ -128,77 +128,77 @@  discard block
 block discarded – undo
128 128
  * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
129 129
  */
130 130
 function lighthouse_widgets_init() {
131
-	register_sidebar( array(
132
-		'name'          => esc_html__( 'Sidebar', 'lighthouse' ),
131
+	register_sidebar(array(
132
+		'name'          => esc_html__('Sidebar', 'lighthouse'),
133 133
 		'id'            => 'sidebar-1',
134 134
 		'description'   => '',
135 135
 		'before_widget' => '<section id="%1$s" class="widget %2$s">',
136 136
 		'after_widget'  => '</section>',
137 137
 		'before_title'  => '<h2 class="widget-title">',
138 138
 		'after_title'   => '</h2>',
139
-	) );
139
+	));
140 140
 }
141
-add_action( 'widgets_init', 'lighthouse_widgets_init' );
141
+add_action('widgets_init', 'lighthouse_widgets_init');
142 142
 
143 143
 /**
144 144
  * Enqueue scripts and styles.
145 145
  */
146 146
 function lighthouse_scripts() {
147 147
 
148
-	wp_enqueue_style( 'lighthouse-font-awesome-css', get_template_directory_uri() . '/css/font-awesome.min.css');
148
+	wp_enqueue_style('lighthouse-font-awesome-css', get_template_directory_uri().'/css/font-awesome.min.css');
149 149
 
150
-	wp_enqueue_style( 'lighthouse-style', get_stylesheet_uri() );
150
+	wp_enqueue_style('lighthouse-style', get_stylesheet_uri());
151 151
 
152 152
 	wp_enqueue_style('lighthouse-google-fonts', 'https://fonts.googleapis.com/css?family=Questrial');
153 153
 
154 154
 	//wp_enqueue_style('lighthouse-owl-carousel-css', get_template_directory_uri() . '/css/owl.carousel.css');
155 155
 
156
-	wp_enqueue_script( 'lighthouse-classList-js', 'https://cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js', array('jquery'), '');
156
+	wp_enqueue_script('lighthouse-classList-js', 'https://cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js', array('jquery'), '');
157 157
 
158
-	wp_enqueue_script( 'lighthouse-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true );
158
+	wp_enqueue_script('lighthouse-bootstrap-js', get_template_directory_uri().'/js/bootstrap.min.js', array('jquery'), '', true);
159 159
 
160
-	wp_enqueue_script( 'lighthouse-material-menu-js', get_template_directory_uri() . '/js/materialMenu.js', array('jquery'), '', true );
160
+	wp_enqueue_script('lighthouse-material-menu-js', get_template_directory_uri().'/js/materialMenu.js', array('jquery'), '', true);
161 161
 
162
-	wp_enqueue_script( 'lighthouse-owl-carousel-js', get_template_directory_uri() . '/js/owl-carousel.js', array('jquery'), '', true );
162
+	wp_enqueue_script('lighthouse-owl-carousel-js', get_template_directory_uri().'/js/owl-carousel.js', array('jquery'), '', true);
163 163
 
164
-	wp_enqueue_script( 'lighthouse-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
164
+	wp_enqueue_script('lighthouse-navigation', get_template_directory_uri().'/js/navigation.js', array(), '20120206', true);
165 165
 
166
-	wp_enqueue_script( 'lighthouse-settings-js', get_template_directory_uri() . '/js/lighthouse-settings.js', array('jquery'), '', true );
166
+	wp_enqueue_script('lighthouse-settings-js', get_template_directory_uri().'/js/lighthouse-settings.js', array('jquery'), '', true);
167 167
 
168
-	wp_enqueue_script( 'lighthouse-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
168
+	wp_enqueue_script('lighthouse-skip-link-focus-fix', get_template_directory_uri().'/js/skip-link-focus-fix.js', array(), '20130115', true);
169 169
 
170
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
171
-		wp_enqueue_script( 'comment-reply' );
170
+	if (is_singular() && comments_open() && get_option('thread_comments')) {
171
+		wp_enqueue_script('comment-reply');
172 172
 	}
173 173
 }
174
-add_action( 'wp_enqueue_scripts', 'lighthouse_scripts' );
174
+add_action('wp_enqueue_scripts', 'lighthouse_scripts');
175 175
 
176 176
 
177 177
 /**
178 178
  * Read More button in excerpt
179 179
  */
180
-function new_excerpt_more( $more ) {
180
+function new_excerpt_more($more) {
181 181
     return ' ';
182 182
 }
183
-add_filter( 'excerpt_more', 'new_excerpt_more' );
183
+add_filter('excerpt_more', 'new_excerpt_more');
184 184
 
185 185
 /**
186 186
  * Custome Lenght of excerpt
187 187
  */
188
-function custom_excerpt_length( $length ) {
188
+function custom_excerpt_length($length) {
189 189
     return 18;
190 190
 }
191
-add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
191
+add_filter('excerpt_length', 'custom_excerpt_length', 999);
192 192
 
193 193
 
194 194
 //callback function for the 'clear_content' shortcode
195
-function recent_post_slider($atts){
195
+function recent_post_slider($atts) {
196 196
 
197 197
 	echo'<div class="post-slider row"><div id="recent-posts" class="owl-carousel">';
198 198
 
199 199
 	global $post;
200 200
 
201
-	$post_query = new WP_Query( array(
201
+	$post_query = new WP_Query(array(
202 202
 		'post_type' => 'post',
203 203
 		'posts_per_page' => 12,
204 204
 		'order'=>'DESC',
@@ -206,26 +206,26 @@  discard block
 block discarded – undo
206 206
 		)
207 207
 	);
208 208
 
209
-	if( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post();
209
+	if ($post_query->have_posts()) : while ($post_query->have_posts()) : $post_query->the_post();
210 210
 
211
-		$thumb_post = wp_get_attachment_image_src( get_post_thumbnail_id(), 'lighthouse_related_post');
211
+		$thumb_post = wp_get_attachment_image_src(get_post_thumbnail_id(), 'lighthouse_related_post');
212 212
 		$url_post = $thumb_post[0];
213 213
 
214 214
 		echo '<div class="col-xs-12"><div class="thumbnail thumbnail-hover">';
215 215
 
216
-		echo'<img class="img-responsive" src=" ' . $url_post . '">';
216
+		echo'<img class="img-responsive" src=" '.$url_post.'">';
217 217
 
218
-		echo '<a href=" ' . get_permalink() .' " " title=" ' .  get_the_title() .' " class="overlay"></a>';
218
+		echo '<a href=" '.get_permalink().' " " title=" '.get_the_title().' " class="overlay"></a>';
219 219
 
220 220
 		echo'</div>';
221 221
 		
222 222
 		echo'<div class="entry">';
223 223
 
224
-		echo '<h3><a href=" ' . get_permalink() . ' "> ' . get_the_title() . '</a></h3>';
224
+		echo '<h3><a href=" '.get_permalink().' "> '.get_the_title().'</a></h3>';
225 225
 
226
-		echo '<span class="date"> <i class="fa fa-clock-o"></i> <span class="date">' . get_the_time(get_option('date_format')) .'</span>';
226
+		echo '<span class="date"> <i class="fa fa-clock-o"></i> <span class="date">'.get_the_time(get_option('date_format')).'</span>';
227 227
 		
228
-		echo '<div class="entry-content">' . get_the_excerpt() . '</div>';
228
+		echo '<div class="entry-content">'.get_the_excerpt().'</div>';
229 229
 
230 230
 		echo '</div></div>';
231 231
 
@@ -237,30 +237,30 @@  discard block
 block discarded – undo
237 237
 
238 238
 }
239 239
 //add the new 'clear_content' shortcode
240
-add_shortcode('recent_posts','recent_post_slider');
240
+add_shortcode('recent_posts', 'recent_post_slider');
241 241
 
242 242
 
243 243
 /**
244 244
  * Implement the Custom Header feature.
245 245
  */
246
-require get_template_directory() . '/inc/custom-header.php';
246
+require get_template_directory().'/inc/custom-header.php';
247 247
 
248 248
 /**
249 249
  * Custom template tags for this theme.
250 250
  */
251
-require get_template_directory() . '/inc/template-tags.php';
251
+require get_template_directory().'/inc/template-tags.php';
252 252
 
253 253
 /**
254 254
  * Custom functions that act independently of the theme templates.
255 255
  */
256
-require get_template_directory() . '/inc/extras.php';
256
+require get_template_directory().'/inc/extras.php';
257 257
 
258 258
 /**
259 259
  * Customizer additions.
260 260
  */
261
-require get_template_directory() . '/inc/customizer.php';
261
+require get_template_directory().'/inc/customizer.php';
262 262
 
263 263
 /**
264 264
  * Load Jetpack compatibility file.
265 265
  */
266
-require get_template_directory() . '/inc/jetpack.php';
266
+require get_template_directory().'/inc/jetpack.php';
Please login to merge, or discard this patch.