Passed
Push — add/multiplan ( b90a6b...55423f )
by Virginia
10:34
created
templates/tab-content-workout.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -26,24 +26,24 @@  discard block
 block discarded – undo
26 26
 
27 27
 	<div class="entry-content">
28 28
 		<?php
29
-			wp_link_pages(
30
-				array(
31
-					'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
32
-					'after'       => '</div></div>',
33
-					'link_before' => '<span>',
34
-					'link_after'  => '</span>',
35
-				)
36
-			);
37
-		?>
29
+               wp_link_pages(
30
+                    array(
31
+                         'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
32
+                         'after'       => '</div></div>',
33
+                         'link_before' => '<span>',
34
+                         'link_after'  => '</span>',
35
+                    )
36
+               );
37
+          ?>
38 38
 		<div class="single-plan-inner workout-content">
39 39
 			<?php
40
-			if ( is_singular( 'workout' ) ) { ?>
40
+               if ( is_singular( 'workout' ) ) { ?>
41 41
 				<div class="single-plan-section-title workout title-lined">
42 42
 					<?php lsx_get_svg_icon( 'work.svg' ); ?>
43 43
 					<h2><?php the_title(); ?></h2>
44 44
 					<?php if ( class_exists( 'LSX_Sharing' ) ) {
45
-						lsx_content_sharing();
46
-					} ?>
45
+                              lsx_content_sharing();
46
+                         } ?>
47 47
 				</div>
48 48
 			<?php } else { ?>
49 49
 				<div class="single-plan-section-title workout title-lined">
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 				</div>
53 53
 			<?php } ?>
54 54
 			<?php
55
-			if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) {
56
-				?>
55
+               if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) {
56
+                    ?>
57 57
 				<div class="workout-instructions">
58 58
 					<div class="row">
59 59
 						<div class="col-md-12">
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 					</div>
66 66
 				</div>
67 67
 				<?php
68
-			}
69
-			?>
68
+               }
69
+               ?>
70 70
 
71 71
 			<?php lsx_health_plan_workout_sets(); ?>
72 72
 		</div>
@@ -82,5 +82,5 @@  discard block
 block discarded – undo
82 82
 <?php } ?>
83 83
 <?php
84 84
 if ( ! empty( $connected_articles ) ) {
85
-	lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) );
85
+     lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) );
86 86
 }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 global $shortcode_args;
9 9
 
10 10
 // Getting translated endpoint.
11
-$archive_workout = \lsx_health_plan\functions\get_option( 'endpoint_workout_archive', 'workout' );
12
-$workout         = \lsx_health_plan\functions\get_option( 'endpoint_workout', 'workout' );
11
+$archive_workout = \lsx_health_plan\functions\get_option('endpoint_workout_archive', 'workout');
12
+$workout         = \lsx_health_plan\functions\get_option('endpoint_workout', 'workout');
13 13
 
14
-$connected_articles = get_post_meta( get_the_ID(), ( $workout . '_connected_articles' ), true );
14
+$connected_articles = get_post_meta(get_the_ID(), ($workout . '_connected_articles'), true);
15 15
 
16 16
 ?>
17 17
 
@@ -37,29 +37,29 @@  discard block
 block discarded – undo
37 37
 		?>
38 38
 		<div class="single-plan-inner workout-content">
39 39
 			<?php
40
-			if ( is_singular( 'workout' ) ) { ?>
40
+			if (is_singular('workout')) { ?>
41 41
 				<div class="single-plan-section-title workout title-lined">
42
-					<?php lsx_get_svg_icon( 'work.svg' ); ?>
42
+					<?php lsx_get_svg_icon('work.svg'); ?>
43 43
 					<h2><?php the_title(); ?></h2>
44
-					<?php if ( class_exists( 'LSX_Sharing' ) ) {
44
+					<?php if (class_exists('LSX_Sharing')) {
45 45
 						lsx_content_sharing();
46 46
 					} ?>
47 47
 				</div>
48 48
 			<?php } else { ?>
49 49
 				<div class="single-plan-section-title workout title-lined">
50
-					<?php lsx_get_svg_icon( 'work.svg' ); ?>
51
-					<h2><?php esc_html_e( 'My Workout', 'lsx-health-plan' ); ?></h2>
50
+					<?php lsx_get_svg_icon('work.svg'); ?>
51
+					<h2><?php esc_html_e('My Workout', 'lsx-health-plan'); ?></h2>
52 52
 				</div>
53 53
 			<?php } ?>
54 54
 			<?php
55
-			if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) {
55
+			if (lsx_health_plan_has_warmup() && ( ! is_singular('workout'))) {
56 56
 				?>
57 57
 				<div class="workout-instructions">
58 58
 					<div class="row">
59 59
 						<div class="col-md-12">
60 60
 							<div class="content-intro">
61
-								<h3><?php esc_html_e( "Don't forget your warm up!", 'lsx-health-plan' ); ?></h3>
62
-								<p><?php esc_html_e( 'Be sure to do the warm-up before every workout session.', 'lsx-health-plan' ); ?></p>
61
+								<h3><?php esc_html_e("Don't forget your warm up!", 'lsx-health-plan'); ?></h3>
62
+								<p><?php esc_html_e('Be sure to do the warm-up before every workout session.', 'lsx-health-plan'); ?></p>
63 63
 							</div>
64 64
 						</div>
65 65
 					</div>
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
 	<?php lsx_entry_bottom(); ?>
76 76
 
77 77
 </article><!-- #post-## -->
78
-<?php if ( is_singular( $workout ) ) { ?>
78
+<?php if (is_singular($workout)) { ?>
79 79
 	<div  class="back-plan-btn">
80
-		<a class="btn" href="/<?php echo $archive_workout; ?>"><?php esc_html_e( 'Back to workouts', 'lsx-health-plan' ); ?></a>
80
+		<a class="btn" href="/<?php echo $archive_workout; ?>"><?php esc_html_e('Back to workouts', 'lsx-health-plan'); ?></a>
81 81
 	</div>
82 82
 <?php } ?>
83 83
 <?php
84
-if ( ! empty( $connected_articles ) ) {
85
-	lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) );
84
+if ( ! empty($connected_articles)) {
85
+	lsx_hp_single_related($connected_articles, __('Related articles', 'lsx-health-plan'));
86 86
 }
Please login to merge, or discard this patch.
templates/tab-content-plan.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 $section_key  = get_query_var( 'section' );
9 9
 $endpoint_key = get_query_var( 'endpoint' );
10 10
 if ( '' !== $section_key && '' === $endpoint && \lsx_health_plan\functions\plan\has_sections() ) {
11
-	$section_info = \lsx_health_plan\functions\plan\get_section_info( $section_key );
12
-	if ( isset( $section_info['description'] ) && '' !== $section_info['description'] ) {
13
-		global $shortcode_args;
14
-		?>
11
+     $section_info = \lsx_health_plan\functions\plan\get_section_info( $section_key );
12
+     if ( isset( $section_info['description'] ) && '' !== $section_info['description'] ) {
13
+          global $shortcode_args;
14
+          ?>
15 15
 		<?php lsx_entry_before(); ?>
16 16
 
17 17
 		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 			<div class="entry-content">
26 26
 				<div class="overview">
27 27
 				<?php
28
-					echo wp_kses_post( apply_filters( 'the_content', $section_info['description'] ) );
29
-
30
-					wp_link_pages( array(
31
-						'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
32
-						'after'       => '</div></div>',
33
-						'link_before' => '<span>',
34
-						'link_after'  => '</span>',
35
-					) );
36
-				?>
28
+                         echo wp_kses_post( apply_filters( 'the_content', $section_info['description'] ) );
29
+
30
+                         wp_link_pages( array(
31
+                              'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
32
+                              'after'       => '</div></div>',
33
+                              'link_before' => '<span>',
34
+                              'link_after'  => '</span>',
35
+                         ) );
36
+                    ?>
37 37
 				</div>
38 38
 			</div><!-- .entry-content -->
39 39
 			<?php if ( null === $shortcode_args ) { ?>
@@ -51,6 +51,6 @@  discard block
 block discarded – undo
51 51
 		</article><!-- #post-## -->
52 52
 
53 53
 		<?php
54
-	}
54
+     }
55 55
 }
56 56
 ?>
Please login to merge, or discard this patch.
templates/tab-content-meal.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 	<div class="entry-content">
27 27
 		<div class="single-plan-inner meal-content">
28 28
 			<?php
29
-			if ( is_singular( 'meal' ) ) { ?>
29
+               if ( is_singular( 'meal' ) ) { ?>
30 30
 				<div class="single-plan-section-title meal-plan title-lined">
31 31
 					<?php lsx_get_svg_icon( 'meal.svg' ); ?>
32 32
 					<h2><?php the_title(); ?></h2>
33 33
 					<?php if ( class_exists( 'LSX_Sharing' ) ) {
34
-						lsx_content_sharing();
35
-					} ?>
34
+                              lsx_content_sharing();
35
+                         } ?>
36 36
 				</div>
37 37
 			<?php } else { ?>
38 38
 				<div class="single-plan-section-title meal-plan title-lined">
@@ -55,18 +55,18 @@  discard block
 block discarded – undo
55 55
 	<?php } ?>
56 56
 
57 57
 	<?php
58
-	// Shoping list
59
-	$shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true );
60
-	if ( ! empty( $shopping_list ) ) {
61
-		?>
58
+     // Shoping list
59
+     $shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true );
60
+     if ( ! empty( $shopping_list ) ) {
61
+          ?>
62 62
 		<a class="btn border-btn btn-shopping" href="<?php echo esc_url( get_page_link( $shopping_list ) ); ?>" target="_blank"><?php esc_html_e( 'Download Shopping List', 'lsx-health-plan' ); ?><i class="fa fa-download" aria-hidden="true"></i></a>
63 63
 	<?php
64
-	}
64
+     }
65 65
 
66
-	?>
66
+     ?>
67 67
 </div>
68 68
 
69 69
 <?php
70 70
 if ( ! empty( $connected_articles ) ) {
71
-	lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) );
71
+     lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) );
72 72
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
 
8 8
 // Getting translated endpoint.
9 9
 
10
-$archive_meals = \lsx_health_plan\functions\get_option( 'endpoint_meal_archive', 'meals' );
11
-$meal          = \lsx_health_plan\functions\get_option( 'endpoint_meal', 'meal' );
10
+$archive_meals = \lsx_health_plan\functions\get_option('endpoint_meal_archive', 'meals');
11
+$meal          = \lsx_health_plan\functions\get_option('endpoint_meal', 'meal');
12 12
 
13
-$connected_members  = get_post_meta( get_the_ID(), ( $meal . '_connected_team_member' ), true );
14
-$connected_articles = get_post_meta( get_the_ID(), ( $meal . '_connected_articles' ), true );
13
+$connected_members  = get_post_meta(get_the_ID(), ($meal . '_connected_team_member'), true);
14
+$connected_articles = get_post_meta(get_the_ID(), ($meal . '_connected_articles'), true);
15 15
 
16 16
 ?>
17 17
 
@@ -26,18 +26,18 @@  discard block
 block discarded – undo
26 26
 	<div class="entry-content">
27 27
 		<div class="single-plan-inner meal-content">
28 28
 			<?php
29
-			if ( is_singular( 'meal' ) ) { ?>
29
+			if (is_singular('meal')) { ?>
30 30
 				<div class="single-plan-section-title meal-plan title-lined">
31
-					<?php lsx_get_svg_icon( 'meal.svg' ); ?>
31
+					<?php lsx_get_svg_icon('meal.svg'); ?>
32 32
 					<h2><?php the_title(); ?></h2>
33
-					<?php if ( class_exists( 'LSX_Sharing' ) ) {
33
+					<?php if (class_exists('LSX_Sharing')) {
34 34
 						lsx_content_sharing();
35 35
 					} ?>
36 36
 				</div>
37 37
 			<?php } else { ?>
38 38
 				<div class="single-plan-section-title meal-plan title-lined">
39
-					<?php lsx_get_svg_icon( 'meal.svg' ); ?>
40
-					<h2><?php esc_html_e( 'My Meal Plan', 'lsx-health-plan' ); ?> <?php the_title(); ?></h2>
39
+					<?php lsx_get_svg_icon('meal.svg'); ?>
40
+					<h2><?php esc_html_e('My Meal Plan', 'lsx-health-plan'); ?> <?php the_title(); ?></h2>
41 41
 				</div>
42 42
 			<?php } ?>
43 43
 
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
 </article><!-- #post-## -->
51 51
 
52 52
 <div  class="back-plan-btn">
53
-	<?php if ( is_single() && is_singular( 'meal' ) ) { ?>
54
-		<a class="btn border-btn" href="/<?php echo $archive_meals; ?>"><?php esc_html_e( 'Back to meals', 'lsx-health-plan' ); ?></a>
53
+	<?php if (is_single() && is_singular('meal')) { ?>
54
+		<a class="btn border-btn" href="/<?php echo $archive_meals; ?>"><?php esc_html_e('Back to meals', 'lsx-health-plan'); ?></a>
55 55
 	<?php } ?>
56 56
 
57 57
 	<?php
58 58
 	// Shoping list
59
-	$shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true );
60
-	if ( ! empty( $shopping_list ) ) {
59
+	$shopping_list = get_post_meta(get_the_ID(), 'meal_shopping_list', true);
60
+	if ( ! empty($shopping_list)) {
61 61
 		?>
62
-		<a class="btn border-btn btn-shopping" href="<?php echo esc_url( get_page_link( $shopping_list ) ); ?>" target="_blank"><?php esc_html_e( 'Download Shopping List', 'lsx-health-plan' ); ?><i class="fa fa-download" aria-hidden="true"></i></a>
62
+		<a class="btn border-btn btn-shopping" href="<?php echo esc_url(get_page_link($shopping_list)); ?>" target="_blank"><?php esc_html_e('Download Shopping List', 'lsx-health-plan'); ?><i class="fa fa-download" aria-hidden="true"></i></a>
63 63
 	<?php
64 64
 	}
65 65
 
@@ -67,6 +67,6 @@  discard block
 block discarded – undo
67 67
 </div>
68 68
 
69 69
 <?php
70
-if ( ! empty( $connected_articles ) ) {
71
-	lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) );
70
+if ( ! empty($connected_articles)) {
71
+	lsx_hp_single_related($connected_articles, __('Related articles', 'lsx-health-plan'));
72 72
 }
Please login to merge, or discard this patch.
templates/tab-content-warm-up.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 
9 9
 $warm_up = get_post_meta( get_the_ID(), 'plan_warmup', true );
10 10
 if ( false === $warm_up || '' === $warm_up ) {
11
-	$options = \lsx_health_plan\functions\get_option( 'all' );
12
-	if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) {
13
-		$warm_up = $options['plan_warmup'];
14
-	}
11
+     $options = \lsx_health_plan\functions\get_option( 'all' );
12
+     if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) {
13
+          $warm_up = $options['plan_warmup'];
14
+     }
15 15
 }
16 16
 
17 17
 ?>
@@ -19,25 +19,25 @@  discard block
 block discarded – undo
19 19
 <?php
20 20
 
21 21
 if ( false !== $warm_up && '' !== $warm_up ) {
22
-	if ( ! is_array( $warm_up ) ) {
23
-		$warm_up = array( $warm_up );
24
-	}
22
+     if ( ! is_array( $warm_up ) ) {
23
+          $warm_up = array( $warm_up );
24
+     }
25 25
 
26
-	$warmup_type  = array( 'page', 'workout', 'exercise' );
27
-	$warmup_query = new WP_Query(
28
-		array(
29
-			'post__in'  => $warm_up,
30
-			'post_type' => $warmup_type,
31
-		)
32
-	);
26
+     $warmup_type  = array( 'page', 'workout', 'exercise' );
27
+     $warmup_query = new WP_Query(
28
+          array(
29
+               'post__in'  => $warm_up,
30
+               'post_type' => $warmup_type,
31
+          )
32
+     );
33 33
 
34
-	if ( $warmup_query->have_posts() ) {
35
-		while ( $warmup_query->have_posts() ) {
36
-			$warmup_query->the_post();
37
-			lsx_entry_before();
38
-			if ( 'workout' === get_post_type() ) {
39
-				$connected_workouts = array( get_the_ID() );
40
-				?>
34
+     if ( $warmup_query->have_posts() ) {
35
+          while ( $warmup_query->have_posts() ) {
36
+               $warmup_query->the_post();
37
+               lsx_entry_before();
38
+               if ( 'workout' === get_post_type() ) {
39
+                    $connected_workouts = array( get_the_ID() );
40
+                    ?>
41 41
 				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
42 42
 					<?php lsx_entry_top(); ?>
43 43
 					<div class="entry-content">
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 								<h2><?php esc_html_e( 'Warm Up', 'lsx-health-plan' ); ?></h2>
48 48
 							</div>
49 49
 						<?php
50
-							the_content();
51
-							wp_link_pages( array(
52
-								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
53
-								'after'       => '</div></div>',
54
-								'link_before' => '<span>',
55
-								'link_after'  => '</span>',
56
-							) );
57
-						?>
50
+                                   the_content();
51
+                                   wp_link_pages( array(
52
+                                        'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
53
+                                        'after'       => '</div></div>',
54
+                                        'link_before' => '<span>',
55
+                                        'link_after'  => '</span>',
56
+                                   ) );
57
+                              ?>
58 58
 						</div>
59 59
 					</div><!-- .entry-content -->
60 60
 					<?php lsx_entry_bottom(); ?>
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 					<?php } ?>
70 70
 				</article><!-- #post-## -->
71 71
 				<?php
72
-				lsx_health_plan_workout_sets();
73
-			} else {
74
-				?>
72
+                    lsx_health_plan_workout_sets();
73
+               } else {
74
+                    ?>
75 75
 				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
76 76
 					<?php lsx_entry_top(); ?>
77 77
 					<div class="entry-content">
@@ -81,24 +81,24 @@  discard block
 block discarded – undo
81 81
 								<h2><?php esc_html_e( 'Warm Up', 'lsx-health-plan' ); ?></h2>
82 82
 							</div>
83 83
 						<?php
84
-							the_content();
85
-							wp_link_pages( array(
86
-								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
87
-								'after'       => '</div></div>',
88
-								'link_before' => '<span>',
89
-								'link_after'  => '</span>',
90
-							) );
91
-						?>
84
+                                   the_content();
85
+                                   wp_link_pages( array(
86
+                                        'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
87
+                                        'after'       => '</div></div>',
88
+                                        'link_before' => '<span>',
89
+                                        'link_after'  => '</span>',
90
+                                   ) );
91
+                              ?>
92 92
 						</div>
93 93
 					</div><!-- .entry-content -->
94 94
 					<?php lsx_entry_bottom(); ?>
95 95
 				</article><!-- #post-## -->
96 96
 				<?php
97
-			}
97
+               }
98 98
 
99
-		}
100
-		wp_reset_postdata();
101
-	}
99
+          }
100
+          wp_reset_postdata();
101
+     }
102 102
 }
103 103
 ?>
104 104
 </div>
Please login to merge, or discard this patch.
templates/single-plan.php 2 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 
12 12
 <?php
13 13
 $args = array(
14
-	'post_parent' => get_the_ID(),
15
-	'post_type'   => 'plan',
14
+     'post_parent' => get_the_ID(),
15
+     'post_type'   => 'plan',
16 16
 );
17 17
 
18 18
 $plan_id      = get_the_ID();
@@ -28,18 +28,18 @@  discard block
 block discarded – undo
28 28
 $small_description  = get_post_meta( get_the_ID(), ( $plan . '_short_description' ), true );
29 29
 
30 30
 if ( ! empty( $has_sections ) && empty( $is_section ) ) {
31
-	$plan_type_class = 'parent-plan';
31
+     $plan_type_class = 'parent-plan';
32 32
 }
33 33
 if ( ! empty( $has_sections ) && ! empty( $is_section ) ) {
34
-	$plan_type_class = 'child-plan';
34
+     $plan_type_class = 'child-plan';
35 35
 }
36 36
 
37 37
 // Get the plan restrictions.
38 38
 if ( function_exists( 'wc_memberships_is_post_content_restricted' ) && wc_memberships_is_post_content_restricted( get_the_ID() ) ) {
39
-	$restricted = ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() );
39
+     $restricted = ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() );
40 40
 }
41 41
 if ( false === $restricted ) {
42
-	$round_progress = round( \lsx_health_plan\functions\get_progress( get_the_ID() ), 0 );
42
+     $round_progress = round( \lsx_health_plan\functions\get_progress( get_the_ID() ), 0 );
43 43
 }
44 44
 ?>
45 45
 
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 			<?php } ?>
60 60
 
61 61
 			<?php
62
-			if ( ! empty( $has_sections ) ) {
63
-				if ( false === $is_section ) {
64
-					?>
62
+               if ( ! empty( $has_sections ) ) {
63
+                    if ( false === $is_section ) {
64
+                         ?>
65 65
 					<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
66 66
 						<div class="entry-content">
67 67
 							<div class="single-plan-inner main-plan-content">
@@ -69,47 +69,47 @@  discard block
 block discarded – undo
69 69
 									<?php lsx_get_svg_icon( 'my-plan.svg' ); ?>
70 70
 									<h2><?php echo esc_html_e( 'Your Plan', 'lsx-health-plan' ); ?></h2>
71 71
 									<?php if ( class_exists( 'LSX_Sharing' ) ) {
72
-										lsx_content_sharing();
73
-									} ?>
72
+                                                  lsx_content_sharing();
73
+                                             } ?>
74 74
 								</div>
75 75
 								<div class="plan">
76 76
 									<div class="set-box set content-box entry-content">
77 77
 										<div class="plan-top-content">
78 78
 										<?php
79
-										if ( $connected_members ) {
80
-											echo wp_kses_post( lsx_hp_member_connected( $connected_members, $plan ) );
81
-										}
82
-										if ( false === $restricted ) {
83
-											echo wp_kses_post( '<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>' );
84
-										}
85
-										if ( $small_description ) {
86
-											?>
79
+                                                  if ( $connected_members ) {
80
+                                                       echo wp_kses_post( lsx_hp_member_connected( $connected_members, $plan ) );
81
+                                                  }
82
+                                                  if ( false === $restricted ) {
83
+                                                       echo wp_kses_post( '<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>' );
84
+                                                  }
85
+                                                  if ( $small_description ) {
86
+                                                       ?>
87 87
 											<div class="the-content">
88 88
 												<span><?php echo esc_html( $small_description ); ?></span>
89 89
 											</div>
90 90
 											<?php
91 91
 											
92
-										}
93
-										?>
92
+                                                  }
93
+                                                  ?>
94 94
 										</div>
95 95
 										<?php
96
-										if ( lsx_health_plan_has_tips() ) {
97
-											echo wp_kses_post( do_shortcode( '[lsx_health_plan_featured_tips_block]' ) );
98
-										} ?>
96
+                                                  if ( lsx_health_plan_has_tips() ) {
97
+                                                       echo wp_kses_post( do_shortcode( '[lsx_health_plan_featured_tips_block]' ) );
98
+                                                  } ?>
99 99
 									</div>
100 100
 									<div class="the-plan-content">
101 101
 										<?php
102
-										echo do_shortcode( '[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]' );
102
+                                                  echo do_shortcode( '[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]' );
103 103
 
104
-										?>
104
+                                                  ?>
105 105
 										<div class="row status-plan-buttons main-plan-btn">
106 106
 											<?php
107
-											if ( function_exists( 'wc_get_page_id' ) ) {
108
-												?>
107
+                                                       if ( function_exists( 'wc_get_page_id' ) ) {
108
+                                                            ?>
109 109
 												<a class="btn border-btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'My Plans', 'lsx-health-plan' ); ?></a>
110 110
 												<?php
111
-											}
112
-											?>
111
+                                                       }
112
+                                                       ?>
113 113
 										</div>
114 114
 									</div>
115 115
 								</div>
@@ -118,32 +118,32 @@  discard block
 block discarded – undo
118 118
 						</div><!-- .entry-content -->
119 119
 					</article>
120 120
 					<?php
121
-				} else {
122
-					lsx_health_plan_single_nav();
123
-					lsx_health_plan_single_tabs();
124
-				}
125
-			}
126
-			?>
121
+                    } else {
122
+                         lsx_health_plan_single_nav();
123
+                         lsx_health_plan_single_tabs();
124
+                    }
125
+               }
126
+               ?>
127 127
 		</div>
128 128
 
129 129
 		<?php
130
-		// Show the buttons on the single plan tabs.
131
-		if ( ! empty( $has_sections ) && false !== $is_section ) {
132
-			?>
130
+          // Show the buttons on the single plan tabs.
131
+          if ( ! empty( $has_sections ) && false !== $is_section ) {
132
+               ?>
133 133
 			<div class="row status-plan-buttons">
134 134
 				<?php lsx_health_plan_day_button(); ?>
135 135
 			</div>
136 136
 			<?php
137
-		}
138
-		?>
137
+          }
138
+          ?>
139 139
 
140 140
 		<?php lsx_content_bottom(); ?>
141 141
 
142 142
 		<?php
143
-		if ( ! empty( $connected_articles ) ) {
144
-			lsx_hp_single_related( $connected_articles, __( 'Latest articles', 'lsx-health-plan' ) );
145
-		}
146
-		?>
143
+          if ( ! empty( $connected_articles ) ) {
144
+               lsx_hp_single_related( $connected_articles, __( 'Latest articles', 'lsx-health-plan' ) );
145
+          }
146
+          ?>
147 147
 
148 148
 
149 149
 	</main><!-- #main -->
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -16,59 +16,59 @@  discard block
 block discarded – undo
16 16
 );
17 17
 
18 18
 $plan_id      = get_the_ID();
19
-$has_sections = \lsx_health_plan\functions\plan\has_sections( $plan_id );
19
+$has_sections = \lsx_health_plan\functions\plan\has_sections($plan_id);
20 20
 $restricted   = false;
21
-$is_section   = get_query_var( 'section', false );
21
+$is_section   = get_query_var('section', false);
22 22
 
23 23
 // Getting translated endpoint.
24
-$plan = \lsx_health_plan\functions\get_option( 'endpoint_plan', 'plan' );
24
+$plan = \lsx_health_plan\functions\get_option('endpoint_plan', 'plan');
25 25
 
26
-$connected_members  = get_post_meta( get_the_ID(), ( $plan . '_connected_team_member' ), true );
27
-$connected_articles = get_post_meta( get_the_ID(), ( $plan . '_connected_articles' ), true );
28
-$small_description  = get_post_meta( get_the_ID(), ( $plan . '_short_description' ), true );
26
+$connected_members  = get_post_meta(get_the_ID(), ($plan . '_connected_team_member'), true);
27
+$connected_articles = get_post_meta(get_the_ID(), ($plan . '_connected_articles'), true);
28
+$small_description  = get_post_meta(get_the_ID(), ($plan . '_short_description'), true);
29 29
 
30
-if ( ! empty( $has_sections ) && empty( $is_section ) ) {
30
+if ( ! empty($has_sections) && empty($is_section)) {
31 31
 	$plan_type_class = 'parent-plan';
32 32
 }
33
-if ( ! empty( $has_sections ) && ! empty( $is_section ) ) {
33
+if ( ! empty($has_sections) && ! empty($is_section)) {
34 34
 	$plan_type_class = 'child-plan';
35 35
 }
36 36
 
37 37
 // Get the plan restrictions.
38
-if ( function_exists( 'wc_memberships_is_post_content_restricted' ) && wc_memberships_is_post_content_restricted( get_the_ID() ) ) {
39
-	$restricted = ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() );
38
+if (function_exists('wc_memberships_is_post_content_restricted') && wc_memberships_is_post_content_restricted(get_the_ID())) {
39
+	$restricted = ! current_user_can('wc_memberships_view_restricted_post_content', get_the_ID());
40 40
 }
41
-if ( false === $restricted ) {
42
-	$round_progress = round( \lsx_health_plan\functions\get_progress( get_the_ID() ), 0 );
41
+if (false === $restricted) {
42
+	$round_progress = round(\lsx_health_plan\functions\get_progress(get_the_ID()), 0);
43 43
 }
44 44
 ?>
45 45
 
46
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
46
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
47 47
 
48 48
 	<?php lsx_content_before(); ?>
49 49
 
50
-	<main id="main" class="site-main <?php echo esc_html( $plan_type_class ); ?>" role="main">
50
+	<main id="main" class="site-main <?php echo esc_html($plan_type_class); ?>" role="main">
51 51
 
52 52
 		<?php lsx_content_top(); ?>
53 53
 
54 54
 		<div class="post-wrapper">
55
-			<?php if ( ! empty( $has_sections ) && empty( $is_section ) ) { ?>
55
+			<?php if ( ! empty($has_sections) && empty($is_section)) { ?>
56 56
 				<div class="plan-content">
57 57
 					<?php the_content(); ?>
58 58
 				</div>
59 59
 			<?php } ?>
60 60
 
61 61
 			<?php
62
-			if ( ! empty( $has_sections ) ) {
63
-				if ( false === $is_section ) {
62
+			if ( ! empty($has_sections)) {
63
+				if (false === $is_section) {
64 64
 					?>
65 65
 					<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
66 66
 						<div class="entry-content">
67 67
 							<div class="single-plan-inner main-plan-content">
68 68
 								<div class="single-plan-section-title title-lined">
69
-									<?php lsx_get_svg_icon( 'my-plan.svg' ); ?>
70
-									<h2><?php echo esc_html_e( 'Your Plan', 'lsx-health-plan' ); ?></h2>
71
-									<?php if ( class_exists( 'LSX_Sharing' ) ) {
69
+									<?php lsx_get_svg_icon('my-plan.svg'); ?>
70
+									<h2><?php echo esc_html_e('Your Plan', 'lsx-health-plan'); ?></h2>
71
+									<?php if (class_exists('LSX_Sharing')) {
72 72
 										lsx_content_sharing();
73 73
 									} ?>
74 74
 								</div>
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
 									<div class="set-box set content-box entry-content">
77 77
 										<div class="plan-top-content">
78 78
 										<?php
79
-										if ( $connected_members ) {
80
-											echo wp_kses_post( lsx_hp_member_connected( $connected_members, $plan ) );
79
+										if ($connected_members) {
80
+											echo wp_kses_post(lsx_hp_member_connected($connected_members, $plan));
81 81
 										}
82
-										if ( false === $restricted ) {
83
-											echo wp_kses_post( '<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>' );
82
+										if (false === $restricted) {
83
+											echo wp_kses_post('<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>');
84 84
 										}
85
-										if ( $small_description ) {
85
+										if ($small_description) {
86 86
 											?>
87 87
 											<div class="the-content">
88
-												<span><?php echo esc_html( $small_description ); ?></span>
88
+												<span><?php echo esc_html($small_description); ?></span>
89 89
 											</div>
90 90
 											<?php
91 91
 											
@@ -93,20 +93,20 @@  discard block
 block discarded – undo
93 93
 										?>
94 94
 										</div>
95 95
 										<?php
96
-										if ( lsx_health_plan_has_tips() ) {
97
-											echo wp_kses_post( do_shortcode( '[lsx_health_plan_featured_tips_block]' ) );
96
+										if (lsx_health_plan_has_tips()) {
97
+											echo wp_kses_post(do_shortcode('[lsx_health_plan_featured_tips_block]'));
98 98
 										} ?>
99 99
 									</div>
100 100
 									<div class="the-plan-content">
101 101
 										<?php
102
-										echo do_shortcode( '[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]' );
102
+										echo do_shortcode('[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]');
103 103
 
104 104
 										?>
105 105
 										<div class="row status-plan-buttons main-plan-btn">
106 106
 											<?php
107
-											if ( function_exists( 'wc_get_page_id' ) ) {
107
+											if (function_exists('wc_get_page_id')) {
108 108
 												?>
109
-												<a class="btn border-btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'My Plans', 'lsx-health-plan' ); ?></a>
109
+												<a class="btn border-btn" href="<?php echo wp_kses_post(get_permalink(wc_get_page_id('myaccount'))); ?>"><?php esc_html_e('My Plans', 'lsx-health-plan'); ?></a>
110 110
 												<?php
111 111
 											}
112 112
 											?>
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 		<?php
130 130
 		// Show the buttons on the single plan tabs.
131
-		if ( ! empty( $has_sections ) && false !== $is_section ) {
131
+		if ( ! empty($has_sections) && false !== $is_section) {
132 132
 			?>
133 133
 			<div class="row status-plan-buttons">
134 134
 				<?php lsx_health_plan_day_button(); ?>
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 		<?php lsx_content_bottom(); ?>
141 141
 
142 142
 		<?php
143
-		if ( ! empty( $connected_articles ) ) {
144
-			lsx_hp_single_related( $connected_articles, __( 'Latest articles', 'lsx-health-plan' ) );
143
+		if ( ! empty($connected_articles)) {
144
+			lsx_hp_single_related($connected_articles, __('Latest articles', 'lsx-health-plan'));
145 145
 		}
146 146
 		?>
147 147
 
Please login to merge, or discard this patch.