Passed
Push — dependabot/github_actions/styf... ( 144303 )
by
unknown
09:25 queued 04:35
created
templates/content-archive-tip.php 2 patches
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
 lsx_entry_before();
9 9
 $tip_id         = get_the_id();
10
-$featured_image = get_the_post_thumbnail( $tip_id, array( 600, 300 ) );
10
+$featured_image = get_the_post_thumbnail($tip_id, array(600, 300));
11 11
 ?>
12 12
 <div class="diet-tip-wrapper quick-tip">
13 13
 	<h3 class="title-lined"><?php the_title(); ?></h3>
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 		<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
16 16
 			<div class="tipimage">
17 17
 			<?php
18
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
18
+			if ( ! empty($featured_image) && '' !== $featured_image) {
19 19
 				?>
20
-				<div class="thumbnail tip-thumbnail"><?php echo wp_kses_post( $featured_image ); ?></div>
20
+				<div class="thumbnail tip-thumbnail"><?php echo wp_kses_post($featured_image); ?></div>
21 21
 				<?php
22 22
 			} else {
23 23
 				?>
24
-				<div class="thumbnail tip-thumbnail"><img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/TipPlaceholder.png' ); ?>"></div>
24
+				<div class="thumbnail tip-thumbnail"><img src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/TipPlaceholder.png'); ?>"></div>
25 25
 				<?php
26 26
 			}
27 27
 			?>
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@
 block discarded – undo
15 15
 		<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
16 16
 			<div class="tipimage">
17 17
 			<?php
18
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
19
-				?>
18
+               if ( ! empty( $featured_image ) && '' !== $featured_image ) {
19
+                    ?>
20 20
 				<div class="thumbnail tip-thumbnail"><?php echo wp_kses_post( $featured_image ); ?></div>
21 21
 				<?php
22
-			} else {
23
-				?>
22
+               } else {
23
+                    ?>
24 24
 				<div class="thumbnail tip-thumbnail"><img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/TipPlaceholder.png' ); ?>"></div>
25 25
 				<?php
26
-			}
27
-			?>
26
+               }
27
+               ?>
28 28
 			</div>
29 29
 		</div>
30 30
 		<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
Please login to merge, or discard this patch.
templates/content-exercise.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 $muscle_group = lsx_health_plan_muscle_group_equipment();
11 11
 
12 12
 $sharing = 'sharing-disabled';
13
-if ( class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) :
13
+if (class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) :
14 14
 	$sharing = 'sharing-enabled';
15 15
 endif;
16 16
 
@@ -28,26 +28,26 @@  discard block
 block discarded – undo
28 28
 
29 29
 	<div id="single-exercise" class="entry-content">
30 30
 
31
-		<div class="exercise-title-section title-lined <?php echo esc_html( $sharing ); ?>">
32
-			<?php if ( class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
31
+		<div class="exercise-title-section title-lined <?php echo esc_html($sharing); ?>">
32
+			<?php if (class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?>
33 33
 
34 34
 					<?php
35
-					if ( class_exists( 'LSX_Sharing' ) ) {
35
+					if (class_exists('LSX_Sharing')) {
36 36
 						lsx_content_sharing();
37 37
 					} else {
38
-						if ( function_exists( 'sharing_display' ) ) {
39
-							sharing_display( '', true );
38
+						if (function_exists('sharing_display')) {
39
+							sharing_display('', true);
40 40
 						}
41 41
 
42
-						if ( class_exists( 'Jetpack_Likes' ) ) {
42
+						if (class_exists('Jetpack_Likes')) {
43 43
 							$custom_likes = new Jetpack_Likes();
44
-							echo wp_kses_post( $custom_likes->post_likes( '' ) );
44
+							echo wp_kses_post($custom_likes->post_likes(''));
45 45
 						}
46 46
 					}
47 47
 					?>
48 48
 			<?php endif ?>
49 49
 
50
-			<?php lsx_health_plan_exercise_title( '<h2>', '</h2>' ); ?>
50
+			<?php lsx_health_plan_exercise_title('<h2>', '</h2>'); ?>
51 51
 
52 52
 		</div>
53 53
 
@@ -57,23 +57,23 @@  discard block
 block discarded – undo
57 57
 			<?php
58 58
 			$lsx_hp = lsx_health_plan();
59 59
 
60
-			if ( $lsx_hp->frontend->gallery->has_gallery( get_the_ID() ) ) {
60
+			if ($lsx_hp->frontend->gallery->has_gallery(get_the_ID())) {
61 61
 				lsx_health_plan_gallery();
62 62
 			} else {
63 63
 				$featured_image = get_the_post_thumbnail();
64
-				if ( ! empty( $featured_image ) && '' !== $featured_image ) {
65
-					the_post_thumbnail( 'large', array(
64
+				if ( ! empty($featured_image) && '' !== $featured_image) {
65
+					the_post_thumbnail('large', array(
66 66
 						'class' => 'aligncenter',
67
-					) );
67
+					));
68 68
 				} else {
69 69
 					?>
70
-					<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
70
+					<img src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>">
71 71
 					<?php
72 72
 				}
73 73
 			}
74 74
 			?>
75 75
 
76
-				<?php if ( ( ! empty( $type ) ) || ( ! empty( $equipment ) ) || ( ! empty( $muscle_group ) ) ) { ?>
76
+				<?php if (( ! empty($type)) || ( ! empty($equipment)) || ( ! empty($muscle_group))) { ?>
77 77
 					<div class="exercise-data">
78 78
 						<?php lsx_health_plan_exercise_data(); ?>
79 79
 					</div>
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 				<?php the_content(); ?>
84 84
 				<div  class="back-plan-btn">
85 85
 				<?php
86
-				if ( function_exists( 'wc_get_page_id' ) ) {
86
+				if (function_exists('wc_get_page_id')) {
87 87
 					?>
88
-					<a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Smashed it! Back to my exercises', 'lsx-health-plan' ); ?></a>
88
+					<a class="btn" href="<?php echo wp_kses_post(get_permalink(wc_get_page_id('myaccount'))); ?>"><?php esc_html_e('Smashed it! Back to my exercises', 'lsx-health-plan'); ?></a>
89 89
 					<?php
90 90
 				}
91 91
 				?>
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	</div><!-- .entry-content -->
106 106
 
107 107
 	<footer class="footer-meta clearfix">
108
-		<?php if ( has_tag() ) : ?>
108
+		<?php if (has_tag()) : ?>
109 109
 			<?php lsx_content_post_tags(); ?>
110 110
 		<?php endif ?>
111 111
 	</footer>
Please login to merge, or discard this patch.
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 $sharing = 'sharing-disabled';
13 13
 if ( class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) :
14
-	$sharing = 'sharing-enabled';
14
+     $sharing = 'sharing-enabled';
15 15
 endif;
16 16
 
17 17
 ?>
@@ -32,19 +32,19 @@  discard block
 block discarded – undo
32 32
 			<?php if ( class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
33 33
 
34 34
 					<?php
35
-					if ( class_exists( 'LSX_Sharing' ) ) {
36
-						lsx_content_sharing();
37
-					} else {
38
-						if ( function_exists( 'sharing_display' ) ) {
39
-							sharing_display( '', true );
40
-						}
41
-
42
-						if ( class_exists( 'Jetpack_Likes' ) ) {
43
-							$custom_likes = new Jetpack_Likes();
44
-							echo wp_kses_post( $custom_likes->post_likes( '' ) );
45
-						}
46
-					}
47
-					?>
35
+                         if ( class_exists( 'LSX_Sharing' ) ) {
36
+                              lsx_content_sharing();
37
+                         } else {
38
+                              if ( function_exists( 'sharing_display' ) ) {
39
+                                   sharing_display( '', true );
40
+                              }
41
+
42
+                              if ( class_exists( 'Jetpack_Likes' ) ) {
43
+                                   $custom_likes = new Jetpack_Likes();
44
+                                   echo wp_kses_post( $custom_likes->post_likes( '' ) );
45
+                              }
46
+                         }
47
+                         ?>
48 48
 			<?php endif ?>
49 49
 
50 50
 			<?php lsx_health_plan_exercise_title( '<h2>', '</h2>' ); ?>
@@ -55,23 +55,23 @@  discard block
 block discarded – undo
55 55
 			<div class="col-md-6 exercise-image lsx-hp-shadow">
56 56
 
57 57
 			<?php
58
-			$lsx_hp = lsx_health_plan();
59
-
60
-			if ( $lsx_hp->frontend->gallery->has_gallery( get_the_ID() ) ) {
61
-				lsx_health_plan_gallery();
62
-			} else {
63
-				$featured_image = get_the_post_thumbnail();
64
-				if ( ! empty( $featured_image ) && '' !== $featured_image ) {
65
-					the_post_thumbnail( 'large', array(
66
-						'class' => 'aligncenter',
67
-					) );
68
-				} else {
69
-					?>
58
+               $lsx_hp = lsx_health_plan();
59
+
60
+               if ( $lsx_hp->frontend->gallery->has_gallery( get_the_ID() ) ) {
61
+                    lsx_health_plan_gallery();
62
+               } else {
63
+                    $featured_image = get_the_post_thumbnail();
64
+                    if ( ! empty( $featured_image ) && '' !== $featured_image ) {
65
+                         the_post_thumbnail( 'large', array(
66
+                              'class' => 'aligncenter',
67
+                         ) );
68
+                    } else {
69
+                         ?>
70 70
 					<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
71 71
 					<?php
72
-				}
73
-			}
74
-			?>
72
+                    }
73
+               }
74
+               ?>
75 75
 
76 76
 				<?php if ( ( ! empty( $type ) ) || ( ! empty( $equipment ) ) || ( ! empty( $muscle_group ) ) ) { ?>
77 77
 					<div class="exercise-data">
@@ -83,25 +83,25 @@  discard block
 block discarded – undo
83 83
 				<?php the_content(); ?>
84 84
 				<div  class="back-plan-btn">
85 85
 				<?php
86
-				if ( function_exists( 'wc_get_page_id' ) ) {
87
-					?>
86
+                    if ( function_exists( 'wc_get_page_id' ) ) {
87
+                         ?>
88 88
 					<a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Smashed it! Back to my exercises', 'lsx-health-plan' ); ?></a>
89 89
 					<?php
90
-				}
91
-				?>
90
+                    }
91
+                    ?>
92 92
 				</div>
93 93
 			</div>
94 94
 		</div>
95 95
 		<?php
96
-		wp_link_pages(
97
-			array(
98
-				'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
99
-				'after'       => '</div></div>',
100
-				'link_before' => '<span>',
101
-				'link_after'  => '</span>',
102
-			)
103
-		);
104
-		?>
96
+          wp_link_pages(
97
+               array(
98
+                    'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
99
+                    'after'       => '</div></div>',
100
+                    'link_before' => '<span>',
101
+                    'link_after'  => '</span>',
102
+               )
103
+          );
104
+          ?>
105 105
 	</div><!-- .entry-content -->
106 106
 
107 107
 	<footer class="footer-meta clearfix">
Please login to merge, or discard this patch.
templates/tab-content-warm-up.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,20 +6,20 @@  discard block
 block discarded – undo
6 6
  */
7 7
 global $group_name, $connected_workouts;
8 8
 
9
-$warm_up = get_post_meta( get_the_ID(), 'plan_warmup', true );
10
-if ( false === $warm_up || '' === $warm_up ) {
11
-	$options = \lsx_health_plan\functions\get_option( 'all' );
12
-	if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) {
9
+$warm_up = get_post_meta(get_the_ID(), 'plan_warmup', true);
10
+if (false === $warm_up || '' === $warm_up) {
11
+	$options = \lsx_health_plan\functions\get_option('all');
12
+	if (isset($options['plan_warmup']) && '' !== $options['plan_warmup'] && ! empty($options['plan_warmup'])) {
13 13
 		$warm_up = $options['plan_warmup'];
14 14
 	}
15 15
 }
16 16
 
17
-if ( false !== $warm_up && '' !== $warm_up ) {
18
-	if ( ! is_array( $warm_up ) ) {
19
-		$warm_up = array( $warm_up );
17
+if (false !== $warm_up && '' !== $warm_up) {
18
+	if ( ! is_array($warm_up)) {
19
+		$warm_up = array($warm_up);
20 20
 	}
21 21
 
22
-	$warmup_type  = array( 'page', 'workout', 'exercise' );
22
+	$warmup_type  = array('page', 'workout', 'exercise');
23 23
 	$warmup_query = new WP_Query(
24 24
 		array(
25 25
 			'post__in'  => $warm_up,
@@ -27,24 +27,24 @@  discard block
 block discarded – undo
27 27
 		)
28 28
 	);
29 29
 
30
-	if ( $warmup_query->have_posts() ) {
31
-		while ( $warmup_query->have_posts() ) {
30
+	if ($warmup_query->have_posts()) {
31
+		while ($warmup_query->have_posts()) {
32 32
 			$warmup_query->the_post();
33 33
 			lsx_entry_before();
34
-			if ( 'workout' === get_post_type() ) {
35
-				$connected_workouts = array( get_the_ID() );
34
+			if ('workout' === get_post_type()) {
35
+				$connected_workouts = array(get_the_ID());
36 36
 				?>
37 37
 				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
38 38
 					<?php lsx_entry_top(); ?>
39 39
 					<div class="entry-content">
40 40
 						<?php
41 41
 							the_content();
42
-							wp_link_pages( array(
42
+							wp_link_pages(array(
43 43
 								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
44 44
 								'after'       => '</div></div>',
45 45
 								'link_before' => '<span>',
46 46
 								'link_after'  => '</span>',
47
-							) );
47
+							));
48 48
 						?>
49 49
 					</div><!-- .entry-content -->
50 50
 					<?php lsx_entry_bottom(); ?>
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
 					<div class="entry-content">
59 59
 						<?php
60 60
 							the_content();
61
-							wp_link_pages( array(
61
+							wp_link_pages(array(
62 62
 								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
63 63
 								'after'       => '</div></div>',
64 64
 								'link_before' => '<span>',
65 65
 								'link_after'  => '</span>',
66
-							) );
66
+							));
67 67
 						?>
68 68
 					</div><!-- .entry-content -->
69 69
 					<?php lsx_entry_bottom(); ?>
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -8,71 +8,71 @@
 block discarded – undo
8 8
 
9 9
 $warm_up = get_post_meta( get_the_ID(), 'plan_warmup', true );
10 10
 if ( false === $warm_up || '' === $warm_up ) {
11
-	$options = \lsx_health_plan\functions\get_option( 'all' );
12
-	if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) {
13
-		$warm_up = $options['plan_warmup'];
14
-	}
11
+     $options = \lsx_health_plan\functions\get_option( 'all' );
12
+     if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) {
13
+          $warm_up = $options['plan_warmup'];
14
+     }
15 15
 }
16 16
 
17 17
 if ( false !== $warm_up && '' !== $warm_up ) {
18
-	if ( ! is_array( $warm_up ) ) {
19
-		$warm_up = array( $warm_up );
20
-	}
18
+     if ( ! is_array( $warm_up ) ) {
19
+          $warm_up = array( $warm_up );
20
+     }
21 21
 
22
-	$warmup_type  = array( 'page', 'workout', 'exercise' );
23
-	$warmup_query = new WP_Query(
24
-		array(
25
-			'post__in'  => $warm_up,
26
-			'post_type' => $warmup_type,
27
-		)
28
-	);
22
+     $warmup_type  = array( 'page', 'workout', 'exercise' );
23
+     $warmup_query = new WP_Query(
24
+          array(
25
+               'post__in'  => $warm_up,
26
+               'post_type' => $warmup_type,
27
+          )
28
+     );
29 29
 
30
-	if ( $warmup_query->have_posts() ) {
31
-		while ( $warmup_query->have_posts() ) {
32
-			$warmup_query->the_post();
33
-			lsx_entry_before();
34
-			if ( 'workout' === get_post_type() ) {
35
-				$connected_workouts = array( get_the_ID() );
36
-				?>
30
+     if ( $warmup_query->have_posts() ) {
31
+          while ( $warmup_query->have_posts() ) {
32
+               $warmup_query->the_post();
33
+               lsx_entry_before();
34
+               if ( 'workout' === get_post_type() ) {
35
+                    $connected_workouts = array( get_the_ID() );
36
+                    ?>
37 37
 				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
38 38
 					<?php lsx_entry_top(); ?>
39 39
 					<div class="entry-content">
40 40
 						<?php
41
-							the_content();
42
-							wp_link_pages( array(
43
-								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
44
-								'after'       => '</div></div>',
45
-								'link_before' => '<span>',
46
-								'link_after'  => '</span>',
47
-							) );
48
-						?>
41
+                                   the_content();
42
+                                   wp_link_pages( array(
43
+                                        'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
44
+                                        'after'       => '</div></div>',
45
+                                        'link_before' => '<span>',
46
+                                        'link_after'  => '</span>',
47
+                                   ) );
48
+                              ?>
49 49
 					</div><!-- .entry-content -->
50 50
 					<?php lsx_entry_bottom(); ?>
51 51
 				</article><!-- #post-## -->
52 52
 				<?php
53
-				lsx_health_plan_workout_sets();
54
-			} else {
55
-				?>
53
+                    lsx_health_plan_workout_sets();
54
+               } else {
55
+                    ?>
56 56
 				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
57 57
 					<?php lsx_entry_top(); ?>
58 58
 					<div class="entry-content">
59 59
 						<?php
60
-							the_content();
61
-							wp_link_pages( array(
62
-								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
63
-								'after'       => '</div></div>',
64
-								'link_before' => '<span>',
65
-								'link_after'  => '</span>',
66
-							) );
67
-						?>
60
+                                   the_content();
61
+                                   wp_link_pages( array(
62
+                                        'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
63
+                                        'after'       => '</div></div>',
64
+                                        'link_before' => '<span>',
65
+                                        'link_after'  => '</span>',
66
+                                   ) );
67
+                              ?>
68 68
 					</div><!-- .entry-content -->
69 69
 					<?php lsx_entry_bottom(); ?>
70 70
 				</article><!-- #post-## -->
71 71
 				<?php
72
-			}
72
+               }
73 73
 
74
-			lsx_entry_after();
75
-		}
76
-		wp_reset_postdata();
77
-	}
74
+               lsx_entry_after();
75
+          }
76
+          wp_reset_postdata();
77
+     }
78 78
 }
Please login to merge, or discard this patch.
templates/content-archive-exercise.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,29 +16,29 @@  discard block
 block discarded – undo
16 16
 $link_close      = '';
17 17
 
18 18
 // Check for shortcode overrides.
19
-if ( null !== $shortcode_args ) {
20
-	if ( isset( $shortcode_args['columns'] ) ) {
19
+if (null !== $shortcode_args) {
20
+	if (isset($shortcode_args['columns'])) {
21 21
 		$column_class = $shortcode_args['columns'];
22
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
22
+		$column_class = \lsx_health_plan\functions\column_class($column_class);
23 23
 	}
24
-	if ( isset( $shortcode_args['link'] ) ) {
24
+	if (isset($shortcode_args['link'])) {
25 25
 		$link_setting = $shortcode_args['link'];
26 26
 		// Setup our link and content.
27
-		switch ( $link_setting ) {
27
+		switch ($link_setting) {
28 28
 			case 'single':
29
-				$link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
29
+				$link_html  = '<a href="' . get_permalink($group['connected_exercises']) . '">';
30 30
 				$link_close = '</a>';
31 31
 				break;
32 32
 
33 33
 			case 'modal':
34 34
 				$link_html  = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
35 35
 				$link_close = '</a>';
36
-				$modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
36
+				$modal_content_setting = \lsx_health_plan\functions\get_option('workout_tab_modal_content', 'excerpt');
37 37
 				$modal_args = array(
38 38
 					'modal_content' => $modal_content_setting,
39 39
 				);
40 40
 				// We call the button to register the modal, but we do not output it.
41
-				lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
41
+				lsx_health_plan_workout_exercise_button($group['connected_exercises'], $group, false, $modal_args);
42 42
 				break;
43 43
 
44 44
 			case 'none':
@@ -48,27 +48,27 @@  discard block
 block discarded – undo
48 48
 				break;
49 49
 		}
50 50
 	}
51
-	if ( isset( $shortcode_args['description'] ) ) {
51
+	if (isset($shortcode_args['description'])) {
52 52
 		$content_setting = $shortcode_args['description'];
53 53
 	}
54 54
 }
55 55
 ?>
56 56
 
57
-<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>">
57
+<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?>">
58 58
 	<article class="lsx-slot box-shadow">
59 59
 		<?php lsx_entry_top(); ?>
60 60
 
61 61
 		<div class="exercise-feature-img">
62
-			<a href="<?php echo esc_url( get_permalink() ); ?>">
62
+			<a href="<?php echo esc_url(get_permalink()); ?>">
63 63
 			<?php
64 64
 			$featured_image = get_the_post_thumbnail();
65
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
66
-				the_post_thumbnail( 'medium', array(
65
+			if ( ! empty($featured_image) && '' !== $featured_image) {
66
+				the_post_thumbnail('medium', array(
67 67
 					'class' => 'aligncenter',
68
-				) );
68
+				));
69 69
 			} else {
70 70
 				?>
71
-				<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
71
+				<img src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>">
72 72
 				<?php
73 73
 			}
74 74
 			?>
@@ -76,21 +76,21 @@  discard block
 block discarded – undo
76 76
 		</div>
77 77
 		<div class="content-box exercise-content-box white-bg">
78 78
 			<div class="title-lined">
79
-				<?php lsx_health_plan_exercise_title( '<h3 class="exercise-title">', '</h3>' ); ?>
79
+				<?php lsx_health_plan_exercise_title('<h3 class="exercise-title">', '</h3>'); ?>
80 80
 				<?php lsx_health_plan_exercise_data(); ?>
81 81
 			</div>
82 82
 			<?php
83
-			if ( '' !== $content_setting && 'excerpt' === $content_setting ) {
84
-				if ( ! has_excerpt() ) {
85
-					$content = wp_trim_words( get_the_content(), 20 );
83
+			if ('' !== $content_setting && 'excerpt' === $content_setting) {
84
+				if ( ! has_excerpt()) {
85
+					$content = wp_trim_words(get_the_content(), 20);
86 86
 					$content = '<p>' . $content . '</p>';
87 87
 				} else {
88
-					$content = apply_filters( 'the_excerpt', get_the_excerpt() );
88
+					$content = apply_filters('the_excerpt', get_the_excerpt());
89 89
 				}
90
-				echo wp_kses_post( $content );
90
+				echo wp_kses_post($content);
91 91
 			}
92 92
 			?>
93
-			<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See exercise', 'lsx-health-plan' ); ?></a>
93
+			<a href="<?php echo esc_url(get_permalink()); ?>" class="btn border-btn"><?php esc_html_e('See exercise', 'lsx-health-plan'); ?></a>
94 94
 		</div>
95 95
 		<?php lsx_entry_bottom(); ?>
96 96
 	</article>
Please login to merge, or discard this patch.
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -17,40 +17,40 @@  discard block
 block discarded – undo
17 17
 
18 18
 // Check for shortcode overrides.
19 19
 if ( null !== $shortcode_args ) {
20
-	if ( isset( $shortcode_args['columns'] ) ) {
21
-		$column_class = $shortcode_args['columns'];
22
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
23
-	}
24
-	if ( isset( $shortcode_args['link'] ) ) {
25
-		$link_setting = $shortcode_args['link'];
26
-		// Setup our link and content.
27
-		switch ( $link_setting ) {
28
-			case 'single':
29
-				$link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
30
-				$link_close = '</a>';
31
-				break;
20
+     if ( isset( $shortcode_args['columns'] ) ) {
21
+          $column_class = $shortcode_args['columns'];
22
+          $column_class = \lsx_health_plan\functions\column_class( $column_class );
23
+     }
24
+     if ( isset( $shortcode_args['link'] ) ) {
25
+          $link_setting = $shortcode_args['link'];
26
+          // Setup our link and content.
27
+          switch ( $link_setting ) {
28
+               case 'single':
29
+                    $link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
30
+                    $link_close = '</a>';
31
+                    break;
32 32
 
33
-			case 'modal':
34
-				$link_html  = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
35
-				$link_close = '</a>';
36
-				$modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
37
-				$modal_args = array(
38
-					'modal_content' => $modal_content_setting,
39
-				);
40
-				// We call the button to register the modal, but we do not output it.
41
-				lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
42
-				break;
33
+               case 'modal':
34
+                    $link_html  = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
35
+                    $link_close = '</a>';
36
+                    $modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
37
+                    $modal_args = array(
38
+                         'modal_content' => $modal_content_setting,
39
+                    );
40
+                    // We call the button to register the modal, but we do not output it.
41
+                    lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
42
+                    break;
43 43
 
44
-			case 'none':
45
-			default:
46
-				$link_html  = '';
47
-				$link_close = '';
48
-				break;
49
-		}
50
-	}
51
-	if ( isset( $shortcode_args['description'] ) ) {
52
-		$content_setting = $shortcode_args['description'];
53
-	}
44
+               case 'none':
45
+               default:
46
+                    $link_html  = '';
47
+                    $link_close = '';
48
+                    break;
49
+          }
50
+     }
51
+     if ( isset( $shortcode_args['description'] ) ) {
52
+          $content_setting = $shortcode_args['description'];
53
+     }
54 54
 }
55 55
 ?>
56 56
 
@@ -61,17 +61,17 @@  discard block
 block discarded – undo
61 61
 		<div class="exercise-feature-img">
62 62
 			<a href="<?php echo esc_url( get_permalink() ); ?>">
63 63
 			<?php
64
-			$featured_image = get_the_post_thumbnail();
65
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
66
-				the_post_thumbnail( 'medium', array(
67
-					'class' => 'aligncenter',
68
-				) );
69
-			} else {
70
-				?>
64
+               $featured_image = get_the_post_thumbnail();
65
+               if ( ! empty( $featured_image ) && '' !== $featured_image ) {
66
+                    the_post_thumbnail( 'medium', array(
67
+                         'class' => 'aligncenter',
68
+                    ) );
69
+               } else {
70
+                    ?>
71 71
 				<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
72 72
 				<?php
73
-			}
74
-			?>
73
+               }
74
+               ?>
75 75
 			</a>
76 76
 		</div>
77 77
 		<div class="content-box exercise-content-box white-bg">
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
 				<?php lsx_health_plan_exercise_data(); ?>
81 81
 			</div>
82 82
 			<?php
83
-			if ( '' !== $content_setting && 'excerpt' === $content_setting ) {
84
-				if ( ! has_excerpt() ) {
85
-					$content = wp_trim_words( get_the_content(), 20 );
86
-					$content = '<p>' . $content . '</p>';
87
-				} else {
88
-					$content = apply_filters( 'the_excerpt', get_the_excerpt() );
89
-				}
90
-				echo wp_kses_post( $content );
91
-			}
92
-			?>
83
+               if ( '' !== $content_setting && 'excerpt' === $content_setting ) {
84
+                    if ( ! has_excerpt() ) {
85
+                         $content = wp_trim_words( get_the_content(), 20 );
86
+                         $content = '<p>' . $content . '</p>';
87
+                    } else {
88
+                         $content = apply_filters( 'the_excerpt', get_the_excerpt() );
89
+                    }
90
+                    echo wp_kses_post( $content );
91
+               }
92
+               ?>
93 93
 			<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See exercise', 'lsx-health-plan' ); ?></a>
94 94
 		</div>
95 95
 		<?php lsx_entry_bottom(); ?>
Please login to merge, or discard this patch.
templates/tab-content-recipes.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -19,41 +19,41 @@  discard block
 block discarded – undo
19 19
 		<?php
20 20
 			//the_content();
21 21
 
22
-			wp_link_pages( array(
22
+			wp_link_pages(array(
23 23
 				'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
24 24
 				'after'       => '</div></div>',
25 25
 				'link_before' => '<span>',
26 26
 				'link_after'  => '</span>',
27
-			) );
27
+			));
28 28
 		?>
29 29
 		<div class="single-plan-section-title recipes-plan">
30
-			<?php lsx_get_svg_icon( 'recipes.svg' ); ?>
31
-			<h2 class="title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
30
+			<?php lsx_get_svg_icon('recipes.svg'); ?>
31
+			<h2 class="title-lined"><?php esc_html_e('Recipes', 'lsx-health-plan'); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
32 32
 		</div>
33 33
 		<div class="single-plan-inner recipes-content">
34 34
 			<div class="recipes">
35 35
 			<div class="row eating-row">
36 36
 			<?php
37
-			$connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true );
38
-			if ( empty( $connected_recipes ) ) {
39
-				$options = \lsx_health_plan\functions\get_option( 'all' );
40
-				if ( isset( $options['connected_recipes'] ) && '' !== $options['connected_recipes'] && ! empty( $options['connected_recipes'] ) ) {
37
+			$connected_recipes = get_post_meta(get_the_ID(), 'connected_recipes', true);
38
+			if (empty($connected_recipes)) {
39
+				$options = \lsx_health_plan\functions\get_option('all');
40
+				if (isset($options['connected_recipes']) && '' !== $options['connected_recipes'] && ! empty($options['connected_recipes'])) {
41 41
 					$connected_recipes = $options['connected_recipes'];
42
-					if ( ! array( $connected_recipes ) ) {
43
-						$connected_recipes = array( $connected_recipes );
42
+					if ( ! array($connected_recipes)) {
43
+						$connected_recipes = array($connected_recipes);
44 44
 					}
45 45
 				}
46 46
 			}
47
-			$args    = array(
47
+			$args = array(
48 48
 				'orderby'   => 'date',
49 49
 				'order'     => 'DESC',
50 50
 				'post_type' => 'recipe',
51 51
 				'post__in'  => $connected_recipes,
52 52
 			);
53
-			$recipes = new WP_Query( $args );
53
+			$recipes = new WP_Query($args);
54 54
 
55
-			if ( $recipes->have_posts() ) {
56
-				while ( $recipes->have_posts() ) {
55
+			if ($recipes->have_posts()) {
56
+				while ($recipes->have_posts()) {
57 57
 					$recipes->the_post();
58 58
 					$post_id = get_the_id();
59 59
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 						<div class="content-box box-shadow">
63 63
 							<h3 class="recipe-title title-lined"><?php the_title(); ?></h3>
64 64
 							<?php lsx_health_plan_recipe_data(); ?>
65
-							<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn btn-full"><?php esc_html_e( 'View Recipe', 'lsx-health-plan' ); ?></a>
65
+							<a href="<?php echo esc_url(get_permalink()); ?>" class="btn btn-full"><?php esc_html_e('View Recipe', 'lsx-health-plan'); ?></a>
66 66
 						</div>
67 67
 					</div>
68 68
 				<?php
@@ -76,21 +76,21 @@  discard block
 block discarded – undo
76 76
 	</div><!-- .entry-content -->
77 77
 
78 78
 	<footer class="footer-meta clearfix">
79
-		<?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
79
+		<?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?>
80 80
 			<div class="post-tags-wrapper">
81 81
 				<?php lsx_content_post_tags(); ?>
82 82
 
83 83
 				<?php
84
-				if ( class_exists( 'LSX_Sharing' ) ) {
84
+				if (class_exists('LSX_Sharing')) {
85 85
 					lsx_content_sharing();
86 86
 				} else {
87
-					if ( function_exists( 'sharing_display' ) ) {
88
-						sharing_display( '', true );
87
+					if (function_exists('sharing_display')) {
88
+						sharing_display('', true);
89 89
 					}
90 90
 
91
-					if ( class_exists( 'Jetpack_Likes' ) ) {
91
+					if (class_exists('Jetpack_Likes')) {
92 92
 						$custom_likes = new Jetpack_Likes();
93
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
93
+						echo wp_kses_post($custom_likes->post_likes(''));
94 94
 					}
95 95
 				}
96 96
 				?>
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
 
18 18
 	<div class="entry-content">
19 19
 		<?php
20
-			//the_content();
20
+               //the_content();
21 21
 
22
-			wp_link_pages( array(
23
-				'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
24
-				'after'       => '</div></div>',
25
-				'link_before' => '<span>',
26
-				'link_after'  => '</span>',
27
-			) );
28
-		?>
22
+               wp_link_pages( array(
23
+                    'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
24
+                    'after'       => '</div></div>',
25
+                    'link_before' => '<span>',
26
+                    'link_after'  => '</span>',
27
+               ) );
28
+          ?>
29 29
 		<div class="single-plan-section-title recipes-plan">
30 30
 			<?php lsx_get_svg_icon( 'recipes.svg' ); ?>
31 31
 			<h2 class="title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
@@ -34,30 +34,30 @@  discard block
 block discarded – undo
34 34
 			<div class="recipes">
35 35
 			<div class="row eating-row">
36 36
 			<?php
37
-			$connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true );
38
-			if ( empty( $connected_recipes ) ) {
39
-				$options = \lsx_health_plan\functions\get_option( 'all' );
40
-				if ( isset( $options['connected_recipes'] ) && '' !== $options['connected_recipes'] && ! empty( $options['connected_recipes'] ) ) {
41
-					$connected_recipes = $options['connected_recipes'];
42
-					if ( ! array( $connected_recipes ) ) {
43
-						$connected_recipes = array( $connected_recipes );
44
-					}
45
-				}
46
-			}
47
-			$args    = array(
48
-				'orderby'   => 'date',
49
-				'order'     => 'DESC',
50
-				'post_type' => 'recipe',
51
-				'post__in'  => $connected_recipes,
52
-			);
53
-			$recipes = new WP_Query( $args );
37
+               $connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true );
38
+               if ( empty( $connected_recipes ) ) {
39
+                    $options = \lsx_health_plan\functions\get_option( 'all' );
40
+                    if ( isset( $options['connected_recipes'] ) && '' !== $options['connected_recipes'] && ! empty( $options['connected_recipes'] ) ) {
41
+                         $connected_recipes = $options['connected_recipes'];
42
+                         if ( ! array( $connected_recipes ) ) {
43
+                              $connected_recipes = array( $connected_recipes );
44
+                         }
45
+                    }
46
+               }
47
+               $args    = array(
48
+                    'orderby'   => 'date',
49
+                    'order'     => 'DESC',
50
+                    'post_type' => 'recipe',
51
+                    'post__in'  => $connected_recipes,
52
+               );
53
+               $recipes = new WP_Query( $args );
54 54
 
55
-			if ( $recipes->have_posts() ) {
56
-				while ( $recipes->have_posts() ) {
57
-					$recipes->the_post();
58
-					$post_id = get_the_id();
55
+               if ( $recipes->have_posts() ) {
56
+                    while ( $recipes->have_posts() ) {
57
+                         $recipes->the_post();
58
+                         $post_id = get_the_id();
59 59
 
60
-					?>
60
+                         ?>
61 61
 					<div class="col-md-4 recipe-column">
62 62
 						<div class="content-box box-shadow">
63 63
 							<h3 class="recipe-title title-lined"><?php the_title(); ?></h3>
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 						</div>
67 67
 					</div>
68 68
 				<?php
69
-				}
70
-			}
71
-			?>
69
+                    }
70
+               }
71
+               ?>
72 72
 			<?php wp_reset_postdata(); ?>
73 73
 			</div>
74 74
 			</div>
@@ -81,19 +81,19 @@  discard block
 block discarded – undo
81 81
 				<?php lsx_content_post_tags(); ?>
82 82
 
83 83
 				<?php
84
-				if ( class_exists( 'LSX_Sharing' ) ) {
85
-					lsx_content_sharing();
86
-				} else {
87
-					if ( function_exists( 'sharing_display' ) ) {
88
-						sharing_display( '', true );
89
-					}
84
+                    if ( class_exists( 'LSX_Sharing' ) ) {
85
+                         lsx_content_sharing();
86
+                    } else {
87
+                         if ( function_exists( 'sharing_display' ) ) {
88
+                              sharing_display( '', true );
89
+                         }
90 90
 
91
-					if ( class_exists( 'Jetpack_Likes' ) ) {
92
-						$custom_likes = new Jetpack_Likes();
93
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
94
-					}
95
-				}
96
-				?>
91
+                         if ( class_exists( 'Jetpack_Likes' ) ) {
92
+                              $custom_likes = new Jetpack_Likes();
93
+                              echo wp_kses_post( $custom_likes->post_likes( '' ) );
94
+                         }
95
+                    }
96
+                    ?>
97 97
 		<?php endif ?>
98 98
 	</footer><!-- .footer-meta -->
99 99
 
Please login to merge, or discard this patch.
templates/archive-exercise.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', $page_id ) ) {
23
+		if (current_user_can('wc_memberships_view_restricted_post_content', $page_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', $page_id ) ) {
24
-			?>
23
+          if ( current_user_can( 'wc_memberships_view_restricted_post_content', $page_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/content-recipe.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
 ?>
8 8
 
9 9
 <?php
10
-$prep_time     = get_post_meta( get_the_ID(), 'recipe_prep_time', true );
11
-$cooking_time  = get_post_meta( get_the_ID(), 'recipe_cooking_time', true );
12
-$serves        = get_post_meta( get_the_ID(), 'recipe_serves', true );
13
-$portion       = get_post_meta( get_the_ID(), 'recipe_portion', true );
14
-$energy        = get_post_meta( get_the_ID(), 'recipe_energy', true );
15
-$protein       = get_post_meta( get_the_ID(), 'recipe_protein', true );
16
-$carbohydrates = get_post_meta( get_the_ID(), 'recipe_carbohydrates', true );
17
-$fibre         = get_post_meta( get_the_ID(), 'recipe_fibre', true );
18
-$fat           = get_post_meta( get_the_ID(), 'recipe_fat', true );
10
+$prep_time     = get_post_meta(get_the_ID(), 'recipe_prep_time', true);
11
+$cooking_time  = get_post_meta(get_the_ID(), 'recipe_cooking_time', true);
12
+$serves        = get_post_meta(get_the_ID(), 'recipe_serves', true);
13
+$portion       = get_post_meta(get_the_ID(), 'recipe_portion', true);
14
+$energy        = get_post_meta(get_the_ID(), 'recipe_energy', true);
15
+$protein       = get_post_meta(get_the_ID(), 'recipe_protein', true);
16
+$carbohydrates = get_post_meta(get_the_ID(), 'recipe_carbohydrates', true);
17
+$fibre         = get_post_meta(get_the_ID(), 'recipe_fibre', true);
18
+$fat           = get_post_meta(get_the_ID(), 'recipe_fat', true);
19 19
 ?>
20 20
 
21 21
 <?php lsx_entry_before(); ?>
@@ -29,22 +29,22 @@  discard block
 block discarded – undo
29 29
 	</div><!-- .entry-meta -->
30 30
 
31 31
 	<div id="single-recipe" class="entry-content">
32
-		<h2 class="title-lined"><span class="recipe-prefix"><?php esc_html_e( 'Recipe:', 'lsx-health-plan' ); ?></span> <?php the_title(); ?></h2>
32
+		<h2 class="title-lined"><span class="recipe-prefix"><?php esc_html_e('Recipe:', 'lsx-health-plan'); ?></span> <?php the_title(); ?></h2>
33 33
 		<div class="row">
34 34
 			<div class="col-md-6 recipe-image lsx-hp-shadow">
35 35
 				<?php
36 36
 				$featured_image = get_the_post_thumbnail();
37
-				if ( ! empty( $featured_image ) && '' !== $featured_image ) {
38
-					the_post_thumbnail( 'large', array(
37
+				if ( ! empty($featured_image) && '' !== $featured_image) {
38
+					the_post_thumbnail('large', array(
39 39
 						'class' => 'aligncenter',
40
-					) );
40
+					));
41 41
 				} else {
42 42
 					?>
43
-					<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
43
+					<img src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>">
44 44
 					<?php
45 45
 				}
46 46
 				?>
47
-				<?php if ( ( ! empty( $prep_time ) ) || ( ! empty( $cooking_time ) ) || ( ! empty( $serves ) ) || ( ! empty( $portion ) ) || ( ! empty( $energy ) ) || ( ! empty( $protein ) ) || ( ! empty( $carbohydrates ) ) || ( ! empty( $fibre ) ) || ( ! empty( $fat ) ) ) { ?>
47
+				<?php if (( ! empty($prep_time)) || ( ! empty($cooking_time)) || ( ! empty($serves)) || ( ! empty($portion)) || ( ! empty($energy)) || ( ! empty($protein)) || ( ! empty($carbohydrates)) || ( ! empty($fibre)) || ( ! empty($fat))) { ?>
48 48
 				<div class="recipe-data">
49 49
 					<?php lsx_health_plan_recipe_data(); ?>
50 50
 				</div>
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 				<?php the_content(); ?>
55 55
 				<div  class="back-plan-btn">
56 56
 				<?php
57
-				if ( function_exists( 'wc_get_page_id' ) ) {
57
+				if (function_exists('wc_get_page_id')) {
58 58
 					?>
59
-					<a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Back To My Plan', 'lsx-health-plan' ); ?></a>
59
+					<a class="btn" href="<?php echo wp_kses_post(get_permalink(wc_get_page_id('myaccount'))); ?>"><?php esc_html_e('Back To My Plan', 'lsx-health-plan'); ?></a>
60 60
 					<?php
61 61
 				}
62 62
 				?>
@@ -76,21 +76,21 @@  discard block
 block discarded – undo
76 76
 	</div><!-- .entry-content -->
77 77
 
78 78
 	<footer class="footer-meta clearfix">
79
-		<?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
79
+		<?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?>
80 80
 			<div class="post-tags-wrapper">
81 81
 				<?php lsx_content_post_tags(); ?>
82 82
 
83 83
 				<?php
84
-				if ( class_exists( 'LSX_Sharing' ) ) {
84
+				if (class_exists('LSX_Sharing')) {
85 85
 					lsx_content_sharing();
86 86
 				} else {
87
-					if ( function_exists( 'sharing_display' ) ) {
88
-						sharing_display( '', true );
87
+					if (function_exists('sharing_display')) {
88
+						sharing_display('', true);
89 89
 					}
90 90
 
91
-					if ( class_exists( 'Jetpack_Likes' ) ) {
91
+					if (class_exists('Jetpack_Likes')) {
92 92
 						$custom_likes = new Jetpack_Likes();
93
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
93
+						echo wp_kses_post($custom_likes->post_likes(''));
94 94
 					}
95 95
 				}
96 96
 				?>
Please login to merge, or discard this patch.
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
 		<div class="row">
34 34
 			<div class="col-md-6 recipe-image lsx-hp-shadow">
35 35
 				<?php
36
-				$featured_image = get_the_post_thumbnail();
37
-				if ( ! empty( $featured_image ) && '' !== $featured_image ) {
38
-					the_post_thumbnail( 'large', array(
39
-						'class' => 'aligncenter',
40
-					) );
41
-				} else {
42
-					?>
36
+                    $featured_image = get_the_post_thumbnail();
37
+                    if ( ! empty( $featured_image ) && '' !== $featured_image ) {
38
+                         the_post_thumbnail( 'large', array(
39
+                              'class' => 'aligncenter',
40
+                         ) );
41
+                    } else {
42
+                         ?>
43 43
 					<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
44 44
 					<?php
45
-				}
46
-				?>
45
+                    }
46
+                    ?>
47 47
 				<?php if ( ( ! empty( $prep_time ) ) || ( ! empty( $cooking_time ) ) || ( ! empty( $serves ) ) || ( ! empty( $portion ) ) || ( ! empty( $energy ) ) || ( ! empty( $protein ) ) || ( ! empty( $carbohydrates ) ) || ( ! empty( $fibre ) ) || ( ! empty( $fat ) ) ) { ?>
48 48
 				<div class="recipe-data">
49 49
 					<?php lsx_health_plan_recipe_data(); ?>
@@ -54,25 +54,25 @@  discard block
 block discarded – undo
54 54
 				<?php the_content(); ?>
55 55
 				<div  class="back-plan-btn">
56 56
 				<?php
57
-				if ( function_exists( 'wc_get_page_id' ) ) {
58
-					?>
57
+                    if ( function_exists( 'wc_get_page_id' ) ) {
58
+                         ?>
59 59
 					<a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Back To My Plan', 'lsx-health-plan' ); ?></a>
60 60
 					<?php
61
-				}
62
-				?>
61
+                    }
62
+                    ?>
63 63
 				</div>
64 64
 			</div>
65 65
 		</div>
66 66
 		<?php
67
-		wp_link_pages(
68
-			array(
69
-				'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
70
-				'after'       => '</div></div>',
71
-				'link_before' => '<span>',
72
-				'link_after'  => '</span>',
73
-			)
74
-		);
75
-		?>
67
+          wp_link_pages(
68
+               array(
69
+                    'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
70
+                    'after'       => '</div></div>',
71
+                    'link_before' => '<span>',
72
+                    'link_after'  => '</span>',
73
+               )
74
+          );
75
+          ?>
76 76
 	</div><!-- .entry-content -->
77 77
 
78 78
 	<footer class="footer-meta clearfix">
@@ -81,19 +81,19 @@  discard block
 block discarded – undo
81 81
 				<?php lsx_content_post_tags(); ?>
82 82
 
83 83
 				<?php
84
-				if ( class_exists( 'LSX_Sharing' ) ) {
85
-					lsx_content_sharing();
86
-				} else {
87
-					if ( function_exists( 'sharing_display' ) ) {
88
-						sharing_display( '', true );
89
-					}
84
+                    if ( class_exists( 'LSX_Sharing' ) ) {
85
+                         lsx_content_sharing();
86
+                    } else {
87
+                         if ( function_exists( 'sharing_display' ) ) {
88
+                              sharing_display( '', true );
89
+                         }
90 90
 
91
-					if ( class_exists( 'Jetpack_Likes' ) ) {
92
-						$custom_likes = new Jetpack_Likes();
93
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
94
-					}
95
-				}
96
-				?>
91
+                         if ( class_exists( 'Jetpack_Likes' ) ) {
92
+                              $custom_likes = new Jetpack_Likes();
93
+                              echo wp_kses_post( $custom_likes->post_likes( '' ) );
94
+                         }
95
+                    }
96
+                    ?>
97 97
 		<?php endif ?>
98 98
 	</footer><!-- .footer-meta -->
99 99
 
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.