Passed
Push — add/multiplan ( ffce77...a1658b )
by Warwick
03:56
created
templates/single-plan-tabs.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
 $plan_link       = get_permalink();
9 9
 $current_section = get_query_var( 'section', false );
10 10
 if ( '' !== $current_section ) {
11
-	$plan_link = \lsx_health_plan\functions\plan\get_permalink( get_the_ID(), $current_section );
11
+     $plan_link = \lsx_health_plan\functions\plan\get_permalink( get_the_ID(), $current_section );
12 12
 }
13 13
 
14 14
 if ( false !== $current_section && \lsx_health_plan\functions\plan\has_sections() ) {
15
-	$section_info = \lsx_health_plan\functions\plan\get_section_info( $current_section );
16
-	if ( empty( $section_info ) || ( isset( $section_info['rest_day_enabled'] ) && ! empty( $section_info['rest_day_enabled'] ) ) ) {
17
-		return;
18
-	}
15
+     $section_info = \lsx_health_plan\functions\plan\get_section_info( $current_section );
16
+     if ( empty( $section_info ) || ( isset( $section_info['rest_day_enabled'] ) && ! empty( $section_info['rest_day_enabled'] ) ) ) {
17
+          return;
18
+     }
19 19
 }
20 20
 
21 21
 ?>
@@ -23,33 +23,33 @@  discard block
 block discarded – undo
23 23
 	<ul class="nav nav-pills">
24 24
 		<li class="<?php lsx_health_plan_nav_class( '' ); ?>"><a class="overview-tab" href="<?php echo esc_attr( $plan_link ); ?>"><?php lsx_get_svg_icon( 'eye.svg' ); ?> <?php esc_html_e( 'Overview', 'lsx-health-plan' ); ?></a></li>
25 25
 		<?php
26
-		if ( lsx_health_plan_has_warmup() ) {
27
-			$warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
28
-			if ( false === $warm_up ) {
29
-				$warm_up = 'warm-up';
30
-			}
31
-			?>
26
+          if ( lsx_health_plan_has_warmup() ) {
27
+               $warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
28
+               if ( false === $warm_up ) {
29
+                    $warm_up = 'warm-up';
30
+               }
31
+               ?>
32 32
 				<li class="<?php lsx_health_plan_nav_class( 'warm-up' ); ?>"><a class="warm-up-tab" href="<?php echo esc_attr( $plan_link ); ?><?php echo esc_attr( $warm_up ); ?>/"><?php lsx_get_svg_icon( 'warm.svg' ); ?> <?php esc_html_e( 'Warm-up', 'lsx-health-plan' ); ?></a></li>				
33 33
 			<?php
34
-		}
35
-		if ( lsx_health_plan_has_workout() ) {
36
-			$workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
37
-			if ( false === $workout ) {
38
-				$workout = 'workout';
39
-			}
40
-			?>
34
+          }
35
+          if ( lsx_health_plan_has_workout() ) {
36
+               $workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
37
+               if ( false === $workout ) {
38
+                    $workout = 'workout';
39
+               }
40
+               ?>
41 41
 				<li class="<?php lsx_health_plan_nav_class( 'workout' ); ?>"><a class="workout-tab" href="<?php echo esc_attr( $plan_link ); ?><?php echo esc_attr( $workout ); ?>/"><?php lsx_get_svg_icon( 'work.svg' ); ?> <?php esc_html_e( 'Workout', 'lsx-health-plan' ); ?></a></li>
42 42
 			<?php
43
-		}
44
-		if ( lsx_health_plan_has_meal() ) {
45
-			$meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
46
-			if ( false === $meal ) {
47
-				$meal = 'meal';
48
-			}
49
-			?>
43
+          }
44
+          if ( lsx_health_plan_has_meal() ) {
45
+               $meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
46
+               if ( false === $meal ) {
47
+                    $meal = 'meal';
48
+               }
49
+               ?>
50 50
 				<li class="<?php lsx_health_plan_nav_class( 'meal' ); ?>"><a class="meal-plan-tab" href="<?php echo esc_attr( $plan_link ); ?><?php echo esc_attr( $meal ); ?>/"><?php lsx_get_svg_icon( 'meal.svg' ); ?> <?php esc_html_e( 'Meal Plan', 'lsx-health-plan' ); ?></a></li>
51 51
 			<?php
52
-		}
53
-		?>
52
+          }
53
+          ?>
54 54
 	</ul>
55 55
 </div>
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@  discard block
 block discarded – undo
6 6
 */
7 7
 
8 8
 $plan_link       = get_permalink();
9
-$current_section = get_query_var( 'section', false );
10
-if ( '' !== $current_section ) {
11
-	$plan_link = \lsx_health_plan\functions\plan\get_permalink( get_the_ID(), $current_section );
9
+$current_section = get_query_var('section', false);
10
+if ('' !== $current_section) {
11
+	$plan_link = \lsx_health_plan\functions\plan\get_permalink(get_the_ID(), $current_section);
12 12
 }
13 13
 
14
-if ( false !== $current_section && \lsx_health_plan\functions\plan\has_sections() ) {
15
-	$section_info = \lsx_health_plan\functions\plan\get_section_info( $current_section );
16
-	if ( empty( $section_info ) || ( isset( $section_info['rest_day_enabled'] ) && ! empty( $section_info['rest_day_enabled'] ) ) ) {
14
+if (false !== $current_section && \lsx_health_plan\functions\plan\has_sections()) {
15
+	$section_info = \lsx_health_plan\functions\plan\get_section_info($current_section);
16
+	if (empty($section_info) || (isset($section_info['rest_day_enabled']) && ! empty($section_info['rest_day_enabled']))) {
17 17
 		return;
18 18
 	}
19 19
 }
@@ -21,33 +21,33 @@  discard block
 block discarded – undo
21 21
 ?>
22 22
 <div id="single-plan-nav">
23 23
 	<ul class="nav nav-pills">
24
-		<li class="<?php lsx_health_plan_nav_class( '' ); ?>"><a class="overview-tab" href="<?php echo esc_attr( $plan_link ); ?>"><?php lsx_get_svg_icon( 'eye.svg' ); ?> <?php esc_html_e( 'Overview', 'lsx-health-plan' ); ?></a></li>
24
+		<li class="<?php lsx_health_plan_nav_class(''); ?>"><a class="overview-tab" href="<?php echo esc_attr($plan_link); ?>"><?php lsx_get_svg_icon('eye.svg'); ?> <?php esc_html_e('Overview', 'lsx-health-plan'); ?></a></li>
25 25
 		<?php
26
-		if ( lsx_health_plan_has_warmup() ) {
27
-			$warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false );
28
-			if ( false === $warm_up ) {
26
+		if (lsx_health_plan_has_warmup()) {
27
+			$warm_up = \lsx_health_plan\functions\get_option('endpoint_warm_up', false);
28
+			if (false === $warm_up) {
29 29
 				$warm_up = 'warm-up';
30 30
 			}
31 31
 			?>
32
-				<li class="<?php lsx_health_plan_nav_class( 'warm-up' ); ?>"><a class="warm-up-tab" href="<?php echo esc_attr( $plan_link ); ?><?php echo esc_attr( $warm_up ); ?>/"><?php lsx_get_svg_icon( 'warm.svg' ); ?> <?php esc_html_e( 'Warm-up', 'lsx-health-plan' ); ?></a></li>				
32
+				<li class="<?php lsx_health_plan_nav_class('warm-up'); ?>"><a class="warm-up-tab" href="<?php echo esc_attr($plan_link); ?><?php echo esc_attr($warm_up); ?>/"><?php lsx_get_svg_icon('warm.svg'); ?> <?php esc_html_e('Warm-up', 'lsx-health-plan'); ?></a></li>				
33 33
 			<?php
34 34
 		}
35
-		if ( lsx_health_plan_has_workout() ) {
36
-			$workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false );
37
-			if ( false === $workout ) {
35
+		if (lsx_health_plan_has_workout()) {
36
+			$workout = \lsx_health_plan\functions\get_option('endpoint_workout', false);
37
+			if (false === $workout) {
38 38
 				$workout = 'workout';
39 39
 			}
40 40
 			?>
41
-				<li class="<?php lsx_health_plan_nav_class( 'workout' ); ?>"><a class="workout-tab" href="<?php echo esc_attr( $plan_link ); ?><?php echo esc_attr( $workout ); ?>/"><?php lsx_get_svg_icon( 'work.svg' ); ?> <?php esc_html_e( 'Workout', 'lsx-health-plan' ); ?></a></li>
41
+				<li class="<?php lsx_health_plan_nav_class('workout'); ?>"><a class="workout-tab" href="<?php echo esc_attr($plan_link); ?><?php echo esc_attr($workout); ?>/"><?php lsx_get_svg_icon('work.svg'); ?> <?php esc_html_e('Workout', 'lsx-health-plan'); ?></a></li>
42 42
 			<?php
43 43
 		}
44
-		if ( lsx_health_plan_has_meal() ) {
45
-			$meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false );
46
-			if ( false === $meal ) {
44
+		if (lsx_health_plan_has_meal()) {
45
+			$meal = \lsx_health_plan\functions\get_option('endpoint_meal', false);
46
+			if (false === $meal) {
47 47
 				$meal = 'meal';
48 48
 			}
49 49
 			?>
50
-				<li class="<?php lsx_health_plan_nav_class( 'meal' ); ?>"><a class="meal-plan-tab" href="<?php echo esc_attr( $plan_link ); ?><?php echo esc_attr( $meal ); ?>/"><?php lsx_get_svg_icon( 'meal.svg' ); ?> <?php esc_html_e( 'Meal Plan', 'lsx-health-plan' ); ?></a></li>
50
+				<li class="<?php lsx_health_plan_nav_class('meal'); ?>"><a class="meal-plan-tab" href="<?php echo esc_attr($plan_link); ?><?php echo esc_attr($meal); ?>/"><?php lsx_get_svg_icon('meal.svg'); ?> <?php esc_html_e('Meal Plan', 'lsx-health-plan'); ?></a></li>
51 51
 			<?php
52 52
 		}
53 53
 		?>
Please login to merge, or discard this patch.