Completed
Push — master ( ca774b...8af728 )
by Fernando
02:59
created
page-templates/template-no-sidebar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 
14 14
 			<?php lsx_content_top(); ?>		
15 15
 			
16
-				<?php while ( have_posts() ) : the_post(); ?>
16
+				<?php while (have_posts()) : the_post(); ?>
17 17
 		
18
-					<?php get_template_part( 'content', 'page' ); ?>
18
+					<?php get_template_part('content', 'page'); ?>
19 19
 		
20 20
 				<?php endwhile; // end of the loop. ?>		
21 21
 				
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 			
24 24
 			<?php
25 25
 				// If comments are open or we have at least one comment, load up the comment template
26
-				if ( comments_open() || '0' != get_comments_number() ) :
26
+				if (comments_open() || '0' != get_comments_number()) :
27 27
 					comments_template();
28 28
 				endif;
29 29
 			?>			
Please login to merge, or discard this patch.
content-portfolio.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 
9 9
 $type_class = "filter-item column-3 ";
10
-$types = get_the_terms( get_the_ID(), 'jetpack-portfolio-type');
10
+$types = get_the_terms(get_the_ID(), 'jetpack-portfolio-type');
11 11
 if ($types) {
12 12
 	foreach ($types as $type) {
13 13
 		$type_class .= $type->slug . " ";
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
 <article id="post-<?php the_ID(); ?>" data-column="<?php echo 3; ?>" <?php post_class($type_class); ?>>
19 19
 	<div class="portfolio-content-wrapper">
20 20
 		<div class="portfolio-thumbnail">
21
-			<?php if ( has_post_thumbnail() ) : ?>
21
+			<?php if (has_post_thumbnail()) : ?>
22 22
 				<a href="<?php the_permalink(); ?>">
23
-					<?php lsx_thumbnail( 'lsx-thumbnail-wide' ); ?>
23
+					<?php lsx_thumbnail('lsx-thumbnail-wide'); ?>
24 24
 				</a>
25 25
 			<?php endif; ?>
26 26
 		</div>
27 27
 		
28
-		<?php the_title( '<a class="portfolio-title" href="' . esc_url( get_permalink() ) . '" rel="bookmark"><span>', '</span></a>' ); ?>
28
+		<?php the_title('<a class="portfolio-title" href="' . esc_url(get_permalink()) . '" rel="bookmark"><span>', '</span></a>'); ?>
29 29
 	</div>
30 30
 </article>
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
author.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,12 @@
 block discarded – undo
44 44
 			
45 45
 			<?php lsx_paging_nav(); ?>
46 46
 
47
-		<?php else : ?>
47
+		<?php else {
48
+	: ?>
48 49
 
49
-			<?php get_template_part( 'content', 'none' ); ?>
50
+			<?php get_template_part( 'content', 'none' );
51
+}
52
+?>
50 53
 
51 54
 		<?php endif; ?>
52 55
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 	<?php lsx_content_wrap_before(); ?>
13 13
 
14
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
14
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
15 15
 		
16 16
 		<?php lsx_content_before(); ?>
17 17
 
@@ -19,25 +19,25 @@  discard block
 block discarded – undo
19 19
 
20 20
 		<?php lsx_content_top(); ?>
21 21
 
22
-		<?php if ( have_posts() ) : ?>
22
+		<?php if (have_posts()) : ?>
23 23
 
24 24
 			<?php 
25
-			$layout = get_theme_mod('lsx_layout','2cr');
26
-			$layout = apply_filters( 'lsx_layout', $layout );
27
-			if('1c' === $layout){
25
+			$layout = get_theme_mod('lsx_layout', '2cr');
26
+			$layout = apply_filters('lsx_layout', $layout);
27
+			if ('1c' === $layout) {
28 28
 				lsx_breadcrumbs();
29 29
 			}
30 30
 			?>			
31 31
 
32 32
 			<?php /* Start the Loop */ ?>
33
-			<?php while ( have_posts() ) : the_post(); ?>
33
+			<?php while (have_posts()) : the_post(); ?>
34 34
 
35 35
 				<?php
36 36
 					/* Include the Post-Format-specific template for the content.
37 37
 					 * If you want to override this in a child theme, then include a file
38 38
 					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
39 39
 					 */
40
-					get_template_part( 'content', get_post_format() );
40
+					get_template_part('content', get_post_format());
41 41
 				?>
42 42
 
43 43
 			<?php endwhile; ?>
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 		<?php else : ?>
48 48
 
49
-			<?php get_template_part( 'content', 'none' ); ?>
49
+			<?php get_template_part('content', 'none'); ?>
50 50
 
51 51
 		<?php endif; ?>
52 52
 
Please login to merge, or discard this patch.
footer.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 											if(has_nav_menu('footer-menu')){
26 26
 												wp_nav_menu(array('theme_location' => 'footer-menu'));
27 27
 											}
28
-										}else{
28
+										} else{
29 29
 											if(has_nav_menu('footer_logged_in')){
30 30
 												wp_nav_menu(array('theme_location' => 'footer_logged_in'));
31 31
 											}
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @package lsx
8 8
  */
9 9
 ?>
10
-<?php if ( !is_singular('landing-page') ) { ?>
10
+<?php if ( ! is_singular('landing-page')) { ?>
11 11
 
12 12
 			</div><!-- .content -->
13 13
 		</div><!-- wrap -->
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
 		  					    <div class="footer-menu">
22 22
 									<?php 
23 23
 									
24
-										if(!is_user_logged_in()){
25
-											if(has_nav_menu('footer-menu')){
24
+										if ( ! is_user_logged_in()) {
25
+											if (has_nav_menu('footer-menu')) {
26 26
 												wp_nav_menu(array('theme_location' => 'footer-menu'));
27 27
 											}
28
-										}else{
29
-											if(has_nav_menu('footer_logged_in')){
28
+										} else {
29
+											if (has_nav_menu('footer_logged_in')) {
30 30
 												wp_nav_menu(array('theme_location' => 'footer_logged_in'));
31 31
 											}
32 32
 										}				
@@ -41,26 +41,26 @@  discard block
 block discarded – undo
41 41
 
42 42
 			    		<?php lsx_footer_top(); ?>
43 43
 
44
-			      		<p class="credit <?php if ( has_nav_menu( 'social' ) || has_nav_menu( 'footer' ) ) { ?>credit-float<?php } ?>"><?php printf( esc_html__( '&#169; %1$s %2$s All Rights Reserved.', 'lsx' ), esc_html( date_i18n( 'Y' ) ), esc_html( get_bloginfo( 'name' ) ) ); ?></p>
45
-						<?php if ( has_nav_menu( 'social' ) ) { ?>
44
+			      		<p class="credit <?php if (has_nav_menu('social') || has_nav_menu('footer')) { ?>credit-float<?php } ?>"><?php printf(esc_html__('&#169; %1$s %2$s All Rights Reserved.', 'lsx'), esc_html(date_i18n('Y')), esc_html(get_bloginfo('name'))); ?></p>
45
+						<?php if (has_nav_menu('social')) { ?>
46 46
 							<nav id="social-navigation" class="social-navigation">
47 47
 								<?php
48 48
 									// Social links navigation menu.
49
-									wp_nav_menu( array(
49
+									wp_nav_menu(array(
50 50
 										'theme_location' => 'social',
51 51
 										'depth'          => 1,
52
-									) );
52
+									));
53 53
 								?>
54 54
 							</nav><!-- .social-navigation -->
55 55
 						<?php } ?>
56
-						<?php if ( has_nav_menu( 'footer' ) ) { ?>
56
+						<?php if (has_nav_menu('footer')) { ?>
57 57
 							<nav id="footer-navigation" class="footer-navigation">
58 58
 								<?php
59 59
 									// Footer links navigation menu.
60
-									wp_nav_menu( array(
60
+									wp_nav_menu(array(
61 61
 										'theme_location' => 'footer',
62 62
 										'depth'          => 1,
63
-									) );
63
+									));
64 64
 								?>
65 65
 							</nav><!-- .footer-navigation -->
66 66
 						<?php } ?>
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
 
88 88
 			    		<?php lsx_footer_top(); ?>
89 89
 
90
-			      		<p class="credit <?php if ( has_nav_menu( 'social' ) ) { ?>credit-float<?php } ?>"><?php printf( esc_html__( '&#169; %1$s %2$s All Rights Reserved.', 'lsx' ), esc_html( date_i18n( 'Y' ) ), esc_html( get_bloginfo( 'name' ) ) ); ?></p>
91
-						<?php if ( has_nav_menu( 'social' ) ) { ?>
90
+			      		<p class="credit <?php if (has_nav_menu('social')) { ?>credit-float<?php } ?>"><?php printf(esc_html__('&#169; %1$s %2$s All Rights Reserved.', 'lsx'), esc_html(date_i18n('Y')), esc_html(get_bloginfo('name'))); ?></p>
91
+						<?php if (has_nav_menu('social')) { ?>
92 92
 							<nav id="social-navigation" class="social-navigation" role="navigation">
93 93
 								<?php
94 94
 									// Social links navigation menu.
95
-									wp_nav_menu( array(
95
+									wp_nav_menu(array(
96 96
 										'theme_location' => 'social',
97 97
 										'depth'          => 1,
98
-									) );
98
+									));
99 99
 								?>
100 100
 							</nav><!-- .social-navigation -->
101 101
 						<?php } ?>
Please login to merge, or discard this patch.
image.php 3 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -62,18 +62,20 @@
 block discarded – undo
62 62
                                      */
63 63
                                     $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
64 64
                                     foreach ( $attachments as $k => $attachment ) {
65
-                                        if ( $attachment->ID == $post->ID )
66
-                                            break;
65
+                                        if ( $attachment->ID == $post->ID ) {
66
+                                                                                    break;
67
+                                        }
67 68
                                     }
68 69
                                     $k++;
69 70
                                     // If there is more than 1 attachment in a gallery
70 71
                                     if ( count( $attachments ) > 1 ) {
71
-                                        if ( isset( $attachments[ $k ] ) )
72
-                                            // get the URL of the next image attachment
72
+                                        if ( isset( $attachments[ $k ] ) ) {
73
+                                                                                    // get the URL of the next image attachment
73 74
                                             $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
74
-                                        else
75
-                                            // or get the URL of the first image attachment
75
+                                        } else {
76
+                                                                                    // or get the URL of the first image attachment
76 77
                                             $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
78
+                                        }
77 79
                                     } else {
78 80
                                         // or, if there's only 1 image, get the URL of the image
79 81
                                         $next_attachment_url = wp_get_attachment_url();
Please login to merge, or discard this patch.
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
  
32 32
                         <div class="entry-meta">
33 33
                             <?php
34
-                               $metadata = wp_get_attachment_metadata();
35
-                                printf( wp_kses_post( '%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s &times; %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>' ),
36
-                                    esc_html__( 'Published', 'lsx' ),
37
-                                    esc_attr( get_the_date( 'c' ) ),
38
-                                    esc_html( get_the_date() ),
39
-                                    esc_html__( 'at', 'lsx' ),
40
-                                    esc_url( wp_get_attachment_url() ),
41
-                                    esc_attr( $metadata['width'] ),
42
-                                    esc_attr( $metadata['height'] ),
43
-                                    esc_html__( 'in', 'lsx' ),
44
-                                    esc_url( get_permalink( $post->post_parent ) ),
45
-                                    get_the_title( $post->post_parent )
46
-                                );
47
-                            ?>
34
+							   $metadata = wp_get_attachment_metadata();
35
+								printf( wp_kses_post( '%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s &times; %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>' ),
36
+									esc_html__( 'Published', 'lsx' ),
37
+									esc_attr( get_the_date( 'c' ) ),
38
+									esc_html( get_the_date() ),
39
+									esc_html__( 'at', 'lsx' ),
40
+									esc_url( wp_get_attachment_url() ),
41
+									esc_attr( $metadata['width'] ),
42
+									esc_attr( $metadata['height'] ),
43
+									esc_html__( 'in', 'lsx' ),
44
+									esc_url( get_permalink( $post->post_parent ) ),
45
+									get_the_title( $post->post_parent )
46
+								);
47
+							?>
48 48
                             <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?>
49 49
                         </div><!-- .entry-meta -->
50 50
  
@@ -59,34 +59,34 @@  discard block
 block discarded – undo
59 59
                         <div class="entry-attachment">
60 60
                             <div class="attachment">
61 61
                                 <?php
62
-                                    /**
63
-                                     * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
64
-                                     * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
65
-                                     */
66
-                                    $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
67
-                                    foreach ( $attachments as $k => $attachment ) {
68
-                                        if ( $attachment->ID == $post->ID )
69
-                                            break;
70
-                                    }
71
-                                    $k++;
72
-                                    // If there is more than 1 attachment in a gallery
73
-                                    if ( count( $attachments ) > 1 ) {
74
-                                        if ( isset( $attachments[ $k ] ) )
75
-                                            // get the URL of the next image attachment
76
-                                            $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
77
-                                        else
78
-                                            // or get the URL of the first image attachment
79
-                                            $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
80
-                                    } else {
81
-                                        // or, if there's only 1 image, get the URL of the image
82
-                                        $next_attachment_url = wp_get_attachment_url();
83
-                                    }
84
-                                ?>
62
+									/**
63
+									 * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
64
+									 * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
65
+									 */
66
+									$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
67
+									foreach ( $attachments as $k => $attachment ) {
68
+										if ( $attachment->ID == $post->ID )
69
+											break;
70
+									}
71
+									$k++;
72
+									// If there is more than 1 attachment in a gallery
73
+									if ( count( $attachments ) > 1 ) {
74
+										if ( isset( $attachments[ $k ] ) )
75
+											// get the URL of the next image attachment
76
+											$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
77
+										else
78
+											// or get the URL of the first image attachment
79
+											$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
80
+									} else {
81
+										// or, if there's only 1 image, get the URL of the image
82
+										$next_attachment_url = wp_get_attachment_url();
83
+									}
84
+								?>
85 85
  
86 86
                                 <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
87
-                                    $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size.
88
-                                    echo wp_get_attachment_image( $post->ID, $attachment_size );
89
-                                ?></a>
87
+									$attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size.
88
+									echo wp_get_attachment_image( $post->ID, $attachment_size );
89
+								?></a>
90 90
                             </div><!-- .attachment -->
91 91
  
92 92
                             <?php if ( ! empty( $post->post_excerpt ) ) : ?>
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
                         </div><!-- .entry-attachment -->
98 98
  
99 99
                         <?php
100
-                            the_content();
100
+							the_content();
101 101
 
102
-                            wp_link_pages( array(
103
-                                'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
104
-                                'after' => '</div></div>',
105
-                                'link_before' => '<span>',
106
-                                'link_after' => '</span>'
107
-                            ) );
108
-                        ?>
102
+							wp_link_pages( array(
103
+								'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
104
+								'after' => '</div></div>',
105
+								'link_before' => '<span>',
106
+								'link_after' => '</span>'
107
+							) );
108
+						?>
109 109
  
110 110
                     </div><!-- .entry-content -->
111 111
                     
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     <?php lsx_content_wrap_before(); ?>
12 12
  
13
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
13
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
14 14
 
15 15
 		<?php lsx_content_before(); ?>
16 16
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 			<?php lsx_content_top(); ?>
20 20
  
21
-            <?php while ( have_posts() ) : the_post(); ?>
21
+            <?php while (have_posts()) : the_post(); ?>
22 22
  
23 23
  				<?php lsx_entry_before(); ?>
24 24
  				
@@ -32,25 +32,25 @@  discard block
 block discarded – undo
32 32
                         <div class="entry-meta">
33 33
                             <?php
34 34
                                $metadata = wp_get_attachment_metadata();
35
-                                printf( wp_kses_post( '%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s &times; %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>' ),
36
-                                    esc_html__( 'Published', 'lsx' ),
37
-                                    esc_attr( get_the_date( 'c' ) ),
38
-                                    esc_html( get_the_date() ),
39
-                                    esc_html__( 'at', 'lsx' ),
40
-                                    esc_url( wp_get_attachment_url() ),
41
-                                    esc_attr( $metadata['width'] ),
42
-                                    esc_attr( $metadata['height'] ),
43
-                                    esc_html__( 'in', 'lsx' ),
44
-                                    esc_url( get_permalink( $post->post_parent ) ),
45
-                                    get_the_title( $post->post_parent )
35
+                                printf(wp_kses_post('%1$s <span class="entry-date"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></span> %4$s <a href="%5$s">%6$s &times; %7$s</a> %8$s <a href="%9$s" title="%10$s" rel="gallery">%10$s</a>'),
36
+                                    esc_html__('Published', 'lsx'),
37
+                                    esc_attr(get_the_date('c')),
38
+                                    esc_html(get_the_date()),
39
+                                    esc_html__('at', 'lsx'),
40
+                                    esc_url(wp_get_attachment_url()),
41
+                                    esc_attr($metadata['width']),
42
+                                    esc_attr($metadata['height']),
43
+                                    esc_html__('in', 'lsx'),
44
+                                    esc_url(get_permalink($post->post_parent)),
45
+                                    get_the_title($post->post_parent)
46 46
                                 );
47 47
                             ?>
48
-                            <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?>
48
+                            <?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="sep"> | </span> <span class="edit-link">', '</span>'); ?>
49 49
                         </div><!-- .entry-meta -->
50 50
  
51 51
                         <nav id="image-navigation" class="site-navigation">
52
-                            <span class="previous-image"><?php previous_image_link( false, '&larr; '.esc_html__( 'Previous', 'lsx' ) ); ?></span>
53
-                            <span class="next-image"><?php next_image_link( false, esc_html__( 'Next', 'lsx' ).' &rarr;' ); ?></span>
52
+                            <span class="previous-image"><?php previous_image_link(false, '&larr; ' . esc_html__('Previous', 'lsx')); ?></span>
53
+                            <span class="next-image"><?php next_image_link(false, esc_html__('Next', 'lsx') . ' &rarr;'); ?></span>
54 54
                         </nav><!-- #image-navigation -->
55 55
                     </header><!-- .entry-header -->
56 56
  
@@ -63,33 +63,33 @@  discard block
 block discarded – undo
63 63
                                      * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
64 64
                                      * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
65 65
                                      */
66
-                                    $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
67
-                                    foreach ( $attachments as $k => $attachment ) {
68
-                                        if ( $attachment->ID == $post->ID )
66
+                                    $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')));
67
+                                    foreach ($attachments as $k => $attachment) {
68
+                                        if ($attachment->ID == $post->ID)
69 69
                                             break;
70 70
                                     }
71 71
                                     $k++;
72 72
                                     // If there is more than 1 attachment in a gallery
73
-                                    if ( count( $attachments ) > 1 ) {
74
-                                        if ( isset( $attachments[ $k ] ) )
73
+                                    if (count($attachments) > 1) {
74
+                                        if (isset($attachments[$k]))
75 75
                                             // get the URL of the next image attachment
76
-                                            $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
76
+                                            $next_attachment_url = get_attachment_link($attachments[$k]->ID);
77 77
                                         else
78 78
                                             // or get the URL of the first image attachment
79
-                                            $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
79
+                                            $next_attachment_url = get_attachment_link($attachments[0]->ID);
80 80
                                     } else {
81 81
                                         // or, if there's only 1 image, get the URL of the image
82 82
                                         $next_attachment_url = wp_get_attachment_url();
83 83
                                     }
84 84
                                 ?>
85 85
  
86
-                                <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
87
-                                    $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size.
88
-                                    echo wp_get_attachment_image( $post->ID, $attachment_size );
86
+                                <a href="<?php echo esc_url($next_attachment_url); ?>" title="<?php echo esc_attr(get_the_title()); ?>" rel="attachment"><?php
87
+                                    $attachment_size = apply_filters('shape_attachment_size', array(1200, 1200)); // Filterable image size.
88
+                                    echo wp_get_attachment_image($post->ID, $attachment_size);
89 89
                                 ?></a>
90 90
                             </div><!-- .attachment -->
91 91
  
92
-                            <?php if ( ! empty( $post->post_excerpt ) ) : ?>
92
+                            <?php if ( ! empty($post->post_excerpt)) : ?>
93 93
                             <div class="entry-caption">
94 94
                                 <?php the_excerpt(); ?>
95 95
                             </div><!-- .entry-caption -->
@@ -99,27 +99,27 @@  discard block
 block discarded – undo
99 99
                         <?php
100 100
                             the_content();
101 101
 
102
-                            wp_link_pages( array(
102
+                            wp_link_pages(array(
103 103
                                 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
104 104
                                 'after' => '</div></div>',
105 105
                                 'link_before' => '<span>',
106 106
                                 'link_after' => '</span>'
107
-                            ) );
107
+                            ));
108 108
                         ?>
109 109
  
110 110
                     </div><!-- .entry-content -->
111 111
                     
112 112
 					<footer class="entry-meta">
113 113
 						
114
-						<?php if ( ! is_single() ) : ?>
115
-							<a class="read-more" href="<?php the_permalink(); ?>"><?php esc_html_e( 'Read More', 'lsx' ); ?></a>
114
+						<?php if ( ! is_single()) : ?>
115
+							<a class="read-more" href="<?php the_permalink(); ?>"><?php esc_html_e('Read More', 'lsx'); ?></a>
116 116
 						<?php endif ?>
117 117
 				
118
-						<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
119
-						<span class="comments-link"><?php comments_popup_link( esc_html__( 'Leave a comment', 'lsx' ), esc_html__( '1 Comment', 'lsx' ), esc_html__( '% Comments', 'lsx' ) ); ?></span>
118
+						<?php if ( ! post_password_required() && (comments_open() || '0' != get_comments_number())) : ?>
119
+						<span class="comments-link"><?php comments_popup_link(esc_html__('Leave a comment', 'lsx'), esc_html__('1 Comment', 'lsx'), esc_html__('% Comments', 'lsx')); ?></span>
120 120
 						<?php endif; ?>			
121 121
 				
122
-						<?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?>
122
+						<?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?>
123 123
 					</footer><!-- .entry-meta -->                    
124 124
  
125 125
  				<?php lsx_entry_bottom(); ?>
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
  
129 129
 				<?php
130 130
 					// If comments are open or we have at least one comment, load up the comment template
131
-					if ( comments_open() || '0' != get_comments_number() ) :
131
+					if (comments_open() || '0' != get_comments_number()) :
132 132
 						comments_template();
133 133
 					endif;
134 134
 				?>	
Please login to merge, or discard this patch.
content.php 2 patches
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 			$show_on_front = get_option('show_on_front','posts');
34 34
 			if('page' == $show_on_front){
35 35
 				$archive_link = get_permalink(get_option('page_for_posts'));
36
-			}else{
36
+			} else{
37 37
 				$archive_link = home_url();
38 38
 			}
39
-		}else{
39
+		} else{
40 40
 			$archive_link = get_post_format_link($format);
41 41
 		}
42 42
 		$format = lsx_translate_format_to_fontawesome($format);
@@ -71,10 +71,12 @@  discard block
 block discarded – undo
71 71
 		</div><!-- .entry-summary -->
72 72
 	<?php elseif ( has_post_format( array('link') ) ) : ?>
73 73
 
74
-	<?php else : ?>
74
+	<?php else {
75
+	: ?>
75 76
 		<div class="entry-content">
76 77
 			<?php
77 78
 				the_content();
79
+}
78 80
 
79 81
 				wp_link_pages( array(
80 82
 					'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
 <?php lsx_entry_before(); ?>
8 8
 
9 9
 <?php 
10
-	if ( has_post_thumbnail() ) { 
10
+	if (has_post_thumbnail()) { 
11 11
 		$thumb_class = 'has-thumb';
12 12
 	} else {
13 13
 		$thumb_class = 'no-thumb';
14 14
 	} 
15 15
 ?>
16 16
 
17
-<article id="post-<?php the_ID(); ?>" <?php post_class( $thumb_class ); ?>>
17
+<article id="post-<?php the_ID(); ?>" <?php post_class($thumb_class); ?>>
18 18
 	<?php lsx_entry_top(); ?>
19 19
 
20 20
 	<header class="entry-header">
21
-		<?php if ( has_post_thumbnail() ) { ?>
21
+		<?php if (has_post_thumbnail()) { ?>
22 22
 		<div class="entry-image">
23 23
 			<a class="thumbnail" href="<?php the_permalink(); ?>">
24 24
 				 <?php lsx_thumbnail('lsx-single-thumbnail'); ?>
@@ -28,35 +28,35 @@  discard block
 block discarded – undo
28 28
 
29 29
 	<?php 
30 30
 		$format = get_post_format();
31
-		if ( false === $format ) {
31
+		if (false === $format) {
32 32
 			$format = 'standard';
33
-			$show_on_front = get_option('show_on_front','posts');
34
-			if('page' == $show_on_front){
33
+			$show_on_front = get_option('show_on_front', 'posts');
34
+			if ('page' == $show_on_front) {
35 35
 				$archive_link = get_permalink(get_option('page_for_posts'));
36
-			}else{
36
+			} else {
37 37
 				$archive_link = home_url();
38 38
 			}
39
-		}else{
39
+		} else {
40 40
 			$archive_link = get_post_format_link($format);
41 41
 		}
42 42
 		$format = lsx_translate_format_to_fontawesome($format);
43 43
 		?>
44 44
 
45 45
 		<h1 class="entry-title">
46
-			<?php if ( has_post_thumbnail() ) { ?>
47
-				<a href="<?php echo esc_url($archive_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a>
46
+			<?php if (has_post_thumbnail()) { ?>
47
+				<a href="<?php echo esc_url($archive_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a>
48 48
 			<?php } else { ?>
49
-				<a href="<?php echo esc_url($archive_link) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a>
49
+				<a href="<?php echo esc_url($archive_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a>
50 50
 			<?php } ?>
51 51
 
52
-			<?php if ( has_post_format( array('link') ) ) { ?>
53
-				<a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
52
+			<?php if (has_post_format(array('link'))) { ?>
53
+				<a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
54 54
 			<?php } else { ?>
55 55
 				<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
56 56
 			<?php } ?>
57 57
 
58
-			<?php if ( is_sticky() ) { ?>
59
-				<span class="label label-default label-sticky"><?php esc_html_e('Featured','lsx'); ?></span>
58
+			<?php if (is_sticky()) { ?>
59
+				<span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span>
60 60
 			<?php } ?>
61 61
 		</h1>
62 62
 
@@ -65,37 +65,37 @@  discard block
 block discarded – undo
65 65
 		</div><!-- .entry-meta -->
66 66
 	</header><!-- .entry-header -->	
67 67
 
68
-	<?php if ( !is_singular() && !has_post_format( array('video', 'audio', 'quote', 'link') ) ) : // Only display Excerpts for Search and Archives ?>
68
+	<?php if ( ! is_singular() && ! has_post_format(array('video', 'audio', 'quote', 'link'))) : // Only display Excerpts for Search and Archives ?>
69 69
 		<div class="entry-summary"> 
70 70
 			<?php the_excerpt(); ?>
71 71
 		</div><!-- .entry-summary -->
72
-	<?php elseif ( has_post_format( array('link') ) ) : ?>
72
+	<?php elseif (has_post_format(array('link'))) : ?>
73 73
 
74 74
 	<?php else : ?>
75 75
 		<div class="entry-content">
76 76
 			<?php
77 77
 				the_content();
78 78
 
79
-				wp_link_pages( array(
79
+				wp_link_pages(array(
80 80
 					'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
81 81
 					'after' => '</div></div>',
82 82
 					'link_before' => '<span>',
83 83
 					'link_after' => '</span>'
84
-				) );
84
+				));
85 85
 			?>
86 86
 		</div><!-- .entry-content -->
87 87
 	<?php endif; ?>
88 88
 	
89
-	<?php if ( has_tag() || ( comments_open() && ! empty( get_comments_number() ) ) ) : ?>
89
+	<?php if (has_tag() || (comments_open() && ! empty(get_comments_number()))) : ?>
90 90
 		<div class="post-tags-wrapper">
91 91
 			<?php lsx_content_post_tags(); ?>
92 92
 			
93
-			<?php if ( comments_open() && 0 != get_comments_number() ) : ?>
93
+			<?php if (comments_open() && 0 != get_comments_number()) : ?>
94 94
 				<div class="post-comments">
95 95
 					<a href="<?php the_permalink() ?>#comments">
96 96
 						<?php
97 97
 							$count = get_comments_number();
98
-							printf( esc_html( _n( 'One Comment', '%1$s Comments', $count, 'lsx' ) ), esc_html( number_format_i18n( $count ) ) );
98
+							printf(esc_html(_n('One Comment', '%1$s Comments', $count, 'lsx')), esc_html(number_format_i18n($count)));
99 99
 						?>
100 100
 					</a>
101 101
 				</div>
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
 
108 108
 	<div class="clearfix"></div>
109 109
 
110
-	<?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?>
110
+	<?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?>
111 111
 
112
-	<?php if ( !is_singular() && !is_single() ) { // Display full-width divider on Archives ?>
112
+	<?php if ( ! is_singular() && ! is_single()) { // Display full-width divider on Archives ?>
113 113
 		<div class="lsx-breaker"></div>
114 114
 	<?php } ?>
115 115
 </article><!-- #post-## -->
Please login to merge, or discard this patch.
inc/jetpack.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
  * @category portfolio
124 124
  */
125 125
 function lsx_remove_single_related_posts() {
126
-    if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
127
-        $jprp = Jetpack_RelatedPosts::init();
128
-        $callback = array( $jprp, 'filter_add_target_to_dom' );
129
-        remove_filter( 'the_content', $callback, 40 );
130
-    }
126
+	if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
127
+		$jprp = Jetpack_RelatedPosts::init();
128
+		$callback = array( $jprp, 'filter_add_target_to_dom' );
129
+		remove_filter( 'the_content', $callback, 40 );
130
+	}
131 131
 }
132 132
 add_filter( 'wp', 'lsx_remove_single_related_posts', 20 );
133 133
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 		if(is_array($types)){
312 312
 			foreach ($types as $type) {
313 313
 				$content = '<li><a href="#" data-filter=".'.$type->slug.'">';
314
-		    	$content .= $type->name;					
314
+				$content .= $type->name;					
315 315
 				$content .= '</a></li>';
316 316
 				echo $content;
317 317
 				echo "\n";
Please login to merge, or discard this patch.
Braces   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -243,14 +243,13 @@  discard block
 block discarded – undo
243 243
 
244 244
 		$meta_value = get_post_meta( $post_id, $meta_key, true );
245 245
 
246
-		if ( $new_meta_value && '' == $meta_value )
247
-			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
248
-
249
-		elseif ( $new_meta_value && $new_meta_value != $meta_value )
250
-		update_post_meta( $post_id, $meta_key, $new_meta_value );
251
-
252
-		elseif ( '' == $new_meta_value && $meta_value )
253
-		delete_post_meta( $post_id, $meta_key, $meta_value );
246
+		if ( $new_meta_value && '' == $meta_value ) {
247
+					add_post_meta( $post_id, $meta_key, $new_meta_value, true );
248
+		} elseif ( $new_meta_value && $new_meta_value != $meta_value ) {
249
+				update_post_meta( $post_id, $meta_key, $new_meta_value );
250
+		} elseif ( '' == $new_meta_value && $meta_value ) {
251
+				delete_post_meta( $post_id, $meta_key, $meta_value );
252
+		}
254 253
 	}
255 254
 }
256 255
 
@@ -402,7 +401,7 @@  discard block
 block discarded – undo
402 401
 		
403 402
 		if('jetpack-portfolio' == get_post_type()){
404 403
 			get_template_part( 'content', 'portfolio' );
405
-		}else{
404
+		} else{
406 405
 			get_template_part( 'content', get_post_type() );
407 406
 		}
408 407
 	}
Please login to merge, or discard this patch.
Spacing   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
  */
20 20
 function lsx_allowed_related_post_types($allowed_post_types) {
21 21
 	$allowed_post_types[] = 'jetpack-portfolio';
22
-	foreach($allowed_post_types as $key => $value){
23
-		if('page' == $value){
22
+	foreach ($allowed_post_types as $key => $value) {
23
+		if ('page' == $value) {
24 24
 			unset($allowed_post_types[$key]);
25 25
 		}
26 26
 	}
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
  * @category site-logo
36 36
  */
37 37
 
38
-function lsx_site_logo_title_tag( $html) {
38
+function lsx_site_logo_title_tag($html) {
39 39
 
40
-	$html = str_replace('<a', '<a title="'.get_bloginfo('name').'" ', $html);
40
+	$html = str_replace('<a', '<a title="' . get_bloginfo('name') . '" ', $html);
41 41
 	return $html;
42 42
 }
43
-add_filter( 'jetpack_the_site_logo', 'lsx_site_logo_title_tag');
43
+add_filter('jetpack_the_site_logo', 'lsx_site_logo_title_tag');
44 44
 
45 45
 
46 46
 /*
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
  * @subpackage jetpack
55 55
  * @category portfolio
56 56
  */
57
-function lsx_portfolio_infinite_scroll(){
58
-	global $_wp_theme_features,$wp_query;
57
+function lsx_portfolio_infinite_scroll() {
58
+	global $_wp_theme_features, $wp_query;
59 59
 
60
-	if(is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag')){
60
+	if (is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag')) {
61 61
 		
62
-		if(class_exists('The_Neverending_Home_Page')){
62
+		if (class_exists('The_Neverending_Home_Page')) {
63 63
 			$_wp_theme_features['infinite-scroll'][0]['container'] = 'portfolio-infinite-scroll-wrapper';
64 64
 			$_wp_theme_features['infinite-scroll'][0]['posts_per_page'] = 99;
65 65
 		}
66 66
 	}
67 67
 
68 68
 }
69
-add_action('wp_head','lsx_portfolio_infinite_scroll',1000);
69
+add_action('wp_head', 'lsx_portfolio_infinite_scroll', 1000);
70 70
 
71 71
 /**
72 72
  * Disables the infinite scroll on the portfolio archive
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
  * @subpackage jetpack
76 76
  * @category portfolio
77 77
  */
78
-function lsx_portfolio_infinite_scroll_disable($supported){
79
-	if(is_post_type_archive('jetpack-portfolio')){
78
+function lsx_portfolio_infinite_scroll_disable($supported) {
79
+	if (is_post_type_archive('jetpack-portfolio')) {
80 80
 		$supported = false;
81 81
 	}
82 82
 	return $supported;
83 83
 }
84
-add_filter( 'infinite_scroll_archive_supported', 'lsx_portfolio_infinite_scroll_disable', 1, 10 );
84
+add_filter('infinite_scroll_archive_supported', 'lsx_portfolio_infinite_scroll_disable', 1, 10);
85 85
 
86 86
 /**
87 87
  * Set the Portfolio to 9 posts per page
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
  * @subpackage jetpack
91 91
  * @category portfolio
92 92
 */
93
-function lsx_portfolio_archive_pagination( $query ) {
94
-	if(!is_admin()){
95
-		if ( $query->is_post_type_archive(array('jetpack-portfolio')) && $query->is_main_query() && class_exists('The_Neverending_Home_Page')) {
96
-			$query->set( 'posts_per_page', -1 );
93
+function lsx_portfolio_archive_pagination($query) {
94
+	if ( ! is_admin()) {
95
+		if ($query->is_post_type_archive(array('jetpack-portfolio')) && $query->is_main_query() && class_exists('The_Neverending_Home_Page')) {
96
+			$query->set('posts_per_page', -1);
97 97
 		}
98 98
 	}
99 99
 }
100
-add_action( 'pre_get_posts', 'lsx_portfolio_archive_pagination' , 100 );
100
+add_action('pre_get_posts', 'lsx_portfolio_archive_pagination', 100);
101 101
 
102 102
 /**
103 103
  * Remove the related posts from below the content area.
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
  * @category portfolio
108 108
  */
109 109
 function lsx_remove_portfolio_related_posts() {
110
-	if ( is_single() && 'jetpack-portfolio' == get_post_type() && class_exists( 'Jetpack_RelatedPosts' ) ) {
110
+	if (is_single() && 'jetpack-portfolio' == get_post_type() && class_exists('Jetpack_RelatedPosts')) {
111 111
 		$jprp = Jetpack_RelatedPosts::init();
112
-		$callback = array( $jprp, 'filter_add_target_to_dom' );
113
-		remove_filter( 'the_content', $callback, 40 );
112
+		$callback = array($jprp, 'filter_add_target_to_dom');
113
+		remove_filter('the_content', $callback, 40);
114 114
 	}
115 115
 }
116
-add_filter( 'wp', 'lsx_remove_portfolio_related_posts', 20 );
116
+add_filter('wp', 'lsx_remove_portfolio_related_posts', 20);
117 117
 
118 118
 /**
119 119
  * Remove the related posts from below the content area.
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
  * @category portfolio
124 124
  */
125 125
 function lsx_remove_single_related_posts() {
126
-    if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
126
+    if (is_single() && class_exists('Jetpack_RelatedPosts')) {
127 127
         $jprp = Jetpack_RelatedPosts::init();
128
-        $callback = array( $jprp, 'filter_add_target_to_dom' );
129
-        remove_filter( 'the_content', $callback, 40 );
128
+        $callback = array($jprp, 'filter_add_target_to_dom');
129
+        remove_filter('the_content', $callback, 40);
130 130
     }
131 131
 }
132
-add_filter( 'wp', 'lsx_remove_single_related_posts', 20 );
132
+add_filter('wp', 'lsx_remove_single_related_posts', 20);
133 133
 
134 134
 /**
135 135
  * A template tag to call the Portfolios Related posts
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
  * @subpackage jetpack
139 139
  * @category portfolio
140 140
  */
141
-function lsx_portfolio_related_posts(){
142
-	if(class_exists('Jetpack_RelatedPosts')){ ?>
141
+function lsx_portfolio_related_posts() {
142
+	if (class_exists('Jetpack_RelatedPosts')) { ?>
143 143
 		<div class="row">
144 144
 			<div class="col-md-12">
145 145
 				<?php echo do_shortcode('[jetpack-related-posts]'); ?>
@@ -156,16 +156,16 @@  discard block
 block discarded – undo
156 156
  * @category portfolio
157 157
  */
158 158
 function lsx_portfolio_remove_share() {
159
-	if ( ( is_single() && 'jetpack-portfolio' == get_post_type() ) || is_page_template( 'page-templates/template-portfolio.php' ) ) {
160
-		remove_filter( 'the_content', 'sharing_display',19 );
161
-		remove_filter( 'the_excerpt', 'sharing_display',19 );
159
+	if ((is_single() && 'jetpack-portfolio' == get_post_type()) || is_page_template('page-templates/template-portfolio.php')) {
160
+		remove_filter('the_content', 'sharing_display', 19);
161
+		remove_filter('the_excerpt', 'sharing_display', 19);
162 162
 
163
-		if ( class_exists( 'Jetpack_Likes' ) ) {
164
-			remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
163
+		if (class_exists('Jetpack_Likes')) {
164
+			remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1);
165 165
 		}
166 166
 	}
167 167
 }
168
-add_action( 'loop_start', 'lsx_portfolio_remove_share' );
168
+add_action('loop_start', 'lsx_portfolio_remove_share');
169 169
 
170 170
 /**
171 171
  * Remove the sharing from single
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
  * @category post
176 176
  */
177 177
 function lsx_single_remove_share() {
178
-	if ( is_single() ) {
179
-		remove_filter( 'the_content', 'sharing_display',19 );
180
-		remove_filter( 'the_excerpt', 'sharing_display',19 );
178
+	if (is_single()) {
179
+		remove_filter('the_content', 'sharing_display', 19);
180
+		remove_filter('the_excerpt', 'sharing_display', 19);
181 181
 
182
-		if ( class_exists( 'Jetpack_Likes' ) ) {
183
-			remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
182
+		if (class_exists('Jetpack_Likes')) {
183
+			remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1);
184 184
 		}
185 185
 	}
186 186
 }
187
-add_action( 'loop_start', 'lsx_single_remove_share' );
187
+add_action('loop_start', 'lsx_single_remove_share');
188 188
 
189 189
 /**
190 190
  * Redirect the template archive to our one
@@ -193,18 +193,18 @@  discard block
 block discarded – undo
193 193
  * @subpackage jetpack
194 194
  * @category portfolio
195 195
 */
196
-function lsx_portfolio_taxonomy_template( $template ) {
196
+function lsx_portfolio_taxonomy_template($template) {
197 197
 
198
-	if ( is_tax(array('jetpack-portfolio-type','jetpack-portfolio-tag'))  ) {
199
-		$new_template = locate_template( array( 'archive-jetpack-portfolio.php' ) );
200
-		if ( '' != $new_template ) {
201
-			return $new_template ;
198
+	if (is_tax(array('jetpack-portfolio-type', 'jetpack-portfolio-tag'))) {
199
+		$new_template = locate_template(array('archive-jetpack-portfolio.php'));
200
+		if ('' != $new_template) {
201
+			return $new_template;
202 202
 		}
203 203
 	}
204 204
 
205 205
 	return $template;
206 206
 }
207
-add_filter( 'template_include', 'lsx_portfolio_taxonomy_template', 99 );
207
+add_filter('template_include', 'lsx_portfolio_taxonomy_template', 99);
208 208
 
209 209
 
210 210
 /**
@@ -214,43 +214,43 @@  discard block
 block discarded – undo
214 214
  * @subpackage jetpack
215 215
  * @category portfolio
216 216
  */
217
-add_action( 'add_meta_boxes', 'lsx_add_portfolio_post_meta_boxes' );
218
-add_action( 'save_post', 'lsx_save_portfolio_post_meta', 100, 2 );
217
+add_action('add_meta_boxes', 'lsx_add_portfolio_post_meta_boxes');
218
+add_action('save_post', 'lsx_save_portfolio_post_meta', 100, 2);
219 219
 
220
-function lsx_save_portfolio_post_meta( $post_id, $post ) {
221
-	if ( 'jetpack-portfolio' != $post->post_type ) {
220
+function lsx_save_portfolio_post_meta($post_id, $post) {
221
+	if ('jetpack-portfolio' != $post->post_type) {
222 222
 		return;
223 223
 	}
224 224
 
225
-	if ( ! isset( $_POST['lsx-website'] ) && ! isset( $_POST['lsx-client'] ) ) {
225
+	if ( ! isset($_POST['lsx-website']) && ! isset($_POST['lsx-client'])) {
226 226
 		return;
227 227
 	}
228 228
 
229
-	$post_type = get_post_type_object( $post->post_type );
229
+	$post_type = get_post_type_object($post->post_type);
230 230
 
231
-	if ( ! current_user_can( $post_type->cap->edit_post, $post_id ) ) {
231
+	if ( ! current_user_can($post_type->cap->edit_post, $post_id)) {
232 232
 		return;
233 233
 	}
234 234
 
235
-	check_admin_referer( 'lsx_save_portfolio', '_lsx_client_nonce' );
236
-	check_admin_referer( 'lsx_save_portfolio', '_lsx_website_nonce' );
235
+	check_admin_referer('lsx_save_portfolio', '_lsx_client_nonce');
236
+	check_admin_referer('lsx_save_portfolio', '_lsx_website_nonce');
237 237
 
238
-	$meta_keys = array('lsx-website','lsx-client');
238
+	$meta_keys = array('lsx-website', 'lsx-client');
239 239
 
240
-	foreach($meta_keys as $meta_key){
241
-		$new_meta_value = sanitize_text_field( wp_unslash( $_POST[$meta_key] ) );
242
-		$new_meta_value = ! empty( $new_meta_value ) ? $new_meta_value : '';
240
+	foreach ($meta_keys as $meta_key) {
241
+		$new_meta_value = sanitize_text_field(wp_unslash($_POST[$meta_key]));
242
+		$new_meta_value = ! empty($new_meta_value) ? $new_meta_value : '';
243 243
 
244
-		$meta_value = get_post_meta( $post_id, $meta_key, true );
244
+		$meta_value = get_post_meta($post_id, $meta_key, true);
245 245
 
246
-		if ( $new_meta_value && '' == $meta_value )
247
-			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
246
+		if ($new_meta_value && '' == $meta_value)
247
+			add_post_meta($post_id, $meta_key, $new_meta_value, true);
248 248
 
249
-		elseif ( $new_meta_value && $new_meta_value != $meta_value )
250
-		update_post_meta( $post_id, $meta_key, $new_meta_value );
249
+		elseif ($new_meta_value && $new_meta_value != $meta_value)
250
+		update_post_meta($post_id, $meta_key, $new_meta_value);
251 251
 
252
-		elseif ( '' == $new_meta_value && $meta_value )
253
-		delete_post_meta( $post_id, $meta_key, $meta_value );
252
+		elseif ('' == $new_meta_value && $meta_value)
253
+		delete_post_meta($post_id, $meta_key, $meta_value);
254 254
 	}
255 255
 }
256 256
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
 	add_meta_box(
260 260
 	'lsx_client_meta_box',
261
-	esc_html__( 'Client', 'lsx' ),
261
+	esc_html__('Client', 'lsx'),
262 262
 	'lsx_client_meta_box',
263 263
 	'jetpack-portfolio',
264 264
 	'side',
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
 	add_meta_box(
269 269
 	'lsx_website_meta_box',
270
-	esc_html__( 'Website', 'lsx' ),
270
+	esc_html__('Website', 'lsx'),
271 271
 	'lsx_website_meta_box',
272 272
 	'jetpack-portfolio',
273 273
 	'side',
@@ -275,25 +275,25 @@  discard block
 block discarded – undo
275 275
 			);
276 276
 }
277 277
 
278
-function lsx_client_meta_box( $object, $box ) { ?>
278
+function lsx_client_meta_box($object, $box) { ?>
279 279
 
280
-  <?php wp_nonce_field( 'lsx_save_portfolio', '_lsx_client_nonce' ); ?>
280
+  <?php wp_nonce_field('lsx_save_portfolio', '_lsx_client_nonce'); ?>
281 281
 
282 282
   <p>
283
-    <input class="widefat" type="text" name="lsx-client" id="lsx-client" value="<?php echo esc_attr( get_post_meta( $object->ID, 'lsx-client', true ) ); ?>" size="30" />
283
+    <input class="widefat" type="text" name="lsx-client" id="lsx-client" value="<?php echo esc_attr(get_post_meta($object->ID, 'lsx-client', true)); ?>" size="30" />
284 284
     <br /><br />
285
-    <label for="lsx-client"><?php esc_html_e( 'Enter the name of the project client', 'lsx' ); ?></label>
285
+    <label for="lsx-client"><?php esc_html_e('Enter the name of the project client', 'lsx'); ?></label>
286 286
   </p>
287 287
 <?php }
288 288
 
289
-function lsx_website_meta_box( $object, $box ) { ?>
289
+function lsx_website_meta_box($object, $box) { ?>
290 290
 
291
-  <?php wp_nonce_field( 'lsx_save_portfolio', '_lsx_website_nonce' ); ?>
291
+  <?php wp_nonce_field('lsx_save_portfolio', '_lsx_website_nonce'); ?>
292 292
 
293 293
   <p>
294
-    <input class="widefat" type="text" name="lsx-website" id="lsx-website" value="<?php echo esc_attr( get_post_meta( $object->ID, 'lsx-website', true ) ); ?>" size="30" />
294
+    <input class="widefat" type="text" name="lsx-website" id="lsx-website" value="<?php echo esc_attr(get_post_meta($object->ID, 'lsx-website', true)); ?>" size="30" />
295 295
     <br /><br />
296
-    <label for="lsx-website"><?php esc_html_e( 'Enter the URL of the project website', 'lsx' ); ?></label>
296
+    <label for="lsx-website"><?php esc_html_e('Enter the URL of the project website', 'lsx'); ?></label>
297 297
   </p>
298 298
 <?php }
299 299
 
@@ -306,18 +306,18 @@  discard block
 block discarded – undo
306 306
  * @category portfolio
307 307
  */   
308 308
 
309
-function lsx_portfolio_sorter(){ ?>
309
+function lsx_portfolio_sorter() { ?>
310 310
 	<ul id="filterNav" class="clearfix">
311
-		<li class="allBtn"><a href="#" data-filter="*" class="selected"><?php esc_html_e( 'All', 'lsx' ); ?></a></li>
311
+		<li class="allBtn"><a href="#" data-filter="*" class="selected"><?php esc_html_e('All', 'lsx'); ?></a></li>
312 312
 		<?php 
313 313
 		$types = get_terms('jetpack-portfolio-type');
314 314
 		
315
-		if(is_array($types)){
315
+		if (is_array($types)) {
316 316
 			foreach ($types as $type) {
317
-				$content = '<li><a href="#" data-filter=".'.$type->slug.'">';
317
+				$content = '<li><a href="#" data-filter=".' . $type->slug . '">';
318 318
 		    	$content .= $type->name;					
319 319
 				$content .= '</a></li>';
320
-				echo wp_kses_post( $content );
320
+				echo wp_kses_post($content);
321 321
 				echo "\n";
322 322
 			}
323 323
 		}?>
@@ -332,18 +332,18 @@  discard block
 block discarded – undo
332 332
  * @category portfolio
333 333
  */
334 334
 
335
-function lsx_portfolio_naviagtion_labels($labels){ 
335
+function lsx_portfolio_naviagtion_labels($labels) { 
336 336
 	
337
-	if(is_post_type_archive('jetpack-portfolio')){
337
+	if (is_post_type_archive('jetpack-portfolio')) {
338 338
 		$labels = array(
339
-				'next' 		=> '<span class="meta-nav">&larr;</span> '.esc_html__( 'Older', 'lsx' ),
340
-				'previous' 	=> esc_html__( 'Newer', 'lsx' ).' <span class="meta-nav">&rarr;</span>',
341
-				'title' 	=> esc_html__( 'Portfolio navigation', 'lsx' )
339
+				'next' 		=> '<span class="meta-nav">&larr;</span> ' . esc_html__('Older', 'lsx'),
340
+				'previous' 	=> esc_html__('Newer', 'lsx') . ' <span class="meta-nav">&rarr;</span>',
341
+				'title' 	=> esc_html__('Portfolio navigation', 'lsx')
342 342
 		);
343 343
 	}
344 344
 	return $labels;
345 345
 }
346
-add_filter('lsx_post_navigation_labels','lsx_portfolio_naviagtion_labels',1,10);
346
+add_filter('lsx_post_navigation_labels', 'lsx_portfolio_naviagtion_labels', 1, 10);
347 347
 
348 348
 
349 349
 /*
@@ -357,11 +357,11 @@  discard block
 block discarded – undo
357 357
  * @subpackage jetpack
358 358
  * @category related-posts
359 359
  */
360
-function lsx_remove_related_post_context(){
361
-	add_filter( 'jetpack_relatedposts_filter_post_context', '__return_empty_string' );
362
-	add_filter( 'rest_api_allowed_post_types', 'lsx_allowed_related_post_types' );
360
+function lsx_remove_related_post_context() {
361
+	add_filter('jetpack_relatedposts_filter_post_context', '__return_empty_string');
362
+	add_filter('rest_api_allowed_post_types', 'lsx_allowed_related_post_types');
363 363
 }
364
-add_action('init','lsx_remove_related_post_context',20);
364
+add_action('init', 'lsx_remove_related_post_context', 20);
365 365
 
366 366
 
367 367
 /*
@@ -378,13 +378,13 @@  discard block
 block discarded – undo
378 378
 	$infinite_scroll_args = array(
379 379
 			'container' => 'main',
380 380
 			'type' => 'click',
381
-			'posts_per_page' => get_option('posts_per_page',10),
381
+			'posts_per_page' => get_option('posts_per_page', 10),
382 382
 			'render'    => 'lsx_infinite_scroll_render'
383 383
 	);
384 384
 
385
-	add_theme_support( 'infinite-scroll', $infinite_scroll_args );
385
+	add_theme_support('infinite-scroll', $infinite_scroll_args);
386 386
 }
387
-add_action( 'after_setup_theme', 'lsx_jetpack_infinite_scroll_after_setup' );
387
+add_action('after_setup_theme', 'lsx_jetpack_infinite_scroll_after_setup');
388 388
 
389 389
 /**
390 390
  * Set the code to be rendered on for calling posts,
@@ -397,13 +397,13 @@  discard block
 block discarded – undo
397 397
  function lsx_infinite_scroll_render() {
398 398
 	global $wp_query;
399 399
 	
400
-	while(have_posts()){
400
+	while (have_posts()) {
401 401
 		the_post();
402 402
 		
403
-		if('jetpack-portfolio' == get_post_type()){
404
-			get_template_part( 'content', 'portfolio' );
405
-		}else{
406
-			get_template_part( 'content', get_post_type() );
403
+		if ('jetpack-portfolio' == get_post_type()) {
404
+			get_template_part('content', 'portfolio');
405
+		} else {
406
+			get_template_part('content', get_post_type());
407 407
 		}
408 408
 	}
409 409
  }
@@ -415,8 +415,8 @@  discard block
 block discarded – undo
415 415
  * @subpackage jetpack
416 416
  * @category related posts
417 417
  */
418
-function lsx_related_posts_headline( $headline ) {
419
-	$headline = sprintf( '<h3 class="jp-relatedposts-headline"><em>%s</em></h3>', esc_html__( 'Related Posts', 'lsx' ) );
418
+function lsx_related_posts_headline($headline) {
419
+	$headline = sprintf('<h3 class="jp-relatedposts-headline"><em>%s</em></h3>', esc_html__('Related Posts', 'lsx'));
420 420
 	return $headline;
421 421
 }
422
-add_filter( 'jetpack_relatedposts_filter_headline', 'lsx_related_posts_headline' );
422
+add_filter('jetpack_relatedposts_filter_headline', 'lsx_related_posts_headline');
Please login to merge, or discard this patch.
inc/buddypress.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  */
20 20
  function lsx_buddypress_page_columns($layout) {
21 21
  	
22
-	if(bp_is_profile_component()|| bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component()
23
-		|| bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()){
22
+	if (bp_is_profile_component() || bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component()
23
+		|| bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()) {
24 24
 		$layout = '1c';
25 25
 	}
26 26
 	return $layout;
27 27
  }
28
- add_filter( 'lsx_layout', 'lsx_buddypress_page_columns' , 1 , 100 );
29 28
\ No newline at end of file
29
+ add_filter('lsx_layout', 'lsx_buddypress_page_columns', 1, 100);
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
inc/google-font.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 	/**
14 14
 	 * Constructor
15
-	**/
15
+	 **/
16 16
 	public function __construct($title, $location, $cssDeclaration, $cssClass)
17 17
 	{
18 18
 		$this->title = $title;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	/**
25 25
 	 * Getters
26 26
 	 * taken from: http://stackoverflow.com/questions/4478661/getter-and-setter
27
-	**/
27
+	 **/
28 28
 	public function __get($property) 
29 29
 	{
30 30
 		if (property_exists($this, $property)) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 /**
4 4
  * Google_Font Class
5 5
 **/
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.