Passed
Push — dependabot/github_actions/styf... ( 144303 )
by
unknown
09:25 queued 04:35
created
templates/tab-content-workout.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -28,35 +28,35 @@  discard block
 block discarded – undo
28 28
 		?>
29 29
 		<div class="single-plan-inner workout-content">
30 30
 			<?php
31
-			if ( ! is_singular( 'workout' ) ) { ?>
31
+			if ( ! is_singular('workout')) { ?>
32 32
 				<div class="single-plan-section-title workout">
33
-					<?php lsx_get_svg_icon( 'work.svg' ); ?>
34
-					<h2 class="title-lined"><?php esc_html_e( 'My Workout', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
33
+					<?php lsx_get_svg_icon('work.svg'); ?>
34
+					<h2 class="title-lined"><?php esc_html_e('My Workout', 'lsx-health-plan'); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
35 35
 				</div>
36 36
 			<?php } ?>
37 37
 			<?php
38
-			if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) {
38
+			if (lsx_health_plan_has_warmup() && ( ! is_singular('workout'))) {
39 39
 				?>
40 40
 				<div class="workout-instructions">
41 41
 					<div class="row">
42 42
 						<div class="col-md-6">
43
-							<h3><?php esc_html_e( "Don't forget your warm up!", 'lsx-health-plan' ); ?></h3>
44
-							<p><?php esc_html_e( 'Be sure to do the warm-up before every workout session.', 'lsx-health-plan' ); ?></p>
43
+							<h3><?php esc_html_e("Don't forget your warm up!", 'lsx-health-plan'); ?></h3>
44
+							<p><?php esc_html_e('Be sure to do the warm-up before every workout session.', 'lsx-health-plan'); ?></p>
45 45
 						</div>
46 46
 						<div class="col-md-6">
47 47
 							<div class="single-plan-inner-buttons">
48 48
 								<?php
49
-								$download = \lsx_health_plan\functions\get_option( 'download_page', false );
50
-								if ( ! empty( $download ) ) {
49
+								$download = \lsx_health_plan\functions\get_option('download_page', false);
50
+								if ( ! empty($download)) {
51 51
 									?>
52 52
 									<div class="complete-plan-btn">
53 53
 										<?php
54
-										echo wp_kses_post( do_shortcode( '[download id="' . $download . '"]' ) );
54
+										echo wp_kses_post(do_shortcode('[download id="' . $download . '"]'));
55 55
 										?>
56 56
 									</div>
57 57
 								<?php } ?>
58 58
 								<div  class="back-plan-btn">
59
-									<a class="btn secondary-btn wrm-up-btn" href="<?php the_permalink(); ?>warm-up/"><?php esc_html_e( 'See Warm-Up', 'lsx-health-plan' ); ?></a>
59
+									<a class="btn secondary-btn wrm-up-btn" href="<?php the_permalink(); ?>warm-up/"><?php esc_html_e('See Warm-Up', 'lsx-health-plan'); ?></a>
60 60
 								</div>
61 61
 							</div>
62 62
 						</div>
@@ -66,32 +66,32 @@  discard block
 block discarded – undo
66 66
 			}
67 67
 			?>
68 68
 			<!-- Pre Workout-->
69
-			<?php lsx_workout_snacks( 'pre' ); ?>
69
+			<?php lsx_workout_snacks('pre'); ?>
70 70
 
71 71
 			<?php lsx_health_plan_workout_sets(); ?>
72 72
 
73 73
 			<!-- Post Workout-->
74
-			<?php lsx_workout_snacks( 'post' ); ?>
74
+			<?php lsx_workout_snacks('post'); ?>
75 75
 		</div>
76 76
 
77 77
 	</div><!-- .entry-content -->
78 78
 
79 79
 	<footer class="footer-meta clearfix">
80
-		<?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
80
+		<?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?>
81 81
 			<div class="post-tags-wrapper">
82 82
 				<?php lsx_content_post_tags(); ?>
83 83
 
84 84
 				<?php
85
-				if ( class_exists( 'LSX_Sharing' ) ) {
85
+				if (class_exists('LSX_Sharing')) {
86 86
 					lsx_content_sharing();
87 87
 				} else {
88
-					if ( function_exists( 'sharing_display' ) ) {
89
-						sharing_display( '', true );
88
+					if (function_exists('sharing_display')) {
89
+						sharing_display('', true);
90 90
 					}
91 91
 
92
-					if ( class_exists( 'Jetpack_Likes' ) ) {
92
+					if (class_exists('Jetpack_Likes')) {
93 93
 						$custom_likes = new Jetpack_Likes();
94
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
94
+						echo wp_kses_post($custom_likes->post_likes(''));
95 95
 					}
96 96
 				}
97 97
 				?>
Please login to merge, or discard this patch.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -17,26 +17,26 @@  discard block
 block discarded – undo
17 17
 
18 18
 	<div class="entry-content">
19 19
 		<?php
20
-			wp_link_pages(
21
-				array(
22
-					'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
23
-					'after'       => '</div></div>',
24
-					'link_before' => '<span>',
25
-					'link_after'  => '</span>',
26
-				)
27
-			);
28
-		?>
20
+               wp_link_pages(
21
+                    array(
22
+                         'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
23
+                         'after'       => '</div></div>',
24
+                         'link_before' => '<span>',
25
+                         'link_after'  => '</span>',
26
+                    )
27
+               );
28
+          ?>
29 29
 		<div class="single-plan-inner workout-content">
30 30
 			<?php
31
-			if ( ! is_singular( 'workout' ) ) { ?>
31
+               if ( ! is_singular( 'workout' ) ) { ?>
32 32
 				<div class="single-plan-section-title workout">
33 33
 					<?php lsx_get_svg_icon( 'work.svg' ); ?>
34 34
 					<h2 class="title-lined"><?php esc_html_e( 'My Workout', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
35 35
 				</div>
36 36
 			<?php } ?>
37 37
 			<?php
38
-			if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) {
39
-				?>
38
+               if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) {
39
+                    ?>
40 40
 				<div class="workout-instructions">
41 41
 					<div class="row">
42 42
 						<div class="col-md-6">
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 						<div class="col-md-6">
47 47
 							<div class="single-plan-inner-buttons">
48 48
 								<?php
49
-								$download = \lsx_health_plan\functions\get_option( 'download_page', false );
50
-								if ( ! empty( $download ) ) {
51
-									?>
49
+                                        $download = \lsx_health_plan\functions\get_option( 'download_page', false );
50
+                                        if ( ! empty( $download ) ) {
51
+                                             ?>
52 52
 									<div class="complete-plan-btn">
53 53
 										<?php
54
-										echo wp_kses_post( do_shortcode( '[download id="' . $download . '"]' ) );
55
-										?>
54
+                                                  echo wp_kses_post( do_shortcode( '[download id="' . $download . '"]' ) );
55
+                                                  ?>
56 56
 									</div>
57 57
 								<?php } ?>
58 58
 								<div  class="back-plan-btn">
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 					</div>
64 64
 				</div>
65 65
 				<?php
66
-			}
67
-			?>
66
+               }
67
+               ?>
68 68
 			<!-- Pre Workout-->
69 69
 			<?php lsx_workout_snacks( 'pre' ); ?>
70 70
 
@@ -82,19 +82,19 @@  discard block
 block discarded – undo
82 82
 				<?php lsx_content_post_tags(); ?>
83 83
 
84 84
 				<?php
85
-				if ( class_exists( 'LSX_Sharing' ) ) {
86
-					lsx_content_sharing();
87
-				} else {
88
-					if ( function_exists( 'sharing_display' ) ) {
89
-						sharing_display( '', true );
90
-					}
85
+                    if ( class_exists( 'LSX_Sharing' ) ) {
86
+                         lsx_content_sharing();
87
+                    } else {
88
+                         if ( function_exists( 'sharing_display' ) ) {
89
+                              sharing_display( '', true );
90
+                         }
91 91
 
92
-					if ( class_exists( 'Jetpack_Likes' ) ) {
93
-						$custom_likes = new Jetpack_Likes();
94
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
95
-					}
96
-				}
97
-				?>
92
+                         if ( class_exists( 'Jetpack_Likes' ) ) {
93
+                              $custom_likes = new Jetpack_Likes();
94
+                              echo wp_kses_post( $custom_likes->post_likes( '' ) );
95
+                         }
96
+                    }
97
+                    ?>
98 98
 		<?php endif ?>
99 99
 	</footer><!-- .footer-meta -->
100 100
 
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.
templates/tab-content-meal.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 
17 17
 	<div class="entry-content">
18 18
 		<div class="single-plan-section-title meal-plan">
19
-			<?php lsx_get_svg_icon( 'meal.svg' ); ?>
20
-			<h2 class="title-lined"><?php esc_html_e( 'My Meal Plan', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
19
+			<?php lsx_get_svg_icon('meal.svg'); ?>
20
+			<h2 class="title-lined"><?php esc_html_e('My Meal Plan', 'lsx-health-plan'); ?> <span class="blue-title"><?php the_title(); ?></span></h2>
21 21
 		</div>
22 22
 		<div class="single-plan-inner meal-content">
23 23
 			<?php require LSX_HEALTH_PLAN_PATH . 'templates/partials/meal-plans.php'; ?>
@@ -25,21 +25,21 @@  discard block
 block discarded – undo
25 25
 	</div><!-- .entry-content -->
26 26
 
27 27
 	<footer class="footer-meta clearfix">
28
-		<?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
28
+		<?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?>
29 29
 			<div class="post-tags-wrapper">
30 30
 				<?php lsx_content_post_tags(); ?>
31 31
 
32 32
 				<?php
33
-				if ( class_exists( 'LSX_Sharing' ) ) {
33
+				if (class_exists('LSX_Sharing')) {
34 34
 					lsx_content_sharing();
35 35
 				} else {
36
-					if ( function_exists( 'sharing_display' ) ) {
37
-						sharing_display( '', true );
36
+					if (function_exists('sharing_display')) {
37
+						sharing_display('', true);
38 38
 					}
39 39
 
40
-					if ( class_exists( 'Jetpack_Likes' ) ) {
40
+					if (class_exists('Jetpack_Likes')) {
41 41
 						$custom_likes = new Jetpack_Likes();
42
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
42
+						echo wp_kses_post($custom_likes->post_likes(''));
43 43
 					}
44 44
 				}
45 45
 				?>
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@
 block discarded – undo
30 30
 				<?php lsx_content_post_tags(); ?>
31 31
 
32 32
 				<?php
33
-				if ( class_exists( 'LSX_Sharing' ) ) {
34
-					lsx_content_sharing();
35
-				} else {
36
-					if ( function_exists( 'sharing_display' ) ) {
37
-						sharing_display( '', true );
38
-					}
39
-
40
-					if ( class_exists( 'Jetpack_Likes' ) ) {
41
-						$custom_likes = new Jetpack_Likes();
42
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
43
-					}
44
-				}
45
-				?>
33
+                    if ( class_exists( 'LSX_Sharing' ) ) {
34
+                         lsx_content_sharing();
35
+                    } else {
36
+                         if ( function_exists( 'sharing_display' ) ) {
37
+                              sharing_display( '', true );
38
+                         }
39
+
40
+                         if ( class_exists( 'Jetpack_Likes' ) ) {
41
+                              $custom_likes = new Jetpack_Likes();
42
+                              echo wp_kses_post( $custom_likes->post_likes( '' ) );
43
+                         }
44
+                    }
45
+                    ?>
46 46
 		<?php endif ?>
47 47
 	</footer><!-- .footer-meta -->
48 48
 
Please login to merge, or discard this patch.
templates/table-exercise-data.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@  discard block
 block discarded – undo
5 5
 $muscle_group = lsx_health_plan_muscle_group_equipment();
6 6
 
7 7
 ?>
8
-<?php if ( ( ! empty( $type ) ) || ( ! empty( $equipment ) ) || ( ! empty( $muscle_group ) ) ) { ?>
8
+<?php if (( ! empty($type)) || ( ! empty($equipment)) || ( ! empty($muscle_group))) { ?>
9 9
 <table class="exercise-table">
10 10
 	<tbody>
11 11
 		<?php
12
-		if ( ! empty( $type ) ) {
12
+		if ( ! empty($type)) {
13 13
 		?>
14 14
 			<tr class="types">
15
-				<td><?php esc_html_e( 'Type:', 'lsx-health-plan' ); ?>&nbsp</td>
15
+				<td><?php esc_html_e('Type:', 'lsx-health-plan'); ?>&nbsp</td>
16 16
 				<td>
17 17
 				<?php
18
-					echo wp_kses_post( $type );
18
+					echo wp_kses_post($type);
19 19
 				?>
20 20
 				</td>
21 21
 			</tr>
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 		}
24 24
 		?>
25 25
 		<?php
26
-		if ( ! empty( $muscle_group ) ) {
26
+		if ( ! empty($muscle_group)) {
27 27
 		?>
28 28
 			<tr class="muscle-group">
29
-				<td><?php esc_html_e( 'Muscle Group:', 'lsx-health-plan' ); ?>&nbsp</td>
29
+				<td><?php esc_html_e('Muscle Group:', 'lsx-health-plan'); ?>&nbsp</td>
30 30
 				<td>
31 31
 				<?php
32
-					echo wp_kses_post( $muscle_group );
32
+					echo wp_kses_post($muscle_group);
33 33
 				?>
34 34
 				</td>
35 35
 			</tr>
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 		}
38 38
 		?>
39 39
 		<?php
40
-		if ( ! empty( $equipment ) ) {
40
+		if ( ! empty($equipment)) {
41 41
 		?>
42 42
 			<tr class="equipment">
43
-				<td><?php esc_html_e( 'Equipment:', 'lsx-health-plan' ); ?>&nbsp</td>
43
+				<td><?php esc_html_e('Equipment:', 'lsx-health-plan'); ?>&nbsp</td>
44 44
 				<td>
45 45
 				<?php
46
-					echo wp_kses_post( $equipment );
46
+					echo wp_kses_post($equipment);
47 47
 				?>
48 48
 				</td>
49 49
 			</tr>
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,47 +9,47 @@
 block discarded – undo
9 9
 <table class="exercise-table">
10 10
 	<tbody>
11 11
 		<?php
12
-		if ( ! empty( $type ) ) {
13
-		?>
12
+          if ( ! empty( $type ) ) {
13
+          ?>
14 14
 			<tr class="types">
15 15
 				<td><?php esc_html_e( 'Type:', 'lsx-health-plan' ); ?>&nbsp</td>
16 16
 				<td>
17 17
 				<?php
18
-					echo wp_kses_post( $type );
19
-				?>
18
+                         echo wp_kses_post( $type );
19
+                    ?>
20 20
 				</td>
21 21
 			</tr>
22 22
 		<?php
23
-		}
24
-		?>
23
+          }
24
+          ?>
25 25
 		<?php
26
-		if ( ! empty( $muscle_group ) ) {
27
-		?>
26
+          if ( ! empty( $muscle_group ) ) {
27
+          ?>
28 28
 			<tr class="muscle-group">
29 29
 				<td><?php esc_html_e( 'Muscle Group:', 'lsx-health-plan' ); ?>&nbsp</td>
30 30
 				<td>
31 31
 				<?php
32
-					echo wp_kses_post( $muscle_group );
33
-				?>
32
+                         echo wp_kses_post( $muscle_group );
33
+                    ?>
34 34
 				</td>
35 35
 			</tr>
36 36
 		<?php
37
-		}
38
-		?>
37
+          }
38
+          ?>
39 39
 		<?php
40
-		if ( ! empty( $equipment ) ) {
41
-		?>
40
+          if ( ! empty( $equipment ) ) {
41
+          ?>
42 42
 			<tr class="equipment">
43 43
 				<td><?php esc_html_e( 'Equipment:', 'lsx-health-plan' ); ?>&nbsp</td>
44 44
 				<td>
45 45
 				<?php
46
-					echo wp_kses_post( $equipment );
47
-				?>
46
+                         echo wp_kses_post( $equipment );
47
+                    ?>
48 48
 				</td>
49 49
 			</tr>
50 50
 		<?php
51
-		}
52
-		?>
51
+          }
52
+          ?>
53 53
 	</tbody>
54 54
 </table>
55 55
 <?php } ?>
Please login to merge, or discard this patch.
templates/table-recipe-data.php 2 patches
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$prep_time     = get_post_meta( get_the_ID(), 'recipe_prep_time', true );
3
-$cooking_time  = get_post_meta( get_the_ID(), 'recipe_cooking_time', true );
4
-$serves        = get_post_meta( get_the_ID(), 'recipe_serves', true );
5
-$portion       = get_post_meta( get_the_ID(), 'recipe_portion', true );
6
-$energy        = get_post_meta( get_the_ID(), 'recipe_energy', true );
7
-$protein       = get_post_meta( get_the_ID(), 'recipe_protein', true );
8
-$carbohydrates = get_post_meta( get_the_ID(), 'recipe_carbohydrates', true );
9
-$fibre         = get_post_meta( get_the_ID(), 'recipe_fibre', true );
10
-$fat           = get_post_meta( get_the_ID(), 'recipe_fat', true );
2
+$prep_time     = get_post_meta(get_the_ID(), 'recipe_prep_time', true);
3
+$cooking_time  = get_post_meta(get_the_ID(), 'recipe_cooking_time', true);
4
+$serves        = get_post_meta(get_the_ID(), 'recipe_serves', true);
5
+$portion       = get_post_meta(get_the_ID(), 'recipe_portion', true);
6
+$energy        = get_post_meta(get_the_ID(), 'recipe_energy', true);
7
+$protein       = get_post_meta(get_the_ID(), 'recipe_protein', true);
8
+$carbohydrates = get_post_meta(get_the_ID(), 'recipe_carbohydrates', true);
9
+$fibre         = get_post_meta(get_the_ID(), 'recipe_fibre', true);
10
+$fat           = get_post_meta(get_the_ID(), 'recipe_fat', true);
11 11
 ?>
12
-<?php if ( ( ! empty( $prep_time ) ) || ( ! empty( $cooking_time ) ) || ( ! empty( $serves ) ) || ( ! empty( $portion ) ) ) { ?>
12
+<?php if (( ! empty($prep_time)) || ( ! empty($cooking_time)) || ( ! empty($serves)) || ( ! empty($portion))) { ?>
13 13
 <table class="recipe-table cooking-info-table">
14
-	<?php if ( is_single() && is_singular( 'recipe' ) ) { ?>
14
+	<?php if (is_single() && is_singular('recipe')) { ?>
15 15
 		<thead>
16 16
 			<tr>
17 17
 				<th>Cooking Info</th>
@@ -20,29 +20,29 @@  discard block
 block discarded – undo
20 20
 	<?php } ?>
21 21
 	<tbody>
22 22
 		<?php
23
-		if ( 1 >= (int) $serves ) {
23
+		if (1 >= (int) $serves) {
24 24
 			$serves       = '1';
25
-			$serves_label = __( 'Person', 'lsx-health-plan' );
25
+			$serves_label = __('Person', 'lsx-health-plan');
26 26
 		} else {
27
-			$serves_label = __( 'People', 'lsx-health-plan' );
27
+			$serves_label = __('People', 'lsx-health-plan');
28 28
 		}
29 29
 		?>
30 30
 		<tr class="serves">
31
-			<td><?php esc_html_e( 'Serves:', 'lsx-health-plan' ); ?>&nbsp</td>
31
+			<td><?php esc_html_e('Serves:', 'lsx-health-plan'); ?>&nbsp</td>
32 32
 			<td>
33 33
 			<?php
34
-				echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label );
34
+				echo wp_kses_post($serves) . ' ' . esc_html($serves_label);
35 35
 			?>
36 36
 			</td>
37 37
 		</tr>
38 38
 		<?php
39
-		if ( ! empty( $prep_time ) ) {
39
+		if ( ! empty($prep_time)) {
40 40
 		?>
41 41
 		<tr class="prep-time">
42
-		<td><?php esc_html_e( 'Prep time: ', 'lsx-health-plan' ); ?>&nbsp</td>
42
+		<td><?php esc_html_e('Prep time: ', 'lsx-health-plan'); ?>&nbsp</td>
43 43
 			<td>
44 44
 			<?php
45
-				echo wp_kses_post( $prep_time );
45
+				echo wp_kses_post($prep_time);
46 46
 			?>
47 47
 			</td>
48 48
 		</tr>
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 		}
51 51
 		?>
52 52
 		<?php
53
-		if ( ! empty( $cooking_time ) ) {
53
+		if ( ! empty($cooking_time)) {
54 54
 		?>
55 55
 		<tr class="cooking-time">
56
-			<td><?php esc_html_e( 'Cooking time: ', 'lsx-health-plan' ); ?>&nbsp</td>
56
+			<td><?php esc_html_e('Cooking time: ', 'lsx-health-plan'); ?>&nbsp</td>
57 57
 			<td>
58 58
 			<?php
59
-				echo wp_kses_post( $cooking_time );
59
+				echo wp_kses_post($cooking_time);
60 60
 			?>
61 61
 			</td>
62 62
 		</tr>
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 		}
65 65
 		?>
66 66
 		<?php
67
-		if ( ! empty( $portion ) ) {
67
+		if ( ! empty($portion)) {
68 68
 		?>
69 69
 		<tr class="portion-size">
70
-			<td><?php esc_html_e( 'Portion size: ', 'lsx-health-plan' ); ?>&nbsp</td>
70
+			<td><?php esc_html_e('Portion size: ', 'lsx-health-plan'); ?>&nbsp</td>
71 71
 			<td>
72 72
 			<?php
73
-				echo wp_kses_post( $portion );
73
+				echo wp_kses_post($portion);
74 74
 			?>
75 75
 			</td>
76 76
 		</tr>
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	</tbody>
81 81
 </table>
82 82
 <?php } ?>
83
-<?php if ( is_single() && is_singular( 'recipe' ) && ( ( ! empty( $energy ) ) || ( ! empty( $protein ) ) || ( ! empty( $carbohydrates ) ) || ( ! empty( $fibre ) ) || ( ! empty( $fat ) ) ) ) { ?>
83
+<?php if (is_single() && is_singular('recipe') && (( ! empty($energy)) || ( ! empty($protein)) || ( ! empty($carbohydrates)) || ( ! empty($fibre)) || ( ! empty($fat)))) { ?>
84 84
 	<table class="recipe-table nutritional-info-table">
85 85
 		<thead>
86 86
 			<tr>
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 		</thead>
90 90
 		<tbody>
91 91
 			<?php
92
-			if ( ! empty( $energy ) ) {
92
+			if ( ! empty($energy)) {
93 93
 			?>
94 94
 			<tr class="energy">
95
-			<td><?php esc_html_e( 'Energy: ', 'lsx-health-plan' ); ?>&nbsp</td>
95
+			<td><?php esc_html_e('Energy: ', 'lsx-health-plan'); ?>&nbsp</td>
96 96
 				<td>
97 97
 				<?php
98
-					echo wp_kses_post( $energy );
98
+					echo wp_kses_post($energy);
99 99
 				?>
100 100
 				</td>
101 101
 			</tr>
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
 			}
104 104
 			?>
105 105
 			<?php
106
-			if ( ! empty( $protein ) ) {
106
+			if ( ! empty($protein)) {
107 107
 			?>
108 108
 			<tr class="protein">
109
-			<td><?php esc_html_e( 'Protein: ', 'lsx-health-plan' ); ?>&nbsp</td>
109
+			<td><?php esc_html_e('Protein: ', 'lsx-health-plan'); ?>&nbsp</td>
110 110
 				<td>
111 111
 				<?php
112
-					echo wp_kses_post( $protein );
112
+					echo wp_kses_post($protein);
113 113
 				?>
114 114
 				</td>
115 115
 			</tr>
@@ -117,13 +117,13 @@  discard block
 block discarded – undo
117 117
 			}
118 118
 			?>
119 119
 			<?php
120
-			if ( ! empty( $carbohydrates ) ) {
120
+			if ( ! empty($carbohydrates)) {
121 121
 			?>
122 122
 			<tr class="carbohydrates">
123
-			<td><?php esc_html_e( 'Carbohydrates: ', 'lsx-health-plan' ); ?>&nbsp</td>
123
+			<td><?php esc_html_e('Carbohydrates: ', 'lsx-health-plan'); ?>&nbsp</td>
124 124
 				<td>
125 125
 				<?php
126
-					echo wp_kses_post( $carbohydrates );
126
+					echo wp_kses_post($carbohydrates);
127 127
 				?>
128 128
 				</td>
129 129
 			</tr>
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
 			}
132 132
 			?>
133 133
 			<?php
134
-			if ( ! empty( $fibre ) ) {
134
+			if ( ! empty($fibre)) {
135 135
 			?>
136 136
 			<tr class="fibre">
137
-			<td><?php esc_html_e( 'Fibre: ', 'lsx-health-plan' ); ?>&nbsp</td>
137
+			<td><?php esc_html_e('Fibre: ', 'lsx-health-plan'); ?>&nbsp</td>
138 138
 				<td>
139 139
 				<?php
140
-					echo wp_kses_post( $fibre );
140
+					echo wp_kses_post($fibre);
141 141
 				?>
142 142
 				</td>
143 143
 			</tr>
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 			}
146 146
 			?>
147 147
 			<?php
148
-			if ( ! empty( $fat ) ) {
148
+			if ( ! empty($fat)) {
149 149
 			?>
150 150
 			<tr class="fat">
151
-			<td><?php esc_html_e( 'Fat: ', 'lsx-health-plan' ); ?>&nbsp</td>
151
+			<td><?php esc_html_e('Fat: ', 'lsx-health-plan'); ?>&nbsp</td>
152 152
 				<td>
153 153
 				<?php
154
-					echo wp_kses_post( $fat );
154
+					echo wp_kses_post($fat);
155 155
 				?>
156 156
 				</td>
157 157
 			</tr>
Please login to merge, or discard this patch.
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -20,63 +20,63 @@  discard block
 block discarded – undo
20 20
 	<?php } ?>
21 21
 	<tbody>
22 22
 		<?php
23
-		if ( 1 >= (int) $serves ) {
24
-			$serves       = '1';
25
-			$serves_label = __( 'Person', 'lsx-health-plan' );
26
-		} else {
27
-			$serves_label = __( 'People', 'lsx-health-plan' );
28
-		}
29
-		?>
23
+          if ( 1 >= (int) $serves ) {
24
+               $serves       = '1';
25
+               $serves_label = __( 'Person', 'lsx-health-plan' );
26
+          } else {
27
+               $serves_label = __( 'People', 'lsx-health-plan' );
28
+          }
29
+          ?>
30 30
 		<tr class="serves">
31 31
 			<td><?php esc_html_e( 'Serves:', 'lsx-health-plan' ); ?>&nbsp</td>
32 32
 			<td>
33 33
 			<?php
34
-				echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label );
35
-			?>
34
+                    echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label );
35
+               ?>
36 36
 			</td>
37 37
 		</tr>
38 38
 		<?php
39
-		if ( ! empty( $prep_time ) ) {
40
-		?>
39
+          if ( ! empty( $prep_time ) ) {
40
+          ?>
41 41
 		<tr class="prep-time">
42 42
 		<td><?php esc_html_e( 'Prep time: ', 'lsx-health-plan' ); ?>&nbsp</td>
43 43
 			<td>
44 44
 			<?php
45
-				echo wp_kses_post( $prep_time );
46
-			?>
45
+                    echo wp_kses_post( $prep_time );
46
+               ?>
47 47
 			</td>
48 48
 		</tr>
49 49
 		<?php
50
-		}
51
-		?>
50
+          }
51
+          ?>
52 52
 		<?php
53
-		if ( ! empty( $cooking_time ) ) {
54
-		?>
53
+          if ( ! empty( $cooking_time ) ) {
54
+          ?>
55 55
 		<tr class="cooking-time">
56 56
 			<td><?php esc_html_e( 'Cooking time: ', 'lsx-health-plan' ); ?>&nbsp</td>
57 57
 			<td>
58 58
 			<?php
59
-				echo wp_kses_post( $cooking_time );
60
-			?>
59
+                    echo wp_kses_post( $cooking_time );
60
+               ?>
61 61
 			</td>
62 62
 		</tr>
63 63
 		<?php
64
-		}
65
-		?>
64
+          }
65
+          ?>
66 66
 		<?php
67
-		if ( ! empty( $portion ) ) {
68
-		?>
67
+          if ( ! empty( $portion ) ) {
68
+          ?>
69 69
 		<tr class="portion-size">
70 70
 			<td><?php esc_html_e( 'Portion size: ', 'lsx-health-plan' ); ?>&nbsp</td>
71 71
 			<td>
72 72
 			<?php
73
-				echo wp_kses_post( $portion );
74
-			?>
73
+                    echo wp_kses_post( $portion );
74
+               ?>
75 75
 			</td>
76 76
 		</tr>
77 77
 		<?php
78
-		}
79
-		?>
78
+          }
79
+          ?>
80 80
 	</tbody>
81 81
 </table>
82 82
 <?php } ?>
@@ -89,75 +89,75 @@  discard block
 block discarded – undo
89 89
 		</thead>
90 90
 		<tbody>
91 91
 			<?php
92
-			if ( ! empty( $energy ) ) {
93
-			?>
92
+               if ( ! empty( $energy ) ) {
93
+               ?>
94 94
 			<tr class="energy">
95 95
 			<td><?php esc_html_e( 'Energy: ', 'lsx-health-plan' ); ?>&nbsp</td>
96 96
 				<td>
97 97
 				<?php
98
-					echo wp_kses_post( $energy );
99
-				?>
98
+                         echo wp_kses_post( $energy );
99
+                    ?>
100 100
 				</td>
101 101
 			</tr>
102 102
 			<?php
103
-			}
104
-			?>
103
+               }
104
+               ?>
105 105
 			<?php
106
-			if ( ! empty( $protein ) ) {
107
-			?>
106
+               if ( ! empty( $protein ) ) {
107
+               ?>
108 108
 			<tr class="protein">
109 109
 			<td><?php esc_html_e( 'Protein: ', 'lsx-health-plan' ); ?>&nbsp</td>
110 110
 				<td>
111 111
 				<?php
112
-					echo wp_kses_post( $protein );
113
-				?>
112
+                         echo wp_kses_post( $protein );
113
+                    ?>
114 114
 				</td>
115 115
 			</tr>
116 116
 			<?php
117
-			}
118
-			?>
117
+               }
118
+               ?>
119 119
 			<?php
120
-			if ( ! empty( $carbohydrates ) ) {
121
-			?>
120
+               if ( ! empty( $carbohydrates ) ) {
121
+               ?>
122 122
 			<tr class="carbohydrates">
123 123
 			<td><?php esc_html_e( 'Carbohydrates: ', 'lsx-health-plan' ); ?>&nbsp</td>
124 124
 				<td>
125 125
 				<?php
126
-					echo wp_kses_post( $carbohydrates );
127
-				?>
126
+                         echo wp_kses_post( $carbohydrates );
127
+                    ?>
128 128
 				</td>
129 129
 			</tr>
130 130
 			<?php
131
-			}
132
-			?>
131
+               }
132
+               ?>
133 133
 			<?php
134
-			if ( ! empty( $fibre ) ) {
135
-			?>
134
+               if ( ! empty( $fibre ) ) {
135
+               ?>
136 136
 			<tr class="fibre">
137 137
 			<td><?php esc_html_e( 'Fibre: ', 'lsx-health-plan' ); ?>&nbsp</td>
138 138
 				<td>
139 139
 				<?php
140
-					echo wp_kses_post( $fibre );
141
-				?>
140
+                         echo wp_kses_post( $fibre );
141
+                    ?>
142 142
 				</td>
143 143
 			</tr>
144 144
 			<?php
145
-			}
146
-			?>
145
+               }
146
+               ?>
147 147
 			<?php
148
-			if ( ! empty( $fat ) ) {
149
-			?>
148
+               if ( ! empty( $fat ) ) {
149
+               ?>
150 150
 			<tr class="fat">
151 151
 			<td><?php esc_html_e( 'Fat: ', 'lsx-health-plan' ); ?>&nbsp</td>
152 152
 				<td>
153 153
 				<?php
154
-					echo wp_kses_post( $fat );
155
-				?>
154
+                         echo wp_kses_post( $fat );
155
+                    ?>
156 156
 				</td>
157 157
 			</tr>
158 158
 			<?php
159
-			}
160
-			?>
159
+               }
160
+               ?>
161 161
 		</tbody>
162 162
 	</table>
163 163
 <?php } ?>
Please login to merge, or discard this patch.
templates/single-plan-tabs.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,42 +8,42 @@
 block discarded – undo
8 8
 ?>
9 9
 <div id="single-plan-nav">
10 10
 	<ul class="nav nav-pills">
11
-		<li class="<?php lsx_health_plan_nav_class( '' ); ?>"><a class="overview-tab" href="<?php the_permalink(); ?>"><?php lsx_get_svg_icon( 'eye.svg' ); ?> <?php esc_html_e( 'Overview', 'lsx-health-plan' ); ?></a></li>
11
+		<li class="<?php lsx_health_plan_nav_class(''); ?>"><a class="overview-tab" href="<?php the_permalink(); ?>"><?php lsx_get_svg_icon('eye.svg'); ?> <?php esc_html_e('Overview', 'lsx-health-plan'); ?></a></li>
12 12
 		<?php
13
-		if ( lsx_health_plan_has_warmup() ) {
14
-			$warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
15
-			if ( false === $warm_up ) {
13
+		if (lsx_health_plan_has_warmup()) {
14
+			$warm_up = \lsx_health_plan\functions\get_option('endpoint_warm_up', false);
15
+			if (false === $warm_up) {
16 16
 				$warm_up = 'warm-up';
17 17
 			}
18 18
 			?>
19
-				<li class="<?php lsx_health_plan_nav_class( 'warm-up' ); ?>"><a class="warm-up-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $warm_up ); ?>/"><?php lsx_get_svg_icon( 'warm.svg' ); ?> <?php esc_html_e( 'Warm-up', 'lsx-health-plan' ); ?></a></li>				
19
+				<li class="<?php lsx_health_plan_nav_class('warm-up'); ?>"><a class="warm-up-tab" href="<?php the_permalink(); ?><?php echo esc_attr($warm_up); ?>/"><?php lsx_get_svg_icon('warm.svg'); ?> <?php esc_html_e('Warm-up', 'lsx-health-plan'); ?></a></li>				
20 20
 			<?php
21 21
 		}
22
-		if ( lsx_health_plan_has_workout() ) {
23
-			$workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
24
-			if ( false === $workout ) {
22
+		if (lsx_health_plan_has_workout()) {
23
+			$workout = \lsx_health_plan\functions\get_option('endpoint_workout', false);
24
+			if (false === $workout) {
25 25
 				$workout = 'workout';
26 26
 			}
27 27
 			?>
28
-				<li class="<?php lsx_health_plan_nav_class( 'workout' ); ?>"><a class="workout-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $workout ); ?>/"><?php lsx_get_svg_icon( 'work.svg' ); ?> <?php esc_html_e( 'Workout', 'lsx-health-plan' ); ?></a></li>
28
+				<li class="<?php lsx_health_plan_nav_class('workout'); ?>"><a class="workout-tab" href="<?php the_permalink(); ?><?php echo esc_attr($workout); ?>/"><?php lsx_get_svg_icon('work.svg'); ?> <?php esc_html_e('Workout', 'lsx-health-plan'); ?></a></li>
29 29
 			<?php
30 30
 		}
31
-		if ( lsx_health_plan_has_meal() ) {
32
-			$meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
33
-			if ( false === $meal ) {
31
+		if (lsx_health_plan_has_meal()) {
32
+			$meal = \lsx_health_plan\functions\get_option('endpoint_meal', false);
33
+			if (false === $meal) {
34 34
 				$meal = 'meal';
35 35
 			}
36 36
 			?>
37
-				<li class="<?php lsx_health_plan_nav_class( 'meal' ); ?>"><a class="meal-plan-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $meal ); ?>/"><?php lsx_get_svg_icon( 'meal.svg' ); ?> <?php esc_html_e( 'Meal Plan', 'lsx-health-plan' ); ?></a></li>
37
+				<li class="<?php lsx_health_plan_nav_class('meal'); ?>"><a class="meal-plan-tab" href="<?php the_permalink(); ?><?php echo esc_attr($meal); ?>/"><?php lsx_get_svg_icon('meal.svg'); ?> <?php esc_html_e('Meal Plan', 'lsx-health-plan'); ?></a></li>
38 38
 			<?php
39 39
 		}
40
-		if ( lsx_health_plan_has_recipe() ) {
41
-			$recipe = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false );
42
-			if ( false === $recipe ) {
40
+		if (lsx_health_plan_has_recipe()) {
41
+			$recipe = \lsx_health_plan\functions\get_option('endpoint_recipe', false);
42
+			if (false === $recipe) {
43 43
 				$recipe = 'recipes';
44 44
 			}
45 45
 			?>
46
-				<li class="<?php lsx_health_plan_nav_class( 'recipes' ); ?>"><a class="recipes-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $recipe ); ?>/"><?php lsx_get_svg_icon( 'recipes.svg' ); ?> <?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?></a></li>
46
+				<li class="<?php lsx_health_plan_nav_class('recipes'); ?>"><a class="recipes-tab" href="<?php the_permalink(); ?><?php echo esc_attr($recipe); ?>/"><?php lsx_get_svg_icon('recipes.svg'); ?> <?php esc_html_e('Recipes', 'lsx-health-plan'); ?></a></li>
47 47
 			<?php
48 48
 		}
49 49
 		?>
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -10,42 +10,42 @@
 block discarded – undo
10 10
 	<ul class="nav nav-pills">
11 11
 		<li class="<?php lsx_health_plan_nav_class( '' ); ?>"><a class="overview-tab" href="<?php the_permalink(); ?>"><?php lsx_get_svg_icon( 'eye.svg' ); ?> <?php esc_html_e( 'Overview', 'lsx-health-plan' ); ?></a></li>
12 12
 		<?php
13
-		if ( lsx_health_plan_has_warmup() ) {
14
-			$warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
15
-			if ( false === $warm_up ) {
16
-				$warm_up = 'warm-up';
17
-			}
18
-			?>
13
+          if ( lsx_health_plan_has_warmup() ) {
14
+               $warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
15
+               if ( false === $warm_up ) {
16
+                    $warm_up = 'warm-up';
17
+               }
18
+               ?>
19 19
 				<li class="<?php lsx_health_plan_nav_class( 'warm-up' ); ?>"><a class="warm-up-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $warm_up ); ?>/"><?php lsx_get_svg_icon( 'warm.svg' ); ?> <?php esc_html_e( 'Warm-up', 'lsx-health-plan' ); ?></a></li>				
20 20
 			<?php
21
-		}
22
-		if ( lsx_health_plan_has_workout() ) {
23
-			$workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
24
-			if ( false === $workout ) {
25
-				$workout = 'workout';
26
-			}
27
-			?>
21
+          }
22
+          if ( lsx_health_plan_has_workout() ) {
23
+               $workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
24
+               if ( false === $workout ) {
25
+                    $workout = 'workout';
26
+               }
27
+               ?>
28 28
 				<li class="<?php lsx_health_plan_nav_class( 'workout' ); ?>"><a class="workout-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $workout ); ?>/"><?php lsx_get_svg_icon( 'work.svg' ); ?> <?php esc_html_e( 'Workout', 'lsx-health-plan' ); ?></a></li>
29 29
 			<?php
30
-		}
31
-		if ( lsx_health_plan_has_meal() ) {
32
-			$meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
33
-			if ( false === $meal ) {
34
-				$meal = 'meal';
35
-			}
36
-			?>
30
+          }
31
+          if ( lsx_health_plan_has_meal() ) {
32
+               $meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
33
+               if ( false === $meal ) {
34
+                    $meal = 'meal';
35
+               }
36
+               ?>
37 37
 				<li class="<?php lsx_health_plan_nav_class( 'meal' ); ?>"><a class="meal-plan-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $meal ); ?>/"><?php lsx_get_svg_icon( 'meal.svg' ); ?> <?php esc_html_e( 'Meal Plan', 'lsx-health-plan' ); ?></a></li>
38 38
 			<?php
39
-		}
40
-		if ( lsx_health_plan_has_recipe() ) {
41
-			$recipe = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false );
42
-			if ( false === $recipe ) {
43
-				$recipe = 'recipes';
44
-			}
45
-			?>
39
+          }
40
+          if ( lsx_health_plan_has_recipe() ) {
41
+               $recipe = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false );
42
+               if ( false === $recipe ) {
43
+                    $recipe = 'recipes';
44
+               }
45
+               ?>
46 46
 				<li class="<?php lsx_health_plan_nav_class( 'recipes' ); ?>"><a class="recipes-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $recipe ); ?>/"><?php lsx_get_svg_icon( 'recipes.svg' ); ?> <?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?></a></li>
47 47
 			<?php
48
-		}
49
-		?>
48
+          }
49
+          ?>
50 50
 	</ul>
51 51
 </div>
Please login to merge, or discard this patch.
includes/shortcodes.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function restricted_content() {
16 16
 	$content = '';
17
-	if ( ! is_user_logged_in() ) {
17
+	if ( ! is_user_logged_in()) {
18 18
 		ob_start();
19
-		echo do_shortcode( '[woocommerce_my_account]' );
19
+		echo do_shortcode('[woocommerce_my_account]');
20 20
 		$content = ob_get_clean();
21 21
 	}
22 22
 	return $content;
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
  *
52 52
  * @return void
53 53
  */
54
-function day_plan_box( $args = array() ) {
54
+function day_plan_box($args = array()) {
55 55
 	$defaults = array(
56 56
 		'week_view'      => false,
57 57
 		'show_downloads' => false,
58 58
 	);
59
-	$args     = wp_parse_args( $args, $defaults );
59
+	$args = wp_parse_args($args, $defaults);
60 60
 	ob_start();
61
-	if ( false === $args['week_view'] ) {
61
+	if (false === $args['week_view']) {
62 62
 		echo lsx_health_plan_day_plan_block(); // WPCS: XSS OK.
63 63
 	} else {
64
-		echo lsx_health_plan_week_plan_block( $args ); // WPCS: XSS OK.
64
+		echo lsx_health_plan_week_plan_block($args); // WPCS: XSS OK.
65 65
 	}
66 66
 	$content = ob_get_clean();
67 67
 	return $content;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  * @param array $args
74 74
  * @return void
75 75
  */
76
-function exercise_box( $args = array() ) {
76
+function exercise_box($args = array()) {
77 77
 	$defaults = array(
78 78
 		'include'       => '',
79 79
 		'term'          => '',
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
 		'parent'        => false,
93 93
 		'modal_content' => 'excerpt',
94 94
 	);
95
-	$args     = wp_parse_args( $args, $defaults );
95
+	$args = wp_parse_args($args, $defaults);
96 96
 	ob_start();
97
-	echo lsx_health_plan_items( $args ); // WPCS: XSS OK.
97
+	echo lsx_health_plan_items($args); // WPCS: XSS OK.
98 98
 	$content = ob_get_clean();
99 99
 	return $content;
100 100
 }
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 	echo lsx_health_plan_featured_video_block(); // WPCS: XSS OK.
110 110
 	$content = ob_get_clean();
111 111
 
112
-	wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
113
-	wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
112
+	wp_enqueue_script('slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array('jquery'), LSX_HEALTH_PLAN_VER, true);
113
+	wp_enqueue_script('lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array('slick'), LSX_HEALTH_PLAN_VER, true);
114 114
 	return $content;
115 115
 }
116 116
 
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 	ob_start();
124 124
 	echo lsx_health_plan_featured_recipes_block(); // WPCS: XSS OK.
125 125
 	$content = ob_get_clean();
126
-	wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
127
-	wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
126
+	wp_enqueue_script('slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array('jquery'), LSX_HEALTH_PLAN_VER, true);
127
+	wp_enqueue_script('lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array('slick'), LSX_HEALTH_PLAN_VER, true);
128 128
 	return $content;
129 129
 }
130 130
 
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 	ob_start();
138 138
 	echo lsx_health_plan_featured_tips_block(); // WPCS: XSS OK.
139 139
 	$content = ob_get_clean();
140
-	wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
141
-	wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
140
+	wp_enqueue_script('slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array('jquery'), LSX_HEALTH_PLAN_VER, true);
141
+	wp_enqueue_script('lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array('slick'), LSX_HEALTH_PLAN_VER, true);
142 142
 	return $content;
143 143
 }
144 144
 
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
  */
150 150
 function account_notices() {
151 151
 	$content = '';
152
-	if ( function_exists( 'wc_print_notices' ) ) {
153
-		$content = wc_print_notices( true );
152
+	if (function_exists('wc_print_notices')) {
153
+		$content = wc_print_notices(true);
154 154
 	}
155 155
 	return $content;
156 156
 }
Please login to merge, or discard this patch.
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
  * @return string
14 14
  */
15 15
 function restricted_content() {
16
-	$content = '';
17
-	if ( ! is_user_logged_in() ) {
18
-		ob_start();
19
-		echo do_shortcode( '[woocommerce_my_account]' );
20
-		$content = ob_get_clean();
21
-	}
22
-	return $content;
16
+     $content = '';
17
+     if ( ! is_user_logged_in() ) {
18
+          ob_start();
19
+          echo do_shortcode( '[woocommerce_my_account]' );
20
+          $content = ob_get_clean();
21
+     }
22
+     return $content;
23 23
 }
24 24
 
25 25
 /**
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
  * @return void
29 29
  */
30 30
 function my_profile_tabs() {
31
-	ob_start();
32
-	echo lsx_health_plan_my_profile_tabs(); // WPCS: XSS OK.
33
-	$content = ob_get_clean();
34
-	return $content;
31
+     ob_start();
32
+     echo lsx_health_plan_my_profile_tabs(); // WPCS: XSS OK.
33
+     $content = ob_get_clean();
34
+     return $content;
35 35
 }
36 36
 
37 37
 /**
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
  * @return void
41 41
  */
42 42
 function my_profile_box() {
43
-	ob_start();
44
-	echo lsx_health_plan_my_profile_box(); // WPCS: XSS OK.
45
-	$content = ob_get_clean();
46
-	return $content;
43
+     ob_start();
44
+     echo lsx_health_plan_my_profile_box(); // WPCS: XSS OK.
45
+     $content = ob_get_clean();
46
+     return $content;
47 47
 }
48 48
 
49 49
 /**
@@ -52,19 +52,19 @@  discard block
 block discarded – undo
52 52
  * @return void
53 53
  */
54 54
 function day_plan_box( $args = array() ) {
55
-	$defaults = array(
56
-		'week_view'      => false,
57
-		'show_downloads' => false,
58
-	);
59
-	$args     = wp_parse_args( $args, $defaults );
60
-	ob_start();
61
-	if ( false === $args['week_view'] ) {
62
-		echo lsx_health_plan_day_plan_block(); // WPCS: XSS OK.
63
-	} else {
64
-		echo lsx_health_plan_week_plan_block( $args ); // WPCS: XSS OK.
65
-	}
66
-	$content = ob_get_clean();
67
-	return $content;
55
+     $defaults = array(
56
+          'week_view'      => false,
57
+          'show_downloads' => false,
58
+     );
59
+     $args     = wp_parse_args( $args, $defaults );
60
+     ob_start();
61
+     if ( false === $args['week_view'] ) {
62
+          echo lsx_health_plan_day_plan_block(); // WPCS: XSS OK.
63
+     } else {
64
+          echo lsx_health_plan_week_plan_block( $args ); // WPCS: XSS OK.
65
+     }
66
+     $content = ob_get_clean();
67
+     return $content;
68 68
 }
69 69
 
70 70
 /**
@@ -74,29 +74,29 @@  discard block
 block discarded – undo
74 74
  * @return void
75 75
  */
76 76
 function exercise_box( $args = array() ) {
77
-	$defaults = array(
78
-		'include'       => '',
79
-		'term'          => '',
80
-		'taxonomy'      => '',
81
-		'view_more'     => false,
82
-		'columns'       => 3,
83
-		'limit'         => 4,
84
-		'post_type'     => 'exercise',
85
-		'orderby'       => 'date',
86
-		'order'         => 'DESC',
87
-		'description'   => 'none',
88
-		'link'          => 'item',
89
-		'link_class'    => 'btn border-btn',
90
-		'layout'        => 'grid',
91
-		'image_size'    => 'lsx-thumbnail-square',
92
-		'parent'        => false,
93
-		'modal_content' => 'excerpt',
94
-	);
95
-	$args     = wp_parse_args( $args, $defaults );
96
-	ob_start();
97
-	echo lsx_health_plan_items( $args ); // WPCS: XSS OK.
98
-	$content = ob_get_clean();
99
-	return $content;
77
+     $defaults = array(
78
+          'include'       => '',
79
+          'term'          => '',
80
+          'taxonomy'      => '',
81
+          'view_more'     => false,
82
+          'columns'       => 3,
83
+          'limit'         => 4,
84
+          'post_type'     => 'exercise',
85
+          'orderby'       => 'date',
86
+          'order'         => 'DESC',
87
+          'description'   => 'none',
88
+          'link'          => 'item',
89
+          'link_class'    => 'btn border-btn',
90
+          'layout'        => 'grid',
91
+          'image_size'    => 'lsx-thumbnail-square',
92
+          'parent'        => false,
93
+          'modal_content' => 'excerpt',
94
+     );
95
+     $args     = wp_parse_args( $args, $defaults );
96
+     ob_start();
97
+     echo lsx_health_plan_items( $args ); // WPCS: XSS OK.
98
+     $content = ob_get_clean();
99
+     return $content;
100 100
 }
101 101
 
102 102
 /**
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
  * @return void
106 106
  */
107 107
 function feature_video_box() {
108
-	ob_start();
109
-	echo lsx_health_plan_featured_video_block(); // WPCS: XSS OK.
110
-	$content = ob_get_clean();
108
+     ob_start();
109
+     echo lsx_health_plan_featured_video_block(); // WPCS: XSS OK.
110
+     $content = ob_get_clean();
111 111
 
112
-	wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
113
-	wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
114
-	return $content;
112
+     wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
113
+     wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
114
+     return $content;
115 115
 }
116 116
 
117 117
 /**
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
  * @return void
121 121
  */
122 122
 function feature_recipes_box() {
123
-	ob_start();
124
-	echo lsx_health_plan_featured_recipes_block(); // WPCS: XSS OK.
125
-	$content = ob_get_clean();
126
-	wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
127
-	wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
128
-	return $content;
123
+     ob_start();
124
+     echo lsx_health_plan_featured_recipes_block(); // WPCS: XSS OK.
125
+     $content = ob_get_clean();
126
+     wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
127
+     wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
128
+     return $content;
129 129
 }
130 130
 
131 131
 /**
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
  * @return void
135 135
  */
136 136
 function feature_tips_box() {
137
-	ob_start();
138
-	echo lsx_health_plan_featured_tips_block(); // WPCS: XSS OK.
139
-	$content = ob_get_clean();
140
-	wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
141
-	wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
142
-	return $content;
137
+     ob_start();
138
+     echo lsx_health_plan_featured_tips_block(); // WPCS: XSS OK.
139
+     $content = ob_get_clean();
140
+     wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true );
141
+     wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true );
142
+     return $content;
143 143
 }
144 144
 
145 145
 /**
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
  * @return string
149 149
  */
150 150
 function account_notices() {
151
-	$content = '';
152
-	if ( function_exists( 'wc_print_notices' ) ) {
153
-		$content = wc_print_notices( true );
154
-	}
155
-	return $content;
151
+     $content = '';
152
+     if ( function_exists( 'wc_print_notices' ) ) {
153
+          $content = wc_print_notices( true );
154
+     }
155
+     return $content;
156 156
 }
Please login to merge, or discard this patch.
includes/template-tags.php 2 patches
Spacing   +177 added lines, -177 removed lines patch added patch discarded remove patch
@@ -14,23 +14,23 @@  discard block
 block discarded – undo
14 14
 	?>
15 15
 	<div class="col-md-4" >
16 16
 		<div class="lsx-health-plan-box">
17
-			<h3 class="title warm-up-title title-lined"><?php esc_html_e( 'Your Warm-up', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'warm.svg' ); ?></h3>
17
+			<h3 class="title warm-up-title title-lined"><?php esc_html_e('Your Warm-up', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('warm.svg'); ?></h3>
18 18
 			<div class="spacer"></div>
19 19
 			<?php
20
-			$intro_text = \lsx_health_plan\functions\get_option( 'warmup_intro', false );
21
-			if ( false !== $intro_text ) {
20
+			$intro_text = \lsx_health_plan\functions\get_option('warmup_intro', false);
21
+			if (false !== $intro_text) {
22 22
 				?>
23 23
 				<div class="excerpt">
24
-					<p><?php echo wp_kses_post( $intro_text ); ?></p>
24
+					<p><?php echo wp_kses_post($intro_text); ?></p>
25 25
 				</div>
26 26
 				<?php
27 27
 			}
28
-			$warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
29
-			if ( false === $warm_up ) {
28
+			$warm_up = \lsx_health_plan\functions\get_option('endpoint_warm_up', false);
29
+			if (false === $warm_up) {
30 30
 				$warm_up = 'warm-up';
31 31
 			}
32 32
 			?>
33
-			<a href="<?php the_permalink(); ?><?php echo esc_attr( $warm_up ); ?>/" class="btn"><?php esc_html_e( 'Start your warm-up', 'lsx-health-plan' ); ?></a>
33
+			<a href="<?php the_permalink(); ?><?php echo esc_attr($warm_up); ?>/" class="btn"><?php esc_html_e('Start your warm-up', 'lsx-health-plan'); ?></a>
34 34
 		</div>
35 35
 	</div>
36 36
 <?php
@@ -42,29 +42,29 @@  discard block
 block discarded – undo
42 42
 * @return void
43 43
 */
44 44
 function lsx_health_plan_workout_box() {
45
-	if ( ! post_type_exists( 'workout' ) ) {
45
+	if ( ! post_type_exists('workout')) {
46 46
 		return;
47 47
 	}
48 48
 	?>
49 49
 	<div class="col-md-4" >
50 50
 		<div class="lsx-health-plan-box">
51
-			<h3 class="title work-out-title title-lined"><?php esc_html_e( 'Your Workout', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'work.svg' ); ?></h3>
51
+			<h3 class="title work-out-title title-lined"><?php esc_html_e('Your Workout', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('work.svg'); ?></h3>
52 52
 			<div class="spacer"></div>
53 53
 			<?php
54
-			$intro_text = \lsx_health_plan\functions\get_option( 'workout_intro', false );
55
-			if ( false !== $intro_text ) {
54
+			$intro_text = \lsx_health_plan\functions\get_option('workout_intro', false);
55
+			if (false !== $intro_text) {
56 56
 				?>
57 57
 				<div class="excerpt">
58
-					<p><?php echo wp_kses_post( $intro_text ); ?></p>
58
+					<p><?php echo wp_kses_post($intro_text); ?></p>
59 59
 				</div>
60 60
 				<?php
61 61
 			}
62
-			$workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
63
-			if ( false === $workout ) {
62
+			$workout = \lsx_health_plan\functions\get_option('endpoint_workout', false);
63
+			if (false === $workout) {
64 64
 				$workout = 'workout';
65 65
 			}
66 66
 			?>
67
-			<a href="<?php the_permalink(); ?><?php echo esc_attr( $workout ); ?>/" class="btn"><?php esc_html_e( 'Start your workout', 'lsx-health-plan' ); ?></a>
67
+			<a href="<?php the_permalink(); ?><?php echo esc_attr($workout); ?>/" class="btn"><?php esc_html_e('Start your workout', 'lsx-health-plan'); ?></a>
68 68
 		</div>
69 69
 	</div>
70 70
 <?php
@@ -76,29 +76,29 @@  discard block
 block discarded – undo
76 76
 * @return void
77 77
 */
78 78
 function lsx_health_plan_meal_box() {
79
-	if ( ! post_type_exists( 'meal' ) ) {
79
+	if ( ! post_type_exists('meal')) {
80 80
 		return;
81 81
 	}
82 82
 	?>
83 83
 	<div class="col-md-4" >
84 84
 		<div class="lsx-health-plan-box">
85
-			<h3 class="title meal-plan-title title-lined"><?php esc_html_e( 'Your Meal Plan', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'meal.svg' ); ?></h3>
85
+			<h3 class="title meal-plan-title title-lined"><?php esc_html_e('Your Meal Plan', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('meal.svg'); ?></h3>
86 86
 			<div class="spacer"></div>
87 87
 			<?php
88
-			$intro_text = \lsx_health_plan\functions\get_option( 'meal_plan_intro', false );
89
-			if ( false !== $intro_text ) {
88
+			$intro_text = \lsx_health_plan\functions\get_option('meal_plan_intro', false);
89
+			if (false !== $intro_text) {
90 90
 				?>
91 91
 				<div class="excerpt">
92
-					<p><?php echo wp_kses_post( $intro_text ); ?></p>
92
+					<p><?php echo wp_kses_post($intro_text); ?></p>
93 93
 				</div>
94 94
 				<?php
95 95
 			}
96
-			$meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
97
-			if ( false === $meal ) {
96
+			$meal = \lsx_health_plan\functions\get_option('endpoint_meal', false);
97
+			if (false === $meal) {
98 98
 				$meal = 'meal';
99 99
 			}
100 100
 			?>
101
-			<a href="<?php the_permalink(); ?><?php echo esc_attr( $meal ); ?>/" class="btn"><?php esc_html_e( 'View your meal plan', 'lsx-health-plan' ); ?></a>
101
+			<a href="<?php the_permalink(); ?><?php echo esc_attr($meal); ?>/" class="btn"><?php esc_html_e('View your meal plan', 'lsx-health-plan'); ?></a>
102 102
 		</div>
103 103
 	</div>
104 104
 <?php
@@ -110,29 +110,29 @@  discard block
 block discarded – undo
110 110
 * @return void
111 111
 */
112 112
 function lsx_health_plan_recipe_box() {
113
-	if ( ! post_type_exists( 'recipe' ) ) {
113
+	if ( ! post_type_exists('recipe')) {
114 114
 		return;
115 115
 	}
116 116
 	?>
117 117
 	<div class="col-md-4" >
118 118
 		<div class="lsx-health-plan-box">
119
-			<h3 class="title recipes-title title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'recipes.svg' ); ?></h3>
119
+			<h3 class="title recipes-title title-lined"><?php esc_html_e('Recipes', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('recipes.svg'); ?></h3>
120 120
 			<div class="spacer"></div>
121 121
 			<?php
122
-			$intro_text = \lsx_health_plan\functions\get_option( 'recipes_intro', false );
123
-			if ( false !== $intro_text ) {
122
+			$intro_text = \lsx_health_plan\functions\get_option('recipes_intro', false);
123
+			if (false !== $intro_text) {
124 124
 				?>
125 125
 				<div class="excerpt">
126
-					<p><?php echo wp_kses_post( $intro_text ); ?></p>
126
+					<p><?php echo wp_kses_post($intro_text); ?></p>
127 127
 				</div>
128 128
 				<?php
129 129
 			}
130
-			$recipes = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false );
131
-			if ( false === $recipes ) {
130
+			$recipes = \lsx_health_plan\functions\get_option('endpoint_recipe', false);
131
+			if (false === $recipes) {
132 132
 				$recipes = 'recipes';
133 133
 			}
134 134
 			?>
135
-			<a href="<?php the_permalink(); ?><?php echo esc_attr( $recipes ); ?>/" class="btn"><?php esc_html_e( 'View all recipes', 'lsx-health-plan' ); ?></a>
135
+			<a href="<?php the_permalink(); ?><?php echo esc_attr($recipes); ?>/" class="btn"><?php esc_html_e('View all recipes', 'lsx-health-plan'); ?></a>
136 136
 		</div>
137 137
 	</div>
138 138
 <?php
@@ -148,15 +148,15 @@  discard block
 block discarded – undo
148 148
 	?>
149 149
 	<div class="col-md-4 day-download-box" >
150 150
 		<div class="lsx-health-plan-box">
151
-			<h3 class="title downloads-title title-lined"><?php esc_html_e( 'Downloads', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'download.svg' ); ?></h3>
151
+			<h3 class="title downloads-title title-lined"><?php esc_html_e('Downloads', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('download.svg'); ?></h3>
152 152
 			<div class="spacer"></div>
153 153
 			<div class="download-list">
154 154
 				<ul>
155 155
 					<?php
156 156
 					$downloads = \lsx_health_plan\functions\get_downloads();
157
-					if ( ! empty( $downloads ) ) {
158
-						foreach ( $downloads as $download ) {
159
-							echo wp_kses_post( '<li><a href=""><i class="fa fa-file-pdf"></i>' . do_shortcode( '[download id="' . $download . '"]' ) . '</a></li>' );
157
+					if ( ! empty($downloads)) {
158
+						foreach ($downloads as $download) {
159
+							echo wp_kses_post('<li><a href=""><i class="fa fa-file-pdf"></i>' . do_shortcode('[download id="' . $download . '"]') . '</a></li>');
160 160
 						}
161 161
 					}
162 162
 					?>
@@ -173,15 +173,15 @@  discard block
 block discarded – undo
173 173
  * @param string $tab
174 174
  * @return void
175 175
  */
176
-function lsx_health_plan_nav_class( $tab = '' ) {
176
+function lsx_health_plan_nav_class($tab = '') {
177 177
 	$nav_classes = array();
178
-	if ( function_exists( 'is_wc_endpoint_url' ) && 'edit-account' === $tab && is_wc_endpoint_url( 'edit-account' ) ) {
178
+	if (function_exists('is_wc_endpoint_url') && 'edit-account' === $tab && is_wc_endpoint_url('edit-account')) {
179 179
 		$nav_classes[] = 'active';
180
-	} elseif ( lsx_health_plan_is_current_tab( $tab ) ) {
180
+	} elseif (lsx_health_plan_is_current_tab($tab)) {
181 181
 		$nav_classes[] = 'active';
182 182
 	}
183
-	if ( ! empty( $nav_classes ) ) {
184
-		echo wp_kses_post( implode( ' ', $nav_classes ) );
183
+	if ( ! empty($nav_classes)) {
184
+		echo wp_kses_post(implode(' ', $nav_classes));
185 185
 	}
186 186
 }
187 187
 
@@ -196,19 +196,19 @@  discard block
 block discarded – undo
196 196
 		<ul class="nav nav-pills">
197 197
 			<li class="
198 198
 			<?php
199
-			if ( ( function_exists( 'is_wc_endpoint_url' ) && ! is_wc_endpoint_url( 'edit-account' ) ) || ! function_exists( 'is_wc_endpoint_url' ) ) {
200
-				echo esc_attr( 'active' );
199
+			if ((function_exists('is_wc_endpoint_url') && ! is_wc_endpoint_url('edit-account')) || ! function_exists('is_wc_endpoint_url')) {
200
+				echo esc_attr('active');
201 201
 			}
202 202
 			?>
203
-			"><a class="my-plan-tab" href="<?php the_permalink(); ?>"><?php esc_html_e( 'My Plan', 'lsx-health-plan' ); ?></a></li>
203
+			"><a class="my-plan-tab" href="<?php the_permalink(); ?>"><?php esc_html_e('My Plan', 'lsx-health-plan'); ?></a></li>
204 204
 			<li class="
205 205
 			<?php
206
-			if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'edit-account' ) ) {
207
-				echo esc_attr( 'active' );
206
+			if (function_exists('is_wc_endpoint_url') && is_wc_endpoint_url('edit-account')) {
207
+				echo esc_attr('active');
208 208
 			}
209 209
 			?>
210
-			"><a class="account-details-tab" href="<?php the_permalink(); ?>edit-account/"><?php esc_html_e( 'Account Details', 'lsx-health-plan' ); ?></a></li>
211
-			<li class=""><a class="logout-tab" href="<?php echo esc_url( wp_logout_url( get_permalink() ) ); ?>"><?php esc_html_e( 'Logout', 'lsx-health-plan' ); ?></a></li>
210
+			"><a class="account-details-tab" href="<?php the_permalink(); ?>edit-account/"><?php esc_html_e('Account Details', 'lsx-health-plan'); ?></a></li>
211
+			<li class=""><a class="logout-tab" href="<?php echo esc_url(wp_logout_url(get_permalink())); ?>"><?php esc_html_e('Logout', 'lsx-health-plan'); ?></a></li>
212 212
 		</ul>
213 213
 	</div>
214 214
 	<?php
@@ -227,48 +227,48 @@  discard block
 block discarded – undo
227 227
 			<?php
228 228
 				global $current_user;
229 229
 				get_current_user();
230
-				echo get_avatar( $current_user->ID, 240 );
230
+				echo get_avatar($current_user->ID, 240);
231 231
 				?>
232 232
 			</div>
233 233
 			<div class="edit-profile">
234 234
 				<?php
235
-				if ( function_exists( 'wc_get_page_id' ) ) {
236
-					$url_id = wc_get_page_id( 'myaccount' );
235
+				if (function_exists('wc_get_page_id')) {
236
+					$url_id = wc_get_page_id('myaccount');
237 237
 				} else {
238 238
 					$url_id = '';
239 239
 				}
240 240
 				?>
241
-				<a class="btn btn-green" href="<?php echo esc_url( get_permalink( $url_id ) ); ?>edit-account/"><?php esc_html_e( 'Edit Profile', 'lsx-health-plan' ); ?></a>
241
+				<a class="btn btn-green" href="<?php echo esc_url(get_permalink($url_id)); ?>edit-account/"><?php esc_html_e('Edit Profile', 'lsx-health-plan'); ?></a>
242 242
 			</div>
243 243
 		</div>
244 244
 
245 245
 		<div class="profile-details">
246
-			<h1 class="title-lined"><?php echo esc_html( $current_user->display_name ); ?></h1>
246
+			<h1 class="title-lined"><?php echo esc_html($current_user->display_name); ?></h1>
247 247
 			<?php
248
-			$disable_stats = \lsx_health_plan\functions\get_option( 'disable_all_stats', false );
249
-			if ( 'on' !== $disable_stats ) {
248
+			$disable_stats = \lsx_health_plan\functions\get_option('disable_all_stats', false);
249
+			if ('on' !== $disable_stats) {
250 250
 
251
-				$is_weight_disabled  = \lsx_health_plan\functions\get_option( 'disable_weight_checkbox', false );
252
-				$is_waist_disabled   = \lsx_health_plan\functions\get_option( 'disable_waist_checkbox', false );
253
-				$is_fitness_disabled = \lsx_health_plan\functions\get_option( 'disable_fitness_checkbox', false );
251
+				$is_weight_disabled  = \lsx_health_plan\functions\get_option('disable_weight_checkbox', false);
252
+				$is_waist_disabled   = \lsx_health_plan\functions\get_option('disable_waist_checkbox', false);
253
+				$is_fitness_disabled = \lsx_health_plan\functions\get_option('disable_fitness_checkbox', false);
254 254
 				?>
255 255
 				<table class="table personal-information">
256 256
 					<thead>
257 257
 					<tr>
258 258
 						<th scope="col"></th>
259
-						<th scope="col"><strong><?php esc_html_e( 'Start', 'lsx-health-plan' ); ?></strong></th>
260
-						<th scope="col"><strong><?php esc_html_e( 'Goal', 'lsx-health-plan' ); ?></strong></th>
261
-						<th scope="col"><strong><?php esc_html_e( 'Current', 'lsx-health-plan' ); ?></strong></th>
259
+						<th scope="col"><strong><?php esc_html_e('Start', 'lsx-health-plan'); ?></strong></th>
260
+						<th scope="col"><strong><?php esc_html_e('Goal', 'lsx-health-plan'); ?></strong></th>
261
+						<th scope="col"><strong><?php esc_html_e('Current', 'lsx-health-plan'); ?></strong></th>
262 262
 					</tr>
263 263
 					</thead>
264 264
 					<tbody>
265
-					<?php if ( 'on' !== $is_weight_disabled ) { ?>
265
+					<?php if ('on' !== $is_weight_disabled) { ?>
266 266
 						<tr>
267
-							<th scope="row"><strong><?php esc_html_e( 'Weight:', 'lsx-health-plan' ); ?></strong></th>
267
+							<th scope="row"><strong><?php esc_html_e('Weight:', 'lsx-health-plan'); ?></strong></th>
268 268
 							<td>
269 269
 								<?php
270
-								if ( '' !== get_user_meta( get_current_user_id(), 'weight_start', true ) ) {
271
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_start', true ) . ' kg' );
270
+								if ('' !== get_user_meta(get_current_user_id(), 'weight_start', true)) {
271
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'weight_start', true) . ' kg');
272 272
 								} else {
273 273
 									echo '/';
274 274
 								}
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
 							</td>
277 277
 							<td>
278 278
 								<?php
279
-								if ( '' !== get_user_meta( get_current_user_id(), 'weight_goal', true ) ) {
280
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_goal', true ) . ' kg' );
279
+								if ('' !== get_user_meta(get_current_user_id(), 'weight_goal', true)) {
280
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'weight_goal', true) . ' kg');
281 281
 								} else {
282 282
 									echo '/';
283 283
 								}
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
 							</td>
286 286
 							<td>
287 287
 								<?php
288
-								if ( '' !== get_user_meta( get_current_user_id(), 'weight_end', true ) ) {
289
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_end', true ) . ' kg' );
288
+								if ('' !== get_user_meta(get_current_user_id(), 'weight_end', true)) {
289
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'weight_end', true) . ' kg');
290 290
 								} else {
291 291
 									echo '/';
292 292
 								}
@@ -294,13 +294,13 @@  discard block
 block discarded – undo
294 294
 							</td>
295 295
 						</tr>
296 296
 					<?php } ?>
297
-					<?php if ( 'on' !== $is_waist_disabled ) { ?>
297
+					<?php if ('on' !== $is_waist_disabled) { ?>
298 298
 						<tr>
299
-							<th scope="row"><strong><?php esc_html_e( 'Waist:', 'lsx-health-plan' ); ?></strong></th>
299
+							<th scope="row"><strong><?php esc_html_e('Waist:', 'lsx-health-plan'); ?></strong></th>
300 300
 							<td>
301 301
 								<?php
302
-								if ( '' !== get_user_meta( get_current_user_id(), 'waist_start', true ) ) {
303
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_start', true ) . ' cm' );
302
+								if ('' !== get_user_meta(get_current_user_id(), 'waist_start', true)) {
303
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'waist_start', true) . ' cm');
304 304
 								} else {
305 305
 									echo '/';
306 306
 								}
@@ -308,8 +308,8 @@  discard block
 block discarded – undo
308 308
 							</td>
309 309
 							<td>
310 310
 								<?php
311
-								if ( '' !== get_user_meta( get_current_user_id(), 'waist_goal', true ) ) {
312
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_goal', true ) . ' cm' );
311
+								if ('' !== get_user_meta(get_current_user_id(), 'waist_goal', true)) {
312
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'waist_goal', true) . ' cm');
313 313
 								} else {
314 314
 									echo '/';
315 315
 								}
@@ -317,8 +317,8 @@  discard block
 block discarded – undo
317 317
 							</td>
318 318
 							<td>
319 319
 								<?php
320
-								if ( '' !== get_user_meta( get_current_user_id(), 'waist_end', true ) ) {
321
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_end', true ) . ' cm' );
320
+								if ('' !== get_user_meta(get_current_user_id(), 'waist_end', true)) {
321
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'waist_end', true) . ' cm');
322 322
 								} else {
323 323
 									echo '/';
324 324
 								}
@@ -326,13 +326,13 @@  discard block
 block discarded – undo
326 326
 							</td>
327 327
 						</tr>
328 328
 					<?php } ?>
329
-					<?php if ( 'on' !== $is_fitness_disabled ) { ?>
329
+					<?php if ('on' !== $is_fitness_disabled) { ?>
330 330
 						<tr>
331
-							<th scope="row"><strong><?php esc_html_e( 'Fitness:', 'lsx-health-plan' ); ?></strong></th>
331
+							<th scope="row"><strong><?php esc_html_e('Fitness:', 'lsx-health-plan'); ?></strong></th>
332 332
 							<td>
333 333
 								<?php
334
-								if ( '' !== get_user_meta( get_current_user_id(), 'fitness_start', true ) ) {
335
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_start', true ) );
334
+								if ('' !== get_user_meta(get_current_user_id(), 'fitness_start', true)) {
335
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'fitness_start', true));
336 336
 								} else {
337 337
 									echo '/';
338 338
 								}
@@ -340,8 +340,8 @@  discard block
 block discarded – undo
340 340
 							</td>
341 341
 							<td>
342 342
 								<?php
343
-								if ( '' !== get_user_meta( get_current_user_id(), 'fitness_goal', true ) ) {
344
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_goal', true ) );
343
+								if ('' !== get_user_meta(get_current_user_id(), 'fitness_goal', true)) {
344
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'fitness_goal', true));
345 345
 								} else {
346 346
 									echo '/';
347 347
 								}
@@ -349,8 +349,8 @@  discard block
 block discarded – undo
349 349
 							</td>
350 350
 							<td>
351 351
 								<?php
352
-								if ( '' !== get_user_meta( get_current_user_id(), 'fitness_end', true ) ) {
353
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_end', true ) );
352
+								if ('' !== get_user_meta(get_current_user_id(), 'fitness_end', true)) {
353
+									echo wp_kses_post(get_user_meta(get_current_user_id(), 'fitness_end', true));
354 354
 								} else {
355 355
 									echo '/';
356 356
 								}
@@ -374,26 +374,26 @@  discard block
 block discarded – undo
374 374
  * @return void
375 375
  */
376 376
 function lsx_health_plan_day_plan_block() {
377
-	$args      = array(
377
+	$args = array(
378 378
 		'orderby'        => 'menu_order',
379 379
 		'order'          => 'ASC',
380 380
 		'post_type'      => 'plan',
381 381
 		'posts_per_page' => -1,
382 382
 		'nopagin'        => true,
383 383
 	);
384
-	$the_query = new WP_Query( $args );
384
+	$the_query = new WP_Query($args);
385 385
 	?>
386 386
 	<div class="daily-plan-block day-grid">
387 387
 		<?php
388
-		if ( $the_query->have_posts() ) :
389
-			while ( $the_query->have_posts() ) :
388
+		if ($the_query->have_posts()) :
389
+			while ($the_query->have_posts()) :
390 390
 				$the_query->the_post();
391 391
 				$completed_class = '';
392
-				if ( lsx_health_plan_is_day_complete() ) {
392
+				if (lsx_health_plan_is_day_complete()) {
393 393
 					$completed_class = 'completed';
394 394
 				}
395 395
 				?>
396
-				<a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr( $completed_class ); ?>">
396
+				<a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr($completed_class); ?>">
397 397
 					<div class="plan-content"><?php the_title(); ?></div>
398 398
 				</a>
399 399
 			<?php endwhile; ?>
@@ -410,11 +410,11 @@  discard block
 block discarded – undo
410 410
  * @param  array $args An array of arguments.
411 411
  * @return void
412 412
  */
413
-function lsx_health_plan_week_plan_block( $args = array() ) {
413
+function lsx_health_plan_week_plan_block($args = array()) {
414 414
 	$defaults = array(
415 415
 		'show_downloads' => false,
416 416
 	);
417
-	$args     = wp_parse_args( $args, $defaults );
417
+	$args     = wp_parse_args($args, $defaults);
418 418
 	$weeks    = get_terms(
419 419
 		array(
420 420
 			'taxonomy' => 'week',
@@ -422,13 +422,13 @@  discard block
 block discarded – undo
422 422
 			'order'    => 'ASC',
423 423
 		)
424 424
 	);
425
-	if ( ! empty( $weeks ) ) {
425
+	if ( ! empty($weeks)) {
426 426
 		$counter      = 1;
427 427
 		$section_open = false;
428 428
 
429
-		foreach ( $weeks as $week ) {
429
+		foreach ($weeks as $week) {
430 430
 			// Grab the days of the week.
431
-			$query_args      = array(
431
+			$query_args = array(
432 432
 				'orderby'        => 'menu_order',
433 433
 				'order'          => 'ASC',
434 434
 				'post_type'      => 'plan',
@@ -438,22 +438,22 @@  discard block
 block discarded – undo
438 438
 					array(
439 439
 						'taxonomy' => 'week',
440 440
 						'field'    => 'slug',
441
-						'terms'    => array( $week->slug ),
441
+						'terms'    => array($week->slug),
442 442
 					),
443 443
 				),
444 444
 			);
445
-			$the_query      = new WP_Query( $query_args );
445
+			$the_query      = new WP_Query($query_args);
446 446
 			$collapse_class = '';
447 447
 
448 448
 			// Determine if the current week is complete.
449
-			if ( $the_query->have_posts() ) {
450
-				$day_ids = wp_list_pluck( $the_query->posts, 'ID' );
449
+			if ($the_query->have_posts()) {
450
+				$day_ids = wp_list_pluck($the_query->posts, 'ID');
451 451
 
452
-				if ( false === $section_open ) {
453
-					if ( 1 === $counter && ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) {
452
+				if (false === $section_open) {
453
+					if (1 === $counter && ! \lsx_health_plan\functions\is_week_complete(false, $day_ids)) {
454 454
 						$collapse_class = 'in';
455 455
 						$section_open   = true;
456
-					} elseif ( ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) {
456
+					} elseif ( ! \lsx_health_plan\functions\is_week_complete(false, $day_ids)) {
457 457
 						$collapse_class = 'in';
458 458
 						$section_open   = true;
459 459
 					}
@@ -461,32 +461,32 @@  discard block
 block discarded – undo
461 461
 			}
462 462
 
463 463
 			// Determine if there are any weekly downloads.
464
-			if ( isset( $args['show_downloads'] ) && false !== $args['show_downloads'] ) {
465
-				$weekly_downloads = \lsx_health_plan\functions\get_weekly_downloads( $week->slug );
466
-				if ( ! empty( $weekly_downloads ) ) {
464
+			if (isset($args['show_downloads']) && false !== $args['show_downloads']) {
465
+				$weekly_downloads = \lsx_health_plan\functions\get_weekly_downloads($week->slug);
466
+				if ( ! empty($weekly_downloads)) {
467 467
 					$week_downloads_view = 'week-downloads-view-on';
468 468
 				}
469 469
 			}
470 470
 			?>
471 471
 			<div class="daily-plan-block week-grid">
472
-				<a href="#week-<?php echo esc_attr( $week->slug ); ?>" data-toggle="collapse" class="week-title"><?php echo esc_attr( $week->name ); ?></a>
473
-				<div id="week-<?php echo esc_attr( $week->slug ); ?>" class="week-row collapse <?php echo esc_attr( $collapse_class ); ?>">
474
-					<div class="week-row-inner <?php echo esc_html( $week_downloads_view ); ?>">
472
+				<a href="#week-<?php echo esc_attr($week->slug); ?>" data-toggle="collapse" class="week-title"><?php echo esc_attr($week->name); ?></a>
473
+				<div id="week-<?php echo esc_attr($week->slug); ?>" class="week-row collapse <?php echo esc_attr($collapse_class); ?>">
474
+					<div class="week-row-inner <?php echo esc_html($week_downloads_view); ?>">
475 475
 						<div class="week-meals-recipes-box">
476
-							<?php if ( ! empty( $week_downloads_view ) ) { ?>
477
-								<h3 class="title"><?php lsx_get_svg_icon( 'daily-plan.svg' ); ?><?php echo esc_html_e( 'Daily Plan', 'lsx-health-plan' ); ?></h3>
476
+							<?php if ( ! empty($week_downloads_view)) { ?>
477
+								<h3 class="title"><?php lsx_get_svg_icon('daily-plan.svg'); ?><?php echo esc_html_e('Daily Plan', 'lsx-health-plan'); ?></h3>
478 478
 							<?php } ?>
479 479
 							<div class="week-meals-recipes-box-inner">
480 480
 							<?php
481
-							if ( $the_query->have_posts() ) :
482
-								while ( $the_query->have_posts() ) :
481
+							if ($the_query->have_posts()) :
482
+								while ($the_query->have_posts()) :
483 483
 									$the_query->the_post();
484 484
 									$completed_class = '';
485
-									if ( lsx_health_plan_is_day_complete() ) {
485
+									if (lsx_health_plan_is_day_complete()) {
486 486
 										$completed_class = 'completed';
487 487
 									}
488 488
 									?>
489
-									<a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr( $completed_class ); ?>">
489
+									<a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr($completed_class); ?>">
490 490
 										<div class="plan-content"><?php the_title(); ?></div>
491 491
 									</a>
492 492
 									<?php
@@ -497,8 +497,8 @@  discard block
 block discarded – undo
497 497
 							</div>
498 498
 						</div>
499 499
 						<?php
500
-						if ( ! empty( $week_downloads_view ) ) {
501
-							lsx_health_plan_weekly_downloads( $weekly_downloads );
500
+						if ( ! empty($week_downloads_view)) {
501
+							lsx_health_plan_weekly_downloads($weekly_downloads);
502 502
 						}
503 503
 						?>
504 504
 					</div>
@@ -516,16 +516,16 @@  discard block
 block discarded – undo
516 516
  * @param array $weekly_downloads An array of the download ids.
517 517
  * @return void
518 518
  */
519
-function lsx_health_plan_weekly_downloads( $weekly_downloads = array() ) {
520
-	if ( ! empty( $weekly_downloads ) ) {
519
+function lsx_health_plan_weekly_downloads($weekly_downloads = array()) {
520
+	if ( ! empty($weekly_downloads)) {
521 521
 		?>
522 522
 		<div class="week-download-box">
523
-			<h3 class="title"><?php lsx_get_svg_icon( 'download.svg' ); ?><?php echo esc_html_e( 'Downloads', 'lsx-health-plan' ); ?></h3>
523
+			<h3 class="title"><?php lsx_get_svg_icon('download.svg'); ?><?php echo esc_html_e('Downloads', 'lsx-health-plan'); ?></h3>
524 524
 			<ul class="week-download-box-list">
525 525
 				<?php
526
-				foreach ( $weekly_downloads as $weekly_download ) {
526
+				foreach ($weekly_downloads as $weekly_download) {
527 527
 					?>
528
-					<li><?php echo wp_kses_post( do_shortcode( '[download id="' . $weekly_download . '"]' ) ); ?></li>
528
+					<li><?php echo wp_kses_post(do_shortcode('[download id="' . $weekly_download . '"]')); ?></li>
529 529
 					<?php
530 530
 				}
531 531
 				?>
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
  *
541 541
  * @return void
542 542
  */
543
-function lsx_health_plan_items( $args = array() ) {
543
+function lsx_health_plan_items($args = array()) {
544 544
 	global $shortcode_args;
545 545
 	$shortcode_args = $args;
546 546
 	include LSX_HEALTH_PLAN_PATH . '/templates/partials/shortcode-loop.php';
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
  * @return void
553 553
  */
554 554
 function lsx_health_plan_featured_video_block() {
555
-	if ( ! post_type_exists( 'video' ) ) {
555
+	if ( ! post_type_exists('video')) {
556 556
 		return;
557 557
 	}
558 558
 	include LSX_HEALTH_PLAN_PATH . '/templates/featured-videos.php';
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
  * @return void
565 565
  */
566 566
 function lsx_health_plan_featured_recipes_block() {
567
-	if ( ! post_type_exists( 'recipe' ) ) {
567
+	if ( ! post_type_exists('recipe')) {
568 568
 		return;
569 569
 	}
570 570
 	include LSX_HEALTH_PLAN_PATH . '/templates/featured-recipes.php';
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
  * @return void
577 577
  */
578 578
 function lsx_health_plan_featured_tips_block() {
579
-	if ( ! post_type_exists( 'tip' ) ) {
579
+	if ( ! post_type_exists('tip')) {
580 580
 		return;
581 581
 	}
582 582
 	include LSX_HEALTH_PLAN_PATH . '/templates/featured-tips.php';
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
  * @return void
590 590
  */
591 591
 function lsx_health_plan_day_button() {
592
-	if ( lsx_health_plan_is_day_complete() ) {
592
+	if (lsx_health_plan_is_day_complete()) {
593 593
 		lsx_health_plan_unlock_button();
594 594
 	} else {
595 595
 		lsx_health_plan_complete_button();
@@ -605,15 +605,15 @@  discard block
 block discarded – undo
605 605
 	?>
606 606
 	<div class="single-plan-inner-buttons">
607 607
 		<form action="<?php the_permalink(); ?>" method="post" class="form-complete-day complete-plan-btn">
608
-			<?php wp_nonce_field( 'complete', 'lsx-health-plan-actions' ); ?>
609
-			<input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr( get_the_ID() ); ?>" />
610
-			<button class="btn cta-btn" type="submit"><?php esc_html_e( 'Complete Day', 'lsx-health-plan' ); ?></button>
608
+			<?php wp_nonce_field('complete', 'lsx-health-plan-actions'); ?>
609
+			<input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr(get_the_ID()); ?>" />
610
+			<button class="btn cta-btn" type="submit"><?php esc_html_e('Complete Day', 'lsx-health-plan'); ?></button>
611 611
 		</form>
612 612
 		<div  class="back-plan-btn">
613 613
 			<?php
614
-			if ( function_exists( 'wc_get_page_id' ) ) {
614
+			if (function_exists('wc_get_page_id')) {
615 615
 				?>
616
-				<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>
616
+				<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>
617 617
 				<?php
618 618
 			}
619 619
 			?>
@@ -631,15 +631,15 @@  discard block
 block discarded – undo
631 631
 	?>
632 632
 	<div class="single-plan-inner-buttons">
633 633
 		<form action="<?php the_permalink(); ?>" method="post" class="form-complete-day complete-plan-btn">
634
-			<?php wp_nonce_field( 'unlock', 'lsx-health-plan-actions' ); ?>
635
-			<input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr( get_the_ID() ); ?>" />
636
-			<button class="btn secondary-btn" type="submit"><?php esc_html_e( 'Im not done!', 'lsx-health-plan' ); ?></button>
634
+			<?php wp_nonce_field('unlock', 'lsx-health-plan-actions'); ?>
635
+			<input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr(get_the_ID()); ?>" />
636
+			<button class="btn secondary-btn" type="submit"><?php esc_html_e('Im not done!', 'lsx-health-plan'); ?></button>
637 637
 		</form>
638 638
 		<div  class="back-plan-btn">
639 639
 		<?php
640
-		if ( function_exists( 'wc_get_page_id' ) ) {
640
+		if (function_exists('wc_get_page_id')) {
641 641
 			?>
642
-			<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>
642
+			<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>
643 643
 			<?php
644 644
 		}
645 645
 		?>
@@ -655,8 +655,8 @@  discard block
 block discarded – undo
655 655
  * @return void
656 656
  */
657 657
 function lsx_health_plan_single_nav() {
658
-	$tab_template_path = apply_filters( 'lsx_health_plan_single_nav_path', LSX_HEALTH_PLAN_PATH . '/templates/single-plan-tabs.php' );
659
-	if ( '' !== $tab_template_path ) {
658
+	$tab_template_path = apply_filters('lsx_health_plan_single_nav_path', LSX_HEALTH_PLAN_PATH . '/templates/single-plan-tabs.php');
659
+	if ('' !== $tab_template_path) {
660 660
 		require $tab_template_path;
661 661
 	}
662 662
 }
@@ -668,8 +668,8 @@  discard block
 block discarded – undo
668 668
  * @return void
669 669
  */
670 670
 function lsx_health_plan_single_tabs() {
671
-	$endpoint = get_query_var( 'endpoint' );
672
-	switch ( $endpoint ) {
671
+	$endpoint = get_query_var('endpoint');
672
+	switch ($endpoint) {
673 673
 		case 'meal':
674 674
 			$tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-meal.php';
675 675
 			break;
@@ -690,8 +690,8 @@  discard block
 block discarded – undo
690 690
 			$tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-plan.php';
691 691
 			break;
692 692
 	}
693
-	$tab_template_path = apply_filters( 'lsx_health_plan_single_tab_path', $tab_template_path );
694
-	if ( '' !== $tab_template_path ) {
693
+	$tab_template_path = apply_filters('lsx_health_plan_single_tab_path', $tab_template_path);
694
+	if ('' !== $tab_template_path) {
695 695
 		include $tab_template_path;
696 696
 	}
697 697
 }
@@ -711,9 +711,9 @@  discard block
 block discarded – undo
711 711
  * @return recipe_type
712 712
  */
713 713
 function lsx_health_plan_recipe_type() {
714
-	$term_obj_list = get_the_terms( get_the_ID(), 'recipe-type' );
714
+	$term_obj_list = get_the_terms(get_the_ID(), 'recipe-type');
715 715
 	$recipe_type   = $term_obj_list[0]->name;
716
-	if ( ! empty( $recipe_type ) ) {
716
+	if ( ! empty($recipe_type)) {
717 717
 		return $recipe_type;
718 718
 	}
719 719
 }
@@ -725,32 +725,32 @@  discard block
 block discarded – undo
725 725
  * @param array $group
726 726
  * @return void
727 727
  */
728
-function lsx_health_plan_workout_video_play_button( $m, $group, $echo = true ) {
728
+function lsx_health_plan_workout_video_play_button($m, $group, $echo = true) {
729 729
 	$workout_video = '';
730 730
 	$giphy         = '';
731 731
 	$youtube       = '';
732
-	if ( isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] ) {
733
-		$workout_video = esc_html( $group['connected_videos'] );
734
-		$giphy         = get_post_meta( $workout_video, 'video_giphy_source', true );
735
-		$youtube       = esc_url( get_post_meta( $workout_video, 'video_youtube_source', 1 ) );
736
-		$content       = get_post_field( 'post_content', $workout_video );
732
+	if (isset($group['connected_videos']) && '' !== $group['connected_videos']) {
733
+		$workout_video = esc_html($group['connected_videos']);
734
+		$giphy         = get_post_meta($workout_video, 'video_giphy_source', true);
735
+		$youtube       = esc_url(get_post_meta($workout_video, 'video_youtube_source', 1));
736
+		$content       = get_post_field('post_content', $workout_video);
737 737
 		$play_button   = '<button data-toggle="modal" data-target="#workout-video-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>';
738 738
 
739 739
 		$modal_body = '';
740
-		if ( ! empty( $giphy ) ) {
741
-			$giphy      = \lsx_health_plan\functions\get_video_url( $giphy );
740
+		if ( ! empty($giphy)) {
741
+			$giphy      = \lsx_health_plan\functions\get_video_url($giphy);
742 742
 			$modal_body = $giphy; // WPCS: XSS OK.
743
-		} elseif ( ! empty( $youtube ) ) {
744
-			$modal_body = wp_oembed_get( $youtube, array( // WPCS: XSS OK.
743
+		} elseif ( ! empty($youtube)) {
744
+			$modal_body = wp_oembed_get($youtube, array( // WPCS: XSS OK.
745 745
 				'width' => 480,
746
-			) );
746
+			));
747 747
 		}
748 748
 		$modal_body .= '<h5 class="modal-title title-lined">' . $group['name'] . '</h5>';
749 749
 		$modal_body .= $content;
750
-		\lsx_health_plan\functions\register_modal( 'workout-video-modal-' . $m, '', $modal_body );
750
+		\lsx_health_plan\functions\register_modal('workout-video-modal-' . $m, '', $modal_body);
751 751
 
752
-		if ( true === $echo ) {
753
-			echo wp_kses_post( $play_button );
752
+		if (true === $echo) {
753
+			echo wp_kses_post($play_button);
754 754
 		} else {
755 755
 			return $play_button;
756 756
 		}
@@ -764,17 +764,17 @@  discard block
 block discarded – undo
764 764
  */
765 765
 function lsx_health_plan_recipe_archive_description() {
766 766
 	$description = '';
767
-	if ( is_post_type_archive( 'recipe' ) ) {
768
-		$description = \lsx_health_plan\functions\get_option( 'recipe_archive_description', '' );
769
-	} elseif ( is_post_type_archive( 'exercise' ) ) {
770
-		$description = \lsx_health_plan\functions\get_option( 'exercise_archive_description', '' );
771
-	} elseif ( is_tax() ) {
767
+	if (is_post_type_archive('recipe')) {
768
+		$description = \lsx_health_plan\functions\get_option('recipe_archive_description', '');
769
+	} elseif (is_post_type_archive('exercise')) {
770
+		$description = \lsx_health_plan\functions\get_option('exercise_archive_description', '');
771
+	} elseif (is_tax()) {
772 772
 		$description = get_the_archive_description();
773 773
 	}
774
-	if ( '' !== $description ) {
774
+	if ('' !== $description) {
775 775
 		?>
776 776
 		<div class="lsx-hp-archive-description row">
777
-			<div class="col-xs-12 description-wrapper"><?php echo wp_kses_post( $description ); ?></div>
777
+			<div class="col-xs-12 description-wrapper"><?php echo wp_kses_post($description); ?></div>
778 778
 		</div>
779 779
 		<?php
780 780
 	}
@@ -786,21 +786,21 @@  discard block
 block discarded – undo
786 786
  * @param  string $index
787 787
  * @return void
788 788
  */
789
-function lsx_health_plan_workout_tab_content( $index = 1 ) {
790
-	global $group_name,$shortcode_args;
789
+function lsx_health_plan_workout_tab_content($index = 1) {
790
+	global $group_name, $shortcode_args;
791 791
 	$group_name = 'workout_section_' . $index;
792
-	if ( false !== \lsx_health_plan\functions\get_option( 'exercise_enabled', false ) ) {
793
-		$layout = strtolower( \lsx_health_plan\functions\get_option( 'workout_tab_layout', 'table' ) );
792
+	if (false !== \lsx_health_plan\functions\get_option('exercise_enabled', false)) {
793
+		$layout = strtolower(\lsx_health_plan\functions\get_option('workout_tab_layout', 'table'));
794 794
 
795 795
 		// Check for shortcode overrides.
796
-		if ( null !== $shortcode_args && isset( $shortcode_args['layout'] ) ) {
796
+		if (null !== $shortcode_args && isset($shortcode_args['layout'])) {
797 797
 			$layout = $shortcode_args['layout'];
798 798
 		}
799 799
 	} else {
800 800
 		$layout = 'table';
801 801
 	}
802 802
 
803
-	switch ( $layout ) {
803
+	switch ($layout) {
804 804
 		case 'list':
805 805
 			$tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-list.php';
806 806
 			break;
@@ -813,8 +813,8 @@  discard block
 block discarded – undo
813 813
 			$tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-table.php';
814 814
 			break;
815 815
 	}
816
-	$tab_template_path = apply_filters( 'lsx_health_plan_workout_tab_content_path', $tab_template_path );
817
-	if ( '' !== $tab_template_path ) {
816
+	$tab_template_path = apply_filters('lsx_health_plan_workout_tab_content_path', $tab_template_path);
817
+	if ('' !== $tab_template_path) {
818 818
 		include $tab_template_path;
819 819
 	}
820 820
 }
@@ -825,13 +825,13 @@  discard block
 block discarded – undo
825 825
  * @return void
826 826
  */
827 827
 function lsx_health_plan_workout_sets() {
828
-	if ( is_singular( 'workout' ) ) {
828
+	if (is_singular('workout')) {
829 829
 		global $connected_workouts;
830
-		$connected_workouts = array( get_the_ID() );
830
+		$connected_workouts = array(get_the_ID());
831 831
 	}
832 832
 	$template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php';
833
-	$template_path = apply_filters( 'lsx_health_plan_workout_set_template_path', $template_path );
834
-	if ( '' !== $template_path && ! empty( $template_path ) ) {
833
+	$template_path = apply_filters('lsx_health_plan_workout_set_template_path', $template_path);
834
+	if ('' !== $template_path && ! empty($template_path)) {
835 835
 		include $template_path;
836 836
 	}
837 837
 }
Please login to merge, or discard this patch.
Indentation   +394 added lines, -394 removed lines patch added patch discarded remove patch
@@ -11,25 +11,25 @@  discard block
 block discarded – undo
11 11
 * @return void
12 12
 */
13 13
 function lsx_health_plan_warmup_box() {
14
-	?>
14
+     ?>
15 15
 	<div class="col-md-4" >
16 16
 		<div class="lsx-health-plan-box">
17 17
 			<h3 class="title warm-up-title title-lined"><?php esc_html_e( 'Your Warm-up', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'warm.svg' ); ?></h3>
18 18
 			<div class="spacer"></div>
19 19
 			<?php
20
-			$intro_text = \lsx_health_plan\functions\get_option( 'warmup_intro', false );
21
-			if ( false !== $intro_text ) {
22
-				?>
20
+               $intro_text = \lsx_health_plan\functions\get_option( 'warmup_intro', false );
21
+               if ( false !== $intro_text ) {
22
+                    ?>
23 23
 				<div class="excerpt">
24 24
 					<p><?php echo wp_kses_post( $intro_text ); ?></p>
25 25
 				</div>
26 26
 				<?php
27
-			}
28
-			$warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
29
-			if ( false === $warm_up ) {
30
-				$warm_up = 'warm-up';
31
-			}
32
-			?>
27
+               }
28
+               $warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
29
+               if ( false === $warm_up ) {
30
+                    $warm_up = 'warm-up';
31
+               }
32
+               ?>
33 33
 			<a href="<?php the_permalink(); ?><?php echo esc_attr( $warm_up ); ?>/" class="btn"><?php esc_html_e( 'Start your warm-up', 'lsx-health-plan' ); ?></a>
34 34
 		</div>
35 35
 	</div>
@@ -42,28 +42,28 @@  discard block
 block discarded – undo
42 42
 * @return void
43 43
 */
44 44
 function lsx_health_plan_workout_box() {
45
-	if ( ! post_type_exists( 'workout' ) ) {
46
-		return;
47
-	}
48
-	?>
45
+     if ( ! post_type_exists( 'workout' ) ) {
46
+          return;
47
+     }
48
+     ?>
49 49
 	<div class="col-md-4" >
50 50
 		<div class="lsx-health-plan-box">
51 51
 			<h3 class="title work-out-title title-lined"><?php esc_html_e( 'Your Workout', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'work.svg' ); ?></h3>
52 52
 			<div class="spacer"></div>
53 53
 			<?php
54
-			$intro_text = \lsx_health_plan\functions\get_option( 'workout_intro', false );
55
-			if ( false !== $intro_text ) {
56
-				?>
54
+               $intro_text = \lsx_health_plan\functions\get_option( 'workout_intro', false );
55
+               if ( false !== $intro_text ) {
56
+                    ?>
57 57
 				<div class="excerpt">
58 58
 					<p><?php echo wp_kses_post( $intro_text ); ?></p>
59 59
 				</div>
60 60
 				<?php
61
-			}
62
-			$workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
63
-			if ( false === $workout ) {
64
-				$workout = 'workout';
65
-			}
66
-			?>
61
+               }
62
+               $workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
63
+               if ( false === $workout ) {
64
+                    $workout = 'workout';
65
+               }
66
+               ?>
67 67
 			<a href="<?php the_permalink(); ?><?php echo esc_attr( $workout ); ?>/" class="btn"><?php esc_html_e( 'Start your workout', 'lsx-health-plan' ); ?></a>
68 68
 		</div>
69 69
 	</div>
@@ -76,28 +76,28 @@  discard block
 block discarded – undo
76 76
 * @return void
77 77
 */
78 78
 function lsx_health_plan_meal_box() {
79
-	if ( ! post_type_exists( 'meal' ) ) {
80
-		return;
81
-	}
82
-	?>
79
+     if ( ! post_type_exists( 'meal' ) ) {
80
+          return;
81
+     }
82
+     ?>
83 83
 	<div class="col-md-4" >
84 84
 		<div class="lsx-health-plan-box">
85 85
 			<h3 class="title meal-plan-title title-lined"><?php esc_html_e( 'Your Meal Plan', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'meal.svg' ); ?></h3>
86 86
 			<div class="spacer"></div>
87 87
 			<?php
88
-			$intro_text = \lsx_health_plan\functions\get_option( 'meal_plan_intro', false );
89
-			if ( false !== $intro_text ) {
90
-				?>
88
+               $intro_text = \lsx_health_plan\functions\get_option( 'meal_plan_intro', false );
89
+               if ( false !== $intro_text ) {
90
+                    ?>
91 91
 				<div class="excerpt">
92 92
 					<p><?php echo wp_kses_post( $intro_text ); ?></p>
93 93
 				</div>
94 94
 				<?php
95
-			}
96
-			$meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
97
-			if ( false === $meal ) {
98
-				$meal = 'meal';
99
-			}
100
-			?>
95
+               }
96
+               $meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
97
+               if ( false === $meal ) {
98
+                    $meal = 'meal';
99
+               }
100
+               ?>
101 101
 			<a href="<?php the_permalink(); ?><?php echo esc_attr( $meal ); ?>/" class="btn"><?php esc_html_e( 'View your meal plan', 'lsx-health-plan' ); ?></a>
102 102
 		</div>
103 103
 	</div>
@@ -110,28 +110,28 @@  discard block
 block discarded – undo
110 110
 * @return void
111 111
 */
112 112
 function lsx_health_plan_recipe_box() {
113
-	if ( ! post_type_exists( 'recipe' ) ) {
114
-		return;
115
-	}
116
-	?>
113
+     if ( ! post_type_exists( 'recipe' ) ) {
114
+          return;
115
+     }
116
+     ?>
117 117
 	<div class="col-md-4" >
118 118
 		<div class="lsx-health-plan-box">
119 119
 			<h3 class="title recipes-title title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'recipes.svg' ); ?></h3>
120 120
 			<div class="spacer"></div>
121 121
 			<?php
122
-			$intro_text = \lsx_health_plan\functions\get_option( 'recipes_intro', false );
123
-			if ( false !== $intro_text ) {
124
-				?>
122
+               $intro_text = \lsx_health_plan\functions\get_option( 'recipes_intro', false );
123
+               if ( false !== $intro_text ) {
124
+                    ?>
125 125
 				<div class="excerpt">
126 126
 					<p><?php echo wp_kses_post( $intro_text ); ?></p>
127 127
 				</div>
128 128
 				<?php
129
-			}
130
-			$recipes = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false );
131
-			if ( false === $recipes ) {
132
-				$recipes = 'recipes';
133
-			}
134
-			?>
129
+               }
130
+               $recipes = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false );
131
+               if ( false === $recipes ) {
132
+                    $recipes = 'recipes';
133
+               }
134
+               ?>
135 135
 			<a href="<?php the_permalink(); ?><?php echo esc_attr( $recipes ); ?>/" class="btn"><?php esc_html_e( 'View all recipes', 'lsx-health-plan' ); ?></a>
136 136
 		</div>
137 137
 	</div>
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 * @return void
145 145
 */
146 146
 function lsx_health_plan_downloads_box() {
147
-	global $current_user;
148
-	?>
147
+     global $current_user;
148
+     ?>
149 149
 	<div class="col-md-4 day-download-box" >
150 150
 		<div class="lsx-health-plan-box">
151 151
 			<h3 class="title downloads-title title-lined"><?php esc_html_e( 'Downloads', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'download.svg' ); ?></h3>
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
 			<div class="download-list">
154 154
 				<ul>
155 155
 					<?php
156
-					$downloads = \lsx_health_plan\functions\get_downloads();
157
-					if ( ! empty( $downloads ) ) {
158
-						foreach ( $downloads as $download ) {
159
-							echo wp_kses_post( '<li><a href=""><i class="fa fa-file-pdf"></i>' . do_shortcode( '[download id="' . $download . '"]' ) . '</a></li>' );
160
-						}
161
-					}
162
-					?>
156
+                         $downloads = \lsx_health_plan\functions\get_downloads();
157
+                         if ( ! empty( $downloads ) ) {
158
+                              foreach ( $downloads as $download ) {
159
+                                   echo wp_kses_post( '<li><a href=""><i class="fa fa-file-pdf"></i>' . do_shortcode( '[download id="' . $download . '"]' ) . '</a></li>' );
160
+                              }
161
+                         }
162
+                         ?>
163 163
 				</ul>
164 164
 			</div>
165 165
 		</div>
@@ -174,15 +174,15 @@  discard block
 block discarded – undo
174 174
  * @return void
175 175
  */
176 176
 function lsx_health_plan_nav_class( $tab = '' ) {
177
-	$nav_classes = array();
178
-	if ( function_exists( 'is_wc_endpoint_url' ) && 'edit-account' === $tab && is_wc_endpoint_url( 'edit-account' ) ) {
179
-		$nav_classes[] = 'active';
180
-	} elseif ( lsx_health_plan_is_current_tab( $tab ) ) {
181
-		$nav_classes[] = 'active';
182
-	}
183
-	if ( ! empty( $nav_classes ) ) {
184
-		echo wp_kses_post( implode( ' ', $nav_classes ) );
185
-	}
177
+     $nav_classes = array();
178
+     if ( function_exists( 'is_wc_endpoint_url' ) && 'edit-account' === $tab && is_wc_endpoint_url( 'edit-account' ) ) {
179
+          $nav_classes[] = 'active';
180
+     } elseif ( lsx_health_plan_is_current_tab( $tab ) ) {
181
+          $nav_classes[] = 'active';
182
+     }
183
+     if ( ! empty( $nav_classes ) ) {
184
+          echo wp_kses_post( implode( ' ', $nav_classes ) );
185
+     }
186 186
 }
187 187
 
188 188
 /**
@@ -191,22 +191,22 @@  discard block
 block discarded – undo
191 191
  * @return void
192 192
  */
193 193
 function lsx_health_plan_my_profile_tabs() {
194
-	?>
194
+     ?>
195 195
 	<div id="account-nav">
196 196
 		<ul class="nav nav-pills">
197 197
 			<li class="
198 198
 			<?php
199
-			if ( ( function_exists( 'is_wc_endpoint_url' ) && ! is_wc_endpoint_url( 'edit-account' ) ) || ! function_exists( 'is_wc_endpoint_url' ) ) {
200
-				echo esc_attr( 'active' );
201
-			}
202
-			?>
199
+               if ( ( function_exists( 'is_wc_endpoint_url' ) && ! is_wc_endpoint_url( 'edit-account' ) ) || ! function_exists( 'is_wc_endpoint_url' ) ) {
200
+                    echo esc_attr( 'active' );
201
+               }
202
+               ?>
203 203
 			"><a class="my-plan-tab" href="<?php the_permalink(); ?>"><?php esc_html_e( 'My Plan', 'lsx-health-plan' ); ?></a></li>
204 204
 			<li class="
205 205
 			<?php
206
-			if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'edit-account' ) ) {
207
-				echo esc_attr( 'active' );
208
-			}
209
-			?>
206
+               if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'edit-account' ) ) {
207
+                    echo esc_attr( 'active' );
208
+               }
209
+               ?>
210 210
 			"><a class="account-details-tab" href="<?php the_permalink(); ?>edit-account/"><?php esc_html_e( 'Account Details', 'lsx-health-plan' ); ?></a></li>
211 211
 			<li class=""><a class="logout-tab" href="<?php echo esc_url( wp_logout_url( get_permalink() ) ); ?>"><?php esc_html_e( 'Logout', 'lsx-health-plan' ); ?></a></li>
212 212
 		</ul>
@@ -220,24 +220,24 @@  discard block
 block discarded – undo
220 220
  * @return void
221 221
  */
222 222
 function lsx_health_plan_my_profile_box() {
223
-	?>
223
+     ?>
224 224
 	<div class="lsx-health-plan my-profile-block">
225 225
 		<div class="profile-navigation">
226 226
 			<div class="profile-photo">
227 227
 			<?php
228
-				global $current_user;
229
-				get_current_user();
230
-				echo get_avatar( $current_user->ID, 240 );
231
-				?>
228
+                    global $current_user;
229
+                    get_current_user();
230
+                    echo get_avatar( $current_user->ID, 240 );
231
+                    ?>
232 232
 			</div>
233 233
 			<div class="edit-profile">
234 234
 				<?php
235
-				if ( function_exists( 'wc_get_page_id' ) ) {
236
-					$url_id = wc_get_page_id( 'myaccount' );
237
-				} else {
238
-					$url_id = '';
239
-				}
240
-				?>
235
+                    if ( function_exists( 'wc_get_page_id' ) ) {
236
+                         $url_id = wc_get_page_id( 'myaccount' );
237
+                    } else {
238
+                         $url_id = '';
239
+                    }
240
+                    ?>
241 241
 				<a class="btn btn-green" href="<?php echo esc_url( get_permalink( $url_id ) ); ?>edit-account/"><?php esc_html_e( 'Edit Profile', 'lsx-health-plan' ); ?></a>
242 242
 			</div>
243 243
 		</div>
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
 		<div class="profile-details">
246 246
 			<h1 class="title-lined"><?php echo esc_html( $current_user->display_name ); ?></h1>
247 247
 			<?php
248
-			$disable_stats = \lsx_health_plan\functions\get_option( 'disable_all_stats', false );
249
-			if ( 'on' !== $disable_stats ) {
248
+               $disable_stats = \lsx_health_plan\functions\get_option( 'disable_all_stats', false );
249
+               if ( 'on' !== $disable_stats ) {
250 250
 
251
-				$is_weight_disabled  = \lsx_health_plan\functions\get_option( 'disable_weight_checkbox', false );
252
-				$is_waist_disabled   = \lsx_health_plan\functions\get_option( 'disable_waist_checkbox', false );
253
-				$is_fitness_disabled = \lsx_health_plan\functions\get_option( 'disable_fitness_checkbox', false );
254
-				?>
251
+                    $is_weight_disabled  = \lsx_health_plan\functions\get_option( 'disable_weight_checkbox', false );
252
+                    $is_waist_disabled   = \lsx_health_plan\functions\get_option( 'disable_waist_checkbox', false );
253
+                    $is_fitness_disabled = \lsx_health_plan\functions\get_option( 'disable_fitness_checkbox', false );
254
+                    ?>
255 255
 				<table class="table personal-information">
256 256
 					<thead>
257 257
 					<tr>
@@ -267,30 +267,30 @@  discard block
 block discarded – undo
267 267
 							<th scope="row"><strong><?php esc_html_e( 'Weight:', 'lsx-health-plan' ); ?></strong></th>
268 268
 							<td>
269 269
 								<?php
270
-								if ( '' !== get_user_meta( get_current_user_id(), 'weight_start', true ) ) {
271
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_start', true ) . ' kg' );
272
-								} else {
273
-									echo '/';
274
-								}
275
-								?>
270
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'weight_start', true ) ) {
271
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_start', true ) . ' kg' );
272
+                                        } else {
273
+                                             echo '/';
274
+                                        }
275
+                                        ?>
276 276
 							</td>
277 277
 							<td>
278 278
 								<?php
279
-								if ( '' !== get_user_meta( get_current_user_id(), 'weight_goal', true ) ) {
280
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_goal', true ) . ' kg' );
281
-								} else {
282
-									echo '/';
283
-								}
284
-								?>
279
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'weight_goal', true ) ) {
280
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_goal', true ) . ' kg' );
281
+                                        } else {
282
+                                             echo '/';
283
+                                        }
284
+                                        ?>
285 285
 							</td>
286 286
 							<td>
287 287
 								<?php
288
-								if ( '' !== get_user_meta( get_current_user_id(), 'weight_end', true ) ) {
289
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_end', true ) . ' kg' );
290
-								} else {
291
-									echo '/';
292
-								}
293
-								?>
288
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'weight_end', true ) ) {
289
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_end', true ) . ' kg' );
290
+                                        } else {
291
+                                             echo '/';
292
+                                        }
293
+                                        ?>
294 294
 							</td>
295 295
 						</tr>
296 296
 					<?php } ?>
@@ -299,30 +299,30 @@  discard block
 block discarded – undo
299 299
 							<th scope="row"><strong><?php esc_html_e( 'Waist:', 'lsx-health-plan' ); ?></strong></th>
300 300
 							<td>
301 301
 								<?php
302
-								if ( '' !== get_user_meta( get_current_user_id(), 'waist_start', true ) ) {
303
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_start', true ) . ' cm' );
304
-								} else {
305
-									echo '/';
306
-								}
307
-								?>
302
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'waist_start', true ) ) {
303
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_start', true ) . ' cm' );
304
+                                        } else {
305
+                                             echo '/';
306
+                                        }
307
+                                        ?>
308 308
 							</td>
309 309
 							<td>
310 310
 								<?php
311
-								if ( '' !== get_user_meta( get_current_user_id(), 'waist_goal', true ) ) {
312
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_goal', true ) . ' cm' );
313
-								} else {
314
-									echo '/';
315
-								}
316
-								?>
311
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'waist_goal', true ) ) {
312
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_goal', true ) . ' cm' );
313
+                                        } else {
314
+                                             echo '/';
315
+                                        }
316
+                                        ?>
317 317
 							</td>
318 318
 							<td>
319 319
 								<?php
320
-								if ( '' !== get_user_meta( get_current_user_id(), 'waist_end', true ) ) {
321
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_end', true ) . ' cm' );
322
-								} else {
323
-									echo '/';
324
-								}
325
-								?>
320
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'waist_end', true ) ) {
321
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_end', true ) . ' cm' );
322
+                                        } else {
323
+                                             echo '/';
324
+                                        }
325
+                                        ?>
326 326
 							</td>
327 327
 						</tr>
328 328
 					<?php } ?>
@@ -331,38 +331,38 @@  discard block
 block discarded – undo
331 331
 							<th scope="row"><strong><?php esc_html_e( 'Fitness:', 'lsx-health-plan' ); ?></strong></th>
332 332
 							<td>
333 333
 								<?php
334
-								if ( '' !== get_user_meta( get_current_user_id(), 'fitness_start', true ) ) {
335
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_start', true ) );
336
-								} else {
337
-									echo '/';
338
-								}
339
-								?>
334
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'fitness_start', true ) ) {
335
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_start', true ) );
336
+                                        } else {
337
+                                             echo '/';
338
+                                        }
339
+                                        ?>
340 340
 							</td>
341 341
 							<td>
342 342
 								<?php
343
-								if ( '' !== get_user_meta( get_current_user_id(), 'fitness_goal', true ) ) {
344
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_goal', true ) );
345
-								} else {
346
-									echo '/';
347
-								}
348
-								?>
343
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'fitness_goal', true ) ) {
344
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_goal', true ) );
345
+                                        } else {
346
+                                             echo '/';
347
+                                        }
348
+                                        ?>
349 349
 							</td>
350 350
 							<td>
351 351
 								<?php
352
-								if ( '' !== get_user_meta( get_current_user_id(), 'fitness_end', true ) ) {
353
-									echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_end', true ) );
354
-								} else {
355
-									echo '/';
356
-								}
357
-								?>
352
+                                        if ( '' !== get_user_meta( get_current_user_id(), 'fitness_end', true ) ) {
353
+                                             echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_end', true ) );
354
+                                        } else {
355
+                                             echo '/';
356
+                                        }
357
+                                        ?>
358 358
 							</td>
359 359
 						</tr>
360 360
 					<?php } ?>
361 361
 					</tbody>
362 362
 				</table>
363 363
 				<?php
364
-			}
365
-			?>
364
+               }
365
+               ?>
366 366
 		</div>
367 367
 	</div>
368 368
 	<?php
@@ -374,25 +374,25 @@  discard block
 block discarded – undo
374 374
  * @return void
375 375
  */
376 376
 function lsx_health_plan_day_plan_block() {
377
-	$args      = array(
378
-		'orderby'        => 'menu_order',
379
-		'order'          => 'ASC',
380
-		'post_type'      => 'plan',
381
-		'posts_per_page' => -1,
382
-		'nopagin'        => true,
383
-	);
384
-	$the_query = new WP_Query( $args );
385
-	?>
377
+     $args      = array(
378
+          'orderby'        => 'menu_order',
379
+          'order'          => 'ASC',
380
+          'post_type'      => 'plan',
381
+          'posts_per_page' => -1,
382
+          'nopagin'        => true,
383
+     );
384
+     $the_query = new WP_Query( $args );
385
+     ?>
386 386
 	<div class="daily-plan-block day-grid">
387 387
 		<?php
388
-		if ( $the_query->have_posts() ) :
389
-			while ( $the_query->have_posts() ) :
390
-				$the_query->the_post();
391
-				$completed_class = '';
392
-				if ( lsx_health_plan_is_day_complete() ) {
393
-					$completed_class = 'completed';
394
-				}
395
-				?>
388
+          if ( $the_query->have_posts() ) :
389
+               while ( $the_query->have_posts() ) :
390
+                    $the_query->the_post();
391
+                    $completed_class = '';
392
+                    if ( lsx_health_plan_is_day_complete() ) {
393
+                         $completed_class = 'completed';
394
+                    }
395
+                    ?>
396 396
 				<a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr( $completed_class ); ?>">
397 397
 					<div class="plan-content"><?php the_title(); ?></div>
398 398
 				</a>
@@ -411,63 +411,63 @@  discard block
 block discarded – undo
411 411
  * @return void
412 412
  */
413 413
 function lsx_health_plan_week_plan_block( $args = array() ) {
414
-	$defaults = array(
415
-		'show_downloads' => false,
416
-	);
417
-	$args     = wp_parse_args( $args, $defaults );
418
-	$weeks    = get_terms(
419
-		array(
420
-			'taxonomy' => 'week',
421
-			'orderby'  => 'menu_order',
422
-			'order'    => 'ASC',
423
-		)
424
-	);
425
-	if ( ! empty( $weeks ) ) {
426
-		$counter      = 1;
427
-		$section_open = false;
428
-
429
-		foreach ( $weeks as $week ) {
430
-			// Grab the days of the week.
431
-			$query_args      = array(
432
-				'orderby'        => 'menu_order',
433
-				'order'          => 'ASC',
434
-				'post_type'      => 'plan',
435
-				'posts_per_page' => -1,
436
-				'nopagin'        => true,
437
-				'tax_query'      => array(
438
-					array(
439
-						'taxonomy' => 'week',
440
-						'field'    => 'slug',
441
-						'terms'    => array( $week->slug ),
442
-					),
443
-				),
444
-			);
445
-			$the_query      = new WP_Query( $query_args );
446
-			$collapse_class = '';
447
-
448
-			// Determine if the current week is complete.
449
-			if ( $the_query->have_posts() ) {
450
-				$day_ids = wp_list_pluck( $the_query->posts, 'ID' );
451
-
452
-				if ( false === $section_open ) {
453
-					if ( 1 === $counter && ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) {
454
-						$collapse_class = 'in';
455
-						$section_open   = true;
456
-					} elseif ( ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) {
457
-						$collapse_class = 'in';
458
-						$section_open   = true;
459
-					}
460
-				}
461
-			}
462
-
463
-			// Determine if there are any weekly downloads.
464
-			if ( isset( $args['show_downloads'] ) && false !== $args['show_downloads'] ) {
465
-				$weekly_downloads = \lsx_health_plan\functions\get_weekly_downloads( $week->slug );
466
-				if ( ! empty( $weekly_downloads ) ) {
467
-					$week_downloads_view = 'week-downloads-view-on';
468
-				}
469
-			}
470
-			?>
414
+     $defaults = array(
415
+          'show_downloads' => false,
416
+     );
417
+     $args     = wp_parse_args( $args, $defaults );
418
+     $weeks    = get_terms(
419
+          array(
420
+               'taxonomy' => 'week',
421
+               'orderby'  => 'menu_order',
422
+               'order'    => 'ASC',
423
+          )
424
+     );
425
+     if ( ! empty( $weeks ) ) {
426
+          $counter      = 1;
427
+          $section_open = false;
428
+
429
+          foreach ( $weeks as $week ) {
430
+               // Grab the days of the week.
431
+               $query_args      = array(
432
+                    'orderby'        => 'menu_order',
433
+                    'order'          => 'ASC',
434
+                    'post_type'      => 'plan',
435
+                    'posts_per_page' => -1,
436
+                    'nopagin'        => true,
437
+                    'tax_query'      => array(
438
+                         array(
439
+                              'taxonomy' => 'week',
440
+                              'field'    => 'slug',
441
+                              'terms'    => array( $week->slug ),
442
+                         ),
443
+                    ),
444
+               );
445
+               $the_query      = new WP_Query( $query_args );
446
+               $collapse_class = '';
447
+
448
+               // Determine if the current week is complete.
449
+               if ( $the_query->have_posts() ) {
450
+                    $day_ids = wp_list_pluck( $the_query->posts, 'ID' );
451
+
452
+                    if ( false === $section_open ) {
453
+                         if ( 1 === $counter && ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) {
454
+                              $collapse_class = 'in';
455
+                              $section_open   = true;
456
+                         } elseif ( ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) {
457
+                              $collapse_class = 'in';
458
+                              $section_open   = true;
459
+                         }
460
+                    }
461
+               }
462
+
463
+               // Determine if there are any weekly downloads.
464
+               if ( isset( $args['show_downloads'] ) && false !== $args['show_downloads'] ) {
465
+                    $weekly_downloads = \lsx_health_plan\functions\get_weekly_downloads( $week->slug );
466
+                    if ( ! empty( $weekly_downloads ) ) {
467
+                         $week_downloads_view = 'week-downloads-view-on';
468
+                    }
469
+               }
470
+               ?>
471 471
 			<div class="daily-plan-block week-grid">
472 472
 				<a href="#week-<?php echo esc_attr( $week->slug ); ?>" data-toggle="collapse" class="week-title"><?php echo esc_attr( $week->name ); ?></a>
473 473
 				<div id="week-<?php echo esc_attr( $week->slug ); ?>" class="week-row collapse <?php echo esc_attr( $collapse_class ); ?>">
@@ -478,36 +478,36 @@  discard block
 block discarded – undo
478 478
 							<?php } ?>
479 479
 							<div class="week-meals-recipes-box-inner">
480 480
 							<?php
481
-							if ( $the_query->have_posts() ) :
482
-								while ( $the_query->have_posts() ) :
483
-									$the_query->the_post();
484
-									$completed_class = '';
485
-									if ( lsx_health_plan_is_day_complete() ) {
486
-										$completed_class = 'completed';
487
-									}
488
-									?>
481
+                                   if ( $the_query->have_posts() ) :
482
+                                        while ( $the_query->have_posts() ) :
483
+                                             $the_query->the_post();
484
+                                             $completed_class = '';
485
+                                             if ( lsx_health_plan_is_day_complete() ) {
486
+                                                  $completed_class = 'completed';
487
+                                             }
488
+                                             ?>
489 489
 									<a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr( $completed_class ); ?>">
490 490
 										<div class="plan-content"><?php the_title(); ?></div>
491 491
 									</a>
492 492
 									<?php
493
-								endwhile;
494
-							endif;
495
-							wp_reset_postdata();
496
-							?>
493
+                                        endwhile;
494
+                                   endif;
495
+                                   wp_reset_postdata();
496
+                                   ?>
497 497
 							</div>
498 498
 						</div>
499 499
 						<?php
500
-						if ( ! empty( $week_downloads_view ) ) {
501
-							lsx_health_plan_weekly_downloads( $weekly_downloads );
502
-						}
503
-						?>
500
+                              if ( ! empty( $week_downloads_view ) ) {
501
+                                   lsx_health_plan_weekly_downloads( $weekly_downloads );
502
+                              }
503
+                              ?>
504 504
 					</div>
505 505
 				</div>
506 506
 			</div>
507 507
 			<?php
508
-			++$counter;
509
-		}
510
-	}
508
+               ++$counter;
509
+          }
510
+     }
511 511
 }
512 512
 
513 513
 /**
@@ -517,22 +517,22 @@  discard block
 block discarded – undo
517 517
  * @return void
518 518
  */
519 519
 function lsx_health_plan_weekly_downloads( $weekly_downloads = array() ) {
520
-	if ( ! empty( $weekly_downloads ) ) {
521
-		?>
520
+     if ( ! empty( $weekly_downloads ) ) {
521
+          ?>
522 522
 		<div class="week-download-box">
523 523
 			<h3 class="title"><?php lsx_get_svg_icon( 'download.svg' ); ?><?php echo esc_html_e( 'Downloads', 'lsx-health-plan' ); ?></h3>
524 524
 			<ul class="week-download-box-list">
525 525
 				<?php
526
-				foreach ( $weekly_downloads as $weekly_download ) {
527
-					?>
526
+                    foreach ( $weekly_downloads as $weekly_download ) {
527
+                         ?>
528 528
 					<li><?php echo wp_kses_post( do_shortcode( '[download id="' . $weekly_download . '"]' ) ); ?></li>
529 529
 					<?php
530
-				}
531
-				?>
530
+                    }
531
+                    ?>
532 532
 			</ul>
533 533
 		</div>
534 534
 		<?php
535
-	}
535
+     }
536 536
 }
537 537
 
538 538
 /**
@@ -541,9 +541,9 @@  discard block
 block discarded – undo
541 541
  * @return void
542 542
  */
543 543
 function lsx_health_plan_items( $args = array() ) {
544
-	global $shortcode_args;
545
-	$shortcode_args = $args;
546
-	include LSX_HEALTH_PLAN_PATH . '/templates/partials/shortcode-loop.php';
544
+     global $shortcode_args;
545
+     $shortcode_args = $args;
546
+     include LSX_HEALTH_PLAN_PATH . '/templates/partials/shortcode-loop.php';
547 547
 }
548 548
 
549 549
 /**
@@ -552,10 +552,10 @@  discard block
 block discarded – undo
552 552
  * @return void
553 553
  */
554 554
 function lsx_health_plan_featured_video_block() {
555
-	if ( ! post_type_exists( 'video' ) ) {
556
-		return;
557
-	}
558
-	include LSX_HEALTH_PLAN_PATH . '/templates/featured-videos.php';
555
+     if ( ! post_type_exists( 'video' ) ) {
556
+          return;
557
+     }
558
+     include LSX_HEALTH_PLAN_PATH . '/templates/featured-videos.php';
559 559
 }
560 560
 
561 561
 /**
@@ -564,10 +564,10 @@  discard block
 block discarded – undo
564 564
  * @return void
565 565
  */
566 566
 function lsx_health_plan_featured_recipes_block() {
567
-	if ( ! post_type_exists( 'recipe' ) ) {
568
-		return;
569
-	}
570
-	include LSX_HEALTH_PLAN_PATH . '/templates/featured-recipes.php';
567
+     if ( ! post_type_exists( 'recipe' ) ) {
568
+          return;
569
+     }
570
+     include LSX_HEALTH_PLAN_PATH . '/templates/featured-recipes.php';
571 571
 }
572 572
 
573 573
 /**
@@ -576,10 +576,10 @@  discard block
 block discarded – undo
576 576
  * @return void
577 577
  */
578 578
 function lsx_health_plan_featured_tips_block() {
579
-	if ( ! post_type_exists( 'tip' ) ) {
580
-		return;
581
-	}
582
-	include LSX_HEALTH_PLAN_PATH . '/templates/featured-tips.php';
579
+     if ( ! post_type_exists( 'tip' ) ) {
580
+          return;
581
+     }
582
+     include LSX_HEALTH_PLAN_PATH . '/templates/featured-tips.php';
583 583
 }
584 584
 
585 585
 /**
@@ -589,11 +589,11 @@  discard block
 block discarded – undo
589 589
  * @return void
590 590
  */
591 591
 function lsx_health_plan_day_button() {
592
-	if ( lsx_health_plan_is_day_complete() ) {
593
-		lsx_health_plan_unlock_button();
594
-	} else {
595
-		lsx_health_plan_complete_button();
596
-	}
592
+     if ( lsx_health_plan_is_day_complete() ) {
593
+          lsx_health_plan_unlock_button();
594
+     } else {
595
+          lsx_health_plan_complete_button();
596
+     }
597 597
 }
598 598
 
599 599
 /**
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
  * @return void
603 603
  */
604 604
 function lsx_health_plan_complete_button() {
605
-	?>
605
+     ?>
606 606
 	<div class="single-plan-inner-buttons">
607 607
 		<form action="<?php the_permalink(); ?>" method="post" class="form-complete-day complete-plan-btn">
608 608
 			<?php wp_nonce_field( 'complete', 'lsx-health-plan-actions' ); ?>
@@ -611,12 +611,12 @@  discard block
 block discarded – undo
611 611
 		</form>
612 612
 		<div  class="back-plan-btn">
613 613
 			<?php
614
-			if ( function_exists( 'wc_get_page_id' ) ) {
615
-				?>
614
+               if ( function_exists( 'wc_get_page_id' ) ) {
615
+                    ?>
616 616
 				<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>
617 617
 				<?php
618
-			}
619
-			?>
618
+               }
619
+               ?>
620 620
 		</div>
621 621
 	</div>
622 622
 	<?php
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
  * @return void
629 629
  */
630 630
 function lsx_health_plan_unlock_button() {
631
-	?>
631
+     ?>
632 632
 	<div class="single-plan-inner-buttons">
633 633
 		<form action="<?php the_permalink(); ?>" method="post" class="form-complete-day complete-plan-btn">
634 634
 			<?php wp_nonce_field( 'unlock', 'lsx-health-plan-actions' ); ?>
@@ -637,12 +637,12 @@  discard block
 block discarded – undo
637 637
 		</form>
638 638
 		<div  class="back-plan-btn">
639 639
 		<?php
640
-		if ( function_exists( 'wc_get_page_id' ) ) {
641
-			?>
640
+          if ( function_exists( 'wc_get_page_id' ) ) {
641
+               ?>
642 642
 			<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>
643 643
 			<?php
644
-		}
645
-		?>
644
+          }
645
+          ?>
646 646
 		</div>
647 647
 	</div>
648 648
 	<?php
@@ -655,10 +655,10 @@  discard block
 block discarded – undo
655 655
  * @return void
656 656
  */
657 657
 function lsx_health_plan_single_nav() {
658
-	$tab_template_path = apply_filters( 'lsx_health_plan_single_nav_path', LSX_HEALTH_PLAN_PATH . '/templates/single-plan-tabs.php' );
659
-	if ( '' !== $tab_template_path ) {
660
-		require $tab_template_path;
661
-	}
658
+     $tab_template_path = apply_filters( 'lsx_health_plan_single_nav_path', LSX_HEALTH_PLAN_PATH . '/templates/single-plan-tabs.php' );
659
+     if ( '' !== $tab_template_path ) {
660
+          require $tab_template_path;
661
+     }
662 662
 }
663 663
 
664 664
 /**
@@ -668,32 +668,32 @@  discard block
 block discarded – undo
668 668
  * @return void
669 669
  */
670 670
 function lsx_health_plan_single_tabs() {
671
-	$endpoint = get_query_var( 'endpoint' );
672
-	switch ( $endpoint ) {
673
-		case 'meal':
674
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-meal.php';
675
-			break;
676
-
677
-		case 'recipes':
678
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-recipes.php';
679
-			break;
680
-
681
-		case 'workout':
682
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-workout.php';
683
-			break;
684
-
685
-		case 'warm-up':
686
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-warm-up.php';
687
-			break;
688
-
689
-		default:
690
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-plan.php';
691
-			break;
692
-	}
693
-	$tab_template_path = apply_filters( 'lsx_health_plan_single_tab_path', $tab_template_path );
694
-	if ( '' !== $tab_template_path ) {
695
-		include $tab_template_path;
696
-	}
671
+     $endpoint = get_query_var( 'endpoint' );
672
+     switch ( $endpoint ) {
673
+          case 'meal':
674
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-meal.php';
675
+               break;
676
+
677
+          case 'recipes':
678
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-recipes.php';
679
+               break;
680
+
681
+          case 'workout':
682
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-workout.php';
683
+               break;
684
+
685
+          case 'warm-up':
686
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-warm-up.php';
687
+               break;
688
+
689
+          default:
690
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-plan.php';
691
+               break;
692
+     }
693
+     $tab_template_path = apply_filters( 'lsx_health_plan_single_tab_path', $tab_template_path );
694
+     if ( '' !== $tab_template_path ) {
695
+          include $tab_template_path;
696
+     }
697 697
 }
698 698
 
699 699
 /**
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
  * @return void
703 703
  */
704 704
 function lsx_health_plan_recipe_data() {
705
-	include LSX_HEALTH_PLAN_PATH . '/templates/table-recipe-data.php';
705
+     include LSX_HEALTH_PLAN_PATH . '/templates/table-recipe-data.php';
706 706
 }
707 707
 
708 708
 /**
@@ -711,11 +711,11 @@  discard block
 block discarded – undo
711 711
  * @return recipe_type
712 712
  */
713 713
 function lsx_health_plan_recipe_type() {
714
-	$term_obj_list = get_the_terms( get_the_ID(), 'recipe-type' );
715
-	$recipe_type   = $term_obj_list[0]->name;
716
-	if ( ! empty( $recipe_type ) ) {
717
-		return $recipe_type;
718
-	}
714
+     $term_obj_list = get_the_terms( get_the_ID(), 'recipe-type' );
715
+     $recipe_type   = $term_obj_list[0]->name;
716
+     if ( ! empty( $recipe_type ) ) {
717
+          return $recipe_type;
718
+     }
719 719
 }
720 720
 
721 721
 /**
@@ -726,35 +726,35 @@  discard block
 block discarded – undo
726 726
  * @return void
727 727
  */
728 728
 function lsx_health_plan_workout_video_play_button( $m, $group, $echo = true ) {
729
-	$workout_video = '';
730
-	$giphy         = '';
731
-	$youtube       = '';
732
-	if ( isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] ) {
733
-		$workout_video = esc_html( $group['connected_videos'] );
734
-		$giphy         = get_post_meta( $workout_video, 'video_giphy_source', true );
735
-		$youtube       = esc_url( get_post_meta( $workout_video, 'video_youtube_source', 1 ) );
736
-		$content       = get_post_field( 'post_content', $workout_video );
737
-		$play_button   = '<button data-toggle="modal" data-target="#workout-video-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>';
738
-
739
-		$modal_body = '';
740
-		if ( ! empty( $giphy ) ) {
741
-			$giphy      = \lsx_health_plan\functions\get_video_url( $giphy );
742
-			$modal_body = $giphy; // WPCS: XSS OK.
743
-		} elseif ( ! empty( $youtube ) ) {
744
-			$modal_body = wp_oembed_get( $youtube, array( // WPCS: XSS OK.
745
-				'width' => 480,
746
-			) );
747
-		}
748
-		$modal_body .= '<h5 class="modal-title title-lined">' . $group['name'] . '</h5>';
749
-		$modal_body .= $content;
750
-		\lsx_health_plan\functions\register_modal( 'workout-video-modal-' . $m, '', $modal_body );
751
-
752
-		if ( true === $echo ) {
753
-			echo wp_kses_post( $play_button );
754
-		} else {
755
-			return $play_button;
756
-		}
757
-	}
729
+     $workout_video = '';
730
+     $giphy         = '';
731
+     $youtube       = '';
732
+     if ( isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] ) {
733
+          $workout_video = esc_html( $group['connected_videos'] );
734
+          $giphy         = get_post_meta( $workout_video, 'video_giphy_source', true );
735
+          $youtube       = esc_url( get_post_meta( $workout_video, 'video_youtube_source', 1 ) );
736
+          $content       = get_post_field( 'post_content', $workout_video );
737
+          $play_button   = '<button data-toggle="modal" data-target="#workout-video-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>';
738
+
739
+          $modal_body = '';
740
+          if ( ! empty( $giphy ) ) {
741
+               $giphy      = \lsx_health_plan\functions\get_video_url( $giphy );
742
+               $modal_body = $giphy; // WPCS: XSS OK.
743
+          } elseif ( ! empty( $youtube ) ) {
744
+               $modal_body = wp_oembed_get( $youtube, array( // WPCS: XSS OK.
745
+                    'width' => 480,
746
+               ) );
747
+          }
748
+          $modal_body .= '<h5 class="modal-title title-lined">' . $group['name'] . '</h5>';
749
+          $modal_body .= $content;
750
+          \lsx_health_plan\functions\register_modal( 'workout-video-modal-' . $m, '', $modal_body );
751
+
752
+          if ( true === $echo ) {
753
+               echo wp_kses_post( $play_button );
754
+          } else {
755
+               return $play_button;
756
+          }
757
+     }
758 758
 }
759 759
 
760 760
 /**
@@ -763,21 +763,21 @@  discard block
 block discarded – undo
763 763
  * @return void
764 764
  */
765 765
 function lsx_health_plan_recipe_archive_description() {
766
-	$description = '';
767
-	if ( is_post_type_archive( 'recipe' ) ) {
768
-		$description = \lsx_health_plan\functions\get_option( 'recipe_archive_description', '' );
769
-	} elseif ( is_post_type_archive( 'exercise' ) ) {
770
-		$description = \lsx_health_plan\functions\get_option( 'exercise_archive_description', '' );
771
-	} elseif ( is_tax() ) {
772
-		$description = get_the_archive_description();
773
-	}
774
-	if ( '' !== $description ) {
775
-		?>
766
+     $description = '';
767
+     if ( is_post_type_archive( 'recipe' ) ) {
768
+          $description = \lsx_health_plan\functions\get_option( 'recipe_archive_description', '' );
769
+     } elseif ( is_post_type_archive( 'exercise' ) ) {
770
+          $description = \lsx_health_plan\functions\get_option( 'exercise_archive_description', '' );
771
+     } elseif ( is_tax() ) {
772
+          $description = get_the_archive_description();
773
+     }
774
+     if ( '' !== $description ) {
775
+          ?>
776 776
 		<div class="lsx-hp-archive-description row">
777 777
 			<div class="col-xs-12 description-wrapper"><?php echo wp_kses_post( $description ); ?></div>
778 778
 		</div>
779 779
 		<?php
780
-	}
780
+     }
781 781
 }
782 782
 
783 783
 /**
@@ -787,36 +787,36 @@  discard block
 block discarded – undo
787 787
  * @return void
788 788
  */
789 789
 function lsx_health_plan_workout_tab_content( $index = 1 ) {
790
-	global $group_name,$shortcode_args;
791
-	$group_name = 'workout_section_' . $index;
792
-	if ( false !== \lsx_health_plan\functions\get_option( 'exercise_enabled', false ) ) {
793
-		$layout = strtolower( \lsx_health_plan\functions\get_option( 'workout_tab_layout', 'table' ) );
794
-
795
-		// Check for shortcode overrides.
796
-		if ( null !== $shortcode_args && isset( $shortcode_args['layout'] ) ) {
797
-			$layout = $shortcode_args['layout'];
798
-		}
799
-	} else {
800
-		$layout = 'table';
801
-	}
802
-
803
-	switch ( $layout ) {
804
-		case 'list':
805
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-list.php';
806
-			break;
807
-
808
-		case 'grid':
809
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-grid.php';
810
-			break;
811
-
812
-		case 'table':
813
-			$tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-table.php';
814
-			break;
815
-	}
816
-	$tab_template_path = apply_filters( 'lsx_health_plan_workout_tab_content_path', $tab_template_path );
817
-	if ( '' !== $tab_template_path ) {
818
-		include $tab_template_path;
819
-	}
790
+     global $group_name,$shortcode_args;
791
+     $group_name = 'workout_section_' . $index;
792
+     if ( false !== \lsx_health_plan\functions\get_option( 'exercise_enabled', false ) ) {
793
+          $layout = strtolower( \lsx_health_plan\functions\get_option( 'workout_tab_layout', 'table' ) );
794
+
795
+          // Check for shortcode overrides.
796
+          if ( null !== $shortcode_args && isset( $shortcode_args['layout'] ) ) {
797
+               $layout = $shortcode_args['layout'];
798
+          }
799
+     } else {
800
+          $layout = 'table';
801
+     }
802
+
803
+     switch ( $layout ) {
804
+          case 'list':
805
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-list.php';
806
+               break;
807
+
808
+          case 'grid':
809
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-grid.php';
810
+               break;
811
+
812
+          case 'table':
813
+               $tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-table.php';
814
+               break;
815
+     }
816
+     $tab_template_path = apply_filters( 'lsx_health_plan_workout_tab_content_path', $tab_template_path );
817
+     if ( '' !== $tab_template_path ) {
818
+          include $tab_template_path;
819
+     }
820 820
 }
821 821
 
822 822
 /**
@@ -825,13 +825,13 @@  discard block
 block discarded – undo
825 825
  * @return void
826 826
  */
827 827
 function lsx_health_plan_workout_sets() {
828
-	if ( is_singular( 'workout' ) ) {
829
-		global $connected_workouts;
830
-		$connected_workouts = array( get_the_ID() );
831
-	}
832
-	$template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php';
833
-	$template_path = apply_filters( 'lsx_health_plan_workout_set_template_path', $template_path );
834
-	if ( '' !== $template_path && ! empty( $template_path ) ) {
835
-		include $template_path;
836
-	}
828
+     if ( is_singular( 'workout' ) ) {
829
+          global $connected_workouts;
830
+          $connected_workouts = array( get_the_ID() );
831
+     }
832
+     $template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php';
833
+     $template_path = apply_filters( 'lsx_health_plan_workout_set_template_path', $template_path );
834
+     if ( '' !== $template_path && ! empty( $template_path ) ) {
835
+          include $template_path;
836
+     }
837 837
 }
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.