Completed
Push — master ( bf1080...d99bb1 )
by Md. Mozahidur
04:04
created
includes/menus.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.
includes/shortcodes.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
@@ -82,4 +82,4 @@  discard block
 block discarded – undo
82 82
 	
83 83
 }
84 84
 
85
-add_shortcode('members_logo','member_logo_slider');
86 85
\ No newline at end of file
86
+add_shortcode('members_logo', 'member_logo_slider');
87 87
\ No newline at end of file
Please login to merge, or discard this patch.
includes/theme-settings.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)."'>&laquo; First</a>";
45
-		if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>&lsaquo; Previous</a>";
44
+		if ($paged > 2 && $paged > $range + 1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>&laquo; First</a>";
45
+		if ($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>&lsaquo; 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 &rsaquo;</a>";  
56
-		if ($paged < $pages-1 &&  $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last &raquo;</a>";
56
+		if ($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last &raquo;</a>";
57 57
 		echo "</div>\n";
58 58
 	}
59 59
 }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
includes/widgets.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -3,76 +3,76 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
page-template/backup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 <div class="container full-width">
3 3
 	<div class="row">
4 4
 		<main id="main" class="site-main" role="main">
5
-			<?php while ( have_posts() ) : the_post(); ?>
5
+			<?php while (have_posts()) : the_post(); ?>
6 6
 				<div class="sections">
7 7
 					<?php //the_content(); ?>
8 8
 
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 <div class="row">
13 13
 <div class="col-xs-12">
14 14
 <div class="slider-inner">
15
-<?php echo do_shortcode( '[masterslider id="1"]') ?>
15
+<?php echo do_shortcode('[masterslider id="1"]') ?>
16 16
 </div>
17 17
 <div class="messages">
18 18
 <p>Latest Financial Reports just added - View our 2016 Accounts here +</p>
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		<div class="col-xs-12">
186 186
 		<h4>Members of the following groups, see how we already work with you:</h4>
187 187
 
188
-		<?php echo do_shortcode( '[members_logo]') ?>
188
+		<?php echo do_shortcode('[members_logo]') ?>
189 189
 		</div>
190 190
 	</div>
191 191
 </div>
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	</div>
204 204
 	<div class="row">
205 205
 	<div class="col-xs-12">
206
-	<?php echo do_shortcode( '[recent_posts]') ?>
206
+	<?php echo do_shortcode('[recent_posts]') ?>
207 207
 	</div>
208 208
 	</div>
209 209
 </section>
Please login to merge, or discard this patch.
page-template/blog.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 -->
Please login to merge, or discard this patch.
page-template/page-advice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
page-template/page-home.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 <div class="container full-width">
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
 				<div class="sections">
14 14
 					<?php //the_content(); ?>
15 15
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 <div class="row">
20 20
 <div class="col-xs-12">
21 21
 <div class="slider-inner">
22
-<?php echo do_shortcode( '[masterslider id="1"]') ?>
22
+<?php echo do_shortcode('[masterslider id="1"]') ?>
23 23
 </div>
24 24
 <div class="messages">
25 25
 <p>Latest Financial Reports just added - View our 2016 Accounts here +</p>
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 		<div class="col-xs-12">
193 193
 		<h4>Members of the following groups, see how we already work with you:</h4>
194 194
 
195
-		<?php echo do_shortcode( '[members_logo]') ?>
195
+		<?php echo do_shortcode('[members_logo]') ?>
196 196
 		</div>
197 197
 	</div>
198 198
 </div>
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	</div>
211 211
 	<div class="row">
212 212
 	<div class="col-xs-12">
213
-	<?php echo do_shortcode( '[recent_posts]') ?>
213
+	<?php echo do_shortcode('[recent_posts]') ?>
214 214
 	</div>
215 215
 	</div>
216 216
 </section>
Please login to merge, or discard this patch.