Passed
Push — dependabot/github_actions/styf... ( 144303 )
by
unknown
09:25 queued 04:35
created
templates/partials/workout-table.php 2 patches
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 global $group_name;
9
-$groups = get_post_meta( get_the_ID(), $group_name, true );
10
-if ( is_singular( 'workout' ) ) {
11
-	$groups = get_post_meta( get_queried_object_id(), $group_name, true );
9
+$groups = get_post_meta(get_the_ID(), $group_name, true);
10
+if (is_singular('workout')) {
11
+	$groups = get_post_meta(get_queried_object_id(), $group_name, true);
12 12
 }
13
-if ( ! empty( $groups ) ) {
13
+if ( ! empty($groups)) {
14 14
 	?>
15 15
 	<div class="set-table">
16 16
 		<table class="workout-table">
@@ -18,99 +18,99 @@  discard block
 block discarded – undo
18 18
 			$table_headers = array();
19 19
 			$table_body    = array();
20 20
 
21
-			foreach ( $groups as $group ) {
21
+			foreach ($groups as $group) {
22 22
 				$this_row = array();
23 23
 
24 24
 				$this_row[] = '<tr>';
25 25
 
26 26
 				// Getting the connected exercise.
27
-				if ( post_type_exists( 'exercise' ) ) {
28
-					if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) {
27
+				if (post_type_exists('exercise')) {
28
+					if (isset($group['connected_exercises']) && '' !== $group['connected_exercises'] && ! empty(\lsx_health_plan\functions\check_posts_exist(array($group['connected_exercises'])))) {
29 29
 						$exercise    = $group['connected_exercises'];
30
-						$exercise_id = get_post( $exercise );
30
+						$exercise_id = get_post($exercise);
31 31
 					}
32 32
 				} else {
33 33
 					$exercise    = false;
34 34
 					$exercise_id = false;
35 35
 				}
36 36
 
37
-				if ( false !== $exercise && '' !== $exercise ) {
38
-					$exercise_name         = get_the_title( $exercise_id );
39
-					$this_row[]            = '<td class="workout-title-item">' . esc_html( $exercise_name ) . '</td>';
37
+				if (false !== $exercise && '' !== $exercise) {
38
+					$exercise_name         = get_the_title($exercise_id);
39
+					$this_row[]            = '<td class="workout-title-item">' . esc_html($exercise_name) . '</td>';
40 40
 					$table_headers['name'] = true;
41 41
 				} else {
42
-					if ( isset( $group['name'] ) && '' !== $group['name'] ) {
43
-						$this_row[]            = '<td class="workout-title-item">' . esc_html( $group['name'] ) . '</td>';
42
+					if (isset($group['name']) && '' !== $group['name']) {
43
+						$this_row[]            = '<td class="workout-title-item">' . esc_html($group['name']) . '</td>';
44 44
 						$table_headers['name'] = true;
45 45
 					}
46 46
 				}
47 47
 				// Only display this is exercise is disabled.
48
-				if ( false === $exercise && isset( $group['description'] ) && '' !== $group['description'] ) {
49
-					$this_row[]                   = '<td class="workout-desc-item"><p>' . esc_html( $group['description'] ) . '</td>';
48
+				if (false === $exercise && isset($group['description']) && '' !== $group['description']) {
49
+					$this_row[]                   = '<td class="workout-desc-item"><p>' . esc_html($group['description']) . '</td>';
50 50
 					$table_headers['description'] = true;
51 51
 				}
52 52
 
53
-				if ( isset( $group['reps'] ) && '' !== $group['reps'] ) {
54
-					$this_row[]            = '<td class="reps-field-item center-mobile">' . esc_html( $group['reps'] ) . '</td>';
53
+				if (isset($group['reps']) && '' !== $group['reps']) {
54
+					$this_row[]            = '<td class="reps-field-item center-mobile">' . esc_html($group['reps']) . '</td>';
55 55
 					$table_headers['reps'] = true;
56 56
 				}
57 57
 
58 58
 				// Only display this is exercise is disabled.
59
-				if ( false === $exercise ) {
60
-					if ( isset( $group['equipment'] ) && '' !== $group['equipment'] ) {
61
-						$this_row[]                 = '<td class="equipment-field-item center-mobile">' . esc_html( $group['equipment'] ) . '</td>';
59
+				if (false === $exercise) {
60
+					if (isset($group['equipment']) && '' !== $group['equipment']) {
61
+						$this_row[]                 = '<td class="equipment-field-item center-mobile">' . esc_html($group['equipment']) . '</td>';
62 62
 						$table_headers['equipment'] = true;
63 63
 					}
64
-					if ( isset( $group['muscle'] ) && '' !== $group['muscle'] ) {
65
-						$this_row[]              = '<td class="muscle-field-item center-mobile">' . esc_html( $group['muscle'] ) . '</td>';
64
+					if (isset($group['muscle']) && '' !== $group['muscle']) {
65
+						$this_row[]              = '<td class="muscle-field-item center-mobile">' . esc_html($group['muscle']) . '</td>';
66 66
 						$table_headers['muscle'] = true;
67 67
 					}
68 68
 				}
69
-				if ( post_type_exists( 'video' ) && isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_videos'] ) ) ) ) {
70
-					$this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button( $m, $group, false ) . '</td>';
69
+				if (post_type_exists('video') && isset($group['connected_videos']) && '' !== $group['connected_videos'] && ! empty(\lsx_health_plan\functions\check_posts_exist(array($group['connected_videos'])))) {
70
+					$this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button($m, $group, false) . '</td>';
71 71
 					$table_headers['video'] = true;
72 72
 				}
73
-				if ( post_type_exists( 'exercise' ) && isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) {
74
-					$this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button( $m, $group, false ) . '</td>';
73
+				if (post_type_exists('exercise') && isset($group['connected_exercises']) && '' !== $group['connected_exercises'] && ! empty(\lsx_health_plan\functions\check_posts_exist(array($group['connected_exercises'])))) {
74
+					$this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button($m, $group, false) . '</td>';
75 75
 					$table_headers['exercise'] = true;
76 76
 				}
77 77
 				$this_row[] = '</tr>';
78 78
 
79
-				$table_body[] = implode( '', $this_row );
79
+				$table_body[] = implode('', $this_row);
80 80
 				$m++;
81 81
 			}
82 82
 
83 83
 			// Now we build the table header.
84 84
 			$table_header   = array();
85 85
 			$table_header[] = '<tr>';
86
-			if ( isset( $table_headers['name'] ) ) {
87
-				$table_header[] = '<th class="center-mobile">' . __( 'Workout', 'lsx-health-plan' ) . '</th>';
86
+			if (isset($table_headers['name'])) {
87
+				$table_header[] = '<th class="center-mobile">' . __('Workout', 'lsx-health-plan') . '</th>';
88 88
 			}
89
-			if ( isset( $table_headers['description'] ) ) {
90
-				$table_header[] = '<th class="center-mobile">' . __( 'Description', 'lsx-health-plan' ) . '</th>';
89
+			if (isset($table_headers['description'])) {
90
+				$table_header[] = '<th class="center-mobile">' . __('Description', 'lsx-health-plan') . '</th>';
91 91
 			}
92
-			if ( isset( $table_headers['reps'] ) ) {
93
-				$table_header[] = '<th class="center-mobile">' . __( 'Reps / Time / Distance', 'lsx-health-plan' ) . '</th>';
92
+			if (isset($table_headers['reps'])) {
93
+				$table_header[] = '<th class="center-mobile">' . __('Reps / Time / Distance', 'lsx-health-plan') . '</th>';
94 94
 			}
95
-			if ( isset( $table_headers['equipment'] ) ) {
96
-				$table_header[] = '<th class="center-mobile">' . __( 'Equipment', 'lsx-health-plan' ) . '</th>';
95
+			if (isset($table_headers['equipment'])) {
96
+				$table_header[] = '<th class="center-mobile">' . __('Equipment', 'lsx-health-plan') . '</th>';
97 97
 			}
98
-			if ( isset( $table_headers['muscle'] ) ) {
99
-				$table_header[] = '<th class="center-mobile">' . __( 'Muscle Group', 'lsx-health-plan' ) . '</th>';
98
+			if (isset($table_headers['muscle'])) {
99
+				$table_header[] = '<th class="center-mobile">' . __('Muscle Group', 'lsx-health-plan') . '</th>';
100 100
 			}
101
-			if ( isset( $table_headers['video'] ) ) {
102
-				$table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>';
101
+			if (isset($table_headers['video'])) {
102
+				$table_header[] = '<th class="center-mobile">' . __('How To', 'lsx-health-plan') . '</th>';
103 103
 			}
104
-			if ( isset( $table_headers['exercise'] ) ) {
105
-				$table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>';
104
+			if (isset($table_headers['exercise'])) {
105
+				$table_header[] = '<th class="center-mobile">' . __('How To', 'lsx-health-plan') . '</th>';
106 106
 			}
107 107
 			$table_header[] = '</tr>';
108 108
 			?>
109 109
 			<thead>
110
-				<?php echo wp_kses_post( implode( '', $table_header ) ); ?>
110
+				<?php echo wp_kses_post(implode('', $table_header)); ?>
111 111
 			</thead>
112 112
 			<tbody>
113
-				<?php echo wp_kses_post( implode( '', $table_body ) ); ?>
113
+				<?php echo wp_kses_post(implode('', $table_body)); ?>
114 114
 			</tbody>
115 115
 		</table>
116 116
 	<?php
Please login to merge, or discard this patch.
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -8,104 +8,104 @@
 block discarded – undo
8 8
 global $group_name;
9 9
 $groups = get_post_meta( get_the_ID(), $group_name, true );
10 10
 if ( is_singular( 'workout' ) ) {
11
-	$groups = get_post_meta( get_queried_object_id(), $group_name, true );
11
+     $groups = get_post_meta( get_queried_object_id(), $group_name, true );
12 12
 }
13 13
 if ( ! empty( $groups ) ) {
14
-	?>
14
+     ?>
15 15
 	<div class="set-table">
16 16
 		<table class="workout-table">
17 17
 			<?php
18
-			$table_headers = array();
19
-			$table_body    = array();
18
+               $table_headers = array();
19
+               $table_body    = array();
20 20
 
21
-			foreach ( $groups as $group ) {
22
-				$this_row = array();
21
+               foreach ( $groups as $group ) {
22
+                    $this_row = array();
23 23
 
24
-				$this_row[] = '<tr>';
24
+                    $this_row[] = '<tr>';
25 25
 
26
-				// Getting the connected exercise.
27
-				if ( post_type_exists( 'exercise' ) ) {
28
-					if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) {
29
-						$exercise    = $group['connected_exercises'];
30
-						$exercise_id = get_post( $exercise );
31
-					}
32
-				} else {
33
-					$exercise    = false;
34
-					$exercise_id = false;
35
-				}
26
+                    // Getting the connected exercise.
27
+                    if ( post_type_exists( 'exercise' ) ) {
28
+                         if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) {
29
+                              $exercise    = $group['connected_exercises'];
30
+                              $exercise_id = get_post( $exercise );
31
+                         }
32
+                    } else {
33
+                         $exercise    = false;
34
+                         $exercise_id = false;
35
+                    }
36 36
 
37
-				if ( false !== $exercise && '' !== $exercise ) {
38
-					$exercise_name         = get_the_title( $exercise_id );
39
-					$this_row[]            = '<td class="workout-title-item">' . esc_html( $exercise_name ) . '</td>';
40
-					$table_headers['name'] = true;
41
-				} else {
42
-					if ( isset( $group['name'] ) && '' !== $group['name'] ) {
43
-						$this_row[]            = '<td class="workout-title-item">' . esc_html( $group['name'] ) . '</td>';
44
-						$table_headers['name'] = true;
45
-					}
46
-				}
47
-				// Only display this is exercise is disabled.
48
-				if ( false === $exercise && isset( $group['description'] ) && '' !== $group['description'] ) {
49
-					$this_row[]                   = '<td class="workout-desc-item"><p>' . esc_html( $group['description'] ) . '</td>';
50
-					$table_headers['description'] = true;
51
-				}
37
+                    if ( false !== $exercise && '' !== $exercise ) {
38
+                         $exercise_name         = get_the_title( $exercise_id );
39
+                         $this_row[]            = '<td class="workout-title-item">' . esc_html( $exercise_name ) . '</td>';
40
+                         $table_headers['name'] = true;
41
+                    } else {
42
+                         if ( isset( $group['name'] ) && '' !== $group['name'] ) {
43
+                              $this_row[]            = '<td class="workout-title-item">' . esc_html( $group['name'] ) . '</td>';
44
+                              $table_headers['name'] = true;
45
+                         }
46
+                    }
47
+                    // Only display this is exercise is disabled.
48
+                    if ( false === $exercise && isset( $group['description'] ) && '' !== $group['description'] ) {
49
+                         $this_row[]                   = '<td class="workout-desc-item"><p>' . esc_html( $group['description'] ) . '</td>';
50
+                         $table_headers['description'] = true;
51
+                    }
52 52
 
53
-				if ( isset( $group['reps'] ) && '' !== $group['reps'] ) {
54
-					$this_row[]            = '<td class="reps-field-item center-mobile">' . esc_html( $group['reps'] ) . '</td>';
55
-					$table_headers['reps'] = true;
56
-				}
53
+                    if ( isset( $group['reps'] ) && '' !== $group['reps'] ) {
54
+                         $this_row[]            = '<td class="reps-field-item center-mobile">' . esc_html( $group['reps'] ) . '</td>';
55
+                         $table_headers['reps'] = true;
56
+                    }
57 57
 
58
-				// Only display this is exercise is disabled.
59
-				if ( false === $exercise ) {
60
-					if ( isset( $group['equipment'] ) && '' !== $group['equipment'] ) {
61
-						$this_row[]                 = '<td class="equipment-field-item center-mobile">' . esc_html( $group['equipment'] ) . '</td>';
62
-						$table_headers['equipment'] = true;
63
-					}
64
-					if ( isset( $group['muscle'] ) && '' !== $group['muscle'] ) {
65
-						$this_row[]              = '<td class="muscle-field-item center-mobile">' . esc_html( $group['muscle'] ) . '</td>';
66
-						$table_headers['muscle'] = true;
67
-					}
68
-				}
69
-				if ( post_type_exists( 'video' ) && isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_videos'] ) ) ) ) {
70
-					$this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button( $m, $group, false ) . '</td>';
71
-					$table_headers['video'] = true;
72
-				}
73
-				if ( post_type_exists( 'exercise' ) && isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) {
74
-					$this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button( $m, $group, false ) . '</td>';
75
-					$table_headers['exercise'] = true;
76
-				}
77
-				$this_row[] = '</tr>';
58
+                    // Only display this is exercise is disabled.
59
+                    if ( false === $exercise ) {
60
+                         if ( isset( $group['equipment'] ) && '' !== $group['equipment'] ) {
61
+                              $this_row[]                 = '<td class="equipment-field-item center-mobile">' . esc_html( $group['equipment'] ) . '</td>';
62
+                              $table_headers['equipment'] = true;
63
+                         }
64
+                         if ( isset( $group['muscle'] ) && '' !== $group['muscle'] ) {
65
+                              $this_row[]              = '<td class="muscle-field-item center-mobile">' . esc_html( $group['muscle'] ) . '</td>';
66
+                              $table_headers['muscle'] = true;
67
+                         }
68
+                    }
69
+                    if ( post_type_exists( 'video' ) && isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_videos'] ) ) ) ) {
70
+                         $this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button( $m, $group, false ) . '</td>';
71
+                         $table_headers['video'] = true;
72
+                    }
73
+                    if ( post_type_exists( 'exercise' ) && isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) {
74
+                         $this_row[]             = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button( $m, $group, false ) . '</td>';
75
+                         $table_headers['exercise'] = true;
76
+                    }
77
+                    $this_row[] = '</tr>';
78 78
 
79
-				$table_body[] = implode( '', $this_row );
80
-				$m++;
81
-			}
79
+                    $table_body[] = implode( '', $this_row );
80
+                    $m++;
81
+               }
82 82
 
83
-			// Now we build the table header.
84
-			$table_header   = array();
85
-			$table_header[] = '<tr>';
86
-			if ( isset( $table_headers['name'] ) ) {
87
-				$table_header[] = '<th class="center-mobile">' . __( 'Workout', 'lsx-health-plan' ) . '</th>';
88
-			}
89
-			if ( isset( $table_headers['description'] ) ) {
90
-				$table_header[] = '<th class="center-mobile">' . __( 'Description', 'lsx-health-plan' ) . '</th>';
91
-			}
92
-			if ( isset( $table_headers['reps'] ) ) {
93
-				$table_header[] = '<th class="center-mobile">' . __( 'Reps / Time / Distance', 'lsx-health-plan' ) . '</th>';
94
-			}
95
-			if ( isset( $table_headers['equipment'] ) ) {
96
-				$table_header[] = '<th class="center-mobile">' . __( 'Equipment', 'lsx-health-plan' ) . '</th>';
97
-			}
98
-			if ( isset( $table_headers['muscle'] ) ) {
99
-				$table_header[] = '<th class="center-mobile">' . __( 'Muscle Group', 'lsx-health-plan' ) . '</th>';
100
-			}
101
-			if ( isset( $table_headers['video'] ) ) {
102
-				$table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>';
103
-			}
104
-			if ( isset( $table_headers['exercise'] ) ) {
105
-				$table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>';
106
-			}
107
-			$table_header[] = '</tr>';
108
-			?>
83
+               // Now we build the table header.
84
+               $table_header   = array();
85
+               $table_header[] = '<tr>';
86
+               if ( isset( $table_headers['name'] ) ) {
87
+                    $table_header[] = '<th class="center-mobile">' . __( 'Workout', 'lsx-health-plan' ) . '</th>';
88
+               }
89
+               if ( isset( $table_headers['description'] ) ) {
90
+                    $table_header[] = '<th class="center-mobile">' . __( 'Description', 'lsx-health-plan' ) . '</th>';
91
+               }
92
+               if ( isset( $table_headers['reps'] ) ) {
93
+                    $table_header[] = '<th class="center-mobile">' . __( 'Reps / Time / Distance', 'lsx-health-plan' ) . '</th>';
94
+               }
95
+               if ( isset( $table_headers['equipment'] ) ) {
96
+                    $table_header[] = '<th class="center-mobile">' . __( 'Equipment', 'lsx-health-plan' ) . '</th>';
97
+               }
98
+               if ( isset( $table_headers['muscle'] ) ) {
99
+                    $table_header[] = '<th class="center-mobile">' . __( 'Muscle Group', 'lsx-health-plan' ) . '</th>';
100
+               }
101
+               if ( isset( $table_headers['video'] ) ) {
102
+                    $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>';
103
+               }
104
+               if ( isset( $table_headers['exercise'] ) ) {
105
+                    $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>';
106
+               }
107
+               $table_header[] = '</tr>';
108
+               ?>
109 109
 			<thead>
110 110
 				<?php echo wp_kses_post( implode( '', $table_header ) ); ?>
111 111
 			</thead>
Please login to merge, or discard this patch.
templates/partials/content-default.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,47 +9,47 @@
 block discarded – undo
9 9
 
10 10
 $column_class = '4';
11 11
 // Check for shortcode overrides.
12
-if ( null !== $shortcode_args ) {
13
-	if ( isset( $shortcode_args['columns'] ) ) {
12
+if (null !== $shortcode_args) {
13
+	if (isset($shortcode_args['columns'])) {
14 14
 		$column_class = $shortcode_args['columns'];
15
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
15
+		$column_class = \lsx_health_plan\functions\column_class($column_class);
16 16
 	}
17 17
 }
18 18
 
19 19
 lsx_entry_before();
20 20
 
21 21
 $post_id        = get_the_id();
22
-$featured_image = get_the_post_thumbnail_url( $post_id, $image_size );
22
+$featured_image = get_the_post_thumbnail_url($post_id, $image_size);
23 23
 ?>
24
-<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>">
25
-	<div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>">
24
+<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?>">
25
+	<div style="background-image:url('<?php echo esc_url($featured_image); ?>')" class="lsx-exercises-item bg-<?php echo esc_html($image_size); ?>">
26 26
 		<?php
27 27
 
28
-		if ( ( 'item' === $link ) || ( 'modal' === $link ) ) {
28
+		if (('item' === $link) || ('modal' === $link)) {
29 29
 			?>
30
-			<a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
30
+			<a href="<?php echo esc_url(get_permalink()); ?>" class="exercise-link excerpt-<?php echo esc_html($description); ?>">
31 31
 			<?php
32 32
 		} else {
33 33
 			?>
34
-			<div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
34
+			<div class="exercise-link excerpt-<?php echo esc_html($description); ?>">
35 35
 			<?php
36 36
 		}
37 37
 		?>
38 38
 
39
-		<?php the_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?>
40
-		<?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?>
39
+		<?php the_title('<h4 class="lsx-exercises-title">', '</h4>'); ?>
40
+		<?php if (isset($description) && ('none' !== $description)) { ?>
41 41
 			<?php
42
-			if ( 'excerpt' === $description ) {
43
-				$excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
42
+			if ('excerpt' === $description) {
43
+				$excerpt = \lsx_health_plan\functions\hp_excerpt($post_id);
44 44
 				?>
45
-				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
45
+				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post($excerpt); ?></p>
46 46
 			<?php } ?>
47
-			<?php if ( 'full' === $description ) { ?>
48
-				<?php echo wp_kses_post( get_the_content() ); ?>
47
+			<?php if ('full' === $description) { ?>
48
+				<?php echo wp_kses_post(get_the_content()); ?>
49 49
 			<?php } ?>
50 50
 		<?php } ?>
51 51
 		<?php
52
-		if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) {
52
+		if (isset($link) && (('item' === $link) || ('modal' === $link))) {
53 53
 		?>
54 54
 			</a>
55 55
 		<?php } else { ?>
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 $column_class = '4';
11 11
 // Check for shortcode overrides.
12 12
 if ( null !== $shortcode_args ) {
13
-	if ( isset( $shortcode_args['columns'] ) ) {
14
-		$column_class = $shortcode_args['columns'];
15
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
16
-	}
13
+     if ( isset( $shortcode_args['columns'] ) ) {
14
+          $column_class = $shortcode_args['columns'];
15
+          $column_class = \lsx_health_plan\functions\column_class( $column_class );
16
+     }
17 17
 }
18 18
 
19 19
 lsx_entry_before();
@@ -25,23 +25,23 @@  discard block
 block discarded – undo
25 25
 	<div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>">
26 26
 		<?php
27 27
 
28
-		if ( ( 'item' === $link ) || ( 'modal' === $link ) ) {
29
-			?>
28
+          if ( ( 'item' === $link ) || ( 'modal' === $link ) ) {
29
+               ?>
30 30
 			<a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
31 31
 			<?php
32
-		} else {
33
-			?>
32
+          } else {
33
+               ?>
34 34
 			<div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
35 35
 			<?php
36
-		}
37
-		?>
36
+          }
37
+          ?>
38 38
 
39 39
 		<?php the_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?>
40 40
 		<?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?>
41 41
 			<?php
42
-			if ( 'excerpt' === $description ) {
43
-				$excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
44
-				?>
42
+               if ( 'excerpt' === $description ) {
43
+                    $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
44
+                    ?>
45 45
 				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
46 46
 			<?php } ?>
47 47
 			<?php if ( 'full' === $description ) { ?>
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 			<?php } ?>
50 50
 		<?php } ?>
51 51
 		<?php
52
-		if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) {
53
-		?>
52
+          if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) {
53
+          ?>
54 54
 			</a>
55 55
 		<?php } else { ?>
56 56
 			</div>
Please login to merge, or discard this patch.
templates/partials/workout-grid.php 2 patches
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -5,30 +5,30 @@  discard block
 block discarded – undo
5 5
  * @package lsx-health-plan
6 6
  */
7 7
 
8
-global $group_name,$shortcode_args;
9
-$groups = get_post_meta( get_the_ID(), $group_name, true );
10
-if ( is_singular( 'workout' ) ) {
11
-	$groups = get_post_meta( get_queried_object_id(), $group_name, true );
8
+global $group_name, $shortcode_args;
9
+$groups = get_post_meta(get_the_ID(), $group_name, true);
10
+if (is_singular('workout')) {
11
+	$groups = get_post_meta(get_queried_object_id(), $group_name, true);
12 12
 }
13 13
 
14
-$link_setting          = \lsx_health_plan\functions\get_option( 'workout_tab_link', 'single' );
15
-$modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
16
-$content_setting       = \lsx_health_plan\functions\get_option( 'workout_tab_content', '' );
17
-$column_setting        = \lsx_health_plan\functions\get_option( 'workout_tab_columns', '4' );
14
+$link_setting          = \lsx_health_plan\functions\get_option('workout_tab_link', 'single');
15
+$modal_content_setting = \lsx_health_plan\functions\get_option('workout_tab_modal_content', 'excerpt');
16
+$content_setting       = \lsx_health_plan\functions\get_option('workout_tab_content', '');
17
+$column_setting        = \lsx_health_plan\functions\get_option('workout_tab_columns', '4');
18 18
 
19 19
 // Check for shortcode overrides.
20
-if ( null !== $shortcode_args ) {
21
-	if ( isset( $shortcode_args['link'] ) ) {
20
+if (null !== $shortcode_args) {
21
+	if (isset($shortcode_args['link'])) {
22 22
 		$link_setting = $shortcode_args['link'];
23 23
 	}
24
-	if ( isset( $shortcode_args['description'] ) ) {
24
+	if (isset($shortcode_args['description'])) {
25 25
 		$content_setting = $shortcode_args['description'];
26 26
 	}
27
-	if ( isset( $shortcode_args['columns'] ) ) {
27
+	if (isset($shortcode_args['columns'])) {
28 28
 		$column_setting = $shortcode_args['columns'];
29
-		$column_setting = \lsx_health_plan\functions\column_class( $column_setting );
29
+		$column_setting = \lsx_health_plan\functions\column_class($column_setting);
30 30
 	}
31
-	if ( isset( $shortcode_args['modal_content'] ) ) {
31
+	if (isset($shortcode_args['modal_content'])) {
32 32
 		$modal_content_setting = $shortcode_args['modal_content'];
33 33
 	}
34 34
 }
@@ -37,25 +37,25 @@  discard block
 block discarded – undo
37 37
 	'modal_content' => $modal_content_setting,
38 38
 );
39 39
 
40
-if ( ! empty( $groups ) ) {
40
+if ( ! empty($groups)) {
41 41
 	?>
42 42
 	<div class="set-grid">
43 43
 		<div class="workout-grid row">
44 44
 			<?php
45
-			foreach ( $groups as $group ) {
46
-				if ( isset( $group['connected_exercises'] ) ) {
45
+			foreach ($groups as $group) {
46
+				if (isset($group['connected_exercises'])) {
47 47
 					$reps = '';
48
-					if ( isset( $group['reps'] ) && '' !== $group['reps'] ) {
49
-						$reps = '<span class="reps">' . esc_html( $group['reps'] ) . '</span>';
48
+					if (isset($group['reps']) && '' !== $group['reps']) {
49
+						$reps = '<span class="reps">' . esc_html($group['reps']) . '</span>';
50 50
 					}
51 51
 					$class_excerpt = 'no-excerpt';
52
-					if ( 'excerpt' === $content_setting ) {
52
+					if ('excerpt' === $content_setting) {
53 53
 						$class_excerpt = 'has-excerpt';
54 54
 					}
55 55
 					// Setup our link and content.
56
-					switch ( $link_setting ) {
56
+					switch ($link_setting) {
57 57
 						case 'single':
58
-							$link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
58
+							$link_html  = '<a href="' . get_permalink($group['connected_exercises']) . '">';
59 59
 							$link_close = '</a>';
60 60
 							break;
61 61
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 							$link_html  = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
64 64
 							$link_close = '</a>';
65 65
 							// We call the button to register the modal, but we do not output it.
66
-							lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
66
+							lsx_health_plan_workout_exercise_button($group['connected_exercises'], $group, false, $modal_args);
67 67
 							break;
68 68
 
69 69
 						case 'none':
@@ -73,66 +73,66 @@  discard block
 block discarded – undo
73 73
 							break;
74 74
 					}
75 75
 					?>
76
-					<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_setting ); ?>">
76
+					<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_setting); ?>">
77 77
 						<article class="lsx-slot box-shadow">
78 78
 							<div class="exercise-feature-img">
79
-								<?php echo wp_kses_post( $link_html ); ?>
79
+								<?php echo wp_kses_post($link_html); ?>
80 80
 									<?php
81 81
 									$thumbnail_args = array(
82 82
 										'class' => 'aligncenter',
83 83
 									);
84
-									$featured_image = get_the_post_thumbnail( $group['connected_exercises'], 'medium', $thumbnail_args );
85
-									if ( ! empty( $featured_image ) && '' !== $featured_image ) {
86
-										echo wp_kses_post( $featured_image );
84
+									$featured_image = get_the_post_thumbnail($group['connected_exercises'], 'medium', $thumbnail_args);
85
+									if ( ! empty($featured_image) && '' !== $featured_image) {
86
+										echo wp_kses_post($featured_image);
87 87
 									} else {
88 88
 										?>
89
-										<img src="<?php echo esc_attr( plugin_dir_url( __DIR__ ) . '../assets/images/placeholder.jpg' ); ?>">
89
+										<img src="<?php echo esc_attr(plugin_dir_url(__DIR__) . '../assets/images/placeholder.jpg'); ?>">
90 90
 										<?php
91 91
 									}
92 92
 									?>
93
-								<?php echo wp_kses_post( $link_close ); ?>
93
+								<?php echo wp_kses_post($link_close); ?>
94 94
 							</div>
95 95
 							<div class="content-box exercise-content-box white-bg">
96
-								<h3 class="title-lined <?php echo esc_html( $class_excerpt ); ?>">
97
-									<?php echo wp_kses_post( $link_html ); ?>
96
+								<h3 class="title-lined <?php echo esc_html($class_excerpt); ?>">
97
+									<?php echo wp_kses_post($link_html); ?>
98 98
 											<?php
99
-											$exercise_title = lsx_health_plan_exercise_title( '', '', false, $group['connected_exercises'] );
100
-											echo wp_kses_post( $exercise_title );
99
+											$exercise_title = lsx_health_plan_exercise_title('', '', false, $group['connected_exercises']);
100
+											echo wp_kses_post($exercise_title);
101 101
 											?>
102 102
 										</a>
103
-									<?php echo wp_kses_post( $link_close ); ?>
103
+									<?php echo wp_kses_post($link_close); ?>
104 104
 								</h3>
105 105
 								<div class="reps-container">
106 106
 									<?php
107
-									if ( '' !== $reps ) {
107
+									if ('' !== $reps) {
108 108
 									?>
109
-										<?php echo wp_kses_post( $reps ); ?>
109
+										<?php echo wp_kses_post($reps); ?>
110 110
 									<?php
111 111
 									}
112 112
 									?>
113
-									<?php if ( '' !== $link_html ) { ?>
114
-										<?php echo wp_kses_post( str_replace( '<a', '<a class="btn-simple" ', $link_html ) ); ?>
115
-										<?php esc_html_e( 'How to do it?', 'lsx-health-plan' ); ?>
116
-										<?php echo wp_kses_post( $link_close ); ?>
113
+									<?php if ('' !== $link_html) { ?>
114
+										<?php echo wp_kses_post(str_replace('<a', '<a class="btn-simple" ', $link_html)); ?>
115
+										<?php esc_html_e('How to do it?', 'lsx-health-plan'); ?>
116
+										<?php echo wp_kses_post($link_close); ?>
117 117
 									<?php } ?>
118 118
 								</div>
119 119
 								<?php
120
-								if ( '' !== $content_setting ) {
121
-									if ( 'excerpt' === $content_setting ) {
122
-										$excerpt = \lsx_health_plan\functions\hp_excerpt( $group['connected_exercises'] );
120
+								if ('' !== $content_setting) {
121
+									if ('excerpt' === $content_setting) {
122
+										$excerpt = \lsx_health_plan\functions\hp_excerpt($group['connected_exercises']);
123 123
 										?>
124
-											<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
124
+											<p class="lsx-exercises-excerpt"><?php echo wp_kses_post($excerpt); ?></p>
125 125
 										<?php
126 126
 									}
127
-									if ( 'full' === $content_setting ) {
128
-										echo wp_kses_post( get_the_content( null, null, $group['connected_exercises'] ) );
127
+									if ('full' === $content_setting) {
128
+										echo wp_kses_post(get_the_content(null, null, $group['connected_exercises']));
129 129
 									}
130 130
 
131
-									if ( '' !== $link_html ) {
131
+									if ('' !== $link_html) {
132 132
 										?>
133
-										<?php echo wp_kses_post( str_replace( '<a', '<a class="btn border-btn" ', $link_html ) ); ?>
134
-										<?php esc_html_e( 'View exercise', 'lsx-health-plan' ); ?>
135
-										<?php echo wp_kses_post( $link_close ); ?>
133
+										<?php echo wp_kses_post(str_replace('<a', '<a class="btn border-btn" ', $link_html)); ?>
134
+										<?php esc_html_e('View exercise', 'lsx-health-plan'); ?>
135
+										<?php echo wp_kses_post($link_close); ?>
136 136
 										<?php
137 137
 									}
138 138
 								}
Please login to merge, or discard this patch.
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 global $group_name,$shortcode_args;
9 9
 $groups = get_post_meta( get_the_ID(), $group_name, true );
10 10
 if ( is_singular( 'workout' ) ) {
11
-	$groups = get_post_meta( get_queried_object_id(), $group_name, true );
11
+     $groups = get_post_meta( get_queried_object_id(), $group_name, true );
12 12
 }
13 13
 
14 14
 $link_setting          = \lsx_health_plan\functions\get_option( 'workout_tab_link', 'single' );
@@ -18,98 +18,98 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Check for shortcode overrides.
20 20
 if ( null !== $shortcode_args ) {
21
-	if ( isset( $shortcode_args['link'] ) ) {
22
-		$link_setting = $shortcode_args['link'];
23
-	}
24
-	if ( isset( $shortcode_args['description'] ) ) {
25
-		$content_setting = $shortcode_args['description'];
26
-	}
27
-	if ( isset( $shortcode_args['columns'] ) ) {
28
-		$column_setting = $shortcode_args['columns'];
29
-		$column_setting = \lsx_health_plan\functions\column_class( $column_setting );
30
-	}
31
-	if ( isset( $shortcode_args['modal_content'] ) ) {
32
-		$modal_content_setting = $shortcode_args['modal_content'];
33
-	}
21
+     if ( isset( $shortcode_args['link'] ) ) {
22
+          $link_setting = $shortcode_args['link'];
23
+     }
24
+     if ( isset( $shortcode_args['description'] ) ) {
25
+          $content_setting = $shortcode_args['description'];
26
+     }
27
+     if ( isset( $shortcode_args['columns'] ) ) {
28
+          $column_setting = $shortcode_args['columns'];
29
+          $column_setting = \lsx_health_plan\functions\column_class( $column_setting );
30
+     }
31
+     if ( isset( $shortcode_args['modal_content'] ) ) {
32
+          $modal_content_setting = $shortcode_args['modal_content'];
33
+     }
34 34
 }
35 35
 
36 36
 $modal_args = array(
37
-	'modal_content' => $modal_content_setting,
37
+     'modal_content' => $modal_content_setting,
38 38
 );
39 39
 
40 40
 if ( ! empty( $groups ) ) {
41
-	?>
41
+     ?>
42 42
 	<div class="set-grid">
43 43
 		<div class="workout-grid row">
44 44
 			<?php
45
-			foreach ( $groups as $group ) {
46
-				if ( isset( $group['connected_exercises'] ) ) {
47
-					$reps = '';
48
-					if ( isset( $group['reps'] ) && '' !== $group['reps'] ) {
49
-						$reps = '<span class="reps">' . esc_html( $group['reps'] ) . '</span>';
50
-					}
51
-					$class_excerpt = 'no-excerpt';
52
-					if ( 'excerpt' === $content_setting ) {
53
-						$class_excerpt = 'has-excerpt';
54
-					}
55
-					// Setup our link and content.
56
-					switch ( $link_setting ) {
57
-						case 'single':
58
-							$link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
59
-							$link_close = '</a>';
60
-							break;
45
+               foreach ( $groups as $group ) {
46
+                    if ( isset( $group['connected_exercises'] ) ) {
47
+                         $reps = '';
48
+                         if ( isset( $group['reps'] ) && '' !== $group['reps'] ) {
49
+                              $reps = '<span class="reps">' . esc_html( $group['reps'] ) . '</span>';
50
+                         }
51
+                         $class_excerpt = 'no-excerpt';
52
+                         if ( 'excerpt' === $content_setting ) {
53
+                              $class_excerpt = 'has-excerpt';
54
+                         }
55
+                         // Setup our link and content.
56
+                         switch ( $link_setting ) {
57
+                              case 'single':
58
+                                   $link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
59
+                                   $link_close = '</a>';
60
+                                   break;
61 61
 
62
-						case 'modal':
63
-							$link_html  = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
64
-							$link_close = '</a>';
65
-							// We call the button to register the modal, but we do not output it.
66
-							lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
67
-							break;
62
+                              case 'modal':
63
+                                   $link_html  = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
64
+                                   $link_close = '</a>';
65
+                                   // We call the button to register the modal, but we do not output it.
66
+                                   lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
67
+                                   break;
68 68
 
69
-						case 'none':
70
-						default:
71
-							$link_html  = '';
72
-							$link_close = '';
73
-							break;
74
-					}
75
-					?>
69
+                              case 'none':
70
+                              default:
71
+                                   $link_html  = '';
72
+                                   $link_close = '';
73
+                                   break;
74
+                         }
75
+                         ?>
76 76
 					<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_setting ); ?>">
77 77
 						<article class="lsx-slot box-shadow">
78 78
 							<div class="exercise-feature-img">
79 79
 								<?php echo wp_kses_post( $link_html ); ?>
80 80
 									<?php
81
-									$thumbnail_args = array(
82
-										'class' => 'aligncenter',
83
-									);
84
-									$featured_image = get_the_post_thumbnail( $group['connected_exercises'], 'medium', $thumbnail_args );
85
-									if ( ! empty( $featured_image ) && '' !== $featured_image ) {
86
-										echo wp_kses_post( $featured_image );
87
-									} else {
88
-										?>
81
+                                             $thumbnail_args = array(
82
+                                                  'class' => 'aligncenter',
83
+                                             );
84
+                                             $featured_image = get_the_post_thumbnail( $group['connected_exercises'], 'medium', $thumbnail_args );
85
+                                             if ( ! empty( $featured_image ) && '' !== $featured_image ) {
86
+                                                  echo wp_kses_post( $featured_image );
87
+                                             } else {
88
+                                                  ?>
89 89
 										<img src="<?php echo esc_attr( plugin_dir_url( __DIR__ ) . '../assets/images/placeholder.jpg' ); ?>">
90 90
 										<?php
91
-									}
92
-									?>
91
+                                             }
92
+                                             ?>
93 93
 								<?php echo wp_kses_post( $link_close ); ?>
94 94
 							</div>
95 95
 							<div class="content-box exercise-content-box white-bg">
96 96
 								<h3 class="title-lined <?php echo esc_html( $class_excerpt ); ?>">
97 97
 									<?php echo wp_kses_post( $link_html ); ?>
98 98
 											<?php
99
-											$exercise_title = lsx_health_plan_exercise_title( '', '', false, $group['connected_exercises'] );
100
-											echo wp_kses_post( $exercise_title );
101
-											?>
99
+                                                       $exercise_title = lsx_health_plan_exercise_title( '', '', false, $group['connected_exercises'] );
100
+                                                       echo wp_kses_post( $exercise_title );
101
+                                                       ?>
102 102
 										</a>
103 103
 									<?php echo wp_kses_post( $link_close ); ?>
104 104
 								</h3>
105 105
 								<div class="reps-container">
106 106
 									<?php
107
-									if ( '' !== $reps ) {
108
-									?>
107
+                                             if ( '' !== $reps ) {
108
+                                             ?>
109 109
 										<?php echo wp_kses_post( $reps ); ?>
110 110
 									<?php
111
-									}
112
-									?>
111
+                                             }
112
+                                             ?>
113 113
 									<?php if ( '' !== $link_html ) { ?>
114 114
 										<?php echo wp_kses_post( str_replace( '<a', '<a class="btn-simple" ', $link_html ) ); ?>
115 115
 										<?php esc_html_e( 'How to do it?', 'lsx-health-plan' ); ?>
@@ -117,33 +117,33 @@  discard block
 block discarded – undo
117 117
 									<?php } ?>
118 118
 								</div>
119 119
 								<?php
120
-								if ( '' !== $content_setting ) {
121
-									if ( 'excerpt' === $content_setting ) {
122
-										$excerpt = \lsx_health_plan\functions\hp_excerpt( $group['connected_exercises'] );
123
-										?>
120
+                                        if ( '' !== $content_setting ) {
121
+                                             if ( 'excerpt' === $content_setting ) {
122
+                                                  $excerpt = \lsx_health_plan\functions\hp_excerpt( $group['connected_exercises'] );
123
+                                                  ?>
124 124
 											<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
125 125
 										<?php
126
-									}
127
-									if ( 'full' === $content_setting ) {
128
-										echo wp_kses_post( get_the_content( null, null, $group['connected_exercises'] ) );
129
-									}
126
+                                             }
127
+                                             if ( 'full' === $content_setting ) {
128
+                                                  echo wp_kses_post( get_the_content( null, null, $group['connected_exercises'] ) );
129
+                                             }
130 130
 
131
-									if ( '' !== $link_html ) {
132
-										?>
131
+                                             if ( '' !== $link_html ) {
132
+                                                  ?>
133 133
 										<?php echo wp_kses_post( str_replace( '<a', '<a class="btn border-btn" ', $link_html ) ); ?>
134 134
 										<?php esc_html_e( 'View exercise', 'lsx-health-plan' ); ?>
135 135
 										<?php echo wp_kses_post( $link_close ); ?>
136 136
 										<?php
137
-									}
138
-								}
139
-								?>
137
+                                             }
138
+                                        }
139
+                                        ?>
140 140
 							</div>
141 141
 						</article>
142 142
 					</div>
143 143
 					<?php
144
-				}
145
-			}
146
-			?>
144
+                    }
145
+               }
146
+               ?>
147 147
 		</div>
148 148
 	</div>
149 149
 	<?php
Please login to merge, or discard this patch.
templates/partials/shortcode-loop.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -23,26 +23,26 @@  discard block
 block discarded – undo
23 23
 );
24 24
 
25 25
 // If we are calling the exercises with the parent workout.
26
-if ( false !== 'parent' && 'exercise' === $args['post_type'] ) {
27
-	$items = \lsx_health_plan\functions\get_exercises_by_workout( $args['parent'] );
28
-	if ( ! empty( $items ) ) {
26
+if (false !== 'parent' && 'exercise' === $args['post_type']) {
27
+	$items = \lsx_health_plan\functions\get_exercises_by_workout($args['parent']);
28
+	if ( ! empty($items)) {
29 29
 		$args['include'] = $items;
30 30
 	}
31 31
 }
32 32
 
33
-if ( isset( $args['include'] ) && ( '' !== $args['include'] ) ) {
34
-	if ( is_array( $args['include'] ) ) {
33
+if (isset($args['include']) && ('' !== $args['include'])) {
34
+	if (is_array($args['include'])) {
35 35
 		$include = $args['include'];
36 36
 	} else {
37
-		$include = explode( ',', $args['include'] );
37
+		$include = explode(',', $args['include']);
38 38
 	}
39 39
 	$include_filter          = $include;
40 40
 	$query_array['post__in'] = $include_filter;
41 41
 	$query_array['orderby']  = 'post__in';
42 42
 }
43 43
 
44
-if ( isset( $taxonomy ) && ( '' !== $taxonomy ) && isset( $term ) && ( '' !== $term ) ) {
45
-	$taxonomy_filter          = array(
44
+if (isset($taxonomy) && ('' !== $taxonomy) && isset($term) && ('' !== $term)) {
45
+	$taxonomy_filter = array(
46 46
 		array(
47 47
 			'taxonomy' => $taxonomy,
48 48
 			'field'    => 'slug',
@@ -52,16 +52,16 @@  discard block
 block discarded – undo
52 52
 	$query_array['tax_query'] = $taxonomy_filter;
53 53
 }
54 54
 
55
-$exercises = new WP_Query( $query_array );
55
+$exercises = new WP_Query($query_array);
56 56
 ?>
57 57
 
58
-<div id="lsx-exercises-shortcode" class="daily-plan-block layout-<?php echo esc_html( $args['layout'] ); ?> columns-<?php echo esc_html( $args['columns'] ); ?>">
58
+<div id="lsx-exercises-shortcode" class="daily-plan-block layout-<?php echo esc_html($args['layout']); ?> columns-<?php echo esc_html($args['columns']); ?>">
59 59
 	<div class="lsx-exercises-shortcode" >
60 60
 		<?php
61
-		if ( $exercises->have_posts() ) {
62
-			while ( $exercises->have_posts() ) {
61
+		if ($exercises->have_posts()) {
62
+			while ($exercises->have_posts()) {
63 63
 				$exercises->the_post();
64
-				switch ( $args['post_type'] ) {
64
+				switch ($args['post_type']) {
65 65
 					case 'workout':
66 66
 						include LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php';
67 67
 						break;
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 		?>
91 91
 	</div>
92 92
 	<?php
93
-	if ( isset( $args['view_more'] ) && false !== $args['view_more'] ) {
93
+	if (isset($args['view_more']) && false !== $args['view_more']) {
94 94
 		?>
95 95
 			<div class="col-md-12">
96
-				<a class="<?php echo esc_html( $link_class ); ?>" href="<?php echo esc_url( get_post_type_archive_link( $args['post_type'] ) ); ?>"><?php echo esc_html_e( 'Show More', 'lsx-health-plan' ); ?></a>
96
+				<a class="<?php echo esc_html($link_class); ?>" href="<?php echo esc_url(get_post_type_archive_link($args['post_type'])); ?>"><?php echo esc_html_e('Show More', 'lsx-health-plan'); ?></a>
97 97
 			</div>
98 98
 		<?php
99 99
 	}
Please login to merge, or discard this patch.
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -16,40 +16,40 @@  discard block
 block discarded – undo
16 16
 $image_size  = $args['image_size'];
17 17
 
18 18
 $query_array = array(
19
-	'orderby'        => $args['orderby'],
20
-	'order'          => $args['order'],
21
-	'post_type'      => $args['post_type'],
22
-	'posts_per_page' => $limit,
19
+     'orderby'        => $args['orderby'],
20
+     'order'          => $args['order'],
21
+     'post_type'      => $args['post_type'],
22
+     'posts_per_page' => $limit,
23 23
 );
24 24
 
25 25
 // If we are calling the exercises with the parent workout.
26 26
 if ( false !== 'parent' && 'exercise' === $args['post_type'] ) {
27
-	$items = \lsx_health_plan\functions\get_exercises_by_workout( $args['parent'] );
28
-	if ( ! empty( $items ) ) {
29
-		$args['include'] = $items;
30
-	}
27
+     $items = \lsx_health_plan\functions\get_exercises_by_workout( $args['parent'] );
28
+     if ( ! empty( $items ) ) {
29
+          $args['include'] = $items;
30
+     }
31 31
 }
32 32
 
33 33
 if ( isset( $args['include'] ) && ( '' !== $args['include'] ) ) {
34
-	if ( is_array( $args['include'] ) ) {
35
-		$include = $args['include'];
36
-	} else {
37
-		$include = explode( ',', $args['include'] );
38
-	}
39
-	$include_filter          = $include;
40
-	$query_array['post__in'] = $include_filter;
41
-	$query_array['orderby']  = 'post__in';
34
+     if ( is_array( $args['include'] ) ) {
35
+          $include = $args['include'];
36
+     } else {
37
+          $include = explode( ',', $args['include'] );
38
+     }
39
+     $include_filter          = $include;
40
+     $query_array['post__in'] = $include_filter;
41
+     $query_array['orderby']  = 'post__in';
42 42
 }
43 43
 
44 44
 if ( isset( $taxonomy ) && ( '' !== $taxonomy ) && isset( $term ) && ( '' !== $term ) ) {
45
-	$taxonomy_filter          = array(
46
-		array(
47
-			'taxonomy' => $taxonomy,
48
-			'field'    => 'slug',
49
-			'terms'    => $term,
50
-		),
51
-	);
52
-	$query_array['tax_query'] = $taxonomy_filter;
45
+     $taxonomy_filter          = array(
46
+          array(
47
+               'taxonomy' => $taxonomy,
48
+               'field'    => 'slug',
49
+               'terms'    => $term,
50
+          ),
51
+     );
52
+     $query_array['tax_query'] = $taxonomy_filter;
53 53
 }
54 54
 
55 55
 $exercises = new WP_Query( $query_array );
@@ -58,46 +58,46 @@  discard block
 block discarded – undo
58 58
 <div id="lsx-exercises-shortcode" class="daily-plan-block layout-<?php echo esc_html( $args['layout'] ); ?> columns-<?php echo esc_html( $args['columns'] ); ?>">
59 59
 	<div class="lsx-exercises-shortcode" >
60 60
 		<?php
61
-		if ( $exercises->have_posts() ) {
62
-			while ( $exercises->have_posts() ) {
63
-				$exercises->the_post();
64
-				switch ( $args['post_type'] ) {
65
-					case 'workout':
66
-						include LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php';
67
-						break;
61
+          if ( $exercises->have_posts() ) {
62
+               while ( $exercises->have_posts() ) {
63
+                    $exercises->the_post();
64
+                    switch ( $args['post_type'] ) {
65
+                         case 'workout':
66
+                              include LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php';
67
+                              break;
68 68
 
69
-					case 'meal':
70
-						include LSX_HEALTH_PLAN_PATH . 'templates/partials/meal-plans.php';
71
-						break;
69
+                         case 'meal':
70
+                              include LSX_HEALTH_PLAN_PATH . 'templates/partials/meal-plans.php';
71
+                              break;
72 72
 
73
-					/*case 'exercise':
73
+                         /*case 'exercise':
74 74
 						include LSX_HEALTH_PLAN_PATH . 'templates/partials/content-shortcode-exercise.php';
75 75
 						break;*/
76 76
 
77
-					case 'exercise':
78
-					case 'recipe':
79
-					case 'tip':
80
-						include LSX_HEALTH_PLAN_PATH . 'templates/content-archive-' . $args['post_type'] . '.php';
81
-						break;
77
+                         case 'exercise':
78
+                         case 'recipe':
79
+                         case 'tip':
80
+                              include LSX_HEALTH_PLAN_PATH . 'templates/content-archive-' . $args['post_type'] . '.php';
81
+                              break;
82 82
 
83
-					default:
84
-						include LSX_HEALTH_PLAN_PATH . 'templates/partials/content-default.php';
85
-						break;
86
-				}
87
-			}
88
-		}
89
-		wp_reset_postdata();
90
-		?>
83
+                         default:
84
+                              include LSX_HEALTH_PLAN_PATH . 'templates/partials/content-default.php';
85
+                              break;
86
+                    }
87
+               }
88
+          }
89
+          wp_reset_postdata();
90
+          ?>
91 91
 	</div>
92 92
 	<?php
93
-	if ( isset( $args['view_more'] ) && false !== $args['view_more'] ) {
94
-		?>
93
+     if ( isset( $args['view_more'] ) && false !== $args['view_more'] ) {
94
+          ?>
95 95
 			<div class="col-md-12">
96 96
 				<a class="<?php echo esc_html( $link_class ); ?>" href="<?php echo esc_url( get_post_type_archive_link( $args['post_type'] ) ); ?>"><?php echo esc_html_e( 'Show More', 'lsx-health-plan' ); ?></a>
97 97
 			</div>
98 98
 		<?php
99
-	}
100
-	?>
99
+     }
100
+     ?>
101 101
 </div>
102 102
 <?php
103 103
 $shortcode_args = null;
Please login to merge, or discard this patch.
templates/partials/meal-plans.php 2 patches
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -4,122 +4,122 @@  discard block
 block discarded – undo
4 4
  *
5 5
  * @package lsx-health-plan
6 6
  */
7
-global $connected_meals,$shortcode_args;
7
+global $connected_meals, $shortcode_args;
8 8
 
9 9
 // Check for any shortcode overrides.
10
-if ( null !== $shortcode_args && isset( $shortcode_args['include'] ) ) {
11
-	$connected_meals = array( get_the_ID() );
10
+if (null !== $shortcode_args && isset($shortcode_args['include'])) {
11
+	$connected_meals = array(get_the_ID());
12 12
 }
13 13
 ?>
14 14
 
15 15
 <div class="meals">
16 16
 <?php
17
-if ( empty( $connected_meals ) ) {
18
-	$connected_meals = get_post_meta( get_the_ID(), 'connected_meals', true );
19
-	if ( empty( $connected_meals ) ) {
20
-		$options = \lsx_health_plan\functions\get_option( 'all' );
21
-		if ( isset( $options['connected_meals'] ) && '' !== $options['connected_meals'] && ! empty( $options['connected_meals'] ) ) {
17
+if (empty($connected_meals)) {
18
+	$connected_meals = get_post_meta(get_the_ID(), 'connected_meals', true);
19
+	if (empty($connected_meals)) {
20
+		$options = \lsx_health_plan\functions\get_option('all');
21
+		if (isset($options['connected_meals']) && '' !== $options['connected_meals'] && ! empty($options['connected_meals'])) {
22 22
 			$connected_meals = $options['connected_meals'];
23
-			if ( ! array( $connected_meals ) ) {
24
-				$connected_meals = array( $connected_meals );
23
+			if ( ! array($connected_meals)) {
24
+				$connected_meals = array($connected_meals);
25 25
 			}
26 26
 		}
27 27
 	}
28 28
 }
29
-	$args  = array(
29
+	$args = array(
30 30
 		'orderby'   => 'date',
31 31
 		'order'     => 'DESC',
32 32
 		'post_type' => 'meal',
33 33
 		'post__in'  => $connected_meals,
34 34
 	);
35
-	$meals = new WP_Query( $args );
35
+	$meals = new WP_Query($args);
36 36
 
37
-	if ( $meals->have_posts() ) {
38
-		while ( $meals->have_posts() ) {
37
+	if ($meals->have_posts()) {
38
+		while ($meals->have_posts()) {
39 39
 			$meals->the_post();
40
-			$shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true );
40
+			$shopping_list = get_post_meta(get_the_ID(), 'meal_shopping_list', true);
41 41
 
42 42
 			//Breakfast
43
-			$pre_breakfast_snack = get_post_meta( get_the_ID(), 'meal_pre_breakfast_snack', true );
44
-			$breakfast       = get_post_meta( get_the_ID(), 'meal_breakfast', true );
45
-			$post_breakfast_snack = get_post_meta( get_the_ID(), 'meal_breakfast_snack', true );
43
+			$pre_breakfast_snack = get_post_meta(get_the_ID(), 'meal_pre_breakfast_snack', true);
44
+			$breakfast = get_post_meta(get_the_ID(), 'meal_breakfast', true);
45
+			$post_breakfast_snack = get_post_meta(get_the_ID(), 'meal_breakfast_snack', true);
46 46
 
47 47
 			//Lunch
48
-			$pre_lunch_snack = get_post_meta( get_the_ID(), 'meal_pre_lunch_snack', true );
49
-			$lunch           = get_post_meta( get_the_ID(), 'meal_lunch', true );
50
-			$post_lunch_snack     = get_post_meta( get_the_ID(), 'meal_lunch_snack', true );
48
+			$pre_lunch_snack = get_post_meta(get_the_ID(), 'meal_pre_lunch_snack', true);
49
+			$lunch           = get_post_meta(get_the_ID(), 'meal_lunch', true);
50
+			$post_lunch_snack     = get_post_meta(get_the_ID(), 'meal_lunch_snack', true);
51 51
 
52 52
 			//Dinner
53
-			$pre_dinner_snack     = get_post_meta( get_the_ID(), 'meal_pre_dinner_snack', true );
54
-			$dinner          = get_post_meta( get_the_ID(), 'meal_dinner', true );
55
-			$post_dinner_snack     = get_post_meta( get_the_ID(), 'meal_dinner_snack', true );
53
+			$pre_dinner_snack     = get_post_meta(get_the_ID(), 'meal_pre_dinner_snack', true);
54
+			$dinner = get_post_meta(get_the_ID(), 'meal_dinner', true);
55
+			$post_dinner_snack = get_post_meta(get_the_ID(), 'meal_dinner_snack', true);
56 56
 
57 57
 
58 58
 			?>
59 59
 			<div class="row eating-row">
60 60
 				<div class="col-md-4 eating-column">
61 61
 				<?php
62
-					if ( ! empty( $pre_breakfast_snack ) ) {
63
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
64
-						echo wp_kses_post( apply_filters( 'the_content', $pre_breakfast_snack ) );
62
+					if ( ! empty($pre_breakfast_snack)) {
63
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Snack', 'lsx-health-plan') . '</h3>';
64
+						echo wp_kses_post(apply_filters('the_content', $pre_breakfast_snack));
65 65
 						echo '</div>';
66 66
 					}
67 67
 					?>						
68 68
 					<?php
69
-					if ( ! empty( $breakfast ) ) {
70
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Breakfast', 'lsx-health-plan' ) . '</h3>';
71
-						echo wp_kses_post( apply_filters( 'the_content', $breakfast ) );
69
+					if ( ! empty($breakfast)) {
70
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Breakfast', 'lsx-health-plan') . '</h3>';
71
+						echo wp_kses_post(apply_filters('the_content', $breakfast));
72 72
 						echo '</div>';
73 73
 					}
74 74
 					?>
75 75
 					<?php
76
-					if ( ! empty( $post_breakfast_snack ) ) {
77
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
78
-						echo wp_kses_post( apply_filters( 'the_content', $post_breakfast_snack ) );
76
+					if ( ! empty($post_breakfast_snack)) {
77
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Snack', 'lsx-health-plan') . '</h3>';
78
+						echo wp_kses_post(apply_filters('the_content', $post_breakfast_snack));
79 79
 						echo '</div>';
80 80
 					}
81 81
 					?>
82 82
 				</div>
83 83
 				<div class="col-md-4 eating-column">
84 84
 				<?php
85
-					if ( ! empty( $pre_lunch_snack ) ) {
86
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
87
-						echo wp_kses_post( apply_filters( 'the_content', $pre_lunch_snack ) );
85
+					if ( ! empty($pre_lunch_snack)) {
86
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Snack', 'lsx-health-plan') . '</h3>';
87
+						echo wp_kses_post(apply_filters('the_content', $pre_lunch_snack));
88 88
 						echo '</div>';
89 89
 					}
90 90
 					?>							
91 91
 					<?php
92
-					if ( ! empty( $lunch ) ) {
93
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Lunch', 'lsx-health-plan' ) . '</h3>';
94
-						echo wp_kses_post( apply_filters( 'the_content', $lunch ) );
92
+					if ( ! empty($lunch)) {
93
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Lunch', 'lsx-health-plan') . '</h3>';
94
+						echo wp_kses_post(apply_filters('the_content', $lunch));
95 95
 						echo '</div>';
96 96
 					}
97
-					if ( ! empty( $post_lunch_snack ) ) {
98
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
99
-						echo wp_kses_post( apply_filters( 'the_content', $post_lunch_snack ) );
97
+					if ( ! empty($post_lunch_snack)) {
98
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Snack', 'lsx-health-plan') . '</h3>';
99
+						echo wp_kses_post(apply_filters('the_content', $post_lunch_snack));
100 100
 						echo '</div>';
101 101
 					}
102 102
 					?>
103 103
 				</div>
104 104
 				<div class="col-md-4 eating-column">
105 105
 				<?php
106
-					if ( ! empty( $pre_dinner_snack ) ) {
107
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
108
-						echo wp_kses_post( apply_filters( 'the_content', $pre_dinner_snack ) );
106
+					if ( ! empty($pre_dinner_snack)) {
107
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Snack', 'lsx-health-plan') . '</h3>';
108
+						echo wp_kses_post(apply_filters('the_content', $pre_dinner_snack));
109 109
 						echo '</div>';
110 110
 					}
111 111
 					?>						
112 112
 					<?php
113
-					if ( ! empty( $dinner ) ) {
114
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Supper', 'lsx-health-plan' ) . '</h3>';
115
-						echo wp_kses_post( apply_filters( 'the_content', $dinner ) );
113
+					if ( ! empty($dinner)) {
114
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Supper', 'lsx-health-plan') . '</h3>';
115
+						echo wp_kses_post(apply_filters('the_content', $dinner));
116 116
 						echo '</div>';
117 117
 					}
118 118
 					?>
119 119
 					<?php
120
-					if ( ! empty( $post_dinner_snack ) ) {
121
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
122
-						echo wp_kses_post( apply_filters( 'the_content', $post_dinner_snack ) );
120
+					if ( ! empty($post_dinner_snack)) {
121
+						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__('Snack', 'lsx-health-plan') . '</h3>';
122
+						echo wp_kses_post(apply_filters('the_content', $post_dinner_snack));
123 123
 						echo '</div>';
124 124
 					}
125 125
 					?>							
@@ -131,40 +131,40 @@  discard block
 block discarded – undo
131 131
 	?>
132 132
 	<?php wp_reset_postdata(); ?>
133 133
 
134
-	<?php if ( null === $shortcode_args ) { ?>
134
+	<?php if (null === $shortcode_args) { ?>
135 135
 		<div class="extra-title">
136
-			<h2 class="title-lined"><?php esc_html_e( 'Meal Plan ', 'lsx-health-plan' ); ?> <span><?php esc_html_e( 'Extras', 'lsx-health-plan' ); ?></span></h2>
136
+			<h2 class="title-lined"><?php esc_html_e('Meal Plan ', 'lsx-health-plan'); ?> <span><?php esc_html_e('Extras', 'lsx-health-plan'); ?></span></h2>
137 137
 		</div>
138 138
 
139 139
 		<div class="row tip-row extras-box">
140 140
 			<?php
141
-			$connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true );
142
-			if ( ! empty( $connected_recipes ) && post_type_exists( 'recipe' ) ) {
141
+			$connected_recipes = get_post_meta(get_the_ID(), 'connected_recipes', true);
142
+			if ( ! empty($connected_recipes) && post_type_exists('recipe')) {
143 143
 				?>
144 144
 				<div class="col-md-4">
145 145
 					<div class="content-box tip-left box-shadow">
146
-						<h3 class="eating-title title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?></h3>
147
-						<p><?php esc_html_e( 'If theres a recipe for the day you can find it here or under the recipes tab.', 'lsx-health-plan' ); ?></p>
148
-						<a class="btn border-btn btn-full" href="<?php echo the_permalink(); ?>recipes"><?php esc_html_e( 'View Recipe', 'lsx-health-plan' ); ?><i class="fa fa-angle-right" aria-hidden="true"></i></a>
146
+						<h3 class="eating-title title-lined"><?php esc_html_e('Recipes', 'lsx-health-plan'); ?></h3>
147
+						<p><?php esc_html_e('If theres a recipe for the day you can find it here or under the recipes tab.', 'lsx-health-plan'); ?></p>
148
+						<a class="btn border-btn btn-full" href="<?php echo the_permalink(); ?>recipes"><?php esc_html_e('View Recipe', 'lsx-health-plan'); ?><i class="fa fa-angle-right" aria-hidden="true"></i></a>
149 149
 					</div>	
150 150
 				</div>
151 151
 			<?php } ?>
152 152
 			<?php
153
-			if ( ! empty( $shopping_list ) ) {
153
+			if ( ! empty($shopping_list)) {
154 154
 				?>
155 155
 				<div class="col-md-4">
156 156
 					<div class="content-box tip-middle box-shadow">
157
-						<h3 class="eating-title title-lined"><?php esc_html_e( 'Shopping List', 'lsx-health-plan' ); ?></h3>
158
-						<p><?php esc_html_e( 'Checkout the shopping list and make sure you have all the goodies you need!', 'lsx-health-plan' ); ?></p>
159
-						<a class="btn border-btn btn-full" href="<?php echo esc_url( get_page_link( $shopping_list ) ); ?>" target="_blank"><?php esc_html_e( 'View Shopping List', 'lsx-health-plan' ); ?><i class="fa fa-angle-right" aria-hidden="true"></i></a>
157
+						<h3 class="eating-title title-lined"><?php esc_html_e('Shopping List', 'lsx-health-plan'); ?></h3>
158
+						<p><?php esc_html_e('Checkout the shopping list and make sure you have all the goodies you need!', 'lsx-health-plan'); ?></p>
159
+						<a class="btn border-btn btn-full" href="<?php echo esc_url(get_page_link($shopping_list)); ?>" target="_blank"><?php esc_html_e('View Shopping List', 'lsx-health-plan'); ?><i class="fa fa-angle-right" aria-hidden="true"></i></a>
160 160
 					</div>	
161 161
 				</div>
162 162
 			<?php } ?>
163 163
 
164
-			<?php if ( post_type_exists( 'tip' ) && lsx_health_plan_has_tips() ) { ?>
164
+			<?php if (post_type_exists('tip') && lsx_health_plan_has_tips()) { ?>
165 165
 				<div class="col-md-4">
166 166
 					<div class="tip-right">
167
-						<?php echo do_shortcode( '[lsx_health_plan_featured_tips_block]' ); ?>
167
+						<?php echo do_shortcode('[lsx_health_plan_featured_tips_block]'); ?>
168 168
 					</div>
169 169
 				</div>
170 170
 			<?php } ?>
Please login to merge, or discard this patch.
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -8,127 +8,127 @@  discard block
 block discarded – undo
8 8
 
9 9
 // Check for any shortcode overrides.
10 10
 if ( null !== $shortcode_args && isset( $shortcode_args['include'] ) ) {
11
-	$connected_meals = array( get_the_ID() );
11
+     $connected_meals = array( get_the_ID() );
12 12
 }
13 13
 ?>
14 14
 
15 15
 <div class="meals">
16 16
 <?php
17 17
 if ( empty( $connected_meals ) ) {
18
-	$connected_meals = get_post_meta( get_the_ID(), 'connected_meals', true );
19
-	if ( empty( $connected_meals ) ) {
20
-		$options = \lsx_health_plan\functions\get_option( 'all' );
21
-		if ( isset( $options['connected_meals'] ) && '' !== $options['connected_meals'] && ! empty( $options['connected_meals'] ) ) {
22
-			$connected_meals = $options['connected_meals'];
23
-			if ( ! array( $connected_meals ) ) {
24
-				$connected_meals = array( $connected_meals );
25
-			}
26
-		}
27
-	}
18
+     $connected_meals = get_post_meta( get_the_ID(), 'connected_meals', true );
19
+     if ( empty( $connected_meals ) ) {
20
+          $options = \lsx_health_plan\functions\get_option( 'all' );
21
+          if ( isset( $options['connected_meals'] ) && '' !== $options['connected_meals'] && ! empty( $options['connected_meals'] ) ) {
22
+               $connected_meals = $options['connected_meals'];
23
+               if ( ! array( $connected_meals ) ) {
24
+                    $connected_meals = array( $connected_meals );
25
+               }
26
+          }
27
+     }
28 28
 }
29
-	$args  = array(
30
-		'orderby'   => 'date',
31
-		'order'     => 'DESC',
32
-		'post_type' => 'meal',
33
-		'post__in'  => $connected_meals,
34
-	);
35
-	$meals = new WP_Query( $args );
29
+     $args  = array(
30
+          'orderby'   => 'date',
31
+          'order'     => 'DESC',
32
+          'post_type' => 'meal',
33
+          'post__in'  => $connected_meals,
34
+     );
35
+     $meals = new WP_Query( $args );
36 36
 
37
-	if ( $meals->have_posts() ) {
38
-		while ( $meals->have_posts() ) {
39
-			$meals->the_post();
40
-			$shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true );
37
+     if ( $meals->have_posts() ) {
38
+          while ( $meals->have_posts() ) {
39
+               $meals->the_post();
40
+               $shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true );
41 41
 
42
-			//Breakfast
43
-			$pre_breakfast_snack = get_post_meta( get_the_ID(), 'meal_pre_breakfast_snack', true );
44
-			$breakfast       = get_post_meta( get_the_ID(), 'meal_breakfast', true );
45
-			$post_breakfast_snack = get_post_meta( get_the_ID(), 'meal_breakfast_snack', true );
42
+               //Breakfast
43
+               $pre_breakfast_snack = get_post_meta( get_the_ID(), 'meal_pre_breakfast_snack', true );
44
+               $breakfast       = get_post_meta( get_the_ID(), 'meal_breakfast', true );
45
+               $post_breakfast_snack = get_post_meta( get_the_ID(), 'meal_breakfast_snack', true );
46 46
 
47
-			//Lunch
48
-			$pre_lunch_snack = get_post_meta( get_the_ID(), 'meal_pre_lunch_snack', true );
49
-			$lunch           = get_post_meta( get_the_ID(), 'meal_lunch', true );
50
-			$post_lunch_snack     = get_post_meta( get_the_ID(), 'meal_lunch_snack', true );
47
+               //Lunch
48
+               $pre_lunch_snack = get_post_meta( get_the_ID(), 'meal_pre_lunch_snack', true );
49
+               $lunch           = get_post_meta( get_the_ID(), 'meal_lunch', true );
50
+               $post_lunch_snack     = get_post_meta( get_the_ID(), 'meal_lunch_snack', true );
51 51
 
52
-			//Dinner
53
-			$pre_dinner_snack     = get_post_meta( get_the_ID(), 'meal_pre_dinner_snack', true );
54
-			$dinner          = get_post_meta( get_the_ID(), 'meal_dinner', true );
55
-			$post_dinner_snack     = get_post_meta( get_the_ID(), 'meal_dinner_snack', true );
52
+               //Dinner
53
+               $pre_dinner_snack     = get_post_meta( get_the_ID(), 'meal_pre_dinner_snack', true );
54
+               $dinner          = get_post_meta( get_the_ID(), 'meal_dinner', true );
55
+               $post_dinner_snack     = get_post_meta( get_the_ID(), 'meal_dinner_snack', true );
56 56
 
57 57
 
58
-			?>
58
+               ?>
59 59
 			<div class="row eating-row">
60 60
 				<div class="col-md-4 eating-column">
61 61
 				<?php
62
-					if ( ! empty( $pre_breakfast_snack ) ) {
63
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
64
-						echo wp_kses_post( apply_filters( 'the_content', $pre_breakfast_snack ) );
65
-						echo '</div>';
66
-					}
67
-					?>						
62
+                         if ( ! empty( $pre_breakfast_snack ) ) {
63
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
64
+                              echo wp_kses_post( apply_filters( 'the_content', $pre_breakfast_snack ) );
65
+                              echo '</div>';
66
+                         }
67
+                         ?>						
68 68
 					<?php
69
-					if ( ! empty( $breakfast ) ) {
70
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Breakfast', 'lsx-health-plan' ) . '</h3>';
71
-						echo wp_kses_post( apply_filters( 'the_content', $breakfast ) );
72
-						echo '</div>';
73
-					}
74
-					?>
69
+                         if ( ! empty( $breakfast ) ) {
70
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Breakfast', 'lsx-health-plan' ) . '</h3>';
71
+                              echo wp_kses_post( apply_filters( 'the_content', $breakfast ) );
72
+                              echo '</div>';
73
+                         }
74
+                         ?>
75 75
 					<?php
76
-					if ( ! empty( $post_breakfast_snack ) ) {
77
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
78
-						echo wp_kses_post( apply_filters( 'the_content', $post_breakfast_snack ) );
79
-						echo '</div>';
80
-					}
81
-					?>
76
+                         if ( ! empty( $post_breakfast_snack ) ) {
77
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
78
+                              echo wp_kses_post( apply_filters( 'the_content', $post_breakfast_snack ) );
79
+                              echo '</div>';
80
+                         }
81
+                         ?>
82 82
 				</div>
83 83
 				<div class="col-md-4 eating-column">
84 84
 				<?php
85
-					if ( ! empty( $pre_lunch_snack ) ) {
86
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
87
-						echo wp_kses_post( apply_filters( 'the_content', $pre_lunch_snack ) );
88
-						echo '</div>';
89
-					}
90
-					?>							
85
+                         if ( ! empty( $pre_lunch_snack ) ) {
86
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
87
+                              echo wp_kses_post( apply_filters( 'the_content', $pre_lunch_snack ) );
88
+                              echo '</div>';
89
+                         }
90
+                         ?>							
91 91
 					<?php
92
-					if ( ! empty( $lunch ) ) {
93
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Lunch', 'lsx-health-plan' ) . '</h3>';
94
-						echo wp_kses_post( apply_filters( 'the_content', $lunch ) );
95
-						echo '</div>';
96
-					}
97
-					if ( ! empty( $post_lunch_snack ) ) {
98
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
99
-						echo wp_kses_post( apply_filters( 'the_content', $post_lunch_snack ) );
100
-						echo '</div>';
101
-					}
102
-					?>
92
+                         if ( ! empty( $lunch ) ) {
93
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Lunch', 'lsx-health-plan' ) . '</h3>';
94
+                              echo wp_kses_post( apply_filters( 'the_content', $lunch ) );
95
+                              echo '</div>';
96
+                         }
97
+                         if ( ! empty( $post_lunch_snack ) ) {
98
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
99
+                              echo wp_kses_post( apply_filters( 'the_content', $post_lunch_snack ) );
100
+                              echo '</div>';
101
+                         }
102
+                         ?>
103 103
 				</div>
104 104
 				<div class="col-md-4 eating-column">
105 105
 				<?php
106
-					if ( ! empty( $pre_dinner_snack ) ) {
107
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
108
-						echo wp_kses_post( apply_filters( 'the_content', $pre_dinner_snack ) );
109
-						echo '</div>';
110
-					}
111
-					?>						
106
+                         if ( ! empty( $pre_dinner_snack ) ) {
107
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
108
+                              echo wp_kses_post( apply_filters( 'the_content', $pre_dinner_snack ) );
109
+                              echo '</div>';
110
+                         }
111
+                         ?>						
112 112
 					<?php
113
-					if ( ! empty( $dinner ) ) {
114
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Supper', 'lsx-health-plan' ) . '</h3>';
115
-						echo wp_kses_post( apply_filters( 'the_content', $dinner ) );
116
-						echo '</div>';
117
-					}
118
-					?>
113
+                         if ( ! empty( $dinner ) ) {
114
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Supper', 'lsx-health-plan' ) . '</h3>';
115
+                              echo wp_kses_post( apply_filters( 'the_content', $dinner ) );
116
+                              echo '</div>';
117
+                         }
118
+                         ?>
119 119
 					<?php
120
-					if ( ! empty( $post_dinner_snack ) ) {
121
-						echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
122
-						echo wp_kses_post( apply_filters( 'the_content', $post_dinner_snack ) );
123
-						echo '</div>';
124
-					}
125
-					?>							
120
+                         if ( ! empty( $post_dinner_snack ) ) {
121
+                              echo '<div class="content-box"><h3 class="eating-title title-lined">' . esc_html__( 'Snack', 'lsx-health-plan' ) . '</h3>';
122
+                              echo wp_kses_post( apply_filters( 'the_content', $post_dinner_snack ) );
123
+                              echo '</div>';
124
+                         }
125
+                         ?>							
126 126
 				</div>
127 127
 			</div>
128 128
 			<?php
129
-		}
130
-	}
131
-	?>
129
+          }
130
+     }
131
+     ?>
132 132
 	<?php wp_reset_postdata(); ?>
133 133
 
134 134
 	<?php if ( null === $shortcode_args ) { ?>
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
 
139 139
 		<div class="row tip-row extras-box">
140 140
 			<?php
141
-			$connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true );
142
-			if ( ! empty( $connected_recipes ) && post_type_exists( 'recipe' ) ) {
143
-				?>
141
+               $connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true );
142
+               if ( ! empty( $connected_recipes ) && post_type_exists( 'recipe' ) ) {
143
+                    ?>
144 144
 				<div class="col-md-4">
145 145
 					<div class="content-box tip-left box-shadow">
146 146
 						<h3 class="eating-title title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?></h3>
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 				</div>
151 151
 			<?php } ?>
152 152
 			<?php
153
-			if ( ! empty( $shopping_list ) ) {
154
-				?>
153
+               if ( ! empty( $shopping_list ) ) {
154
+                    ?>
155 155
 				<div class="col-md-4">
156 156
 					<div class="content-box tip-middle box-shadow">
157 157
 						<h3 class="eating-title title-lined"><?php esc_html_e( 'Shopping List', 'lsx-health-plan' ); ?></h3>
Please login to merge, or discard this patch.
templates/partials/content-shortcode-exercise.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -8,50 +8,50 @@
 block discarded – undo
8 8
 
9 9
 $column_class = '4';
10 10
 // Check for shortcode overrides.
11
-if ( null !== $shortcode_args ) {
12
-	if ( isset( $shortcode_args['columns'] ) ) {
11
+if (null !== $shortcode_args) {
12
+	if (isset($shortcode_args['columns'])) {
13 13
 		$column_class = $shortcode_args['columns'];
14
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
14
+		$column_class = \lsx_health_plan\functions\column_class($column_class);
15 15
 	}
16 16
 }
17 17
 
18 18
 lsx_entry_before();
19 19
 
20 20
 $post_id        = get_the_id();
21
-$featured_image = get_the_post_thumbnail_url( $post_id, $image_size );
21
+$featured_image = get_the_post_thumbnail_url($post_id, $image_size);
22 22
 ?>
23
-<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>">
24
-	<div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>">
23
+<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?>">
24
+	<div style="background-image:url('<?php echo esc_url($featured_image); ?>')" class="lsx-exercises-item bg-<?php echo esc_html($image_size); ?>">
25 25
 		<?php
26
-		if ( isset( $link ) && ( 'modal' === $link ) ) {
27
-			echo wp_kses_post( lsx_health_plan_shortcode_exercise_button( $post_id, true ) );
26
+		if (isset($link) && ('modal' === $link)) {
27
+			echo wp_kses_post(lsx_health_plan_shortcode_exercise_button($post_id, true));
28 28
 		}
29 29
 
30
-		if ( 'item' === $link ) {
30
+		if ('item' === $link) {
31 31
 			?>
32
-			<a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
32
+			<a href="<?php echo esc_url(get_permalink()); ?>" class="exercise-link excerpt-<?php echo esc_html($description); ?>">
33 33
 			<?php
34 34
 		} else {
35 35
 			?>
36
-			<div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
36
+			<div class="exercise-link excerpt-<?php echo esc_html($description); ?>">
37 37
 			<?php
38 38
 		}
39 39
 		?>
40 40
 
41
-		<?php lsx_health_plan_exercise_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?>
42
-		<?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?>
41
+		<?php lsx_health_plan_exercise_title('<h4 class="lsx-exercises-title">', '</h4>'); ?>
42
+		<?php if (isset($description) && ('none' !== $description)) { ?>
43 43
 			<?php
44
-			if ( 'excerpt' === $description ) {
45
-				$excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
44
+			if ('excerpt' === $description) {
45
+				$excerpt = \lsx_health_plan\functions\hp_excerpt($post_id);
46 46
 				?>
47
-				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
47
+				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post($excerpt); ?></p>
48 48
 			<?php } ?>
49
-			<?php if ( 'full' === $description ) { ?>
50
-				<?php echo wp_kses_post( get_the_content() ); ?>
49
+			<?php if ('full' === $description) { ?>
50
+				<?php echo wp_kses_post(get_the_content()); ?>
51 51
 			<?php } ?>
52 52
 		<?php } ?>
53 53
 		<?php
54
-		if ( isset( $link ) && ( 'item' === $link ) ) {
54
+		if (isset($link) && ('item' === $link)) {
55 55
 		?>
56 56
 			</a>
57 57
 		<?php } else { ?>
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
 $column_class = '4';
10 10
 // Check for shortcode overrides.
11 11
 if ( null !== $shortcode_args ) {
12
-	if ( isset( $shortcode_args['columns'] ) ) {
13
-		$column_class = $shortcode_args['columns'];
14
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
15
-	}
12
+     if ( isset( $shortcode_args['columns'] ) ) {
13
+          $column_class = $shortcode_args['columns'];
14
+          $column_class = \lsx_health_plan\functions\column_class( $column_class );
15
+     }
16 16
 }
17 17
 
18 18
 lsx_entry_before();
@@ -23,27 +23,27 @@  discard block
 block discarded – undo
23 23
 <div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>">
24 24
 	<div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>">
25 25
 		<?php
26
-		if ( isset( $link ) && ( 'modal' === $link ) ) {
27
-			echo wp_kses_post( lsx_health_plan_shortcode_exercise_button( $post_id, true ) );
28
-		}
26
+          if ( isset( $link ) && ( 'modal' === $link ) ) {
27
+               echo wp_kses_post( lsx_health_plan_shortcode_exercise_button( $post_id, true ) );
28
+          }
29 29
 
30
-		if ( 'item' === $link ) {
31
-			?>
30
+          if ( 'item' === $link ) {
31
+               ?>
32 32
 			<a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
33 33
 			<?php
34
-		} else {
35
-			?>
34
+          } else {
35
+               ?>
36 36
 			<div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>">
37 37
 			<?php
38
-		}
39
-		?>
38
+          }
39
+          ?>
40 40
 
41 41
 		<?php lsx_health_plan_exercise_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?>
42 42
 		<?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?>
43 43
 			<?php
44
-			if ( 'excerpt' === $description ) {
45
-				$excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
46
-				?>
44
+               if ( 'excerpt' === $description ) {
45
+                    $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id );
46
+                    ?>
47 47
 				<p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p>
48 48
 			<?php } ?>
49 49
 			<?php if ( 'full' === $description ) { ?>
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 			<?php } ?>
52 52
 		<?php } ?>
53 53
 		<?php
54
-		if ( isset( $link ) && ( 'item' === $link ) ) {
55
-		?>
54
+          if ( isset( $link ) && ( 'item' === $link ) ) {
55
+          ?>
56 56
 			</a>
57 57
 		<?php } else { ?>
58 58
 			</div>
Please login to merge, or discard this patch.
templates/single-exercise.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
12
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
13 13
 
14 14
 	<?php lsx_content_before(); ?>
15 15
 
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<?php lsx_content_top(); ?>
19 19
 
20
-		<?php if ( have_posts() ) : ?>
20
+		<?php if (have_posts()) : ?>
21 21
 
22 22
 			<?php
23
-			while ( have_posts() ) :
23
+			while (have_posts()) :
24 24
 				the_post();
25 25
 				?>
26 26
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	<?php lsx_content_after(); ?>
38 38
 
39 39
 	<?php
40
-	if ( is_singular( 'post' ) ) {
40
+	if (is_singular('post')) {
41 41
 		lsx_post_nav();
42 42
 	}
43 43
 	?>
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 		<?php if ( have_posts() ) : ?>
21 21
 
22 22
 			<?php
23
-			while ( have_posts() ) :
24
-				the_post();
25
-				?>
23
+               while ( have_posts() ) :
24
+                    the_post();
25
+                    ?>
26 26
 
27 27
 				<?php include LSX_HEALTH_PLAN_PATH . '/templates/content-exercise.php'; ?>
28 28
 
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
 	<?php lsx_content_after(); ?>
38 38
 
39 39
 	<?php
40
-	if ( is_singular( 'post' ) ) {
41
-		lsx_post_nav();
42
-	}
43
-	?>
40
+     if ( is_singular( 'post' ) ) {
41
+          lsx_post_nav();
42
+     }
43
+     ?>
44 44
 
45 45
 </div><!-- #primary -->
46 46
 
Please login to merge, or discard this patch.
templates/single-plan.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
12
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
13 13
 
14 14
 	<?php lsx_content_before(); ?>
15 15
 
Please login to merge, or discard this patch.
templates/content-archive-recipe.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,30 +12,30 @@  discard block
 block discarded – undo
12 12
 <?php
13 13
 $column_class = '4';
14 14
 // Check for shortcode overrides.
15
-if ( null !== $shortcode_args ) {
16
-	if ( isset( $shortcode_args['columns'] ) ) {
15
+if (null !== $shortcode_args) {
16
+	if (isset($shortcode_args['columns'])) {
17 17
 		$column_class = $shortcode_args['columns'];
18
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
18
+		$column_class = \lsx_health_plan\functions\column_class($column_class);
19 19
 	}
20 20
 }
21 21
 ?>
22 22
 
23
-<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>">
23
+<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?>">
24 24
 	<article class="lsx-slot box-shadow">
25
-		<span class="recipe-type"><?php echo esc_html( lsx_health_plan_recipe_type() ); ?></span>
25
+		<span class="recipe-type"><?php echo esc_html(lsx_health_plan_recipe_type()); ?></span>
26 26
 		<?php lsx_entry_top(); ?>
27 27
 
28 28
 		<div class="recipe-feature-img">
29
-			<a href="<?php echo esc_url( get_permalink() ); ?>">
29
+			<a href="<?php echo esc_url(get_permalink()); ?>">
30 30
 			<?php
31 31
 			$featured_image = get_the_post_thumbnail();
32
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
33
-				the_post_thumbnail( 'lsx-thumbnail-square', array(
32
+			if ( ! empty($featured_image) && '' !== $featured_image) {
33
+				the_post_thumbnail('lsx-thumbnail-square', array(
34 34
 					'class' => 'aligncenter',
35
-				) );
35
+				));
36 36
 			} else {
37 37
 				?>
38
-				<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
38
+				<img src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>">
39 39
 				<?php
40 40
 			}
41 41
 			?>
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		<div class="content-box white-bg">
45 45
 			<?php lsx_health_plan_recipe_data(); ?>
46 46
 			<h3 class="recipe-title"><?php the_title(); ?></h3>
47
-			<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'View Recipe', 'lsx-health-plan' ); ?></a>
47
+			<a href="<?php echo esc_url(get_permalink()); ?>" class="btn border-btn"><?php esc_html_e('View Recipe', 'lsx-health-plan'); ?></a>
48 48
 		</div>
49 49
 		<?php lsx_entry_bottom(); ?>
50 50
 	</article>
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 $column_class = '4';
14 14
 // Check for shortcode overrides.
15 15
 if ( null !== $shortcode_args ) {
16
-	if ( isset( $shortcode_args['columns'] ) ) {
17
-		$column_class = $shortcode_args['columns'];
18
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
19
-	}
16
+     if ( isset( $shortcode_args['columns'] ) ) {
17
+          $column_class = $shortcode_args['columns'];
18
+          $column_class = \lsx_health_plan\functions\column_class( $column_class );
19
+     }
20 20
 }
21 21
 ?>
22 22
 
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
 		<div class="recipe-feature-img">
29 29
 			<a href="<?php echo esc_url( get_permalink() ); ?>">
30 30
 			<?php
31
-			$featured_image = get_the_post_thumbnail();
32
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
33
-				the_post_thumbnail( 'lsx-thumbnail-square', array(
34
-					'class' => 'aligncenter',
35
-				) );
36
-			} else {
37
-				?>
31
+               $featured_image = get_the_post_thumbnail();
32
+               if ( ! empty( $featured_image ) && '' !== $featured_image ) {
33
+                    the_post_thumbnail( 'lsx-thumbnail-square', array(
34
+                         'class' => 'aligncenter',
35
+                    ) );
36
+               } else {
37
+                    ?>
38 38
 				<img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
39 39
 				<?php
40
-			}
41
-			?>
40
+               }
41
+               ?>
42 42
 			</a>
43 43
 		</div>
44 44
 		<div class="content-box white-bg">
Please login to merge, or discard this patch.