Passed
Push — add/multiplan ( efd4dd...2fc26f )
by Warwick
05:21 queued 14s
created
classes/frontend/class-general.php 2 patches
Indentation   +165 added lines, -165 removed lines patch added patch discarded remove patch
@@ -8,169 +8,169 @@
 block discarded – undo
8 8
  */
9 9
 class General {
10 10
 
11
-	/**
12
-	 * Holds class instance
13
-	 *
14
-	 * @since 1.0.0
15
-	 *
16
-	 * @var      object \lsx_health_plan\classes\frontend\General()
17
-	 */
18
-	protected static $instance = null;
19
-
20
-	/**
21
-	 * Constructor
22
-	 */
23
-	public function __construct() {
24
-		// Before Output.
25
-		add_action( 'wp_enqueue_scripts', array( $this, 'assets' ), 5 );
26
-		add_filter( 'wp_kses_allowed_html', array( $this, 'allow_html_tags_attributes' ), 100, 2 );
27
-
28
-		// Output.
29
-		add_action( 'body_class', array( $this, 'body_classes' ) );
30
-		add_filter( 'lsx_global_header_title',  array( $this, 'single_title' ), 200, 1 );
31
-		add_action( 'wp_head', array( $this, 'remove_single_footer' ), 99 );
32
-		add_filter( 'get_the_archive_title', array( $this, 'get_the_archive_title' ), 9 );
33
-	}
34
-
35
-	/**
36
-	 * Return an instance of this class.
37
-	 *
38
-	 * @since 1.0.0
39
-	 *
40
-	 * @return    object \lsx_health_plan\classes\frontend\General()    A single instance of this class.
41
-	 */
42
-	public static function get_instance() {
43
-		// If the single instance hasn't been set, set it now.
44
-		if ( null === self::$instance ) {
45
-			self::$instance = new self();
46
-		}
47
-		return self::$instance;
48
-	}
49
-
50
-	/**
51
-	 * Registers the plugin frontend assets
52
-	 *
53
-	 * @return void
54
-	 */
55
-	public function assets() {
56
-
57
-		if ( is_post_type_archive( 'plan' ) && false === \lsx_health_plan\functions\plan\is_filters_disabled() ) {
58
-			wp_enqueue_script( 'isotope', LSX_HEALTH_PLAN_URL . 'assets/js/vendor/isotope.pkgd.min.js', array( 'jquery' ), null, LSX_HEALTH_PLAN_URL, true );
59
-		}
60
-
61
-		wp_enqueue_style( 'lsx-health-plan', LSX_HEALTH_PLAN_URL . 'assets/css/lsx-health-plan.css', array(), LSX_HEALTH_PLAN_VER );
62
-		wp_style_add_data( 'lsx-health-plan', 'rtl', 'replace' );
63
-		wp_enqueue_script( 'lsx-health-plan-scripts', LSX_HEALTH_PLAN_URL . 'assets/js/src/lsx-health-plan-admin.js', array( 'jquery' ) );
64
-
65
-	}
66
-
67
-	/**
68
-	 * Adds the iframe and the progress HTML tags to the allowed WordPress list.
69
-	 */
70
-	public function allow_html_tags_attributes( $tags, $context ) {
71
-		if ( 'post' === $context ) {
72
-			$tags['iframe'] = array(
73
-				'src'             => true,
74
-				'height'          => true,
75
-				'width'           => true,
76
-				'frameborder'     => true,
77
-				'allowfullscreen' => true,
78
-			);
79
-		}
80
-		$tags['progress'] = array(
81
-			'id'    => true,
82
-			'value' => true,
83
-			'max'   => true,
84
-		);
85
-		return $tags;
86
-	}
87
-
88
-	/**
89
-	 * Add body classes to body.
90
-	 *
91
-	 * @param array $classes
92
-	 * @return void
93
-	 */
94
-	public function body_classes( $classes = array() ) {
95
-		global $post;
96
-
97
-		if ( isset( $post->post_content ) && has_shortcode( $post->post_content, 'lsx_health_plan_my_profile_block' ) ) {
98
-			$classes[] = 'my-plan-shortcode';
99
-		}
100
-
101
-		if ( is_single() && is_singular( 'plan' ) ) {
102
-			$args = array(
103
-				'post_parent' => get_the_ID(),
104
-				'post_type'   => 'plan',
105
-			);
106
-
107
-			$post_id      = get_the_ID();
108
-			$has_children = get_children( $args );
109
-			$has_parent   = wp_get_post_parent_id( $post_id );
110
-
111
-			if ( ! empty( $has_children ) ) {
112
-				$plan_type_class = 'parent-plan-page';
113
-				if ( 0 !== $has_parent ) {
114
-					$plan_type_class = 'parent-sub-plan-page';
115
-				}
116
-			} else {
117
-				$plan_type_class = 'unique-plan-page';
118
-				if ( 0 !== $has_parent ) {
119
-					$plan_type_class = 'child-plan-page';
120
-				}
121
-			}
122
-			$classes[] = $plan_type_class;
123
-		}
124
-		return $classes;
125
-	}
126
-
127
-	/**
128
-	 * Remove the single recipe and exercise title
129
-	 */
130
-	public function single_title( $title ) {
131
-
132
-		if ( is_single() && is_singular( 'recipe' ) ) {
133
-
134
-			$title = __( 'Recipe', 'lsx-health-plan' );
135
-		}
136
-
137
-		if ( is_single() && is_singular( 'exercise' ) ) {
138
-
139
-			$title = __( 'Exercise', 'lsx-health-plan' );
140
-		}
141
-
142
-		return $title;
143
-	}
144
-
145
-	/**
146
-	 * Removing footer for HP single pages.
147
-	 *
148
-	 * @return void
149
-	 */
150
-	public function remove_single_footer() {
151
-		if ( ( is_single() && is_singular( array( 'exercise', 'recipe', 'workout', 'meal' ) ) ) || ( is_archive() && is_post_type_archive( array( 'exercise', 'recipe', 'workout', 'meal' ) ) )) {
152
-			remove_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' );
153
-		}
154
-	}
155
-	/**
156
-	 * Remove the "Archives:" from the post type recipes.
157
-	 *
158
-	 * @param string $title the term title.
159
-	 * @return string
160
-	 */
161
-	public function get_the_archive_title( $title ) {
162
-		if ( is_post_type_archive( 'recipe' ) ) {
163
-			$title = __( 'Recipes', 'lsx-health-plan' );
164
-		}
165
-		if ( is_post_type_archive( 'exercise' ) ) {
166
-			$title = __( 'Exercises', 'lsx-health-plan' );
167
-		}
168
-		if ( is_tax() ) {
169
-			$queried_object = get_queried_object();
170
-			if ( isset( $queried_object->name ) ) {
171
-				$title = $queried_object->name;
172
-			}
173
-		}
174
-		return $title;
175
-	}
11
+     /**
12
+      * Holds class instance
13
+      *
14
+      * @since 1.0.0
15
+      *
16
+      * @var      object \lsx_health_plan\classes\frontend\General()
17
+      */
18
+     protected static $instance = null;
19
+
20
+     /**
21
+      * Constructor
22
+      */
23
+     public function __construct() {
24
+          // Before Output.
25
+          add_action( 'wp_enqueue_scripts', array( $this, 'assets' ), 5 );
26
+          add_filter( 'wp_kses_allowed_html', array( $this, 'allow_html_tags_attributes' ), 100, 2 );
27
+
28
+          // Output.
29
+          add_action( 'body_class', array( $this, 'body_classes' ) );
30
+          add_filter( 'lsx_global_header_title',  array( $this, 'single_title' ), 200, 1 );
31
+          add_action( 'wp_head', array( $this, 'remove_single_footer' ), 99 );
32
+          add_filter( 'get_the_archive_title', array( $this, 'get_the_archive_title' ), 9 );
33
+     }
34
+
35
+     /**
36
+      * Return an instance of this class.
37
+      *
38
+      * @since 1.0.0
39
+      *
40
+      * @return    object \lsx_health_plan\classes\frontend\General()    A single instance of this class.
41
+      */
42
+     public static function get_instance() {
43
+          // If the single instance hasn't been set, set it now.
44
+          if ( null === self::$instance ) {
45
+               self::$instance = new self();
46
+          }
47
+          return self::$instance;
48
+     }
49
+
50
+     /**
51
+      * Registers the plugin frontend assets
52
+      *
53
+      * @return void
54
+      */
55
+     public function assets() {
56
+
57
+          if ( is_post_type_archive( 'plan' ) && false === \lsx_health_plan\functions\plan\is_filters_disabled() ) {
58
+               wp_enqueue_script( 'isotope', LSX_HEALTH_PLAN_URL . 'assets/js/vendor/isotope.pkgd.min.js', array( 'jquery' ), null, LSX_HEALTH_PLAN_URL, true );
59
+          }
60
+
61
+          wp_enqueue_style( 'lsx-health-plan', LSX_HEALTH_PLAN_URL . 'assets/css/lsx-health-plan.css', array(), LSX_HEALTH_PLAN_VER );
62
+          wp_style_add_data( 'lsx-health-plan', 'rtl', 'replace' );
63
+          wp_enqueue_script( 'lsx-health-plan-scripts', LSX_HEALTH_PLAN_URL . 'assets/js/src/lsx-health-plan-admin.js', array( 'jquery' ) );
64
+
65
+     }
66
+
67
+     /**
68
+      * Adds the iframe and the progress HTML tags to the allowed WordPress list.
69
+      */
70
+     public function allow_html_tags_attributes( $tags, $context ) {
71
+          if ( 'post' === $context ) {
72
+               $tags['iframe'] = array(
73
+                    'src'             => true,
74
+                    'height'          => true,
75
+                    'width'           => true,
76
+                    'frameborder'     => true,
77
+                    'allowfullscreen' => true,
78
+               );
79
+          }
80
+          $tags['progress'] = array(
81
+               'id'    => true,
82
+               'value' => true,
83
+               'max'   => true,
84
+          );
85
+          return $tags;
86
+     }
87
+
88
+     /**
89
+      * Add body classes to body.
90
+      *
91
+      * @param array $classes
92
+      * @return void
93
+      */
94
+     public function body_classes( $classes = array() ) {
95
+          global $post;
96
+
97
+          if ( isset( $post->post_content ) && has_shortcode( $post->post_content, 'lsx_health_plan_my_profile_block' ) ) {
98
+               $classes[] = 'my-plan-shortcode';
99
+          }
100
+
101
+          if ( is_single() && is_singular( 'plan' ) ) {
102
+               $args = array(
103
+                    'post_parent' => get_the_ID(),
104
+                    'post_type'   => 'plan',
105
+               );
106
+
107
+               $post_id      = get_the_ID();
108
+               $has_children = get_children( $args );
109
+               $has_parent   = wp_get_post_parent_id( $post_id );
110
+
111
+               if ( ! empty( $has_children ) ) {
112
+                    $plan_type_class = 'parent-plan-page';
113
+                    if ( 0 !== $has_parent ) {
114
+                         $plan_type_class = 'parent-sub-plan-page';
115
+                    }
116
+               } else {
117
+                    $plan_type_class = 'unique-plan-page';
118
+                    if ( 0 !== $has_parent ) {
119
+                         $plan_type_class = 'child-plan-page';
120
+                    }
121
+               }
122
+               $classes[] = $plan_type_class;
123
+          }
124
+          return $classes;
125
+     }
126
+
127
+     /**
128
+      * Remove the single recipe and exercise title
129
+      */
130
+     public function single_title( $title ) {
131
+
132
+          if ( is_single() && is_singular( 'recipe' ) ) {
133
+
134
+               $title = __( 'Recipe', 'lsx-health-plan' );
135
+          }
136
+
137
+          if ( is_single() && is_singular( 'exercise' ) ) {
138
+
139
+               $title = __( 'Exercise', 'lsx-health-plan' );
140
+          }
141
+
142
+          return $title;
143
+     }
144
+
145
+     /**
146
+      * Removing footer for HP single pages.
147
+      *
148
+      * @return void
149
+      */
150
+     public function remove_single_footer() {
151
+          if ( ( is_single() && is_singular( array( 'exercise', 'recipe', 'workout', 'meal' ) ) ) || ( is_archive() && is_post_type_archive( array( 'exercise', 'recipe', 'workout', 'meal' ) ) )) {
152
+               remove_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' );
153
+          }
154
+     }
155
+     /**
156
+      * Remove the "Archives:" from the post type recipes.
157
+      *
158
+      * @param string $title the term title.
159
+      * @return string
160
+      */
161
+     public function get_the_archive_title( $title ) {
162
+          if ( is_post_type_archive( 'recipe' ) ) {
163
+               $title = __( 'Recipes', 'lsx-health-plan' );
164
+          }
165
+          if ( is_post_type_archive( 'exercise' ) ) {
166
+               $title = __( 'Exercises', 'lsx-health-plan' );
167
+          }
168
+          if ( is_tax() ) {
169
+               $queried_object = get_queried_object();
170
+               if ( isset( $queried_object->name ) ) {
171
+                    $title = $queried_object->name;
172
+               }
173
+          }
174
+          return $title;
175
+     }
176 176
 }
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function __construct() {
24 24
 		// Before Output.
25
-		add_action( 'wp_enqueue_scripts', array( $this, 'assets' ), 5 );
26
-		add_filter( 'wp_kses_allowed_html', array( $this, 'allow_html_tags_attributes' ), 100, 2 );
25
+		add_action('wp_enqueue_scripts', array($this, 'assets'), 5);
26
+		add_filter('wp_kses_allowed_html', array($this, 'allow_html_tags_attributes'), 100, 2);
27 27
 
28 28
 		// Output.
29
-		add_action( 'body_class', array( $this, 'body_classes' ) );
30
-		add_filter( 'lsx_global_header_title',  array( $this, 'single_title' ), 200, 1 );
31
-		add_action( 'wp_head', array( $this, 'remove_single_footer' ), 99 );
32
-		add_filter( 'get_the_archive_title', array( $this, 'get_the_archive_title' ), 9 );
29
+		add_action('body_class', array($this, 'body_classes'));
30
+		add_filter('lsx_global_header_title', array($this, 'single_title'), 200, 1);
31
+		add_action('wp_head', array($this, 'remove_single_footer'), 99);
32
+		add_filter('get_the_archive_title', array($this, 'get_the_archive_title'), 9);
33 33
 	}
34 34
 
35 35
 	/**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	public static function get_instance() {
43 43
 		// If the single instance hasn't been set, set it now.
44
-		if ( null === self::$instance ) {
44
+		if (null === self::$instance) {
45 45
 			self::$instance = new self();
46 46
 		}
47 47
 		return self::$instance;
@@ -54,21 +54,21 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function assets() {
56 56
 
57
-		if ( is_post_type_archive( 'plan' ) && false === \lsx_health_plan\functions\plan\is_filters_disabled() ) {
58
-			wp_enqueue_script( 'isotope', LSX_HEALTH_PLAN_URL . 'assets/js/vendor/isotope.pkgd.min.js', array( 'jquery' ), null, LSX_HEALTH_PLAN_URL, true );
57
+		if (is_post_type_archive('plan') && false === \lsx_health_plan\functions\plan\is_filters_disabled()) {
58
+			wp_enqueue_script('isotope', LSX_HEALTH_PLAN_URL . 'assets/js/vendor/isotope.pkgd.min.js', array('jquery'), null, LSX_HEALTH_PLAN_URL, true);
59 59
 		}
60 60
 
61
-		wp_enqueue_style( 'lsx-health-plan', LSX_HEALTH_PLAN_URL . 'assets/css/lsx-health-plan.css', array(), LSX_HEALTH_PLAN_VER );
62
-		wp_style_add_data( 'lsx-health-plan', 'rtl', 'replace' );
63
-		wp_enqueue_script( 'lsx-health-plan-scripts', LSX_HEALTH_PLAN_URL . 'assets/js/src/lsx-health-plan-admin.js', array( 'jquery' ) );
61
+		wp_enqueue_style('lsx-health-plan', LSX_HEALTH_PLAN_URL . 'assets/css/lsx-health-plan.css', array(), LSX_HEALTH_PLAN_VER);
62
+		wp_style_add_data('lsx-health-plan', 'rtl', 'replace');
63
+		wp_enqueue_script('lsx-health-plan-scripts', LSX_HEALTH_PLAN_URL . 'assets/js/src/lsx-health-plan-admin.js', array('jquery'));
64 64
 
65 65
 	}
66 66
 
67 67
 	/**
68 68
 	 * Adds the iframe and the progress HTML tags to the allowed WordPress list.
69 69
 	 */
70
-	public function allow_html_tags_attributes( $tags, $context ) {
71
-		if ( 'post' === $context ) {
70
+	public function allow_html_tags_attributes($tags, $context) {
71
+		if ('post' === $context) {
72 72
 			$tags['iframe'] = array(
73 73
 				'src'             => true,
74 74
 				'height'          => true,
@@ -91,31 +91,31 @@  discard block
 block discarded – undo
91 91
 	 * @param array $classes
92 92
 	 * @return void
93 93
 	 */
94
-	public function body_classes( $classes = array() ) {
94
+	public function body_classes($classes = array()) {
95 95
 		global $post;
96 96
 
97
-		if ( isset( $post->post_content ) && has_shortcode( $post->post_content, 'lsx_health_plan_my_profile_block' ) ) {
97
+		if (isset($post->post_content) && has_shortcode($post->post_content, 'lsx_health_plan_my_profile_block')) {
98 98
 			$classes[] = 'my-plan-shortcode';
99 99
 		}
100 100
 
101
-		if ( is_single() && is_singular( 'plan' ) ) {
101
+		if (is_single() && is_singular('plan')) {
102 102
 			$args = array(
103 103
 				'post_parent' => get_the_ID(),
104 104
 				'post_type'   => 'plan',
105 105
 			);
106 106
 
107 107
 			$post_id      = get_the_ID();
108
-			$has_children = get_children( $args );
109
-			$has_parent   = wp_get_post_parent_id( $post_id );
108
+			$has_children = get_children($args);
109
+			$has_parent   = wp_get_post_parent_id($post_id);
110 110
 
111
-			if ( ! empty( $has_children ) ) {
111
+			if ( ! empty($has_children)) {
112 112
 				$plan_type_class = 'parent-plan-page';
113
-				if ( 0 !== $has_parent ) {
113
+				if (0 !== $has_parent) {
114 114
 					$plan_type_class = 'parent-sub-plan-page';
115 115
 				}
116 116
 			} else {
117 117
 				$plan_type_class = 'unique-plan-page';
118
-				if ( 0 !== $has_parent ) {
118
+				if (0 !== $has_parent) {
119 119
 					$plan_type_class = 'child-plan-page';
120 120
 				}
121 121
 			}
@@ -127,16 +127,16 @@  discard block
 block discarded – undo
127 127
 	/**
128 128
 	 * Remove the single recipe and exercise title
129 129
 	 */
130
-	public function single_title( $title ) {
130
+	public function single_title($title) {
131 131
 
132
-		if ( is_single() && is_singular( 'recipe' ) ) {
132
+		if (is_single() && is_singular('recipe')) {
133 133
 
134
-			$title = __( 'Recipe', 'lsx-health-plan' );
134
+			$title = __('Recipe', 'lsx-health-plan');
135 135
 		}
136 136
 
137
-		if ( is_single() && is_singular( 'exercise' ) ) {
137
+		if (is_single() && is_singular('exercise')) {
138 138
 
139
-			$title = __( 'Exercise', 'lsx-health-plan' );
139
+			$title = __('Exercise', 'lsx-health-plan');
140 140
 		}
141 141
 
142 142
 		return $title;
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 	 * @return void
149 149
 	 */
150 150
 	public function remove_single_footer() {
151
-		if ( ( is_single() && is_singular( array( 'exercise', 'recipe', 'workout', 'meal' ) ) ) || ( is_archive() && is_post_type_archive( array( 'exercise', 'recipe', 'workout', 'meal' ) ) )) {
152
-			remove_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' );
151
+		if ((is_single() && is_singular(array('exercise', 'recipe', 'workout', 'meal'))) || (is_archive() && is_post_type_archive(array('exercise', 'recipe', 'workout', 'meal')))) {
152
+			remove_action('lsx_footer_before', 'lsx_add_footer_sidebar_area');
153 153
 		}
154 154
 	}
155 155
 	/**
@@ -158,16 +158,16 @@  discard block
 block discarded – undo
158 158
 	 * @param string $title the term title.
159 159
 	 * @return string
160 160
 	 */
161
-	public function get_the_archive_title( $title ) {
162
-		if ( is_post_type_archive( 'recipe' ) ) {
163
-			$title = __( 'Recipes', 'lsx-health-plan' );
161
+	public function get_the_archive_title($title) {
162
+		if (is_post_type_archive('recipe')) {
163
+			$title = __('Recipes', 'lsx-health-plan');
164 164
 		}
165
-		if ( is_post_type_archive( 'exercise' ) ) {
166
-			$title = __( 'Exercises', 'lsx-health-plan' );
165
+		if (is_post_type_archive('exercise')) {
166
+			$title = __('Exercises', 'lsx-health-plan');
167 167
 		}
168
-		if ( is_tax() ) {
168
+		if (is_tax()) {
169 169
 			$queried_object = get_queried_object();
170
-			if ( isset( $queried_object->name ) ) {
170
+			if (isset($queried_object->name)) {
171 171
 				$title = $queried_object->name;
172 172
 			}
173 173
 		}
Please login to merge, or discard this patch.
classes/integrations/woocommerce/class-checkout.php 2 patches
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -8,110 +8,110 @@
 block discarded – undo
8 8
  */
9 9
 class Checkout {
10 10
 
11
-	/**
12
-	 * Holds class instance
13
-	 *
14
-	 * @since 1.0.0
15
-	 *
16
-	 * @var      object \lsx_health_plan\classes\integrations\woocommerce\Checkout()
17
-	 */
18
-	protected static $instance = null;
11
+     /**
12
+      * Holds class instance
13
+      *
14
+      * @since 1.0.0
15
+      *
16
+      * @var      object \lsx_health_plan\classes\integrations\woocommerce\Checkout()
17
+      */
18
+     protected static $instance = null;
19 19
 
20
-	/**
21
-	 * @var string
22
-	 */
23
-	public $plan_id = '';
20
+     /**
21
+      * @var string
22
+      */
23
+     public $plan_id = '';
24 24
 
25
-	/**
26
-	 * Constructor
27
-	 */
28
-	public function __construct() {
29
-		add_filter( 'woocommerce_order_button_text', array( $this, 'checkout_button_text' ), 10, 1 );
25
+     /**
26
+      * Constructor
27
+      */
28
+     public function __construct() {
29
+          add_filter( 'woocommerce_order_button_text', array( $this, 'checkout_button_text' ), 10, 1 );
30 30
 
31
-		// Cart Messages.
32
-		add_action( 'lsx_content_wrap_before', array( $this, 'cart_notices' ) );
33
-		add_filter( 'wc_add_to_cart_message_html', array( $this, 'add_to_cart_message' ), 10, 3 );
34
-	}
31
+          // Cart Messages.
32
+          add_action( 'lsx_content_wrap_before', array( $this, 'cart_notices' ) );
33
+          add_filter( 'wc_add_to_cart_message_html', array( $this, 'add_to_cart_message' ), 10, 3 );
34
+     }
35 35
 
36
-	/**
37
-	 * Return an instance of this class.
38
-	 *
39
-	 * @since 1.0.0
40
-	 *
41
-	 * @return    object \lsx_health_plan\classes\integrations\woocommerce\Checkout()    A single instance of this class.
42
-	 */
43
-	public static function get_instance() {
44
-		// If the single instance hasn't been set, set it now.
45
-		if ( null === self::$instance ) {
46
-			self::$instance = new self();
47
-		}
48
-		return self::$instance;
49
-	}
36
+     /**
37
+      * Return an instance of this class.
38
+      *
39
+      * @since 1.0.0
40
+      *
41
+      * @return    object \lsx_health_plan\classes\integrations\woocommerce\Checkout()    A single instance of this class.
42
+      */
43
+     public static function get_instance() {
44
+          // If the single instance hasn't been set, set it now.
45
+          if ( null === self::$instance ) {
46
+               self::$instance = new self();
47
+          }
48
+          return self::$instance;
49
+     }
50 50
 
51
-	/**
52
-	 * Return the Place Order Text
53
-	 *
54
-	 * @param string $label
55
-	 * @return void
56
-	 */
57
-	public function checkout_button_text( $label = '' ) {
58
-		$label = __( 'Place order', 'lsx-health-plan' );
59
-		return $label;
60
-	}
51
+     /**
52
+      * Return the Place Order Text
53
+      *
54
+      * @param string $label
55
+      * @return void
56
+      */
57
+     public function checkout_button_text( $label = '' ) {
58
+          $label = __( 'Place order', 'lsx-health-plan' );
59
+          return $label;
60
+     }
61 61
 
62
-	/**
63
-	 * Saves the Plan ID to the cart data, so we can attach it to the order later.
64
-	 *
65
-	 * @param array $cart_item_data
66
-	 * @param string $product_id
67
-	 * @param string $variation_id
68
-	 * @return void
69
-	 */
70
-	public function add_plan_id_to_cart( $cart_item_data, $product_id, $variation_id ) {
71
-		$plan_id = filter_input( INPUT_GET, 'plan_id' );
72
-		if ( empty( $plan_id ) || '' === $plan_id ) {
73
-			return $cart_item_data;
74
-		}
75
-		$cart_item_data['plan_id'] = $plan_id;
76
-		return $cart_item_data;
77
-	}
62
+     /**
63
+      * Saves the Plan ID to the cart data, so we can attach it to the order later.
64
+      *
65
+      * @param array $cart_item_data
66
+      * @param string $product_id
67
+      * @param string $variation_id
68
+      * @return void
69
+      */
70
+     public function add_plan_id_to_cart( $cart_item_data, $product_id, $variation_id ) {
71
+          $plan_id = filter_input( INPUT_GET, 'plan_id' );
72
+          if ( empty( $plan_id ) || '' === $plan_id ) {
73
+               return $cart_item_data;
74
+          }
75
+          $cart_item_data['plan_id'] = $plan_id;
76
+          return $cart_item_data;
77
+     }
78 78
 
79
-	/**
80
-	 * Output the WooCommerce Cart Notices.
81
-	 *
82
-	 * @return void
83
-	 */
84
-	public function cart_notices() {
85
-		if ( function_exists( 'woocommerce_output_all_notices' ) && is_post_type_archive( 'plan' ) ) {
86
-			echo wp_kses_post( '<div class="col-md-12 col-sm-12 woocommerce-notices-wrapper">' );
87
-			wc_print_notices();
88
-			echo wp_kses_post( '</div>' );
89
-		}
90
-	}
79
+     /**
80
+      * Output the WooCommerce Cart Notices.
81
+      *
82
+      * @return void
83
+      */
84
+     public function cart_notices() {
85
+          if ( function_exists( 'woocommerce_output_all_notices' ) && is_post_type_archive( 'plan' ) ) {
86
+               echo wp_kses_post( '<div class="col-md-12 col-sm-12 woocommerce-notices-wrapper">' );
87
+               wc_print_notices();
88
+               echo wp_kses_post( '</div>' );
89
+          }
90
+     }
91 91
 
92
-	/**
93
-	 * Changes the add to cart message and adds our course name.
94
-	 *
95
-	 * @param  string  $message
96
-	 * @param  array   $products
97
-	 * @param  boolean $show_qty
98
-	 * @return string
99
-	 */
100
-	public function add_to_cart_message( $message, $products, $show_qty ) {
101
-		if ( isset( $_GET['plan_id'] ) ) { // @codingStandardsIgnoreLine.
102
-			$this->plan_id = sanitize_text_field( wp_slash( $_GET['plan_id'] ) ); // @codingStandardsIgnoreLine.
92
+     /**
93
+      * Changes the add to cart message and adds our course name.
94
+      *
95
+      * @param  string  $message
96
+      * @param  array   $products
97
+      * @param  boolean $show_qty
98
+      * @return string
99
+      */
100
+     public function add_to_cart_message( $message, $products, $show_qty ) {
101
+          if ( isset( $_GET['plan_id'] ) ) { // @codingStandardsIgnoreLine.
102
+               $this->plan_id = sanitize_text_field( wp_slash( $_GET['plan_id'] ) ); // @codingStandardsIgnoreLine.
103 103
 
104
-			$title = '<strong>' . get_the_title( $this->plan_id ) . '</strong>';
105
-			$title = sprintf( _n( '%s has been added to your cart.', '%s have been added to your cart.', 1, 'lsx-health-plan' ), $title );
104
+               $title = '<strong>' . get_the_title( $this->plan_id ) . '</strong>';
105
+               $title = sprintf( _n( '%s has been added to your cart.', '%s have been added to your cart.', 1, 'lsx-health-plan' ), $title );
106 106
 
107
-			// Output success messages.
108
-			if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
109
-				$return_to = apply_filters( 'woocommerce_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect( wc_get_raw_referer(), false ) : wc_get_page_permalink( 'shop' ) );
110
-				$message   = sprintf( '<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url( $return_to ), esc_html__( 'Continue shopping', 'lsx-health-plan' ), $title );
111
-			} else {
112
-				$message = sprintf( '<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url( wc_get_cart_url() ), esc_html__( 'View cart', 'lsx-health-plan' ), $title );
113
-			}
114
-		}
115
-		return $message;
116
-	}
107
+               // Output success messages.
108
+               if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
109
+                    $return_to = apply_filters( 'woocommerce_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect( wc_get_raw_referer(), false ) : wc_get_page_permalink( 'shop' ) );
110
+                    $message   = sprintf( '<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url( $return_to ), esc_html__( 'Continue shopping', 'lsx-health-plan' ), $title );
111
+               } else {
112
+                    $message = sprintf( '<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url( wc_get_cart_url() ), esc_html__( 'View cart', 'lsx-health-plan' ), $title );
113
+               }
114
+          }
115
+          return $message;
116
+     }
117 117
 }
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 	 * Constructor
27 27
 	 */
28 28
 	public function __construct() {
29
-		add_filter( 'woocommerce_order_button_text', array( $this, 'checkout_button_text' ), 10, 1 );
29
+		add_filter('woocommerce_order_button_text', array($this, 'checkout_button_text'), 10, 1);
30 30
 
31 31
 		// Cart Messages.
32
-		add_action( 'lsx_content_wrap_before', array( $this, 'cart_notices' ) );
33
-		add_filter( 'wc_add_to_cart_message_html', array( $this, 'add_to_cart_message' ), 10, 3 );
32
+		add_action('lsx_content_wrap_before', array($this, 'cart_notices'));
33
+		add_filter('wc_add_to_cart_message_html', array($this, 'add_to_cart_message'), 10, 3);
34 34
 	}
35 35
 
36 36
 	/**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public static function get_instance() {
44 44
 		// If the single instance hasn't been set, set it now.
45
-		if ( null === self::$instance ) {
45
+		if (null === self::$instance) {
46 46
 			self::$instance = new self();
47 47
 		}
48 48
 		return self::$instance;
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 	 * @param string $label
55 55
 	 * @return void
56 56
 	 */
57
-	public function checkout_button_text( $label = '' ) {
58
-		$label = __( 'Place order', 'lsx-health-plan' );
57
+	public function checkout_button_text($label = '') {
58
+		$label = __('Place order', 'lsx-health-plan');
59 59
 		return $label;
60 60
 	}
61 61
 
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 	 * @param string $variation_id
68 68
 	 * @return void
69 69
 	 */
70
-	public function add_plan_id_to_cart( $cart_item_data, $product_id, $variation_id ) {
71
-		$plan_id = filter_input( INPUT_GET, 'plan_id' );
72
-		if ( empty( $plan_id ) || '' === $plan_id ) {
70
+	public function add_plan_id_to_cart($cart_item_data, $product_id, $variation_id) {
71
+		$plan_id = filter_input(INPUT_GET, 'plan_id');
72
+		if (empty($plan_id) || '' === $plan_id) {
73 73
 			return $cart_item_data;
74 74
 		}
75 75
 		$cart_item_data['plan_id'] = $plan_id;
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
 	 * @return void
83 83
 	 */
84 84
 	public function cart_notices() {
85
-		if ( function_exists( 'woocommerce_output_all_notices' ) && is_post_type_archive( 'plan' ) ) {
86
-			echo wp_kses_post( '<div class="col-md-12 col-sm-12 woocommerce-notices-wrapper">' );
85
+		if (function_exists('woocommerce_output_all_notices') && is_post_type_archive('plan')) {
86
+			echo wp_kses_post('<div class="col-md-12 col-sm-12 woocommerce-notices-wrapper">');
87 87
 			wc_print_notices();
88
-			echo wp_kses_post( '</div>' );
88
+			echo wp_kses_post('</div>');
89 89
 		}
90 90
 	}
91 91
 
@@ -97,19 +97,19 @@  discard block
 block discarded – undo
97 97
 	 * @param  boolean $show_qty
98 98
 	 * @return string
99 99
 	 */
100
-	public function add_to_cart_message( $message, $products, $show_qty ) {
101
-		if ( isset( $_GET['plan_id'] ) ) { // @codingStandardsIgnoreLine.
102
-			$this->plan_id = sanitize_text_field( wp_slash( $_GET['plan_id'] ) ); // @codingStandardsIgnoreLine.
100
+	public function add_to_cart_message($message, $products, $show_qty) {
101
+		if (isset($_GET['plan_id'])) { // @codingStandardsIgnoreLine.
102
+			$this->plan_id = sanitize_text_field(wp_slash($_GET['plan_id'])); // @codingStandardsIgnoreLine.
103 103
 
104
-			$title = '<strong>' . get_the_title( $this->plan_id ) . '</strong>';
105
-			$title = sprintf( _n( '%s has been added to your cart.', '%s have been added to your cart.', 1, 'lsx-health-plan' ), $title );
104
+			$title = '<strong>' . get_the_title($this->plan_id) . '</strong>';
105
+			$title = sprintf(_n('%s has been added to your cart.', '%s have been added to your cart.', 1, 'lsx-health-plan'), $title);
106 106
 
107 107
 			// Output success messages.
108
-			if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
109
-				$return_to = apply_filters( 'woocommerce_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect( wc_get_raw_referer(), false ) : wc_get_page_permalink( 'shop' ) );
110
-				$message   = sprintf( '<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url( $return_to ), esc_html__( 'Continue shopping', 'lsx-health-plan' ), $title );
108
+			if ('yes' === get_option('woocommerce_cart_redirect_after_add')) {
109
+				$return_to = apply_filters('woocommerce_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect(wc_get_raw_referer(), false) : wc_get_page_permalink('shop'));
110
+				$message   = sprintf('<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url($return_to), esc_html__('Continue shopping', 'lsx-health-plan'), $title);
111 111
 			} else {
112
-				$message = sprintf( '<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url( wc_get_cart_url() ), esc_html__( 'View cart', 'lsx-health-plan' ), $title );
112
+				$message = sprintf('<a href="%s" tabindex="1" class="btn button wc-forward">%s</a> %s', esc_url(wc_get_cart_url()), esc_html__('View cart', 'lsx-health-plan'), $title);
113 113
 			}
114 114
 		}
115 115
 		return $message;
Please login to merge, or discard this patch.
classes/integrations/class-articles.php 2 patches
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -8,82 +8,82 @@
 block discarded – undo
8 8
  */
9 9
 class Articles {
10 10
 
11
-	/**
12
-	 * Holds class instance
13
-	 *
14
-	 * @var      object \lsx_health_plan\classes\Articles()
15
-	 */
16
-	protected static $instance = null;
11
+     /**
12
+      * Holds class instance
13
+      *
14
+      * @var      object \lsx_health_plan\classes\Articles()
15
+      */
16
+     protected static $instance = null;
17 17
 
18
-	/**
19
-	 * An array of the post types for the Global Defaults field.
20
-	 *
21
-	 * @var array
22
-	 */
23
-	//public $default_types = array( 'exercise', 'recipe', 'meal', 'workout', 'plan' );
18
+     /**
19
+      * An array of the post types for the Global Defaults field.
20
+      *
21
+      * @var array
22
+      */
23
+     //public $default_types = array( 'exercise', 'recipe', 'meal', 'workout', 'plan' );
24 24
 
25
-	/**
26
-	 * Constructor.
27
-	 */
28
-	public function __construct() {
29
-		$this->default_types = array(
30
-			\lsx_health_plan\functions\get_option( 'endpoint_meal', 'meal' ),
31
-			\lsx_health_plan\functions\get_option( 'endpoint_exercise_single', 'exercise' ),
32
-			\lsx_health_plan\functions\get_option( 'endpoint_recipe_single', 'recipe' ),
33
-			\lsx_health_plan\functions\get_option( 'endpoint_workout', 'workout' ),
34
-			\lsx_health_plan\functions\get_option( 'endpoint_plan', 'plan' ),
35
-		);
36
-		add_action( 'cmb2_admin_init', array( $this, 'related_articles_metabox' ) );
37
-	}
25
+     /**
26
+      * Constructor.
27
+      */
28
+     public function __construct() {
29
+          $this->default_types = array(
30
+               \lsx_health_plan\functions\get_option( 'endpoint_meal', 'meal' ),
31
+               \lsx_health_plan\functions\get_option( 'endpoint_exercise_single', 'exercise' ),
32
+               \lsx_health_plan\functions\get_option( 'endpoint_recipe_single', 'recipe' ),
33
+               \lsx_health_plan\functions\get_option( 'endpoint_workout', 'workout' ),
34
+               \lsx_health_plan\functions\get_option( 'endpoint_plan', 'plan' ),
35
+          );
36
+          add_action( 'cmb2_admin_init', array( $this, 'related_articles_metabox' ) );
37
+     }
38 38
 
39
-	/**
40
-	 * Return an instance of this class.
41
-	 *
42
-	 * @since 1.0.0
43
-	 *
44
-	 * @return    object \lsx_health_plan\classes\Articles()    A single instance of this class.
45
-	 */
46
-	public static function get_instance() {
47
-		// If the single instance hasn't been set, set it now.
48
-		if ( null === self::$instance ) {
49
-			self::$instance = new self();
50
-		}
51
-		return self::$instance;
52
-	}
39
+     /**
40
+      * Return an instance of this class.
41
+      *
42
+      * @since 1.0.0
43
+      *
44
+      * @return    object \lsx_health_plan\classes\Articles()    A single instance of this class.
45
+      */
46
+     public static function get_instance() {
47
+          // If the single instance hasn't been set, set it now.
48
+          if ( null === self::$instance ) {
49
+               self::$instance = new self();
50
+          }
51
+          return self::$instance;
52
+     }
53 53
 
54
-	/**
55
-	 * Define the related articles member metabox and field configurations.
56
-	 */
57
-	public function related_articles_metabox() {
58
-		foreach ( $this->default_types as $type => $default_type ) {
59
-			$cmb = new_cmb2_box(
60
-				array(
61
-					'id'           => $default_type . '_related_articles_metabox',
62
-					'title'        => __( 'Related Articles', 'lsx-health-plan' ),
63
-					'object_types' => array( $default_type ), // Post type.
64
-					'context'      => 'normal',
65
-					'priority'     => 'low',
66
-					'show_names'   => true,
67
-				)
68
-			);
54
+     /**
55
+      * Define the related articles member metabox and field configurations.
56
+      */
57
+     public function related_articles_metabox() {
58
+          foreach ( $this->default_types as $type => $default_type ) {
59
+               $cmb = new_cmb2_box(
60
+                    array(
61
+                         'id'           => $default_type . '_related_articles_metabox',
62
+                         'title'        => __( 'Related Articles', 'lsx-health-plan' ),
63
+                         'object_types' => array( $default_type ), // Post type.
64
+                         'context'      => 'normal',
65
+                         'priority'     => 'low',
66
+                         'show_names'   => true,
67
+                    )
68
+               );
69 69
 
70
-			$cmb->add_field(
71
-				array(
72
-					'name'       => __( 'Related Articles', 'lsx-health-plan' ),
73
-					'desc'       => __( 'Connect the related articles that applies to this ', 'lsx-health-plan' ) . $default_type,
74
-					'id'         => $default_type . '_connected_articles',
75
-					'type'       => 'post_search_ajax',
76
-					'limit'      => 3,
77
-					'sortable'   => true,
78
-					'query_args' => array(
79
-						'post_type'      => array( 'post' ),
80
-						'post_status'    => array( 'publish' ),
81
-						'posts_per_page' => 3,
82
-					),
83
-				)
84
-			);
85
-		}
70
+               $cmb->add_field(
71
+                    array(
72
+                         'name'       => __( 'Related Articles', 'lsx-health-plan' ),
73
+                         'desc'       => __( 'Connect the related articles that applies to this ', 'lsx-health-plan' ) . $default_type,
74
+                         'id'         => $default_type . '_connected_articles',
75
+                         'type'       => 'post_search_ajax',
76
+                         'limit'      => 3,
77
+                         'sortable'   => true,
78
+                         'query_args' => array(
79
+                              'post_type'      => array( 'post' ),
80
+                              'post_status'    => array( 'publish' ),
81
+                              'posts_per_page' => 3,
82
+                         ),
83
+                    )
84
+               );
85
+          }
86 86
 
87
-	}
87
+     }
88 88
 
89 89
 }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
 	 */
28 28
 	public function __construct() {
29 29
 		$this->default_types = array(
30
-			\lsx_health_plan\functions\get_option( 'endpoint_meal', 'meal' ),
31
-			\lsx_health_plan\functions\get_option( 'endpoint_exercise_single', 'exercise' ),
32
-			\lsx_health_plan\functions\get_option( 'endpoint_recipe_single', 'recipe' ),
33
-			\lsx_health_plan\functions\get_option( 'endpoint_workout', 'workout' ),
34
-			\lsx_health_plan\functions\get_option( 'endpoint_plan', 'plan' ),
30
+			\lsx_health_plan\functions\get_option('endpoint_meal', 'meal'),
31
+			\lsx_health_plan\functions\get_option('endpoint_exercise_single', 'exercise'),
32
+			\lsx_health_plan\functions\get_option('endpoint_recipe_single', 'recipe'),
33
+			\lsx_health_plan\functions\get_option('endpoint_workout', 'workout'),
34
+			\lsx_health_plan\functions\get_option('endpoint_plan', 'plan'),
35 35
 		);
36
-		add_action( 'cmb2_admin_init', array( $this, 'related_articles_metabox' ) );
36
+		add_action('cmb2_admin_init', array($this, 'related_articles_metabox'));
37 37
 	}
38 38
 
39 39
 	/**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public static function get_instance() {
47 47
 		// If the single instance hasn't been set, set it now.
48
-		if ( null === self::$instance ) {
48
+		if (null === self::$instance) {
49 49
 			self::$instance = new self();
50 50
 		}
51 51
 		return self::$instance;
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 	 * Define the related articles member metabox and field configurations.
56 56
 	 */
57 57
 	public function related_articles_metabox() {
58
-		foreach ( $this->default_types as $type => $default_type ) {
58
+		foreach ($this->default_types as $type => $default_type) {
59 59
 			$cmb = new_cmb2_box(
60 60
 				array(
61 61
 					'id'           => $default_type . '_related_articles_metabox',
62
-					'title'        => __( 'Related Articles', 'lsx-health-plan' ),
63
-					'object_types' => array( $default_type ), // Post type.
62
+					'title'        => __('Related Articles', 'lsx-health-plan'),
63
+					'object_types' => array($default_type), // Post type.
64 64
 					'context'      => 'normal',
65 65
 					'priority'     => 'low',
66 66
 					'show_names'   => true,
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 
70 70
 			$cmb->add_field(
71 71
 				array(
72
-					'name'       => __( 'Related Articles', 'lsx-health-plan' ),
73
-					'desc'       => __( 'Connect the related articles that applies to this ', 'lsx-health-plan' ) . $default_type,
72
+					'name'       => __('Related Articles', 'lsx-health-plan'),
73
+					'desc'       => __('Connect the related articles that applies to this ', 'lsx-health-plan') . $default_type,
74 74
 					'id'         => $default_type . '_connected_articles',
75 75
 					'type'       => 'post_search_ajax',
76 76
 					'limit'      => 3,
77 77
 					'sortable'   => true,
78 78
 					'query_args' => array(
79
-						'post_type'      => array( 'post' ),
80
-						'post_status'    => array( 'publish' ),
79
+						'post_type'      => array('post'),
80
+						'post_status'    => array('publish'),
81 81
 						'posts_per_page' => 3,
82 82
 					),
83 83
 				)
Please login to merge, or discard this patch.
templates/table-exercise-data.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,47 +9,47 @@
 block discarded – undo
9 9
 <table class="exercise-table">
10 10
 	<tbody>
11 11
 		<?php
12
-		if ( ! empty( $type ) ) {
13
-		?>
12
+          if ( ! empty( $type ) ) {
13
+          ?>
14 14
 			<tr class="types">
15 15
 				<td><?php esc_html_e( 'Type:', 'lsx-health-plan' ); ?>&nbsp;</td>
16 16
 				<td>
17 17
 				<?php
18
-					echo wp_kses_post( $type );
19
-				?>
18
+                         echo wp_kses_post( $type );
19
+                    ?>
20 20
 				</td>
21 21
 			</tr>
22 22
 		<?php
23
-		}
24
-		?>
23
+          }
24
+          ?>
25 25
 		<?php
26
-		if ( ! empty( $muscle_group ) ) {
27
-		?>
26
+          if ( ! empty( $muscle_group ) ) {
27
+          ?>
28 28
 			<tr class="muscle-group">
29 29
 				<td><?php esc_html_e( 'Muscle Group:', 'lsx-health-plan' ); ?>&nbsp;</td>
30 30
 				<td>
31 31
 				<?php
32
-					echo wp_kses_post( $muscle_group );
33
-				?>
32
+                         echo wp_kses_post( $muscle_group );
33
+                    ?>
34 34
 				</td>
35 35
 			</tr>
36 36
 		<?php
37
-		}
38
-		?>
37
+          }
38
+          ?>
39 39
 		<?php
40
-		if ( ! empty( $equipment ) ) {
41
-		?>
40
+          if ( ! empty( $equipment ) ) {
41
+          ?>
42 42
 			<tr class="equipment">
43 43
 				<td><?php esc_html_e( 'Equipment:', 'lsx-health-plan' ); ?>&nbsp;</td>
44 44
 				<td>
45 45
 				<?php
46
-					echo wp_kses_post( $equipment );
47
-				?>
46
+                         echo wp_kses_post( $equipment );
47
+                    ?>
48 48
 				</td>
49 49
 			</tr>
50 50
 		<?php
51
-		}
52
-		?>
51
+          }
52
+          ?>
53 53
 	</tbody>
54 54
 </table>
55 55
 <?php } ?>
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@  discard block
 block discarded – undo
5 5
 $muscle_group = lsx_health_plan_muscle_group_equipment();
6 6
 
7 7
 ?>
8
-<?php if ( ( ! empty( $type ) ) || ( ! empty( $equipment ) ) || ( ! empty( $muscle_group ) ) ) { ?>
8
+<?php if (( ! empty($type)) || ( ! empty($equipment)) || ( ! empty($muscle_group))) { ?>
9 9
 <table class="exercise-table">
10 10
 	<tbody>
11 11
 		<?php
12
-		if ( ! empty( $type ) ) {
12
+		if ( ! empty($type)) {
13 13
 		?>
14 14
 			<tr class="types">
15
-				<td><?php esc_html_e( 'Type:', 'lsx-health-plan' ); ?>&nbsp;</td>
15
+				<td><?php esc_html_e('Type:', 'lsx-health-plan'); ?>&nbsp;</td>
16 16
 				<td>
17 17
 				<?php
18
-					echo wp_kses_post( $type );
18
+					echo wp_kses_post($type);
19 19
 				?>
20 20
 				</td>
21 21
 			</tr>
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 		}
24 24
 		?>
25 25
 		<?php
26
-		if ( ! empty( $muscle_group ) ) {
26
+		if ( ! empty($muscle_group)) {
27 27
 		?>
28 28
 			<tr class="muscle-group">
29
-				<td><?php esc_html_e( 'Muscle Group:', 'lsx-health-plan' ); ?>&nbsp;</td>
29
+				<td><?php esc_html_e('Muscle Group:', 'lsx-health-plan'); ?>&nbsp;</td>
30 30
 				<td>
31 31
 				<?php
32
-					echo wp_kses_post( $muscle_group );
32
+					echo wp_kses_post($muscle_group);
33 33
 				?>
34 34
 				</td>
35 35
 			</tr>
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 		}
38 38
 		?>
39 39
 		<?php
40
-		if ( ! empty( $equipment ) ) {
40
+		if ( ! empty($equipment)) {
41 41
 		?>
42 42
 			<tr class="equipment">
43
-				<td><?php esc_html_e( 'Equipment:', 'lsx-health-plan' ); ?>&nbsp;</td>
43
+				<td><?php esc_html_e('Equipment:', 'lsx-health-plan'); ?>&nbsp;</td>
44 44
 				<td>
45 45
 				<?php
46
-					echo wp_kses_post( $equipment );
46
+					echo wp_kses_post($equipment);
47 47
 				?>
48 48
 				</td>
49 49
 			</tr>
Please login to merge, or discard this patch.
templates/content-archive-exercise.php 2 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -18,40 +18,40 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Check for shortcode overrides.
20 20
 if ( null !== $shortcode_args ) {
21
-	if ( isset( $shortcode_args['columns'] ) ) {
22
-		$column_class = $shortcode_args['columns'];
23
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
24
-	}
25
-	if ( isset( $shortcode_args['link'] ) ) {
26
-		$link_setting = $shortcode_args['link'];
27
-		// Setup our link and content.
28
-		switch ( $link_setting ) {
29
-			case 'single':
30
-				$link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
31
-				$link_close = '</a>';
32
-				break;
21
+     if ( isset( $shortcode_args['columns'] ) ) {
22
+          $column_class = $shortcode_args['columns'];
23
+          $column_class = \lsx_health_plan\functions\column_class( $column_class );
24
+     }
25
+     if ( isset( $shortcode_args['link'] ) ) {
26
+          $link_setting = $shortcode_args['link'];
27
+          // Setup our link and content.
28
+          switch ( $link_setting ) {
29
+               case 'single':
30
+                    $link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
31
+                    $link_close = '</a>';
32
+                    break;
33 33
 
34
-			case 'modal':
35
-				$link_html  = '<a class="btn border-btn" data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
36
-				$link_close = '</a>';
37
-				$modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
38
-				$modal_args = array(
39
-					'modal_content' => $modal_content_setting,
40
-				);
41
-				// We call the button to register the modal, but we do not output it.
42
-				lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
43
-				break;
34
+               case 'modal':
35
+                    $link_html  = '<a class="btn border-btn" data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
36
+                    $link_close = '</a>';
37
+                    $modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
38
+                    $modal_args = array(
39
+                         'modal_content' => $modal_content_setting,
40
+                    );
41
+                    // We call the button to register the modal, but we do not output it.
42
+                    lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
43
+                    break;
44 44
 
45
-			case 'none':
46
-			default:
47
-				$link_html  = '';
48
-				$link_close = '';
49
-				break;
50
-		}
51
-	}
52
-	if ( isset( $shortcode_args['description'] ) ) {
53
-		$content_setting = $shortcode_args['description'];
54
-	}
45
+               case 'none':
46
+               default:
47
+                    $link_html  = '';
48
+                    $link_close = '';
49
+                    break;
50
+          }
51
+     }
52
+     if ( isset( $shortcode_args['description'] ) ) {
53
+          $content_setting = $shortcode_args['description'];
54
+     }
55 55
 }
56 56
 
57 57
 ?>
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
 		<div class="exercise-feature-img">
64 64
 			<a href="<?php echo esc_url( get_permalink() ); ?>">
65 65
 			<?php
66
-			$featured_image = get_the_post_thumbnail();
67
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
68
-				the_post_thumbnail( 'lsx-thumbnail-square', array(
69
-					'class' => 'aligncenter',
70
-				) );
71
-			} else {
72
-				?>
66
+               $featured_image = get_the_post_thumbnail();
67
+               if ( ! empty( $featured_image ) && '' !== $featured_image ) {
68
+                    the_post_thumbnail( 'lsx-thumbnail-square', array(
69
+                         'class' => 'aligncenter',
70
+                    ) );
71
+               } else {
72
+                    ?>
73 73
 				<img loading="lazy" src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
74 74
 				<?php
75
-			}
76
-			?>
75
+               }
76
+               ?>
77 77
 			</a>
78 78
 		</div>
79 79
 		<div class="content-box exercise-content-box white-bg">
@@ -82,19 +82,19 @@  discard block
 block discarded – undo
82 82
 				<?php lsx_health_plan_exercise_data(); ?>
83 83
 			</div>
84 84
 			<?php
85
-			if ( '' !== $content_setting && 'excerpt' === $content_setting ) {
86
-				if ( ! has_excerpt() ) {
87
-					$content = wp_trim_words( get_the_content(), 20 );
88
-					$content = '<p>' . $content . '</p>';
89
-				} else {
90
-					$content = apply_filters( 'the_excerpt', get_the_excerpt() );
91
-				}
92
-				echo wp_kses_post( $content );
93
-			}
94
-			if ( '' !== $content_setting && 'full' === $content_setting ) {
95
-				the_content();
96
-			}
97
-			?>
85
+               if ( '' !== $content_setting && 'excerpt' === $content_setting ) {
86
+                    if ( ! has_excerpt() ) {
87
+                         $content = wp_trim_words( get_the_content(), 20 );
88
+                         $content = '<p>' . $content . '</p>';
89
+                    } else {
90
+                         $content = apply_filters( 'the_excerpt', get_the_excerpt() );
91
+                    }
92
+                    echo wp_kses_post( $content );
93
+               }
94
+               if ( '' !== $content_setting && 'full' === $content_setting ) {
95
+                    the_content();
96
+               }
97
+               ?>
98 98
 			<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See exercise', 'lsx-health-plan' ); ?></a>
99 99
 		</div>
100 100
 		<?php lsx_entry_bottom(); ?>
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -17,29 +17,29 @@  discard block
 block discarded – undo
17 17
 $link_close      = '';
18 18
 
19 19
 // Check for shortcode overrides.
20
-if ( null !== $shortcode_args ) {
21
-	if ( isset( $shortcode_args['columns'] ) ) {
20
+if (null !== $shortcode_args) {
21
+	if (isset($shortcode_args['columns'])) {
22 22
 		$column_class = $shortcode_args['columns'];
23
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
23
+		$column_class = \lsx_health_plan\functions\column_class($column_class);
24 24
 	}
25
-	if ( isset( $shortcode_args['link'] ) ) {
25
+	if (isset($shortcode_args['link'])) {
26 26
 		$link_setting = $shortcode_args['link'];
27 27
 		// Setup our link and content.
28
-		switch ( $link_setting ) {
28
+		switch ($link_setting) {
29 29
 			case 'single':
30
-				$link_html  = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">';
30
+				$link_html  = '<a href="' . get_permalink($group['connected_exercises']) . '">';
31 31
 				$link_close = '</a>';
32 32
 				break;
33 33
 
34 34
 			case 'modal':
35 35
 				$link_html  = '<a class="btn border-btn" data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">';
36 36
 				$link_close = '</a>';
37
-				$modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
37
+				$modal_content_setting = \lsx_health_plan\functions\get_option('workout_tab_modal_content', 'excerpt');
38 38
 				$modal_args = array(
39 39
 					'modal_content' => $modal_content_setting,
40 40
 				);
41 41
 				// We call the button to register the modal, but we do not output it.
42
-				lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args );
42
+				lsx_health_plan_workout_exercise_button($group['connected_exercises'], $group, false, $modal_args);
43 43
 				break;
44 44
 
45 45
 			case 'none':
@@ -49,28 +49,28 @@  discard block
 block discarded – undo
49 49
 				break;
50 50
 		}
51 51
 	}
52
-	if ( isset( $shortcode_args['description'] ) ) {
52
+	if (isset($shortcode_args['description'])) {
53 53
 		$content_setting = $shortcode_args['description'];
54 54
 	}
55 55
 }
56 56
 
57 57
 ?>
58 58
 
59
-<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?> has-content-<?php echo esc_attr( $content_setting ); ?>">
59
+<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?> has-content-<?php echo esc_attr($content_setting); ?>">
60 60
 	<article class="lsx-slot box-shadow">
61 61
 		<?php lsx_entry_top(); ?>
62 62
 
63 63
 		<div class="exercise-feature-img">
64
-			<a href="<?php echo esc_url( get_permalink() ); ?>">
64
+			<a href="<?php echo esc_url(get_permalink()); ?>">
65 65
 			<?php
66 66
 			$featured_image = get_the_post_thumbnail();
67
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
68
-				the_post_thumbnail( 'lsx-thumbnail-square', array(
67
+			if ( ! empty($featured_image) && '' !== $featured_image) {
68
+				the_post_thumbnail('lsx-thumbnail-square', array(
69 69
 					'class' => 'aligncenter',
70
-				) );
70
+				));
71 71
 			} else {
72 72
 				?>
73
-				<img loading="lazy" src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
73
+				<img loading="lazy" src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>">
74 74
 				<?php
75 75
 			}
76 76
 			?>
@@ -78,24 +78,24 @@  discard block
 block discarded – undo
78 78
 		</div>
79 79
 		<div class="content-box exercise-content-box white-bg">
80 80
 			<div class="title-lined">
81
-				<?php lsx_health_plan_exercise_title( '<h3 class="exercise-title">', '</h3>' ); ?>
81
+				<?php lsx_health_plan_exercise_title('<h3 class="exercise-title">', '</h3>'); ?>
82 82
 				<?php lsx_health_plan_exercise_data(); ?>
83 83
 			</div>
84 84
 			<?php
85
-			if ( '' !== $content_setting && 'excerpt' === $content_setting ) {
86
-				if ( ! has_excerpt() ) {
87
-					$content = wp_trim_words( get_the_content(), 20 );
85
+			if ('' !== $content_setting && 'excerpt' === $content_setting) {
86
+				if ( ! has_excerpt()) {
87
+					$content = wp_trim_words(get_the_content(), 20);
88 88
 					$content = '<p>' . $content . '</p>';
89 89
 				} else {
90
-					$content = apply_filters( 'the_excerpt', get_the_excerpt() );
90
+					$content = apply_filters('the_excerpt', get_the_excerpt());
91 91
 				}
92
-				echo wp_kses_post( $content );
92
+				echo wp_kses_post($content);
93 93
 			}
94
-			if ( '' !== $content_setting && 'full' === $content_setting ) {
94
+			if ('' !== $content_setting && 'full' === $content_setting) {
95 95
 				the_content();
96 96
 			}
97 97
 			?>
98
-			<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See exercise', 'lsx-health-plan' ); ?></a>
98
+			<a href="<?php echo esc_url(get_permalink()); ?>" class="btn border-btn"><?php esc_html_e('See exercise', 'lsx-health-plan'); ?></a>
99 99
 		</div>
100 100
 		<?php lsx_entry_bottom(); ?>
101 101
 	</article>
Please login to merge, or discard this patch.
templates/featured-tips.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 <div id="lsx-tips-shortcode" class="daily-plan-block">
15 15
 	<div class="lsx-tips-shortcode lsx-tips-slider slick-slider slick-dotted"  >
16 16
 	<?php
17
-	if (is_array($connected_tips) || is_object($connected_tips)) {
18
-		foreach ( $connected_tips as $tip ) {
19
-			$tip_link    = get_permalink( $tip );
20
-			$tip_name    = get_the_title( $tip );
21
-			$tip_content = get_post_field( 'post_content', $tip );
22
-			$icon = LSX_HEALTH_PLAN_URL . 'assets/images/tips-icon.svg';
23
-			?>
17
+     if (is_array($connected_tips) || is_object($connected_tips)) {
18
+          foreach ( $connected_tips as $tip ) {
19
+               $tip_link    = get_permalink( $tip );
20
+               $tip_name    = get_the_title( $tip );
21
+               $tip_content = get_post_field( 'post_content', $tip );
22
+               $icon = LSX_HEALTH_PLAN_URL . 'assets/images/tips-icon.svg';
23
+               ?>
24 24
 			<div class="content-box diet-tip-wrapper quick-tip">
25 25
 				<div class="row">
26 26
 					<div class="col-xs-2">
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 				</div>
34 34
 			</div>
35 35
 			<?php
36
-		}
37
-	}
38
-	?>
36
+          }
37
+     }
38
+     ?>
39 39
 	</div>
40 40
 </div>
41 41
 <?php
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,29 +6,29 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 
9
-$this_post_type = get_post_type( get_the_ID() );
9
+$this_post_type = get_post_type(get_the_ID());
10 10
 
11
-$connected_tips = get_post_meta( get_the_ID(), ( $this_post_type . '_connected_tips' ), true );
11
+$connected_tips = get_post_meta(get_the_ID(), ($this_post_type . '_connected_tips'), true);
12 12
 
13 13
 ?>
14 14
 <div id="lsx-tips-shortcode" class="daily-plan-block">
15 15
 	<div class="lsx-tips-shortcode lsx-tips-slider slick-slider slick-dotted"  >
16 16
 	<?php
17 17
 	if (is_array($connected_tips) || is_object($connected_tips)) {
18
-		foreach ( $connected_tips as $tip ) {
19
-			$tip_link    = get_permalink( $tip );
20
-			$tip_name    = get_the_title( $tip );
21
-			$tip_content = get_post_field( 'post_content', $tip );
18
+		foreach ($connected_tips as $tip) {
19
+			$tip_link    = get_permalink($tip);
20
+			$tip_name    = get_the_title($tip);
21
+			$tip_content = get_post_field('post_content', $tip);
22 22
 			$icon = LSX_HEALTH_PLAN_URL . 'assets/images/tips-icon.svg';
23 23
 			?>
24 24
 			<div class="content-box diet-tip-wrapper quick-tip">
25 25
 				<div class="row">
26 26
 					<div class="col-xs-2">
27
-						<img loading="lazy" src="<?php echo esc_url( $icon ); ?>" alt="tip"/>
27
+						<img loading="lazy" src="<?php echo esc_url($icon); ?>" alt="tip"/>
28 28
 					</div>
29 29
 					<div class="col-xs-10">
30
-						<h3 class="tip-title"><?php echo esc_html( $tip_name ); ?></h3>
31
-						<?php echo wp_kses_post( $tip_content ); ?>
30
+						<h3 class="tip-title"><?php echo esc_html($tip_name); ?></h3>
31
+						<?php echo wp_kses_post($tip_content); ?>
32 32
 					</div> 
33 33
 				</div>
34 34
 			</div>
Please login to merge, or discard this patch.
templates/taxonomy-plan-type.php 3 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 <?php lsx_content_wrap_before(); ?>
11 11
 
12 12
 <?php
13
-	$page_id  = get_the_ID();
14
-	$redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
13
+     $page_id  = get_the_ID();
14
+     $redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
15 15
 ?>
16 16
 
17 17
 	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
 		<!-- Begining restricted content -->
22 22
 		<?php
23
-		if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
24
-			?>
23
+          if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
24
+               ?>
25 25
 			<main id="main" role="main">
26 26
 
27 27
 				<?php lsx_content_top(); ?>
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 					<div class="row">
31 31
 						<?php if ( have_posts() ) : ?>
32 32
 							<?php
33
-							while ( have_posts() ) :
34
-								the_post();
35
-								?>
33
+                                   while ( have_posts() ) :
34
+                                        the_post();
35
+                                        ?>
36 36
 
37 37
 								<?php include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-plan.php'; ?>
38 38
 
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 			</main><!-- #main -->
52 52
 
53 53
 			<?php
54
-		} else {
55
-			wp_redirect( $redirect );
56
-			exit;
57
-		}
58
-		?>
54
+          } else {
55
+               wp_redirect( $redirect );
56
+               exit;
57
+          }
58
+          ?>
59 59
 
60 60
 <?php lsx_content_after(); ?>
61 61
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 	$redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id;
15 15
 ?>
16 16
 
17
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
17
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
18 18
 
19 19
 		<?php lsx_content_before(); ?>
20 20
 
21 21
 		<!-- Begining restricted content -->
22 22
 		<?php
23
-		if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) {
23
+		if (current_user_can('wc_memberships_view_restricted_post_content', $post_id)) {
24 24
 			?>
25 25
 			<main id="main" role="main">
26 26
 
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 				<div class="post-wrapper archive-plan">
30 30
 					<div class="row">
31
-						<?php if ( have_posts() ) : ?>
31
+						<?php if (have_posts()) : ?>
32 32
 							<?php
33
-							while ( have_posts() ) :
33
+							while (have_posts()) :
34 34
 								the_post();
35 35
 								?>
36 36
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 						<?php else : ?>
42 42
 
43
-							<?php get_template_part( 'partials/content', 'none' ); ?>
43
+							<?php get_template_part('partials/content', 'none'); ?>
44 44
 
45 45
 						<?php endif; ?>
46 46
 					</div>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 			<?php
54 54
 		} else {
55
-			wp_redirect( $redirect );
55
+			wp_redirect($redirect);
56 56
 			exit;
57 57
 		}
58 58
 		?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,12 @@
 block discarded – undo
38 38
 
39 39
 							<?php endwhile; ?>
40 40
 
41
-						<?php else : ?>
41
+						<?php else {
42
+     : ?>
42 43
 
43
-							<?php get_template_part( 'partials/content', 'none' ); ?>
44
+							<?php get_template_part( 'partials/content', 'none' );
45
+}
46
+?>
44 47
 
45 48
 						<?php endif; ?>
46 49
 					</div>
Please login to merge, or discard this patch.
templates/partials/shortcode-loop.php 2 patches
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'] ); ?> shortcode-type-<?php echo esc_html( $args['post_type'] ); ?>">
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.
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'] ); ?> shortcode-type-<?php echo esc_html( $args['post_type'] ); ?>">
58
+<div id="lsx-exercises-shortcode" class="daily-plan-block layout-<?php echo esc_html($args['layout']); ?> columns-<?php echo esc_html($args['columns']); ?> shortcode-type-<?php echo esc_html($args['post_type']); ?>">
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.
templates/table-recipe-data.php 2 patches
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -20,63 +20,63 @@  discard block
 block discarded – undo
20 20
 	<?php } ?>
21 21
 	<tbody>
22 22
 		<?php
23
-		if ( 1 >= (int) $serves ) {
24
-			$serves       = '1';
25
-			$serves_label = __( 'Person', 'lsx-health-plan' );
26
-		} else {
27
-			$serves_label = __( 'People', 'lsx-health-plan' );
28
-		}
29
-		?>
23
+          if ( 1 >= (int) $serves ) {
24
+               $serves       = '1';
25
+               $serves_label = __( 'Person', 'lsx-health-plan' );
26
+          } else {
27
+               $serves_label = __( 'People', 'lsx-health-plan' );
28
+          }
29
+          ?>
30 30
 		<tr class="serves">
31 31
 			<td><?php esc_html_e( 'Serves:', 'lsx-health-plan' ); ?>&nbsp;</td>
32 32
 			<td>
33 33
 			<?php
34
-				echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label );
35
-			?>
34
+                    echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label );
35
+               ?>
36 36
 			</td>
37 37
 		</tr>
38 38
 		<?php
39
-		if ( ! empty( $prep_time ) ) {
40
-		?>
39
+          if ( ! empty( $prep_time ) ) {
40
+          ?>
41 41
 		<tr class="prep-time">
42 42
 		<td><?php esc_html_e( 'Prep time: ', 'lsx-health-plan' ); ?>&nbsp;</td>
43 43
 			<td>
44 44
 			<?php
45
-				echo wp_kses_post( $prep_time );
46
-			?>
45
+                    echo wp_kses_post( $prep_time );
46
+               ?>
47 47
 			</td>
48 48
 		</tr>
49 49
 		<?php
50
-		}
51
-		?>
50
+          }
51
+          ?>
52 52
 		<?php
53
-		if ( ! empty( $cooking_time ) ) {
54
-		?>
53
+          if ( ! empty( $cooking_time ) ) {
54
+          ?>
55 55
 		<tr class="cooking-time">
56 56
 			<td><?php esc_html_e( 'Cooking time: ', 'lsx-health-plan' ); ?>&nbsp;</td>
57 57
 			<td>
58 58
 			<?php
59
-				echo wp_kses_post( $cooking_time );
60
-			?>
59
+                    echo wp_kses_post( $cooking_time );
60
+               ?>
61 61
 			</td>
62 62
 		</tr>
63 63
 		<?php
64
-		}
65
-		?>
64
+          }
65
+          ?>
66 66
 		<?php
67
-		if ( ! empty( $portion ) ) {
68
-		?>
67
+          if ( ! empty( $portion ) ) {
68
+          ?>
69 69
 		<tr class="portion-size">
70 70
 			<td><?php esc_html_e( 'Portion size: ', 'lsx-health-plan' ); ?>&nbsp;</td>
71 71
 			<td>
72 72
 			<?php
73
-				echo wp_kses_post( $portion );
74
-			?>
73
+                    echo wp_kses_post( $portion );
74
+               ?>
75 75
 			</td>
76 76
 		</tr>
77 77
 		<?php
78
-		}
79
-		?>
78
+          }
79
+          ?>
80 80
 	</tbody>
81 81
 </table>
82 82
 <?php } ?>
@@ -89,75 +89,75 @@  discard block
 block discarded – undo
89 89
 		</thead>
90 90
 		<tbody>
91 91
 			<?php
92
-			if ( ! empty( $energy ) ) {
93
-			?>
92
+               if ( ! empty( $energy ) ) {
93
+               ?>
94 94
 			<tr class="energy">
95 95
 			<td><?php esc_html_e( 'Energy: ', 'lsx-health-plan' ); ?>&nbsp;</td>
96 96
 				<td>
97 97
 				<?php
98
-					echo wp_kses_post( $energy );
99
-				?>
98
+                         echo wp_kses_post( $energy );
99
+                    ?>
100 100
 				</td>
101 101
 			</tr>
102 102
 			<?php
103
-			}
104
-			?>
103
+               }
104
+               ?>
105 105
 			<?php
106
-			if ( ! empty( $protein ) ) {
107
-			?>
106
+               if ( ! empty( $protein ) ) {
107
+               ?>
108 108
 			<tr class="protein">
109 109
 			<td><?php esc_html_e( 'Protein: ', 'lsx-health-plan' ); ?>&nbsp;</td>
110 110
 				<td>
111 111
 				<?php
112
-					echo wp_kses_post( $protein );
113
-				?>
112
+                         echo wp_kses_post( $protein );
113
+                    ?>
114 114
 				</td>
115 115
 			</tr>
116 116
 			<?php
117
-			}
118
-			?>
117
+               }
118
+               ?>
119 119
 			<?php
120
-			if ( ! empty( $carbohydrates ) ) {
121
-			?>
120
+               if ( ! empty( $carbohydrates ) ) {
121
+               ?>
122 122
 			<tr class="carbohydrates">
123 123
 			<td><?php esc_html_e( 'Carbohydrates: ', 'lsx-health-plan' ); ?>&nbsp;</td>
124 124
 				<td>
125 125
 				<?php
126
-					echo wp_kses_post( $carbohydrates );
127
-				?>
126
+                         echo wp_kses_post( $carbohydrates );
127
+                    ?>
128 128
 				</td>
129 129
 			</tr>
130 130
 			<?php
131
-			}
132
-			?>
131
+               }
132
+               ?>
133 133
 			<?php
134
-			if ( ! empty( $fibre ) ) {
135
-			?>
134
+               if ( ! empty( $fibre ) ) {
135
+               ?>
136 136
 			<tr class="fibre">
137 137
 			<td><?php esc_html_e( 'Fibre: ', 'lsx-health-plan' ); ?>&nbsp;</td>
138 138
 				<td>
139 139
 				<?php
140
-					echo wp_kses_post( $fibre );
141
-				?>
140
+                         echo wp_kses_post( $fibre );
141
+                    ?>
142 142
 				</td>
143 143
 			</tr>
144 144
 			<?php
145
-			}
146
-			?>
145
+               }
146
+               ?>
147 147
 			<?php
148
-			if ( ! empty( $fat ) ) {
149
-			?>
148
+               if ( ! empty( $fat ) ) {
149
+               ?>
150 150
 			<tr class="fat">
151 151
 			<td><?php esc_html_e( 'Fat: ', 'lsx-health-plan' ); ?>&nbsp;</td>
152 152
 				<td>
153 153
 				<?php
154
-					echo wp_kses_post( $fat );
155
-				?>
154
+                         echo wp_kses_post( $fat );
155
+                    ?>
156 156
 				</td>
157 157
 			</tr>
158 158
 			<?php
159
-			}
160
-			?>
159
+               }
160
+               ?>
161 161
 		</tbody>
162 162
 	</table>
163 163
 <?php } ?>
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$prep_time     = get_post_meta( get_the_ID(), 'recipe_prep_time', true );
3
-$cooking_time  = get_post_meta( get_the_ID(), 'recipe_cooking_time', true );
4
-$serves        = get_post_meta( get_the_ID(), 'recipe_serves', true );
5
-$portion       = get_post_meta( get_the_ID(), 'recipe_portion', true );
6
-$energy        = get_post_meta( get_the_ID(), 'recipe_energy', true );
7
-$protein       = get_post_meta( get_the_ID(), 'recipe_protein', true );
8
-$carbohydrates = get_post_meta( get_the_ID(), 'recipe_carbohydrates', true );
9
-$fibre         = get_post_meta( get_the_ID(), 'recipe_fibre', true );
10
-$fat           = get_post_meta( get_the_ID(), 'recipe_fat', true );
2
+$prep_time     = get_post_meta(get_the_ID(), 'recipe_prep_time', true);
3
+$cooking_time  = get_post_meta(get_the_ID(), 'recipe_cooking_time', true);
4
+$serves        = get_post_meta(get_the_ID(), 'recipe_serves', true);
5
+$portion       = get_post_meta(get_the_ID(), 'recipe_portion', true);
6
+$energy        = get_post_meta(get_the_ID(), 'recipe_energy', true);
7
+$protein       = get_post_meta(get_the_ID(), 'recipe_protein', true);
8
+$carbohydrates = get_post_meta(get_the_ID(), 'recipe_carbohydrates', true);
9
+$fibre         = get_post_meta(get_the_ID(), 'recipe_fibre', true);
10
+$fat           = get_post_meta(get_the_ID(), 'recipe_fat', true);
11 11
 ?>
12
-<?php if ( ( ! empty( $prep_time ) ) || ( ! empty( $cooking_time ) ) || ( ! empty( $serves ) ) || ( ! empty( $portion ) ) ) { ?>
12
+<?php if (( ! empty($prep_time)) || ( ! empty($cooking_time)) || ( ! empty($serves)) || ( ! empty($portion))) { ?>
13 13
 <table class="recipe-table cooking-info-table">
14
-	<?php if ( is_single() && is_singular( 'recipe' ) ) { ?>
14
+	<?php if (is_single() && is_singular('recipe')) { ?>
15 15
 		<thead>
16 16
 			<tr>
17 17
 				<th>Cooking Info</th>
@@ -20,29 +20,29 @@  discard block
 block discarded – undo
20 20
 	<?php } ?>
21 21
 	<tbody>
22 22
 		<?php
23
-		if ( 1 >= (int) $serves ) {
23
+		if (1 >= (int) $serves) {
24 24
 			$serves       = '1';
25
-			$serves_label = __( 'Person', 'lsx-health-plan' );
25
+			$serves_label = __('Person', 'lsx-health-plan');
26 26
 		} else {
27
-			$serves_label = __( 'People', 'lsx-health-plan' );
27
+			$serves_label = __('People', 'lsx-health-plan');
28 28
 		}
29 29
 		?>
30 30
 		<tr class="serves">
31
-			<td><?php esc_html_e( 'Serves:', 'lsx-health-plan' ); ?>&nbsp;</td>
31
+			<td><?php esc_html_e('Serves:', 'lsx-health-plan'); ?>&nbsp;</td>
32 32
 			<td>
33 33
 			<?php
34
-				echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label );
34
+				echo wp_kses_post($serves) . ' ' . esc_html($serves_label);
35 35
 			?>
36 36
 			</td>
37 37
 		</tr>
38 38
 		<?php
39
-		if ( ! empty( $prep_time ) ) {
39
+		if ( ! empty($prep_time)) {
40 40
 		?>
41 41
 		<tr class="prep-time">
42
-		<td><?php esc_html_e( 'Prep time: ', 'lsx-health-plan' ); ?>&nbsp;</td>
42
+		<td><?php esc_html_e('Prep time: ', 'lsx-health-plan'); ?>&nbsp;</td>
43 43
 			<td>
44 44
 			<?php
45
-				echo wp_kses_post( $prep_time );
45
+				echo wp_kses_post($prep_time);
46 46
 			?>
47 47
 			</td>
48 48
 		</tr>
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 		}
51 51
 		?>
52 52
 		<?php
53
-		if ( ! empty( $cooking_time ) ) {
53
+		if ( ! empty($cooking_time)) {
54 54
 		?>
55 55
 		<tr class="cooking-time">
56
-			<td><?php esc_html_e( 'Cooking time: ', 'lsx-health-plan' ); ?>&nbsp;</td>
56
+			<td><?php esc_html_e('Cooking time: ', 'lsx-health-plan'); ?>&nbsp;</td>
57 57
 			<td>
58 58
 			<?php
59
-				echo wp_kses_post( $cooking_time );
59
+				echo wp_kses_post($cooking_time);
60 60
 			?>
61 61
 			</td>
62 62
 		</tr>
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 		}
65 65
 		?>
66 66
 		<?php
67
-		if ( ! empty( $portion ) ) {
67
+		if ( ! empty($portion)) {
68 68
 		?>
69 69
 		<tr class="portion-size">
70
-			<td><?php esc_html_e( 'Portion size: ', 'lsx-health-plan' ); ?>&nbsp;</td>
70
+			<td><?php esc_html_e('Portion size: ', 'lsx-health-plan'); ?>&nbsp;</td>
71 71
 			<td>
72 72
 			<?php
73
-				echo wp_kses_post( $portion );
73
+				echo wp_kses_post($portion);
74 74
 			?>
75 75
 			</td>
76 76
 		</tr>
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	</tbody>
81 81
 </table>
82 82
 <?php } ?>
83
-<?php if ( is_single() && is_singular( 'recipe' ) && ( ( ! empty( $energy ) ) || ( ! empty( $protein ) ) || ( ! empty( $carbohydrates ) ) || ( ! empty( $fibre ) ) || ( ! empty( $fat ) ) ) ) { ?>
83
+<?php if (is_single() && is_singular('recipe') && (( ! empty($energy)) || ( ! empty($protein)) || ( ! empty($carbohydrates)) || ( ! empty($fibre)) || ( ! empty($fat)))) { ?>
84 84
 	<table class="recipe-table nutritional-info-table">
85 85
 		<thead>
86 86
 			<tr>
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 		</thead>
90 90
 		<tbody>
91 91
 			<?php
92
-			if ( ! empty( $energy ) ) {
92
+			if ( ! empty($energy)) {
93 93
 			?>
94 94
 			<tr class="energy">
95
-			<td><?php esc_html_e( 'Energy: ', 'lsx-health-plan' ); ?>&nbsp;</td>
95
+			<td><?php esc_html_e('Energy: ', 'lsx-health-plan'); ?>&nbsp;</td>
96 96
 				<td>
97 97
 				<?php
98
-					echo wp_kses_post( $energy );
98
+					echo wp_kses_post($energy);
99 99
 				?>
100 100
 				</td>
101 101
 			</tr>
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
 			}
104 104
 			?>
105 105
 			<?php
106
-			if ( ! empty( $protein ) ) {
106
+			if ( ! empty($protein)) {
107 107
 			?>
108 108
 			<tr class="protein">
109
-			<td><?php esc_html_e( 'Protein: ', 'lsx-health-plan' ); ?>&nbsp;</td>
109
+			<td><?php esc_html_e('Protein: ', 'lsx-health-plan'); ?>&nbsp;</td>
110 110
 				<td>
111 111
 				<?php
112
-					echo wp_kses_post( $protein );
112
+					echo wp_kses_post($protein);
113 113
 				?>
114 114
 				</td>
115 115
 			</tr>
@@ -117,13 +117,13 @@  discard block
 block discarded – undo
117 117
 			}
118 118
 			?>
119 119
 			<?php
120
-			if ( ! empty( $carbohydrates ) ) {
120
+			if ( ! empty($carbohydrates)) {
121 121
 			?>
122 122
 			<tr class="carbohydrates">
123
-			<td><?php esc_html_e( 'Carbohydrates: ', 'lsx-health-plan' ); ?>&nbsp;</td>
123
+			<td><?php esc_html_e('Carbohydrates: ', 'lsx-health-plan'); ?>&nbsp;</td>
124 124
 				<td>
125 125
 				<?php
126
-					echo wp_kses_post( $carbohydrates );
126
+					echo wp_kses_post($carbohydrates);
127 127
 				?>
128 128
 				</td>
129 129
 			</tr>
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
 			}
132 132
 			?>
133 133
 			<?php
134
-			if ( ! empty( $fibre ) ) {
134
+			if ( ! empty($fibre)) {
135 135
 			?>
136 136
 			<tr class="fibre">
137
-			<td><?php esc_html_e( 'Fibre: ', 'lsx-health-plan' ); ?>&nbsp;</td>
137
+			<td><?php esc_html_e('Fibre: ', 'lsx-health-plan'); ?>&nbsp;</td>
138 138
 				<td>
139 139
 				<?php
140
-					echo wp_kses_post( $fibre );
140
+					echo wp_kses_post($fibre);
141 141
 				?>
142 142
 				</td>
143 143
 			</tr>
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 			}
146 146
 			?>
147 147
 			<?php
148
-			if ( ! empty( $fat ) ) {
148
+			if ( ! empty($fat)) {
149 149
 			?>
150 150
 			<tr class="fat">
151
-			<td><?php esc_html_e( 'Fat: ', 'lsx-health-plan' ); ?>&nbsp;</td>
151
+			<td><?php esc_html_e('Fat: ', 'lsx-health-plan'); ?>&nbsp;</td>
152 152
 				<td>
153 153
 				<?php
154
-					echo wp_kses_post( $fat );
154
+					echo wp_kses_post($fat);
155 155
 				?>
156 156
 				</td>
157 157
 			</tr>
Please login to merge, or discard this patch.