Passed
Push — master ( 43702f...903e32 )
by Warwick
04:44 queued 10s
created
templates/taxonomy-equipment.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 	$redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
15 15
 ?>
16 16
 
17
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
17
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
18 18
 
19 19
 		<?php lsx_content_before(); ?>
20 20
 
21 21
 		<!-- Begining restricted content -->
22 22
 		<?php
23
-		if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
23
+		if (current_user_can('wc_memberships_view_restricted_post_content', $post_id)) {
24 24
 			?>
25 25
 			<main id="main" role="main">
26 26
 
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 				<div class="post-wrapper exercise-archive-plan archive-plan">
30 30
 					<div class="row">
31
-						<?php if ( have_posts() ) : ?>
31
+						<?php if (have_posts()) : ?>
32 32
 							<?php
33
-							while ( have_posts() ) :
33
+							while (have_posts()) :
34 34
 								the_post();
35 35
 								?>
36 36
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 						<?php else : ?>
42 42
 
43
-							<?php get_template_part( 'partials/content', 'none' ); ?>
43
+							<?php get_template_part('partials/content', 'none'); ?>
44 44
 
45 45
 						<?php endif; ?>
46 46
 					</div>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 			<?php
54 54
 		} else {
55
-			wp_redirect( $redirect );
55
+			wp_redirect($redirect);
56 56
 			exit;
57 57
 		}
58 58
 		?>
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 ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
24
-			?>
23
+          if ( 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.
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.
templates/partials/content-default.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,47 +9,47 @@
 block discarded – undo
9 9
 
10 10
 $column_class = '4';
11 11
 // Check for shortcode overrides.
12
-if ( null !== $shortcode_args ) {
13
-	if ( isset( $shortcode_args['columns'] ) ) {
12
+if (null !== $shortcode_args) {
13
+	if (isset($shortcode_args['columns'])) {
14 14
 		$column_class = $shortcode_args['columns'];
15
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
15
+		$column_class = \lsx_health_plan\functions\column_class($column_class);
16 16
 	}
17 17
 }
18 18
 
19 19
 lsx_entry_before();
20 20
 
21 21
 $post_id        = get_the_id();
22
-$featured_image = get_the_post_thumbnail_url( $post_id, $image_size );
22
+$featured_image = get_the_post_thumbnail_url($post_id, $image_size);
23 23
 ?>
24
-<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>">
25
-	<div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>">
24
+<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?>">
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 ) ) {
28
+		if (('item' === $link) || ('modal' === $link)) {
29 29
 			?>
30
-			<a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
30
+			<a href="<?php echo esc_url(get_permalink()); ?>" class="exercise-link excerpt-<?php echo esc_html($description); ?>">
31 31
 			<?php
32 32
 		} else {
33 33
 			?>
34
-			<div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
34
+			<div class="exercise-link excerpt-<?php echo esc_html($description); ?>">
35 35
 			<?php
36 36
 		}
37 37
 		?>
38 38
 
39
-		<?php the_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?>
40
-		<?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?>
39
+		<?php the_title('<h4 class="lsx-exercises-title">', '</h4>'); ?>
40
+		<?php if (isset($description) && ('none' !== $description)) { ?>
41 41
 			<?php
42
-			if ( 'excerpt' === $description ) {
43
-				$excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
42
+			if ('excerpt' === $description) {
43
+				$excerpt = \lsx_health_plan\functions\hp_excerpt($post_id);
44 44
 				?>
45
-				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
45
+				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post($excerpt); ?></p>
46 46
 			<?php } ?>
47
-			<?php if ( 'full' === $description ) { ?>
48
-				<?php echo wp_kses_post( get_the_content() ); ?>
47
+			<?php if ('full' === $description) { ?>
48
+				<?php echo wp_kses_post(get_the_content()); ?>
49 49
 			<?php } ?>
50 50
 		<?php } ?>
51 51
 		<?php
52
-		if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) {
52
+		if (isset($link) && (('item' === $link) || ('modal' === $link))) {
53 53
 		?>
54 54
 			</a>
55 55
 		<?php } else { ?>
Please login to merge, or discard this 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 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
12
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
13 13
 
14 14
 	<?php lsx_content_before(); ?>
15 15
 
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<?php lsx_content_top(); ?>
19 19
 
20
-		<?php if ( have_posts() ) : ?>
20
+		<?php if (have_posts()) : ?>
21 21
 
22 22
 			<?php
23
-			while ( have_posts() ) :
23
+			while (have_posts()) :
24 24
 				the_post();
25 25
 				?>
26 26
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	<?php lsx_content_after(); ?>
38 38
 
39 39
 	<?php
40
-	if ( is_singular( 'post' ) ) {
40
+	if (is_singular('post')) {
41 41
 		lsx_post_nav();
42 42
 	}
43 43
 	?>
Please login to merge, or discard this 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 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * @package lsx-health-plan
6 6
  */
7 7
 
8
-$args    = array(
8
+$args = array(
9 9
 	'orderby'        => 'date',
10 10
 	'order'          => 'DESC',
11 11
 	'post_type'      => 'recipe',
@@ -13,31 +13,31 @@  discard block
 block discarded – undo
13 13
 	'meta_key'       => 'recipe_featured',
14 14
 	'meta_compare'   => 'EXISTS',
15 15
 );
16
-$recipes = new WP_Query( $args );
16
+$recipes = new WP_Query($args);
17 17
 ?>
18 18
 
19 19
 <div id="lsx-recipes-shortcode" class="daily-plan-block">
20
-	<h2 class="title-lined"><?php esc_html_e( 'Featured Recipe', 'lsx-health-plan' ); ?></h2>
20
+	<h2 class="title-lined"><?php esc_html_e('Featured Recipe', 'lsx-health-plan'); ?></h2>
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() ) :
24
+		if ($recipes->have_posts()) :
25
+			while ($recipes->have_posts()) :
26 26
 				$recipes->the_post();
27 27
 				$post_id        = get_the_id();
28
-				$featured_image = get_the_post_thumbnail( $post_id, array( 600, 300 ) );
28
+				$featured_image = get_the_post_thumbnail($post_id, array(600, 300));
29 29
 				?>
30 30
 				<div class="lsx-recipes-slot">
31 31
 					<div class="row">
32 32
 						<div class="col-md-5 col-sm-6">
33 33
 							<h4 class="lsx-recipes-title"><?php the_title(); ?></h4>
34 34
 							<?php lsx_health_plan_recipe_data(); ?>
35
-							<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn"><?php esc_html_e( 'View Recipe', 'lsx-health-plan' ); ?></a>
35
+							<a href="<?php echo esc_url(get_permalink()); ?>" class="btn"><?php esc_html_e('View Recipe', 'lsx-health-plan'); ?></a>
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 );
39
+							if ( ! empty($featured_image)) {
40
+								echo wp_kses_post($featured_image);
41 41
 							}
42 42
 							?>
43 43
 						</div>
Please login to merge, or discard this 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/taxonomy-week.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
12
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
13 13
 
14 14
 	<?php lsx_content_before(); ?>
15 15
 
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<?php lsx_content_top(); ?>
19 19
 
20
-		<?php if ( have_posts() ) : ?>
20
+		<?php if (have_posts()) : ?>
21 21
 
22 22
 			<div class="post-wrapper">
23 23
 
24 24
 				<?php
25
-				while ( have_posts() ) :
25
+				while (have_posts()) :
26 26
 					the_post();
27 27
 				?>
28 28
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 		<?php else : ?>
38 38
 
39
-			<?php get_template_part( 'partials/content', 'none' ); ?>
39
+			<?php get_template_part('partials/content', 'none'); ?>
40 40
 
41 41
 		<?php endif; ?>
42 42
 
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
 
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 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * @package lsx-health-plan
6 6
  */
7 7
 
8
-$args   = array(
8
+$args = array(
9 9
 	'orderby'        => 'date',
10 10
 	'order'          => 'DESC',
11 11
 	'post_type'      => 'video',
@@ -13,20 +13,20 @@  discard block
 block discarded – undo
13 13
 	'meta_key'       => 'video_featured_video',
14 14
 	'meta_compare'   => 'EXISTS',
15 15
 );
16
-$videos = new WP_Query( $args );
16
+$videos = new WP_Query($args);
17 17
 ?>
18 18
 
19 19
 <div id="lsx-videos-shortcode" class="daily-plan-block">
20
-	<h2 class="title-lined"><?php esc_html_e( 'Featured Workout', 'lsx-health-plan' ); ?></h2>
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() ) :
23
+		if ($videos->have_posts()) :
24
+			while ($videos->have_posts()) :
25 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 ) );
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 30
 				?>
31 31
 				<div class="lsx-videos-slot">
32 32
 					<div class="row">
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
 						</div>
37 37
 						<div class="col-md-8">
38 38
 							<?php
39
-							if ( ! empty( $giphy ) ) {
39
+							if ( ! empty($giphy)) {
40 40
 								echo $giphy; // WPCS: XSS OK.
41
-							} elseif ( ! empty( $youtube ) ) {
42
-								echo wp_oembed_get( $youtube ); // WPCS: XSS OK.
41
+							} elseif ( ! empty($youtube)) {
42
+								echo wp_oembed_get($youtube); // WPCS: XSS OK.
43 43
 							}
44 44
 							?>
45 45
 						</div>
Please login to merge, or discard this 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.
templates/taxonomy-recipe-type.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 	$redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
15 15
 ?>
16 16
 
17
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
17
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
18 18
 
19 19
 		<?php lsx_content_before(); ?>
20 20
 
21 21
 		<!-- Begining restricted content -->
22 22
 		<?php
23
-		if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
23
+		if (current_user_can('wc_memberships_view_restricted_post_content', $post_id)) {
24 24
 			?>
25 25
 			<main id="main" role="main">
26 26
 
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 				<div class="post-wrapper archive-plan">
30 30
 					<div class="row">
31
-						<?php if ( have_posts() ) : ?>
31
+						<?php if (have_posts()) : ?>
32 32
 							<?php
33
-							while ( have_posts() ) :
33
+							while (have_posts()) :
34 34
 								the_post();
35 35
 								?>
36 36
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 						<?php else : ?>
42 42
 
43
-							<?php get_template_part( 'partials/content', 'none' ); ?>
43
+							<?php get_template_part('partials/content', 'none'); ?>
44 44
 
45 45
 						<?php endif; ?>
46 46
 					</div>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 			<?php
54 54
 		} else {
55
-			wp_redirect( $redirect );
55
+			wp_redirect($redirect);
56 56
 			exit;
57 57
 		}
58 58
 		?>
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 ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
24
-			?>
23
+          if ( 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-recipe.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.
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.
includes/template-tags/gallery.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@
 block discarded – undo
14 14
  * @param  string  $item_id
15 15
  * @return string
16 16
  */
17
-function lsx_health_plan_gallery( $before = '', $after = '', $echo = true, $item_id = false ) {
17
+function lsx_health_plan_gallery($before = '', $after = '', $echo = true, $item_id = false) {
18 18
 	$gallery = '';
19 19
 	$lsx_hp  = lsx_health_plan();
20
-	if ( false === $item_id ) {
20
+	if (false === $item_id) {
21 21
 		$item_id = get_the_ID();
22 22
 	}
23
-	if ( $lsx_hp->frontend->gallery->has_gallery( $item_id ) ) {
23
+	if ($lsx_hp->frontend->gallery->has_gallery($item_id)) {
24 24
 		$gallery = $before . $lsx_hp->frontend->gallery->get_gallery() . $after;
25 25
 	}
26
-	if ( true === $echo ) {
27
-		echo wp_kses_post( $gallery );
26
+	if (true === $echo) {
27
+		echo wp_kses_post($gallery);
28 28
 	} else {
29 29
 		return $gallery;
30 30
 	}
Please login to merge, or discard this 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.
classes/class-core.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	public static function get_instance() {
61 61
 
62 62
 		// If the single instance hasn't been set, set it now.
63
-		if ( null === self::$instance ) {
63
+		if (null === self::$instance) {
64 64
 			self::$instance = new self();
65 65
 		}
66 66
 
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
 	 * @return void
108 108
 	 */
109 109
 	public function get_post_types() {
110
-		$post_types = apply_filters( 'lsx_health_plan_post_types', isset( $this->post_types ) );
111
-		foreach ( $post_types as $index => $post_type ) {
112
-			$is_disabled = \cmb2_get_option( 'lsx_health_plan_options', $post_type . '_disabled', false );
113
-			if ( true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled ) {
114
-				unset( $post_types[ $index ] );
110
+		$post_types = apply_filters('lsx_health_plan_post_types', isset($this->post_types));
111
+		foreach ($post_types as $index => $post_type) {
112
+			$is_disabled = \cmb2_get_option('lsx_health_plan_options', $post_type . '_disabled', false);
113
+			if (true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled) {
114
+				unset($post_types[$index]);
115 115
 			}
116 116
 		}
117 117
 		return $post_types;
Please login to merge, or discard this patch.
Indentation   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -8,116 +8,116 @@
 block discarded – undo
8 8
  */
9 9
 class Core {
10 10
 
11
-	/**
12
-	 * Holds class instance
13
-	 *
14
-	 * @since 1.0.0
15
-	 *
16
-	 * @var      object \lsx_health_plan\classes\Core()
17
-	 */
18
-	protected static $instance = null;
19
-
20
-	/**
21
-	 * @var object \lsx_health_plan\classes\Setup();
22
-	 */
23
-	public $setup;
24
-
25
-	/**
26
-	 * @var object \lsx_health_plan\classes\Admin();
27
-	 */
28
-	public $admin;
29
-
30
-	/**
31
-	 * @var object \lsx_health_plan\classes\Frontend();
32
-	 */
33
-	public $frontend;
34
-
35
-	/**
36
-	 * @var object \lsx_health_plan\classes\Integrations();
37
-	 */
38
-	public $integrations;
39
-
40
-	/**
41
-	 * @var object \lsx_health_plan\classes\Integrations();
42
-	 */
43
-	public $scpo_engine;
44
-
45
-	/**
46
-	 * Constructor
47
-	 */
48
-	public function __construct() {
49
-		$this->load_includes();
50
-		$this->load_classes();
51
-	}
52
-
53
-	/**
54
-	 * Return an instance of this class.
55
-	 *
56
-	 * @since 1.0.0
57
-	 *
58
-	 * @return    object \lsx_health_plan\classes\Core()    A single instance of this class.
59
-	 */
60
-	public static function get_instance() {
61
-
62
-		// If the single instance hasn't been set, set it now.
63
-		if ( null === self::$instance ) {
64
-			self::$instance = new self();
65
-		}
66
-
67
-		return self::$instance;
68
-
69
-	}
70
-
71
-	/**
72
-	 * Loads the variable classes and the static classes.
73
-	 */
74
-	private function load_classes() {
75
-
76
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-setup.php';
77
-		$this->setup = Setup::get_instance();
78
-
79
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-admin.php';
80
-		$this->admin = Admin::get_instance();
81
-
82
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-frontend.php';
83
-		$this->frontend = Frontend::get_instance();
84
-
85
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-integrations.php';
86
-		$this->integrations = Integrations::get_instance();
87
-
88
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-scpo-engine.php';
89
-		$this->scpo_engine = SCPO_Engine::get_instance();
90
-	}
91
-
92
-	/**
93
-	 * Loads the plugin functions.
94
-	 */
95
-	private function load_includes() {
96
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions.php';
97
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/triggers.php';
98
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/recipes.php';
99
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/plan.php';
100
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/conditionals.php';
101
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags.php';
102
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/exercise.php';
103
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/gallery.php';
104
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/plan.php';
105
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/shortcodes.php';
106
-	}
107
-
108
-	/**
109
-	 * Returns the post types currently active
110
-	 *
111
-	 * @return void
112
-	 */
113
-	public function get_post_types() {
114
-		$post_types = apply_filters( 'lsx_health_plan_post_types', isset( $this->post_types ) );
115
-		foreach ( $post_types as $index => $post_type ) {
116
-			$is_disabled = \cmb2_get_option( 'lsx_health_plan_options', $post_type . '_disabled', false );
117
-			if ( true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled ) {
118
-				unset( $post_types[ $index ] );
119
-			}
120
-		}
121
-		return $post_types;
122
-	}
11
+     /**
12
+      * Holds class instance
13
+      *
14
+      * @since 1.0.0
15
+      *
16
+      * @var      object \lsx_health_plan\classes\Core()
17
+      */
18
+     protected static $instance = null;
19
+
20
+     /**
21
+      * @var object \lsx_health_plan\classes\Setup();
22
+      */
23
+     public $setup;
24
+
25
+     /**
26
+      * @var object \lsx_health_plan\classes\Admin();
27
+      */
28
+     public $admin;
29
+
30
+     /**
31
+      * @var object \lsx_health_plan\classes\Frontend();
32
+      */
33
+     public $frontend;
34
+
35
+     /**
36
+      * @var object \lsx_health_plan\classes\Integrations();
37
+      */
38
+     public $integrations;
39
+
40
+     /**
41
+      * @var object \lsx_health_plan\classes\Integrations();
42
+      */
43
+     public $scpo_engine;
44
+
45
+     /**
46
+      * Constructor
47
+      */
48
+     public function __construct() {
49
+          $this->load_includes();
50
+          $this->load_classes();
51
+     }
52
+
53
+     /**
54
+      * Return an instance of this class.
55
+      *
56
+      * @since 1.0.0
57
+      *
58
+      * @return    object \lsx_health_plan\classes\Core()    A single instance of this class.
59
+      */
60
+     public static function get_instance() {
61
+
62
+          // If the single instance hasn't been set, set it now.
63
+          if ( null === self::$instance ) {
64
+               self::$instance = new self();
65
+          }
66
+
67
+          return self::$instance;
68
+
69
+     }
70
+
71
+     /**
72
+      * Loads the variable classes and the static classes.
73
+      */
74
+     private function load_classes() {
75
+
76
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-setup.php';
77
+          $this->setup = Setup::get_instance();
78
+
79
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-admin.php';
80
+          $this->admin = Admin::get_instance();
81
+
82
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-frontend.php';
83
+          $this->frontend = Frontend::get_instance();
84
+
85
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-integrations.php';
86
+          $this->integrations = Integrations::get_instance();
87
+
88
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-scpo-engine.php';
89
+          $this->scpo_engine = SCPO_Engine::get_instance();
90
+     }
91
+
92
+     /**
93
+      * Loads the plugin functions.
94
+      */
95
+     private function load_includes() {
96
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions.php';
97
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/triggers.php';
98
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/recipes.php';
99
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/plan.php';
100
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/conditionals.php';
101
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags.php';
102
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/exercise.php';
103
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/gallery.php';
104
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/plan.php';
105
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/shortcodes.php';
106
+     }
107
+
108
+     /**
109
+      * Returns the post types currently active
110
+      *
111
+      * @return void
112
+      */
113
+     public function get_post_types() {
114
+          $post_types = apply_filters( 'lsx_health_plan_post_types', isset( $this->post_types ) );
115
+          foreach ( $post_types as $index => $post_type ) {
116
+               $is_disabled = \cmb2_get_option( 'lsx_health_plan_options', $post_type . '_disabled', false );
117
+               if ( true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled ) {
118
+                    unset( $post_types[ $index ] );
119
+               }
120
+          }
121
+          return $post_types;
122
+     }
123 123
 }
Please login to merge, or discard this patch.