Passed
Push — add/multiplan ( ad7e4c...0519d0 )
by Warwick
04:28 queued 12s
created
templates/table-recipe-data.php 1 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.
templates/archive-meal.php 1 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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) {
23
+		if (current_user_can('administrator', $page_id) || current_user_can('wc_memberships_view_restricted_post_content', $page_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 workout-archive-plan 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.
templates/archive-recipe.php 1 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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) {
23
+		if (current_user_can('administrator', $page_id) || current_user_can('wc_memberships_view_restricted_post_content', $page_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.
classes/post-types/class-recipe.php 1 patch
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -39,24 +39,24 @@  discard block
 block discarded – undo
39 39
 	 * Constructor
40 40
 	 */
41 41
 	public function __construct() {
42
-		add_action( 'init', array( $this, 'register_post_type' ) );
43
-		add_action( 'init', array( $this, 'taxonomy_setup' ) );
44
-		add_action( 'admin_menu', array( $this, 'register_menus' ) );
42
+		add_action('init', array($this, 'register_post_type'));
43
+		add_action('init', array($this, 'taxonomy_setup'));
44
+		add_action('admin_menu', array($this, 'register_menus'));
45 45
 
46 46
 		// Frontend Actions and Filters.
47
-		add_action( 'wp_head', array( $this, 'remove_archive_original_header' ), 99 );
48
-		add_action( 'lsx_content_wrap_before', array( $this, 'hp_lsx_archive_header' ) );
47
+		add_action('wp_head', array($this, 'remove_archive_original_header'), 99);
48
+		add_action('lsx_content_wrap_before', array($this, 'hp_lsx_archive_header'));
49 49
 
50
-		add_filter( 'lsx_health_plan_archive_template', array( $this, 'enable_post_type' ), 10, 1 );
51
-		add_filter( 'lsx_health_plan_single_template', array( $this, 'enable_post_type' ), 10, 1 );
52
-		add_filter( 'lsx_health_plan_connections', array( $this, 'enable_connections' ), 10, 1 );
53
-		add_filter( 'get_the_archive_title', array( $this, 'get_the_archive_title' ), 100 );
54
-		add_filter( 'lsx_display_global_header_description', array( $this, 'disable_global_header_description' ), 100 );
55
-		add_filter( 'woocommerce_get_breadcrumb', array( $this, 'recipes_breadcrumb_filter' ), 30, 1 );
50
+		add_filter('lsx_health_plan_archive_template', array($this, 'enable_post_type'), 10, 1);
51
+		add_filter('lsx_health_plan_single_template', array($this, 'enable_post_type'), 10, 1);
52
+		add_filter('lsx_health_plan_connections', array($this, 'enable_connections'), 10, 1);
53
+		add_filter('get_the_archive_title', array($this, 'get_the_archive_title'), 100);
54
+		add_filter('lsx_display_global_header_description', array($this, 'disable_global_header_description'), 100);
55
+		add_filter('woocommerce_get_breadcrumb', array($this, 'recipes_breadcrumb_filter'), 30, 1);
56 56
 
57 57
 		// Backend Actions and Filters.
58
-		add_action( 'cmb2_admin_init', array( $this, 'featured_metabox' ) );
59
-		add_action( 'cmb2_admin_init', array( $this, 'details_metaboxes' ) );
58
+		add_action('cmb2_admin_init', array($this, 'featured_metabox'));
59
+		add_action('cmb2_admin_init', array($this, 'details_metaboxes'));
60 60
 	}
61 61
 
62 62
 	/**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	public static function get_instance() {
70 70
 
71 71
 		// If the single instance hasn't been set, set it now.
72
-		if ( null === self::$instance ) {
72
+		if (null === self::$instance) {
73 73
 			self::$instance = new self();
74 74
 		}
75 75
 
@@ -82,21 +82,21 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function register_post_type() {
84 84
 		$this->labels = array(
85
-			'name'               => esc_html__( 'Recipes', 'lsx-health-plan' ),
86
-			'singular_name'      => esc_html__( 'Recipe', 'lsx-health-plan' ),
87
-			'add_new'            => esc_html_x( 'Add New', 'post type general name', 'lsx-health-plan' ),
88
-			'add_new_item'       => esc_html__( 'Add New', 'lsx-health-plan' ),
89
-			'edit_item'          => esc_html__( 'Edit', 'lsx-health-plan' ),
90
-			'new_item'           => esc_html__( 'New', 'lsx-health-plan' ),
91
-			'all_items'          => esc_html__( 'All Recipes', 'lsx-health-plan' ),
92
-			'view_item'          => esc_html__( 'View', 'lsx-health-plan' ),
93
-			'search_items'       => esc_html__( 'Search', 'lsx-health-plan' ),
94
-			'not_found'          => esc_html__( 'None found', 'lsx-health-plan' ),
95
-			'not_found_in_trash' => esc_html__( 'None found in Trash', 'lsx-health-plan' ),
85
+			'name'               => esc_html__('Recipes', 'lsx-health-plan'),
86
+			'singular_name'      => esc_html__('Recipe', 'lsx-health-plan'),
87
+			'add_new'            => esc_html_x('Add New', 'post type general name', 'lsx-health-plan'),
88
+			'add_new_item'       => esc_html__('Add New', 'lsx-health-plan'),
89
+			'edit_item'          => esc_html__('Edit', 'lsx-health-plan'),
90
+			'new_item'           => esc_html__('New', 'lsx-health-plan'),
91
+			'all_items'          => esc_html__('All Recipes', 'lsx-health-plan'),
92
+			'view_item'          => esc_html__('View', 'lsx-health-plan'),
93
+			'search_items'       => esc_html__('Search', 'lsx-health-plan'),
94
+			'not_found'          => esc_html__('None found', 'lsx-health-plan'),
95
+			'not_found_in_trash' => esc_html__('None found in Trash', 'lsx-health-plan'),
96 96
 			'parent_item_colon'  => '',
97
-			'menu_name'          => esc_html__( 'Recipes', 'lsx-health-plan' ),
97
+			'menu_name'          => esc_html__('Recipes', 'lsx-health-plan'),
98 98
 		);
99
-		$args         = array(
99
+		$args = array(
100 100
 			'labels'             => $this->labels,
101 101
 			'public'             => true,
102 102
 			'publicly_queryable' => true,
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 				'custom-fields',
120 120
 			),
121 121
 		);
122
-		register_post_type( 'recipe', $args );
122
+		register_post_type('recipe', $args);
123 123
 	}
124 124
 
125 125
 	/**
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 	 * @return void
129 129
 	 */
130 130
 	public function register_menus() {
131
-		add_submenu_page( 'edit.php?post_type=meal', esc_html__( 'Recipes', 'lsx-health-plan' ), esc_html__( 'Recipes', 'lsx-health-plan' ), 'edit_posts', 'edit.php?post_type=recipe' );
132
-		add_submenu_page( 'edit.php?post_type=meal', esc_html__( 'Recipe Types', 'lsx-health-plan' ), esc_html__( 'Recipe Types', 'lsx-health-plan' ), 'edit_posts', 'edit-tags.php?taxonomy=recipe-type&post_type=recipe' );
133
-		add_submenu_page( 'edit.php?post_type=meal', esc_html__( 'Cuisines', 'lsx-health-plan' ), esc_html__( 'Cuisines', 'lsx-health-plan' ), 'edit_posts', 'edit-tags.php?taxonomy=recipe-cuisine&post_type=recipe' );
131
+		add_submenu_page('edit.php?post_type=meal', esc_html__('Recipes', 'lsx-health-plan'), esc_html__('Recipes', 'lsx-health-plan'), 'edit_posts', 'edit.php?post_type=recipe');
132
+		add_submenu_page('edit.php?post_type=meal', esc_html__('Recipe Types', 'lsx-health-plan'), esc_html__('Recipe Types', 'lsx-health-plan'), 'edit_posts', 'edit-tags.php?taxonomy=recipe-type&post_type=recipe');
133
+		add_submenu_page('edit.php?post_type=meal', esc_html__('Cuisines', 'lsx-health-plan'), esc_html__('Cuisines', 'lsx-health-plan'), 'edit_posts', 'edit-tags.php?taxonomy=recipe-cuisine&post_type=recipe');
134 134
 	}
135 135
 
136 136
 	/**
@@ -138,19 +138,19 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function taxonomy_setup() {
140 140
 		$labels = array(
141
-			'name'              => esc_html_x( 'Cuisine', 'taxonomy general name', 'lsx-health-plan' ),
142
-			'singular_name'     => esc_html_x( 'Cuisines', 'taxonomy singular name', 'lsx-health-plan' ),
143
-			'search_items'      => esc_html__( 'Search', 'lsx-health-plan' ),
144
-			'all_items'         => esc_html__( 'All', 'lsx-health-plan' ),
145
-			'parent_item'       => esc_html__( 'Parent', 'lsx-health-plan' ),
146
-			'parent_item_colon' => esc_html__( 'Parent:', 'lsx-health-plan' ),
147
-			'edit_item'         => esc_html__( 'Edit', 'lsx-health-plan' ),
148
-			'update_item'       => esc_html__( 'Update', 'lsx-health-plan' ),
149
-			'add_new_item'      => esc_html__( 'Add New', 'lsx-health-plan' ),
150
-			'new_item_name'     => esc_html__( 'New Name', 'lsx-health-plan' ),
151
-			'menu_name'         => esc_html__( 'Cuisines', 'lsx-health-plan' ),
141
+			'name'              => esc_html_x('Cuisine', 'taxonomy general name', 'lsx-health-plan'),
142
+			'singular_name'     => esc_html_x('Cuisines', 'taxonomy singular name', 'lsx-health-plan'),
143
+			'search_items'      => esc_html__('Search', 'lsx-health-plan'),
144
+			'all_items'         => esc_html__('All', 'lsx-health-plan'),
145
+			'parent_item'       => esc_html__('Parent', 'lsx-health-plan'),
146
+			'parent_item_colon' => esc_html__('Parent:', 'lsx-health-plan'),
147
+			'edit_item'         => esc_html__('Edit', 'lsx-health-plan'),
148
+			'update_item'       => esc_html__('Update', 'lsx-health-plan'),
149
+			'add_new_item'      => esc_html__('Add New', 'lsx-health-plan'),
150
+			'new_item_name'     => esc_html__('New Name', 'lsx-health-plan'),
151
+			'menu_name'         => esc_html__('Cuisines', 'lsx-health-plan'),
152 152
 		);
153
-		$args   = array(
153
+		$args = array(
154 154
 			'hierarchical'      => true,
155 155
 			'labels'            => $labels,
156 156
 			'show_ui'           => true,
@@ -161,22 +161,22 @@  discard block
 block discarded – undo
161 161
 				'slug' => 'recipe-cuisine',
162 162
 			),
163 163
 		);
164
-		register_taxonomy( 'recipe-cuisine', array( $this->slug ), $args );
164
+		register_taxonomy('recipe-cuisine', array($this->slug), $args);
165 165
 
166 166
 		$labels = array(
167
-			'name'              => esc_html_x( 'Recipe Type', 'taxonomy general name', 'lsx-health-plan' ),
168
-			'singular_name'     => esc_html_x( 'Recipe Types', 'taxonomy singular name', 'lsx-health-plan' ),
169
-			'search_items'      => esc_html__( 'Search', 'lsx-health-plan' ),
170
-			'all_items'         => esc_html__( 'All', 'lsx-health-plan' ),
171
-			'parent_item'       => esc_html__( 'Parent', 'lsx-health-plan' ),
172
-			'parent_item_colon' => esc_html__( 'Parent:', 'lsx-health-plan' ),
173
-			'edit_item'         => esc_html__( 'Edit', 'lsx-health-plan' ),
174
-			'update_item'       => esc_html__( 'Update', 'lsx-health-plan' ),
175
-			'add_new_item'      => esc_html__( 'Add New', 'lsx-health-plan' ),
176
-			'new_item_name'     => esc_html__( 'New Name', 'lsx-health-plan' ),
177
-			'menu_name'         => esc_html__( 'Types', 'lsx-health-plan' ),
167
+			'name'              => esc_html_x('Recipe Type', 'taxonomy general name', 'lsx-health-plan'),
168
+			'singular_name'     => esc_html_x('Recipe Types', 'taxonomy singular name', 'lsx-health-plan'),
169
+			'search_items'      => esc_html__('Search', 'lsx-health-plan'),
170
+			'all_items'         => esc_html__('All', 'lsx-health-plan'),
171
+			'parent_item'       => esc_html__('Parent', 'lsx-health-plan'),
172
+			'parent_item_colon' => esc_html__('Parent:', 'lsx-health-plan'),
173
+			'edit_item'         => esc_html__('Edit', 'lsx-health-plan'),
174
+			'update_item'       => esc_html__('Update', 'lsx-health-plan'),
175
+			'add_new_item'      => esc_html__('Add New', 'lsx-health-plan'),
176
+			'new_item_name'     => esc_html__('New Name', 'lsx-health-plan'),
177
+			'menu_name'         => esc_html__('Types', 'lsx-health-plan'),
178 178
 		);
179
-		$args   = array(
179
+		$args = array(
180 180
 			'hierarchical'      => true,
181 181
 			'labels'            => $labels,
182 182
 			'show_ui'           => true,
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 				'slug' => 'recipe-type',
188 188
 			),
189 189
 		);
190
-		register_taxonomy( 'recipe-type', array( $this->slug ), $args );
190
+		register_taxonomy('recipe-type', array($this->slug), $args);
191 191
 	}
192 192
 
193 193
 	/**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	 * @param array $post_types
197 197
 	 * @return array
198 198
 	 */
199
-	public function enable_post_type( $post_types = array() ) {
199
+	public function enable_post_type($post_types = array()) {
200 200
 		$post_types[] = $this->slug;
201 201
 		return $post_types;
202 202
 	}
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 * @param array $connections
208 208
 	 * @return void
209 209
 	 */
210
-	public function enable_connections( $connections = array() ) {
210
+	public function enable_connections($connections = array()) {
211 211
 		$connections['recipe']['connected_plans'] = 'connected_recipes';
212 212
 		$connections['plan']['connected_recipes'] = 'connected_plans';
213 213
 		return $connections;
@@ -219,42 +219,42 @@  discard block
 block discarded – undo
219 219
 	 * @param string $title the term title.
220 220
 	 * @return string
221 221
 	 */
222
-	public function get_the_archive_title( $title ) {
223
-		if ( is_post_type_archive( 'recipe' ) ) {
224
-			$title = __( 'Recipes', 'lsx-health-plan' );
222
+	public function get_the_archive_title($title) {
223
+		if (is_post_type_archive('recipe')) {
224
+			$title = __('Recipes', 'lsx-health-plan');
225 225
 		}
226
-		if ( is_post_type_archive( 'exercise' ) ) {
227
-			$title = __( 'Exercises', 'lsx-health-plan' );
226
+		if (is_post_type_archive('exercise')) {
227
+			$title = __('Exercises', 'lsx-health-plan');
228 228
 		}
229
-		if ( is_tax( 'recipe-type' ) ) {
229
+		if (is_tax('recipe-type')) {
230 230
 			$queried_object = get_queried_object();
231
-			if ( isset( $queried_object->name ) ) {
232
-				$title = $queried_object->name . ' ' . __( 'Recipes', 'lsx-health-plan' );
231
+			if (isset($queried_object->name)) {
232
+				$title = $queried_object->name . ' ' . __('Recipes', 'lsx-health-plan');
233 233
 			}
234 234
 		}
235 235
 		return $title;
236 236
 	}
237 237
 
238 238
 	public function remove_archive_original_header() {
239
-		if ( is_post_type_archive( 'recipe' ) || is_post_type_archive( 'exercise' ) ) {
240
-			remove_action( 'lsx_content_wrap_before', 'lsx_global_header' );
239
+		if (is_post_type_archive('recipe') || is_post_type_archive('exercise')) {
240
+			remove_action('lsx_content_wrap_before', 'lsx_global_header');
241 241
 		}
242
-		if ( ! is_post_type_archive() ) {
243
-			add_action( 'lsx_content_wrap_before', 'lsx_health_plan_recipe_archive_description', 11 );
242
+		if ( ! is_post_type_archive()) {
243
+			add_action('lsx_content_wrap_before', 'lsx_health_plan_recipe_archive_description', 11);
244 244
 		}
245 245
 	}
246 246
 
247 247
 	public function hp_lsx_archive_header() {
248
-		if ( is_post_type_archive( 'recipe' ) || is_post_type_archive( 'exercise' ) ) {
248
+		if (is_post_type_archive('recipe') || is_post_type_archive('exercise')) {
249 249
 		?>
250 250
 			<div class="archive-header-wrapper banner-archive">
251 251
 				<?php lsx_global_header_inner_bottom(); ?>
252 252
 				<header class="archive-header">
253 253
 					<h1 class="archive-title">
254
-						<?php if ( has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax( 'post_format' ) ) { ?>
255
-							<?php the_archive_title( esc_html__( 'Type:', 'lsx' ) ); ?>
254
+						<?php if (has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax('post_format')) { ?>
255
+							<?php the_archive_title(esc_html__('Type:', 'lsx')); ?>
256 256
 						<?php } else { ?>
257
-							<?php echo wp_kses_post( apply_filters( 'lsx_global_header_title', get_the_archive_title() ) ); ?>
257
+							<?php echo wp_kses_post(apply_filters('lsx_global_header_title', get_the_archive_title())); ?>
258 258
 						<?php } ?>
259 259
 					</h1>
260 260
 
@@ -273,8 +273,8 @@  discard block
 block discarded – undo
273 273
 	 * @param boolean $disable
274 274
 	 * @return boolean
275 275
 	 */
276
-	public function disable_global_header_description( $disable ) {
277
-		if ( is_tax( 'recipe-type' ) ) {
276
+	public function disable_global_header_description($disable) {
277
+		if (is_tax('recipe-type')) {
278 278
 			$disable = true;
279 279
 		}
280 280
 		return $disable;
@@ -286,16 +286,16 @@  discard block
 block discarded – undo
286 286
 	 * @var array $crumbs
287 287
 	 * @return array
288 288
 	 */
289
-	public function recipes_breadcrumb_filter( $crumbs ) {
290
-		$recipe  = \lsx_health_plan\functions\get_option( 'endpoint_recipe', 'recipe' );
291
-		$recipes = \lsx_health_plan\functions\get_option( 'endpoint_recipe_archive', 'recipes' );
292
-		$url     = get_post_type_archive_link( 'recipe' );
289
+	public function recipes_breadcrumb_filter($crumbs) {
290
+		$recipe  = \lsx_health_plan\functions\get_option('endpoint_recipe', 'recipe');
291
+		$recipes = \lsx_health_plan\functions\get_option('endpoint_recipe_archive', 'recipes');
292
+		$url     = get_post_type_archive_link('recipe');
293 293
 
294
-		if ( is_singular( 'recipe' ) ) {
294
+		if (is_singular('recipe')) {
295 295
 			$recipe_name     = get_the_title();
296
-			$term_obj_list   = get_the_terms( get_the_ID(), 'recipe-type' );
296
+			$term_obj_list   = get_the_terms(get_the_ID(), 'recipe-type');
297 297
 			$recipe_type     = $term_obj_list[0]->name;
298
-			$recipe_type_url = get_term_link( $term_obj_list[0]->term_id );
298
+			$recipe_type_url = get_term_link($term_obj_list[0]->term_id);
299 299
 		
300 300
 			$crumbs[1] = array(
301 301
 				0 => $recipes,
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
 				0 => $recipe_name,
310 310
 			);
311 311
 		}
312
-		if ( is_tax( 'recipe-type' ) || is_tax( 'recipe-cuisine' ) ) {
313
-			$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); 
312
+		if (is_tax('recipe-type') || is_tax('recipe-cuisine')) {
313
+			$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); 
314 314
 
315
-			$single_term_title = str_replace( '-', ' ', $term->taxonomy ) . ': ' . $term->name;
315
+			$single_term_title = str_replace('-', ' ', $term->taxonomy) . ': ' . $term->name;
316 316
 
317 317
 			$crumbs[1] = array(
318 318
 				0 => $recipes,
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
 		$cmb = new_cmb2_box(
333 333
 			array(
334 334
 				'id'           => $this->slug . '_featured_metabox',
335
-				'title'        => __( 'Featured', 'lsx-health-plan' ),
336
-				'object_types' => array( $this->slug ),
335
+				'title'        => __('Featured', 'lsx-health-plan'),
336
+				'object_types' => array($this->slug),
337 337
 				'context'      => 'side',
338 338
 				'priority'     => 'high',
339 339
 				'show_names'   => true,
@@ -341,8 +341,8 @@  discard block
 block discarded – undo
341 341
 		);
342 342
 		$cmb->add_field(
343 343
 			array(
344
-				'name'       => __( 'Featured', 'lsx-health-plan' ),
345
-				'desc'       => __( 'Enable the checkbox to feature this recipe, featured recipes display in any page that has the recipe shortcode: [lsx_health_plan_featured_recipes_block]', 'lsx-health-plan' ),
344
+				'name'       => __('Featured', 'lsx-health-plan'),
345
+				'desc'       => __('Enable the checkbox to feature this recipe, featured recipes display in any page that has the recipe shortcode: [lsx_health_plan_featured_recipes_block]', 'lsx-health-plan'),
346 346
 				'id'         => $this->slug . '_featured',
347 347
 				'type'       => 'checkbox',
348 348
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
@@ -357,8 +357,8 @@  discard block
 block discarded – undo
357 357
 		$cmb = new_cmb2_box(
358 358
 			array(
359 359
 				'id'           => $this->slug . '_details_metabox',
360
-				'title'        => __( 'Cooking Info', 'lsx-health-plan' ),
361
-				'object_types' => array( $this->slug ), // Post type
360
+				'title'        => __('Cooking Info', 'lsx-health-plan'),
361
+				'object_types' => array($this->slug), // Post type
362 362
 				'context'      => 'normal',
363 363
 				'priority'     => 'high',
364 364
 				'show_names'   => true,
@@ -366,27 +366,27 @@  discard block
 block discarded – undo
366 366
 		);
367 367
 		$cmb->add_field(
368 368
 			array(
369
-				'name'       => __( 'Prep Time', 'lsx-health-plan' ),
369
+				'name'       => __('Prep Time', 'lsx-health-plan'),
370 370
 				'id'         => $this->slug . '_prep_time',
371
-				'desc'       => __( 'Add the preparation time for the entire meal i.e: 25 mins', 'lsx-health-plan' ),
371
+				'desc'       => __('Add the preparation time for the entire meal i.e: 25 mins', 'lsx-health-plan'),
372 372
 				'type'       => 'text',
373 373
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
374 374
 			)
375 375
 		);
376 376
 		$cmb->add_field(
377 377
 			array(
378
-				'name'       => __( 'Cooking Time', 'lsx-health-plan' ),
378
+				'name'       => __('Cooking Time', 'lsx-health-plan'),
379 379
 				'id'         => $this->slug . '_cooking_time',
380
-				'desc'       => __( 'Add the cooking time i.e: 15 mins', 'lsx-health-plan' ),
380
+				'desc'       => __('Add the cooking time i.e: 15 mins', 'lsx-health-plan'),
381 381
 				'type'       => 'text',
382 382
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
383 383
 			)
384 384
 		);
385 385
 		$cmb->add_field(
386 386
 			array(
387
-				'name'       => __( 'Serves', 'lsx-health-plan' ),
387
+				'name'       => __('Serves', 'lsx-health-plan'),
388 388
 				'id'         => $this->slug . '_serves',
389
-				'desc'       => __( 'Add the recommended serving size i.e: 6', 'lsx-health-plan' ),
389
+				'desc'       => __('Add the recommended serving size i.e: 6', 'lsx-health-plan'),
390 390
 				'type'       => 'text',
391 391
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
392 392
 				'attributes' => array(
@@ -397,8 +397,8 @@  discard block
 block discarded – undo
397 397
 		);
398 398
 		$cmb->add_field(
399 399
 			array(
400
-				'name'       => __( 'Portion', 'lsx-health-plan' ),
401
-				'desc'       => __( 'Add the recommended portion size i.e: 200mg', 'lsx-health-plan' ),
400
+				'name'       => __('Portion', 'lsx-health-plan'),
401
+				'desc'       => __('Add the recommended portion size i.e: 200mg', 'lsx-health-plan'),
402 402
 				'id'         => $this->slug . '_portion',
403 403
 				'type'       => 'text',
404 404
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
@@ -407,8 +407,8 @@  discard block
 block discarded – undo
407 407
 		$cmb = new_cmb2_box(
408 408
 			array(
409 409
 				'id'           => $this->slug . '_nutritional_metabox',
410
-				'title'        => __( 'Nutritional Info', 'lsx-health-plan' ),
411
-				'object_types' => array( $this->slug ), // Post type
410
+				'title'        => __('Nutritional Info', 'lsx-health-plan'),
411
+				'object_types' => array($this->slug), // Post type
412 412
 				'context'      => 'normal',
413 413
 				'priority'     => 'high',
414 414
 				'show_names'   => true,
@@ -416,45 +416,45 @@  discard block
 block discarded – undo
416 416
 		);
417 417
 		$cmb->add_field(
418 418
 			array(
419
-				'name'       => __( 'Energy', 'lsx-health-plan' ),
419
+				'name'       => __('Energy', 'lsx-health-plan'),
420 420
 				'id'         => $this->slug . '_energy',
421
-				'desc'       => __( 'Add the energy amount for the entire meal i.e: 700 kj', 'lsx-health-plan' ),
421
+				'desc'       => __('Add the energy amount for the entire meal i.e: 700 kj', 'lsx-health-plan'),
422 422
 				'type'       => 'text',
423 423
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
424 424
 			)
425 425
 		);
426 426
 		$cmb->add_field(
427 427
 			array(
428
-				'name'       => __( 'Protein', 'lsx-health-plan' ),
428
+				'name'       => __('Protein', 'lsx-health-plan'),
429 429
 				'id'         => $this->slug . '_protein',
430
-				'desc'       => __( 'Add the protein amount for the entire meal i.e: 50 g', 'lsx-health-plan' ),
430
+				'desc'       => __('Add the protein amount for the entire meal i.e: 50 g', 'lsx-health-plan'),
431 431
 				'type'       => 'text',
432 432
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
433 433
 			)
434 434
 		);
435 435
 		$cmb->add_field(
436 436
 			array(
437
-				'name'       => __( 'Carbohydrates', 'lsx-health-plan' ),
437
+				'name'       => __('Carbohydrates', 'lsx-health-plan'),
438 438
 				'id'         => $this->slug . '_carbohydrates',
439
-				'desc'       => __( 'Add the carbohydrates amount for the entire meal i.e: 5 g', 'lsx-health-plan' ),
439
+				'desc'       => __('Add the carbohydrates amount for the entire meal i.e: 5 g', 'lsx-health-plan'),
440 440
 				'type'       => 'text',
441 441
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
442 442
 			)
443 443
 		);
444 444
 		$cmb->add_field(
445 445
 			array(
446
-				'name'       => __( 'Fibre', 'lsx-health-plan' ),
446
+				'name'       => __('Fibre', 'lsx-health-plan'),
447 447
 				'id'         => $this->slug . '_fibre',
448
-				'desc'       => __( 'Add the fibre amount for the entire meal i.e: 5 g', 'lsx-health-plan' ),
448
+				'desc'       => __('Add the fibre amount for the entire meal i.e: 5 g', 'lsx-health-plan'),
449 449
 				'type'       => 'text',
450 450
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
451 451
 			)
452 452
 		);
453 453
 		$cmb->add_field(
454 454
 			array(
455
-				'name'       => __( 'Fat', 'lsx-health-plan' ),
455
+				'name'       => __('Fat', 'lsx-health-plan'),
456 456
 				'id'         => $this->slug . '_fat',
457
-				'desc'       => __( 'Add the fat amount for the entire meal i.e: 20 g', 'lsx-health-plan' ),
457
+				'desc'       => __('Add the fat amount for the entire meal i.e: 20 g', 'lsx-health-plan'),
458 458
 				'type'       => 'text',
459 459
 				'show_on_cb' => 'cmb2_hide_if_no_cats',
460 460
 			)
Please login to merge, or discard this patch.
templates/archive-workout.php 1 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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) {
23
+		if (current_user_can('administrator', $page_id) || current_user_can('wc_memberships_view_restricted_post_content', $page_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 workout-archive-plan 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.
templates/archive-exercise.php 1 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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) {
23
+		if (current_user_can('administrator', $page_id) || current_user_can('wc_memberships_view_restricted_post_content', $page_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 exercise-archive-plan 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.
templates/tab-content-meal.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
 
8 8
 // Getting translated endpoint.
9 9
 
10
-$archive_meals = \lsx_health_plan\functions\get_option( 'endpoint_meal_archive', 'meals' );
11
-$meal          = \lsx_health_plan\functions\get_option( 'endpoint_meal', 'meal' );
10
+$archive_meals = \lsx_health_plan\functions\get_option('endpoint_meal_archive', 'meals');
11
+$meal          = \lsx_health_plan\functions\get_option('endpoint_meal', 'meal');
12 12
 
13
-$connected_members  = get_post_meta( get_the_ID(), ( $meal . '_connected_team_member' ), true );
14
-$connected_articles = get_post_meta( get_the_ID(), ( $meal . '_connected_articles' ), true );
13
+$connected_members  = get_post_meta(get_the_ID(), ($meal . '_connected_team_member'), true);
14
+$connected_articles = get_post_meta(get_the_ID(), ($meal . '_connected_articles'), true);
15 15
 
16 16
 ?>
17 17
 
@@ -26,18 +26,18 @@  discard block
 block discarded – undo
26 26
 	<div class="entry-content">
27 27
 		<div class="single-plan-inner meal-content">
28 28
 			<?php
29
-			if ( is_singular( 'meal' ) ) { ?>
29
+			if (is_singular('meal')) { ?>
30 30
 				<div class="single-plan-section-title meal-plan title-lined">
31
-					<?php lsx_get_svg_icon( 'meal.svg' ); ?>
31
+					<?php lsx_get_svg_icon('meal.svg'); ?>
32 32
 					<h2><?php the_title(); ?></h2>
33
-					<?php if ( class_exists( 'LSX_Sharing' ) ) {
33
+					<?php if (class_exists('LSX_Sharing')) {
34 34
 						lsx_content_sharing();
35 35
 					} ?>
36 36
 				</div>
37 37
 			<?php } else { ?>
38 38
 				<div class="single-plan-section-title meal-plan title-lined">
39
-					<?php lsx_get_svg_icon( 'meal.svg' ); ?>
40
-					<h2><?php esc_html_e( 'My Meal Plan', 'lsx-health-plan' ); ?> <?php the_title(); ?></h2>
39
+					<?php lsx_get_svg_icon('meal.svg'); ?>
40
+					<h2><?php esc_html_e('My Meal Plan', 'lsx-health-plan'); ?> <?php the_title(); ?></h2>
41 41
 				</div>
42 42
 			<?php } ?>
43 43
 
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
 </article><!-- #post-## -->
51 51
 
52 52
 <div  class="back-plan-btn">
53
-	<?php if ( is_single() && is_singular( 'meal' ) ) { ?>
54
-		<a class="btn border-btn" href="/<?php echo $archive_meals; ?>"><?php esc_html_e( 'Back to meals', 'lsx-health-plan' ); ?></a>
53
+	<?php if (is_single() && is_singular('meal')) { ?>
54
+		<a class="btn border-btn" href="/<?php echo $archive_meals; ?>"><?php esc_html_e('Back to meals', 'lsx-health-plan'); ?></a>
55 55
 	<?php } ?>
56 56
 
57 57
 	<?php
58 58
 	// Shoping list
59
-	$shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true );
60
-	if ( ! empty( $shopping_list ) ) {
59
+	$shopping_list = get_post_meta(get_the_ID(), 'meal_shopping_list', true);
60
+	if ( ! empty($shopping_list)) {
61 61
 		?>
62
-		<a class="btn border-btn btn-shopping" href="<?php echo esc_url( get_page_link( $shopping_list ) ); ?>" target="_blank"><?php esc_html_e( 'Download Shopping List', 'lsx-health-plan' ); ?><i class="fa fa-download" aria-hidden="true"></i></a>
62
+		<a class="btn border-btn btn-shopping" href="<?php echo esc_url(get_page_link($shopping_list)); ?>" target="_blank"><?php esc_html_e('Download Shopping List', 'lsx-health-plan'); ?><i class="fa fa-download" aria-hidden="true"></i></a>
63 63
 	<?php
64 64
 	}
65 65
 
@@ -67,6 +67,6 @@  discard block
 block discarded – undo
67 67
 </div>
68 68
 
69 69
 <?php
70
-if ( ! empty( $connected_articles ) ) {
71
-	lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) );
70
+if ( ! empty($connected_articles)) {
71
+	lsx_hp_single_related($connected_articles, __('Related articles', 'lsx-health-plan'));
72 72
 }
Please login to merge, or discard this patch.
templates/content-archive-recipe.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,31 +12,31 @@  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 25
 		<?php lsx_entry_top(); ?>
26 26
 
27 27
 		<?php lsx_hp_recipe_plan_meta(); ?>
28 28
 
29 29
 		<div class="recipe-feature-img">
30
-			<a href="<?php echo esc_url( get_permalink() ); ?>">
30
+			<a href="<?php echo esc_url(get_permalink()); ?>">
31 31
 			<?php
32 32
 			$featured_image = get_the_post_thumbnail();
33
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
34
-				the_post_thumbnail( 'lsx-thumbnail-square', array(
33
+			if ( ! empty($featured_image) && '' !== $featured_image) {
34
+				the_post_thumbnail('lsx-thumbnail-square', array(
35 35
 					'class' => 'aligncenter',
36
-				) );
36
+				));
37 37
 			} else {
38 38
 				?>
39
-				<img loading="lazy" class="placeholder" src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
39
+				<img loading="lazy" class="placeholder" src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>">
40 40
 				<?php
41 41
 			}
42 42
 			?>
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 		</div>
45 45
 		<div class="content-box white-bg">
46 46
 			<?php lsx_health_plan_recipe_data(); ?>
47
-			<a class="recipe-title-link" href="<?php echo esc_url( get_permalink() ); ?>">
48
-				<?php the_title( '<h3 class="recipe-title">', '</h3>' ); ?>
47
+			<a class="recipe-title-link" href="<?php echo esc_url(get_permalink()); ?>">
48
+				<?php the_title('<h3 class="recipe-title">', '</h3>'); ?>
49 49
 			</a>
50
-			<a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See Recipe', 'lsx-health-plan' ); ?></a>
50
+			<a href="<?php echo esc_url(get_permalink()); ?>" class="btn border-btn"><?php esc_html_e('See Recipe', 'lsx-health-plan'); ?></a>
51 51
 		</div>
52 52
 		<?php lsx_entry_bottom(); ?>
53 53
 	</article>
Please login to merge, or discard this patch.
includes/template-tags/exercise.php 1 patch
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
  * @return exercise_type
12 12
  */
13 13
 function lsx_health_plan_exercise_type() {
14
-	$term_obj_list = get_the_term_list( get_the_ID(), 'exercise-type', '', ', ' );
15
-	if ( ! empty( $term_obj_list ) ) {
14
+	$term_obj_list = get_the_term_list(get_the_ID(), 'exercise-type', '', ', ');
15
+	if ( ! empty($term_obj_list)) {
16 16
 		return $term_obj_list;
17 17
 	}
18 18
 }
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @return muscle_group_equipment
24 24
  */
25 25
 function lsx_health_plan_muscle_group_equipment() {
26
-	$term_obj_list = get_the_term_list( get_the_ID(), 'muscle-group', '', ', ' );
27
-	if ( ! empty( $term_obj_list ) ) {
26
+	$term_obj_list = get_the_term_list(get_the_ID(), 'muscle-group', '', ', ');
27
+	if ( ! empty($term_obj_list)) {
28 28
 		return $term_obj_list;
29 29
 	}
30 30
 }
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
  * @return exercise_equipment
36 36
  */
37 37
 function lsx_health_plan_exercise_equipment() {
38
-	$term_obj_list = get_the_term_list( get_the_ID(), 'equipment', '', ', ' );
39
-	if ( ! empty( $term_obj_list ) ) {
38
+	$term_obj_list = get_the_term_list(get_the_ID(), 'equipment', '', ', ');
39
+	if ( ! empty($term_obj_list)) {
40 40
 		return $term_obj_list;
41 41
 	}
42 42
 }
@@ -50,74 +50,74 @@  discard block
 block discarded – undo
50 50
 	include LSX_HEALTH_PLAN_PATH . '/templates/table-exercise-data.php';
51 51
 }
52 52
 
53
-function lsx_health_plan_workout_exercise_alt_button( $m, $group, $echo = true, $args = array(), $alt_title, $alt_description, $alt_image ) {
53
+function lsx_health_plan_workout_exercise_alt_button($m, $group, $echo = true, $args = array(), $alt_title, $alt_description, $alt_image) {
54 54
 	$defaults = array(
55 55
 		'modal_trigger' => 'button',
56 56
 		'modal_content' => 'excerpt',
57 57
 	);
58
-	$args     = wp_parse_args( $args, $defaults );
58
+	$args = wp_parse_args($args, $defaults);
59 59
 
60 60
 	$exercise_id = '';
61
-	if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) {
62
-		$exercise_id     = esc_html( $group['connected_exercises'] );
63
-		$content         = get_post_field( 'post_content', $exercise_id );
64
-		$url             = get_permalink( $exercise_id );
65
-		$equipment_group = get_the_term_list( $exercise_id, 'equipment', '', ', ' );
66
-		$muscle_group    = get_the_term_list( $exercise_id, 'muscle-group', '', ', ' );
61
+	if (isset($group['connected_exercises']) && '' !== $group['connected_exercises']) {
62
+		$exercise_id     = esc_html($group['connected_exercises']);
63
+		$content         = get_post_field('post_content', $exercise_id);
64
+		$url             = get_permalink($exercise_id);
65
+		$equipment_group = get_the_term_list($exercise_id, 'equipment', '', ', ');
66
+		$muscle_group    = get_the_term_list($exercise_id, 'muscle-group', '', ', ');
67 67
 		$lsx_hp          = lsx_health_plan();
68 68
 
69
-		if ( 'excerpt' === $args['modal_content'] ) {
70
-			$content = wp_trim_words( $content, 40 );
69
+		if ('excerpt' === $args['modal_content']) {
70
+			$content = wp_trim_words($content, 40);
71 71
 		}
72 72
 
73
-		if ( 'link' ) {
74
-			$play_button = '<a data-toggle="modal" href="#workout-alt-exercise-modal-' . $m . '">' . get_the_title( $exercise_id ) . '</a>';
73
+		if ('link') {
74
+			$play_button = '<a data-toggle="modal" href="#workout-alt-exercise-modal-' . $m . '">' . get_the_title($exercise_id) . '</a>';
75 75
 		} else {
76 76
 			$play_button = '<button data-toggle="alt-modal" data-target="#workout-alt-exercise-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>';
77 77
 		}
78 78
 
79
-		$modal_body  = '';
79
+		$modal_body = '';
80 80
 
81
-		if ( '' !== $alt_image && ! empty( $alt_image ) ) {
81
+		if ('' !== $alt_image && ! empty($alt_image)) {
82 82
 			$modal_body .= '<div class="modal-image"/><img alt="thumbnail" loading="lazy" class="aligncenter wp-post-image" src="' . $alt_image . '"></div>';
83 83
 		} else {
84
-			if ( $lsx_hp->frontend->gallery->has_gallery( $exercise_id ) ) {
84
+			if ($lsx_hp->frontend->gallery->has_gallery($exercise_id)) {
85 85
 				$gallery_args = array(
86 86
 					'css_class' => 'modal-slider',
87 87
 				);
88
-				$modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args );
88
+				$modal_body .= $lsx_hp->frontend->gallery->get_gallery('', '', $gallery_args);
89 89
 			} else {
90
-				$modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail( $exercise_id, 'large' ) . '</div>';
90
+				$modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail($exercise_id, 'large') . '</div>';
91 91
 			}
92 92
 		}
93 93
 
94
-		if ( '' !== $alt_title ) {
94
+		if ('' !== $alt_title) {
95 95
 			$modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . $alt_title . '</h5>';
96 96
 		} else {
97
-			$modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title( $exercise_id ) . '</h5>';
97
+			$modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title($exercise_id) . '</h5>';
98 98
 		}
99 99
 
100
-		if ( ! empty( $equipment_group ) ) {
100
+		if ( ! empty($equipment_group)) {
101 101
 			$modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>';
102 102
 		}
103
-		if ( ! empty( $muscle_group ) ) {
103
+		if ( ! empty($muscle_group)) {
104 104
 			$modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>';
105 105
 		}
106 106
 		$modal_body .= '</div>';
107
-		if ( '' !== $args['modal_content'] ) {
108
-			if ( '' !== $alt_description ) {
107
+		if ('' !== $args['modal_content']) {
108
+			if ('' !== $alt_description) {
109 109
 				$modal_body .= '<div class="modal-excerpt"/>' . $alt_description . '</div>';
110 110
 			} else {
111 111
 				$modal_body .= '<div class="modal-excerpt"/>' . $content . '</div>';
112 112
 			}
113 113
 		}
114
-		if ( 'excerpt' === $args['modal_content'] ) {
115
-			$modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __( 'Read More', 'lsx-heal-plan' ) . '</a>';
114
+		if ('excerpt' === $args['modal_content']) {
115
+			$modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __('Read More', 'lsx-heal-plan') . '</a>';
116 116
 		}
117
-		\lsx_health_plan\functions\register_modal( 'workout-alt-exercise-modal-' . $m, '', $modal_body );
117
+		\lsx_health_plan\functions\register_modal('workout-alt-exercise-modal-' . $m, '', $modal_body);
118 118
 
119
-		if ( true === $echo ) {
120
-			echo wp_kses_post( $play_button );
119
+		if (true === $echo) {
120
+			echo wp_kses_post($play_button);
121 121
 		} else {
122 122
 			return $play_button;
123 123
 		}
@@ -133,62 +133,62 @@  discard block
 block discarded – undo
133 133
  * @param array   $args
134 134
  * @return void
135 135
  */
136
-function lsx_health_plan_workout_exercise_button( $m, $group, $echo = true, $args = array() ) {
136
+function lsx_health_plan_workout_exercise_button($m, $group, $echo = true, $args = array()) {
137 137
 	$defaults = array(
138 138
 		'modal_trigger' => 'button',
139 139
 		'modal_content' => 'excerpt',
140 140
 	);
141
-	$args     = wp_parse_args( $args, $defaults );
141
+	$args = wp_parse_args($args, $defaults);
142 142
 
143 143
 	$exercise_id = '';
144
-	if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) {
145
-		$exercise_id     = esc_html( $group['connected_exercises'] );
146
-		$content         = get_post_field( 'post_content', $exercise_id );
147
-		$url             = get_permalink( $exercise_id );
148
-		$equipment_group = get_the_term_list( $exercise_id, 'equipment', '', ', ' );
149
-		$muscle_group    = get_the_term_list( $exercise_id, 'muscle-group', '', ', ' );
144
+	if (isset($group['connected_exercises']) && '' !== $group['connected_exercises']) {
145
+		$exercise_id     = esc_html($group['connected_exercises']);
146
+		$content         = get_post_field('post_content', $exercise_id);
147
+		$url             = get_permalink($exercise_id);
148
+		$equipment_group = get_the_term_list($exercise_id, 'equipment', '', ', ');
149
+		$muscle_group    = get_the_term_list($exercise_id, 'muscle-group', '', ', ');
150 150
 		$lsx_hp          = lsx_health_plan();
151 151
 
152
-		if ( 'excerpt' === $args['modal_content'] ) {
153
-			$content = wp_trim_words( $content, 40 );
152
+		if ('excerpt' === $args['modal_content']) {
153
+			$content = wp_trim_words($content, 40);
154 154
 		}
155 155
 
156
-		if ( 'link' ) {
157
-			$play_button = '<a data-toggle="modal" href="#workout-exercise-modal-' . $m . '">' . get_the_title( $exercise_id ) . '</a>';
156
+		if ('link') {
157
+			$play_button = '<a data-toggle="modal" href="#workout-exercise-modal-' . $m . '">' . get_the_title($exercise_id) . '</a>';
158 158
 		} else {
159 159
 			$play_button = '<button data-toggle="modal" data-target="#workout-exercise-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>';
160 160
 		}
161 161
 
162
-		$modal_body  = '';
162
+		$modal_body = '';
163 163
 
164
-		if ( $lsx_hp->frontend->gallery->has_gallery( $exercise_id ) ) {
164
+		if ($lsx_hp->frontend->gallery->has_gallery($exercise_id)) {
165 165
 			$gallery_args = array(
166 166
 				'css_class' => 'modal-slider',
167 167
 			);
168
-			$modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args );
168
+			$modal_body .= $lsx_hp->frontend->gallery->get_gallery('', '', $gallery_args);
169 169
 		} else {
170
-			$modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail( $exercise_id, 'large' ) . '</div>';
170
+			$modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail($exercise_id, 'large') . '</div>';
171 171
 		}
172 172
 
173
-		$modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title( $exercise_id ) . '</h5>';
173
+		$modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title($exercise_id) . '</h5>';
174 174
 
175
-		if ( ! empty( $equipment_group ) ) {
175
+		if ( ! empty($equipment_group)) {
176 176
 			$modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>';
177 177
 		}
178
-		if ( ! empty( $muscle_group ) ) {
178
+		if ( ! empty($muscle_group)) {
179 179
 			$modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>';
180 180
 		}
181 181
 		$modal_body .= '</div>';
182
-		if ( '' !== $args['modal_content'] ) {
182
+		if ('' !== $args['modal_content']) {
183 183
 			$modal_body .= '<div class="modal-excerpt"/>' . $content . '</div>';
184 184
 		}
185
-		if ( 'excerpt' === $args['modal_content'] ) {
186
-			$modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __( 'Read More', 'lsx-heal-plan' ) . '</a>';
185
+		if ('excerpt' === $args['modal_content']) {
186
+			$modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __('Read More', 'lsx-heal-plan') . '</a>';
187 187
 		}
188
-		\lsx_health_plan\functions\register_modal( 'workout-exercise-modal-' . $m, '', $modal_body );
188
+		\lsx_health_plan\functions\register_modal('workout-exercise-modal-' . $m, '', $modal_body);
189 189
 
190
-		if ( true === $echo ) {
191
-			echo wp_kses_post( $play_button );
190
+		if (true === $echo) {
191
+			echo wp_kses_post($play_button);
192 192
 		} else {
193 193
 			return $play_button;
194 194
 		}
@@ -202,39 +202,39 @@  discard block
 block discarded – undo
202 202
  * @param array $group
203 203
  * @return void
204 204
  */
205
-function lsx_health_plan_shortcode_exercise_button( $m, $content = true ) {
206
-	$equipment_group = get_the_term_list( $m, 'equipment', '', ', ' );
207
-	$muscle_group    = get_the_term_list( $m, 'muscle-group', '', ', ' );
205
+function lsx_health_plan_shortcode_exercise_button($m, $content = true) {
206
+	$equipment_group = get_the_term_list($m, 'equipment', '', ', ');
207
+	$muscle_group    = get_the_term_list($m, 'muscle-group', '', ', ');
208 208
 	$title           = get_the_title();
209 209
 	$lsx_hp          = lsx_health_plan();
210
-	$button     = '<a data-toggle="modal" href="#exercise-modal-' . $m . '" data-target="#exercise-modal-' . $m . '"></a>';
210
+	$button = '<a data-toggle="modal" href="#exercise-modal-' . $m . '" data-target="#exercise-modal-' . $m . '"></a>';
211 211
 
212
-	if ( true === $content ) {
212
+	if (true === $content) {
213 213
 		$content = get_the_content();
214 214
 	}
215 215
 
216 216
 	$modal_body = '';
217
-	if ( $lsx_hp->frontend->gallery->has_gallery( $m ) ) {
217
+	if ($lsx_hp->frontend->gallery->has_gallery($m)) {
218 218
 		$gallery_args = array(
219 219
 			'css_class' => 'modal-slider',
220 220
 		);
221
-		$modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args );
221
+		$modal_body .= $lsx_hp->frontend->gallery->get_gallery('', '', $gallery_args);
222 222
 	} else {
223
-		$modal_body .= '<div class="modal-image">' . get_the_post_thumbnail( $m, 'large' ) . '</div>';
223
+		$modal_body .= '<div class="modal-image">' . get_the_post_thumbnail($m, 'large') . '</div>';
224 224
 	}
225 225
 	$modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . $title . '</h5>';
226 226
 
227
-	if ( ! empty( $equipment_group ) ) {
227
+	if ( ! empty($equipment_group)) {
228 228
 		$modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>';
229 229
 	}
230
-	if ( ! empty( $muscle_group ) ) {
230
+	if ( ! empty($muscle_group)) {
231 231
 		$modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>';
232 232
 	}
233 233
 	$modal_body .= '</div>';
234 234
 	$modal_body .= $content;
235
-	\lsx_health_plan\functions\register_modal( 'exercise-modal-' . $m, '', $modal_body );
235
+	\lsx_health_plan\functions\register_modal('exercise-modal-' . $m, '', $modal_body);
236 236
 
237
-	return ( $button );
237
+	return ($button);
238 238
 }
239 239
 
240 240
 /**
@@ -245,18 +245,18 @@  discard block
 block discarded – undo
245 245
  * @param  boolean $echo
246 246
  * @return string
247 247
  */
248
-function lsx_health_plan_exercise_title( $before = '', $after = '', $echo = true, $exercise_id = false ) {
249
-	if ( false === $exercise_id ) {
248
+function lsx_health_plan_exercise_title($before = '', $after = '', $echo = true, $exercise_id = false) {
249
+	if (false === $exercise_id) {
250 250
 		$exercise_id = get_the_ID();
251 251
 	}
252
-	$title = get_the_title( $exercise_id );
253
-	$side  = get_post_meta( $exercise_id, 'exercise_side', true );
254
-	if ( '' !== $side ) {
255
-		$title .= ' - ' . ucwords( $side );
252
+	$title = get_the_title($exercise_id);
253
+	$side  = get_post_meta($exercise_id, 'exercise_side', true);
254
+	if ('' !== $side) {
255
+		$title .= ' - ' . ucwords($side);
256 256
 	}
257
-	$title = apply_filters( 'lsx_health_plan_exercise_title', $before . $title . $after, $title, $before, $after, $exercise_id );
258
-	if ( true === $echo ) {
259
-		echo wp_kses_post( $title );
257
+	$title = apply_filters('lsx_health_plan_exercise_title', $before . $title . $after, $title, $before, $after, $exercise_id);
258
+	if (true === $echo) {
259
+		echo wp_kses_post($title);
260 260
 	} else {
261 261
 		return $title;
262 262
 	}
Please login to merge, or discard this patch.