Passed
Pull Request — master (#215)
by
unknown
10:41 queued 06:28
created
templates/single-workout.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,9 +36,12 @@
 block discarded – undo
36 36
 
37 37
 			<?php lsx_paging_nav(); ?>
38 38
 
39
-		<?php else : ?>
39
+		<?php else {
40
+     : ?>
40 41
 
41
-			<?php get_template_part( 'partials/content', 'none' ); ?>
42
+			<?php get_template_part( 'partials/content', 'none' );
43
+}
44
+?>
42 45
 
43 46
 		<?php endif; ?>
44 47
 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 			<div class="post-wrapper">
23 23
 
24 24
 				<?php
25
-				while ( have_posts() ) :
26
-					the_post();
27
-				?>
25
+                    while ( have_posts() ) :
26
+                         the_post();
27
+                    ?>
28 28
 					<?php include LSX_HEALTH_PLAN_PATH . '/templates/tab-content-workout.php'; ?>
29 29
 
30 30
 				<?php endwhile; ?>
Please login to merge, or discard this patch.
templates/taxonomy-equipment.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,12 @@
 block discarded – undo
38 38
 
39 39
 							<?php endwhile; ?>
40 40
 
41
-						<?php else : ?>
41
+						<?php else {
42
+     : ?>
42 43
 
43
-							<?php get_template_part( 'partials/content', 'none' ); ?>
44
+							<?php get_template_part( 'partials/content', 'none' );
45
+}
46
+?>
44 47
 
45 48
 						<?php endif; ?>
46 49
 					</div>
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12 12
 <?php
13
-	$page_id  = get_the_ID();
14
-	$redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
13
+     $page_id  = get_the_ID();
14
+     $redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
15 15
 ?>
16 16
 
17 17
 	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
 		<!-- Begining restricted content -->
22 22
 		<?php
23
-		if ( ! function_exists( 'wc_memberships_view_restricted_post_content' ) || current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
24
-			?>
23
+          if ( ! function_exists( 'wc_memberships_view_restricted_post_content' ) || current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
24
+               ?>
25 25
 			<main id="main" role="main">
26 26
 
27 27
 				<?php lsx_content_top(); ?>
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 					<div class="row">
31 31
 						<?php if ( have_posts() ) : ?>
32 32
 							<?php
33
-							while ( have_posts() ) :
34
-								the_post();
35
-								?>
33
+                                   while ( have_posts() ) :
34
+                                        the_post();
35
+                                        ?>
36 36
 
37 37
 								<?php include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-exercise.php'; ?>
38 38
 
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 			</main><!-- #main -->
52 52
 
53 53
 			<?php
54
-		} else {
55
-			wp_redirect( $redirect );
56
-			exit;
57
-		}
58
-		?>
54
+          } else {
55
+               wp_redirect( $redirect );
56
+               exit;
57
+          }
58
+          ?>
59 59
 
60 60
 <?php lsx_content_after(); ?>
61 61
 
Please login to merge, or discard this patch.
templates/partials/content-default.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 $column_class = '4';
11 11
 // Check for shortcode overrides.
12 12
 if ( null !== $shortcode_args ) {
13
-	if ( isset( $shortcode_args['columns'] ) ) {
14
-		$column_class = $shortcode_args['columns'];
15
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
16
-	}
13
+     if ( isset( $shortcode_args['columns'] ) ) {
14
+          $column_class = $shortcode_args['columns'];
15
+          $column_class = \lsx_health_plan\functions\column_class( $column_class );
16
+     }
17 17
 }
18 18
 
19 19
 lsx_entry_before();
@@ -25,23 +25,23 @@  discard block
 block discarded – undo
25 25
 	<div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>">
26 26
 		<?php
27 27
 
28
-		if ( ( 'item' === $link ) || ( 'modal' === $link ) ) {
29
-			?>
28
+          if ( ( 'item' === $link ) || ( 'modal' === $link ) ) {
29
+               ?>
30 30
 			<a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
31 31
 			<?php
32
-		} else {
33
-			?>
32
+          } else {
33
+               ?>
34 34
 			<div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
35 35
 			<?php
36
-		}
37
-		?>
36
+          }
37
+          ?>
38 38
 
39 39
 		<?php the_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?>
40 40
 		<?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?>
41 41
 			<?php
42
-			if ( 'excerpt' === $description ) {
43
-				$excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
44
-				?>
42
+               if ( 'excerpt' === $description ) {
43
+                    $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
44
+                    ?>
45 45
 				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
46 46
 			<?php } ?>
47 47
 			<?php if ( 'full' === $description ) { ?>
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 			<?php } ?>
50 50
 		<?php } ?>
51 51
 		<?php
52
-		if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) {
53
-		?>
52
+          if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) {
53
+          ?>
54 54
 			</a>
55 55
 		<?php } else { ?>
56 56
 			</div>
Please login to merge, or discard this patch.
templates/single-exercise.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 		<?php if ( have_posts() ) : ?>
21 21
 
22 22
 			<?php
23
-			while ( have_posts() ) :
24
-				the_post();
25
-				?>
23
+               while ( have_posts() ) :
24
+                    the_post();
25
+                    ?>
26 26
 
27 27
 				<?php include LSX_HEALTH_PLAN_PATH . '/templates/content-exercise.php'; ?>
28 28
 
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
 	<?php lsx_content_after(); ?>
38 38
 
39 39
 	<?php
40
-	if ( is_singular( 'post' ) ) {
41
-		lsx_post_nav();
42
-	}
43
-	?>
40
+     if ( is_singular( 'post' ) ) {
41
+          lsx_post_nav();
42
+     }
43
+     ?>
44 44
 
45 45
 </div><!-- #primary -->
46 46
 
Please login to merge, or discard this patch.
templates/featured-recipes.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 $args    = array(
9
-	'orderby'        => 'date',
10
-	'order'          => 'DESC',
11
-	'post_type'      => 'recipe',
12
-	'posts_per_page' => 3,
13
-	'meta_key'       => 'recipe_featured',
14
-	'meta_compare'   => 'EXISTS',
9
+     'orderby'        => 'date',
10
+     'order'          => 'DESC',
11
+     'post_type'      => 'recipe',
12
+     'posts_per_page' => 3,
13
+     'meta_key'       => 'recipe_featured',
14
+     'meta_compare'   => 'EXISTS',
15 15
 );
16 16
 $recipes = new WP_Query( $args );
17 17
 ?>
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
 	<div class="lsx-recipes-shortcode lsx-recipes-slider slick-slider slick-dotted slick-has-arrows" data-slick="{'slidesToShow': 1, 'slidesToScroll': 1}" >
22 22
 
23 23
 		<?php
24
-		if ( $recipes->have_posts() ) :
25
-			while ( $recipes->have_posts() ) :
26
-				$recipes->the_post();
27
-				$post_id        = get_the_id();
28
-				$featured_image = get_the_post_thumbnail( $post_id, array( 600, 300 ) );
29
-				?>
24
+          if ( $recipes->have_posts() ) :
25
+               while ( $recipes->have_posts() ) :
26
+                    $recipes->the_post();
27
+                    $post_id        = get_the_id();
28
+                    $featured_image = get_the_post_thumbnail( $post_id, array( 600, 300 ) );
29
+                    ?>
30 30
 				<div class="lsx-recipes-slot">
31 31
 					<div class="row">
32 32
 						<div class="col-md-5 col-sm-6">
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
 						</div>
37 37
 						<div class="col-md-7 col-sm-6">
38 38
 							<?php
39
-							if ( ! empty( $featured_image ) ) {
40
-								echo wp_kses_post( $featured_image );
41
-							}
42
-							?>
39
+                                   if ( ! empty( $featured_image ) ) {
40
+                                        echo wp_kses_post( $featured_image );
41
+                                   }
42
+                                   ?>
43 43
 						</div>
44 44
 					</div>
45 45
 				</div>
Please login to merge, or discard this patch.
templates/single-recipe.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 		<?php if ( have_posts() ) : ?>
21 21
 
22 22
 			<?php
23
-			while ( have_posts() ) :
24
-				the_post();
25
-				?>
23
+               while ( have_posts() ) :
24
+                    the_post();
25
+                    ?>
26 26
 
27 27
 				<?php include LSX_HEALTH_PLAN_PATH . '/templates/content-recipe.php'; ?>
28 28
 
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
 	<?php lsx_content_after(); ?>
38 38
 
39 39
 	<?php
40
-	if ( is_singular( 'post' ) ) {
41
-		lsx_post_nav();
42
-	}
43
-	?>
40
+     if ( is_singular( 'post' ) ) {
41
+          lsx_post_nav();
42
+     }
43
+     ?>
44 44
 
45 45
 </div><!-- #primary -->
46 46
 
Please login to merge, or discard this patch.
templates/taxonomy-week.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 			<div class="post-wrapper">
23 23
 
24 24
 				<?php
25
-				while ( have_posts() ) :
26
-					the_post();
27
-				?>
25
+                    while ( have_posts() ) :
26
+                         the_post();
27
+                    ?>
28 28
 
29 29
 					<?php include LSX_HEALTH_PLAN_PATH . '/templates/content-plan.php'; ?>
30 30
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,9 +36,12 @@
 block discarded – undo
36 36
 
37 37
 			<?php lsx_paging_nav(); ?>
38 38
 
39
-		<?php else : ?>
39
+		<?php else {
40
+     : ?>
40 41
 
41
-			<?php get_template_part( 'partials/content', 'none' ); ?>
42
+			<?php get_template_part( 'partials/content', 'none' );
43
+}
44
+?>
42 45
 
43 46
 		<?php endif; ?>
44 47
 
Please login to merge, or discard this patch.
templates/featured-videos.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 $args   = array(
9
-	'orderby'        => 'date',
10
-	'order'          => 'DESC',
11
-	'post_type'      => 'video',
12
-	'posts_per_page' => 3,
13
-	'meta_key'       => 'video_featured_video',
14
-	'meta_compare'   => 'EXISTS',
9
+     'orderby'        => 'date',
10
+     'order'          => 'DESC',
11
+     'post_type'      => 'video',
12
+     'posts_per_page' => 3,
13
+     'meta_key'       => 'video_featured_video',
14
+     'meta_compare'   => 'EXISTS',
15 15
 );
16 16
 $videos = new WP_Query( $args );
17 17
 ?>
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 	<h2 class="title-lined"><?php esc_html_e( 'Featured Workout', 'lsx-health-plan' ); ?></h2>
21 21
 	<div class="lsx-videos-shortcode lsx-videos-slider slick-slider slick-dotted slick-has-arrows" data-slick="{'slidesToShow': 1, 'slidesToScroll': 1}" >
22 22
 		<?php
23
-		if ( $videos->have_posts() ) :
24
-			while ( $videos->have_posts() ) :
25
-				$videos->the_post();
23
+          if ( $videos->have_posts() ) :
24
+               while ( $videos->have_posts() ) :
25
+                    $videos->the_post();
26 26
 
27
-				$featured = get_post_meta( get_the_ID(), 'video_featured_video', true );
28
-				$giphy    = get_post_meta( get_the_ID(), 'video_giphy_source', true );
29
-				$youtube  = esc_url( get_post_meta( get_the_ID(), 'video_youtube_source', 1 ) );
30
-				?>
27
+                    $featured = get_post_meta( get_the_ID(), 'video_featured_video', true );
28
+                    $giphy    = get_post_meta( get_the_ID(), 'video_giphy_source', true );
29
+                    $youtube  = esc_url( get_post_meta( get_the_ID(), 'video_youtube_source', 1 ) );
30
+                    ?>
31 31
 				<div class="lsx-videos-slot">
32 32
 					<div class="row">
33 33
 						<div class="col-md-4">
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
 						</div>
37 37
 						<div class="col-md-8">
38 38
 							<?php
39
-							if ( ! empty( $giphy ) ) {
40
-								echo $giphy; // WPCS: XSS OK.
41
-							} elseif ( ! empty( $youtube ) ) {
42
-								echo wp_oembed_get( $youtube ); // WPCS: XSS OK.
43
-							}
44
-							?>
39
+                                   if ( ! empty( $giphy ) ) {
40
+                                        echo $giphy; // WPCS: XSS OK.
41
+                                   } elseif ( ! empty( $youtube ) ) {
42
+                                        echo wp_oembed_get( $youtube ); // WPCS: XSS OK.
43
+                                   }
44
+                                   ?>
45 45
 						</div>
46 46
 					</div>
47 47
 				</div>
Please login to merge, or discard this patch.
includes/template-tags/gallery.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -15,17 +15,17 @@
 block discarded – undo
15 15
  * @return string
16 16
  */
17 17
 function lsx_health_plan_gallery( $before = '', $after = '', $echo = true, $item_id = false ) {
18
-	$gallery = '';
19
-	$lsx_hp  = lsx_health_plan();
20
-	if ( false === $item_id ) {
21
-		$item_id = get_the_ID();
22
-	}
23
-	if ( $lsx_hp->frontend->gallery->has_gallery( $item_id ) ) {
24
-		$gallery = $before . $lsx_hp->frontend->gallery->get_gallery() . $after;
25
-	}
26
-	if ( true === $echo ) {
27
-		echo wp_kses_post( $gallery );
28
-	} else {
29
-		return $gallery;
30
-	}
18
+     $gallery = '';
19
+     $lsx_hp  = lsx_health_plan();
20
+     if ( false === $item_id ) {
21
+          $item_id = get_the_ID();
22
+     }
23
+     if ( $lsx_hp->frontend->gallery->has_gallery( $item_id ) ) {
24
+          $gallery = $before . $lsx_hp->frontend->gallery->get_gallery() . $after;
25
+     }
26
+     if ( true === $echo ) {
27
+          echo wp_kses_post( $gallery );
28
+     } else {
29
+          return $gallery;
30
+     }
31 31
 }
Please login to merge, or discard this patch.