Passed
Push — add/multiplan ( 7c40d1...efd4dd )
by Virginia
04:04
created
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/single-plan.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -16,59 +16,59 @@  discard block
 block discarded – undo
16 16
 );
17 17
 
18 18
 $plan_id      = get_the_ID();
19
-$has_sections = \lsx_health_plan\functions\plan\has_sections( $plan_id );
19
+$has_sections = \lsx_health_plan\functions\plan\has_sections($plan_id);
20 20
 $restricted   = false;
21
-$is_section   = get_query_var( 'section', false );
21
+$is_section   = get_query_var('section', false);
22 22
 
23 23
 // Getting translated endpoint.
24
-$plan = \lsx_health_plan\functions\get_option( 'endpoint_plan', 'plan' );
24
+$plan = \lsx_health_plan\functions\get_option('endpoint_plan', 'plan');
25 25
 
26
-$connected_members  = get_post_meta( get_the_ID(), ( $plan . '_connected_team_member' ), true );
27
-$connected_articles = get_post_meta( get_the_ID(), ( $plan . '_connected_articles' ), true );
28
-$small_description  = get_post_meta( get_the_ID(), ( $plan . '_short_description' ), true );
26
+$connected_members  = get_post_meta(get_the_ID(), ($plan . '_connected_team_member'), true);
27
+$connected_articles = get_post_meta(get_the_ID(), ($plan . '_connected_articles'), true);
28
+$small_description  = get_post_meta(get_the_ID(), ($plan . '_short_description'), true);
29 29
 
30
-if ( ! empty( $has_sections ) && empty( $is_section ) ) {
30
+if ( ! empty($has_sections) && empty($is_section)) {
31 31
 	$plan_type_class = 'parent-plan';
32 32
 }
33
-if ( ! empty( $has_sections ) && ! empty( $is_section ) ) {
33
+if ( ! empty($has_sections) && ! empty($is_section)) {
34 34
 	$plan_type_class = 'child-plan';
35 35
 }
36 36
 
37 37
 // Get the plan restrictions.
38
-if ( function_exists( 'wc_memberships_is_post_content_restricted' ) && wc_memberships_is_post_content_restricted( get_the_ID() ) ) {
39
-	$restricted = ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() );
38
+if (function_exists('wc_memberships_is_post_content_restricted') && wc_memberships_is_post_content_restricted(get_the_ID())) {
39
+	$restricted = ! current_user_can('wc_memberships_view_restricted_post_content', get_the_ID());
40 40
 }
41
-if ( false === $restricted ) {
42
-	$round_progress = round( \lsx_health_plan\functions\get_progress( get_the_ID() ), 0 );
41
+if (false === $restricted) {
42
+	$round_progress = round(\lsx_health_plan\functions\get_progress(get_the_ID()), 0);
43 43
 }
44 44
 ?>
45 45
 
46
-<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
46
+<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
47 47
 
48 48
 	<?php lsx_content_before(); ?>
49 49
 
50
-	<main id="main" class="site-main <?php echo esc_html( $plan_type_class ); ?>" role="main">
50
+	<main id="main" class="site-main <?php echo esc_html($plan_type_class); ?>" role="main">
51 51
 
52 52
 		<?php lsx_content_top(); ?>
53 53
 
54 54
 		<div class="post-wrapper">
55
-			<?php if ( ! empty( $has_sections ) && empty( $is_section ) ) { ?>
55
+			<?php if ( ! empty($has_sections) && empty($is_section)) { ?>
56 56
 				<div class="plan-content">
57 57
 					<?php the_content(); ?>
58 58
 				</div>
59 59
 			<?php } ?>
60 60
 
61 61
 			<?php
62
-			if ( ! empty( $has_sections ) ) {
63
-				if ( false === $is_section ) {
62
+			if ( ! empty($has_sections)) {
63
+				if (false === $is_section) {
64 64
 					?>
65 65
 					<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
66 66
 						<div class="entry-content">
67 67
 							<div class="single-plan-inner main-plan-content">
68 68
 								<div class="single-plan-section-title title-lined">
69
-									<?php lsx_get_svg_icon( 'my-plan.svg' ); ?>
70
-									<h2><?php echo esc_html_e( 'Your Plan', 'lsx-health-plan' ); ?></h2>
71
-									<?php if ( class_exists( 'LSX_Sharing' ) ) {
69
+									<?php lsx_get_svg_icon('my-plan.svg'); ?>
70
+									<h2><?php echo esc_html_e('Your Plan', 'lsx-health-plan'); ?></h2>
71
+									<?php if (class_exists('LSX_Sharing')) {
72 72
 										lsx_content_sharing();
73 73
 									} ?>
74 74
 								</div>
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
 									<div class="set-box set content-box entry-content">
77 77
 										<div class="plan-top-content">
78 78
 										<?php
79
-										if ( $connected_members ) {
80
-											echo wp_kses_post( lsx_hp_member_connected( $connected_members, $plan ) );
79
+										if ($connected_members) {
80
+											echo wp_kses_post(lsx_hp_member_connected($connected_members, $plan));
81 81
 										}
82
-										if ( false === $restricted ) {
83
-											echo wp_kses_post( '<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>' );
82
+										if (false === $restricted) {
83
+											echo wp_kses_post('<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>');
84 84
 										}
85
-										if ( $small_description ) {
85
+										if ($small_description) {
86 86
 											?>
87 87
 											<div class="the-content">
88
-												<span><?php echo esc_html( $small_description ); ?></span>
88
+												<span><?php echo esc_html($small_description); ?></span>
89 89
 											</div>
90 90
 											<?php
91 91
 											
@@ -93,20 +93,20 @@  discard block
 block discarded – undo
93 93
 										?>
94 94
 										</div>
95 95
 										<?php
96
-										if ( lsx_health_plan_has_tips() ) {
97
-											echo wp_kses_post( do_shortcode( '[lsx_health_plan_featured_tips_block]' ) );
96
+										if (lsx_health_plan_has_tips()) {
97
+											echo wp_kses_post(do_shortcode('[lsx_health_plan_featured_tips_block]'));
98 98
 										} ?>
99 99
 									</div>
100 100
 									<div class="the-plan-content">
101 101
 										<?php
102
-										echo do_shortcode( '[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]' );
102
+										echo do_shortcode('[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]');
103 103
 
104 104
 										?>
105 105
 										<div class="row status-plan-buttons main-plan-btn">
106 106
 											<?php
107
-											if ( function_exists( 'wc_get_page_id' ) ) {
107
+											if (function_exists('wc_get_page_id')) {
108 108
 												?>
109
-												<a class="btn border-btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'My Plans', 'lsx-health-plan' ); ?></a>
109
+												<a class="btn border-btn" href="<?php echo wp_kses_post(get_permalink(wc_get_page_id('myaccount'))); ?>"><?php esc_html_e('My Plans', 'lsx-health-plan'); ?></a>
110 110
 												<?php
111 111
 											}
112 112
 											?>
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 		<?php
130 130
 		// Show the buttons on the single plan tabs.
131
-		if ( ! empty( $has_sections ) && false !== $is_section ) {
131
+		if ( ! empty($has_sections) && false !== $is_section) {
132 132
 			?>
133 133
 			<div class="row status-plan-buttons">
134 134
 				<?php lsx_health_plan_day_button(); ?>
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 		<?php lsx_content_bottom(); ?>
141 141
 
142 142
 		<?php
143
-		if ( ! empty( $connected_articles ) ) {
144
-			lsx_hp_single_related( $connected_articles, __( 'Latest articles', 'lsx-health-plan' ) );
143
+		if ( ! empty($connected_articles)) {
144
+			lsx_hp_single_related($connected_articles, __('Latest articles', 'lsx-health-plan'));
145 145
 		}
146 146
 		?>
147 147
 
Please login to merge, or discard this patch.
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.
classes/integrations/class-lsx-team.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
 	 */
21 21
 	public function __construct() {
22 22
 		$this->default_types = array(
23
-			\lsx_health_plan\functions\get_option( 'endpoint_meal', 'meal' ),
24
-			\lsx_health_plan\functions\get_option( 'endpoint_exercise_single', 'exercise' ),
25
-			\lsx_health_plan\functions\get_option( 'endpoint_recipe_single', 'recipe' ),
26
-			\lsx_health_plan\functions\get_option( 'endpoint_workout', 'workout' ),
27
-			\lsx_health_plan\functions\get_option( 'endpoint_plan', 'plan' ),
23
+			\lsx_health_plan\functions\get_option('endpoint_meal', 'meal'),
24
+			\lsx_health_plan\functions\get_option('endpoint_exercise_single', 'exercise'),
25
+			\lsx_health_plan\functions\get_option('endpoint_recipe_single', 'recipe'),
26
+			\lsx_health_plan\functions\get_option('endpoint_workout', 'workout'),
27
+			\lsx_health_plan\functions\get_option('endpoint_plan', 'plan'),
28 28
 		);
29
-		add_action( 'wp_enqueue_scripts', array( $this, 'assets' ), 5 );
30
-		add_action( 'cmb2_admin_init', array( $this, 'related_team_metabox' ) );
31
-		add_action( 'cmb2_admin_init', array( $this, 'additional_single_team_metabox' ) );
32
-		add_action( 'lsx_entry_bottom', array( $this, 'hp_team_member_tabs' ) );
33
-		add_action( 'wp_head', array( $this, 'remove_archive_original_team_header' ), 99 );
29
+		add_action('wp_enqueue_scripts', array($this, 'assets'), 5);
30
+		add_action('cmb2_admin_init', array($this, 'related_team_metabox'));
31
+		add_action('cmb2_admin_init', array($this, 'additional_single_team_metabox'));
32
+		add_action('lsx_entry_bottom', array($this, 'hp_team_member_tabs'));
33
+		add_action('wp_head', array($this, 'remove_archive_original_team_header'), 99);
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;
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
56 56
 	 *
57 57
 	 */
58 58
 	public function assets() {
59
-		wp_enqueue_style( 'lsx-health-plan-team', LSX_HEALTH_PLAN_URL . 'assets/css/lsx-health-plan-team.css', array(), LSX_HEALTH_PLAN_VER );
59
+		wp_enqueue_style('lsx-health-plan-team', LSX_HEALTH_PLAN_URL . 'assets/css/lsx-health-plan-team.css', array(), LSX_HEALTH_PLAN_VER);
60 60
 	}
61 61
 
62 62
 	/**
63 63
 	 * Define the related team member metabox and field configurations.
64 64
 	 */
65 65
 	public function related_team_metabox() {
66
-		foreach ( $this->default_types as $type => $default_type ) {
66
+		foreach ($this->default_types as $type => $default_type) {
67 67
 			$cmb = new_cmb2_box(
68 68
 				array(
69 69
 					'id'           => $default_type . '_related_team_member__metabox',
70
-					'title'        => __( 'Related Team Member', 'lsx-health-plan' ),
71
-					'object_types' => array( $default_type ), // Post type.
70
+					'title'        => __('Related Team Member', 'lsx-health-plan'),
71
+					'object_types' => array($default_type), // Post type.
72 72
 					'context'      => 'normal',
73 73
 					'priority'     => 'low',
74 74
 					'show_names'   => true,
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
 
78 78
 			$cmb->add_field(
79 79
 				array(
80
-					'name'       => __( 'Related Team Member', 'lsx-health-plan' ),
81
-					'desc'       => __( 'Connect the related team member that applies to this ', 'lsx-health-plan' ) . $default_type,
80
+					'name'       => __('Related Team Member', 'lsx-health-plan'),
81
+					'desc'       => __('Connect the related team member that applies to this ', 'lsx-health-plan') . $default_type,
82 82
 					'id'         => $default_type . '_connected_team_member',
83 83
 					'type'       => 'post_search_ajax',
84
-					'limit'      => 4,  // Limit selection to X items only (default 1).
84
+					'limit'      => 4, // Limit selection to X items only (default 1).
85 85
 					'sortable'   => true, // Allow selected items to be sortable (default false).
86 86
 					'query_args' => array(
87
-						'post_type'      => array( 'team' ),
88
-						'post_status'    => array( 'publish' ),
87
+						'post_type'      => array('team'),
88
+						'post_status'    => array('publish'),
89 89
 						'posts_per_page' => -1,
90 90
 					),
91 91
 				)
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 			array(
103 103
 				'id'           => 'lsx__team',
104 104
 				'title'        => '',
105
-				'object_types' => array( 'team' ), // Post type.
105
+				'object_types' => array('team'), // Post type.
106 106
 				'context'      => 'normal',
107 107
 				'priority'     => 'high',
108 108
 				'show_names'   => true,
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 
112 112
 		$cmb->add_field(
113 113
 			array(
114
-				'name'       => __( 'Team Member Experience', 'lsx-health-plan' ),
115
-				'desc'       => __( 'Add additional experience to this team member', 'lsx-health-plan' ),
114
+				'name'       => __('Team Member Experience', 'lsx-health-plan'),
115
+				'desc'       => __('Add additional experience to this team member', 'lsx-health-plan'),
116 116
 				'id'         => 'team_member_experience',
117 117
 				'type'       => 'wysiwyg',
118 118
 			)
@@ -120,15 +120,15 @@  discard block
 block discarded – undo
120 120
 
121 121
 		$cmb->add_field(
122 122
 			array(
123
-				'name'       => __( 'Featured Plans', 'lsx-health-plan' ),
124
-				'desc'       => __( 'Connect the related plans to this team member', 'lsx-health-plan' ),
123
+				'name'       => __('Featured Plans', 'lsx-health-plan'),
124
+				'desc'       => __('Connect the related plans to this team member', 'lsx-health-plan'),
125 125
 				'id'         => 'connected_team_member_plan',
126 126
 				'type'       => 'post_search_ajax',
127 127
 				'limit'      => 3,
128 128
 				'sortable'   => true,
129 129
 				'query_args' => array(
130
-					'post_type'      => array( 'plan' ),
131
-					'post_status'    => array( 'publish' ),
130
+					'post_type'      => array('plan'),
131
+					'post_status'    => array('publish'),
132 132
 					'posts_per_page' => -1,
133 133
 				),
134 134
 			)
@@ -142,14 +142,14 @@  discard block
 block discarded – undo
142 142
 	 * @return void
143 143
 	 */
144 144
 	public function hp_team_member_tabs() {
145
-		if ( is_single() && is_singular( 'team' ) ) {
145
+		if (is_single() && is_singular('team')) {
146 146
 			require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/team.php';
147 147
 		}
148 148
 	}
149 149
 
150 150
 	public function remove_archive_original_team_header() {
151
-		if (  is_single() && is_singular( 'team' ) ) {
152
-			remove_action( 'lsx_content_wrap_before', 'lsx_global_header' );
151
+		if (is_single() && is_singular('team')) {
152
+			remove_action('lsx_content_wrap_before', 'lsx_global_header');
153 153
 		}
154 154
 	}
155 155
 }
Please login to merge, or discard this patch.
classes/admin/settings/class-meal.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_meal_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_meal_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Disable Meals', 'lsx-health-plan' ),
55
+				'name'        => __('Disable Meals', 'lsx-health-plan'),
56 56
 				'id'          => 'meal_disabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Disable meal post type if you are wanting a minimal site.', 'lsx-health-plan' ),
60
+				'description' => __('Disable meal post type if you are wanting a minimal site.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 			array(
66 66
 				'id'          => 'meal_archive_description',
67 67
 				'type'        => 'wysiwyg',
68
-				'name'        => __( 'Archive Description', 'lsx-health-plan' ),
69
-				'description' => __( 'This will show up on the post type archive.', 'lsx-health-plan' ),
68
+				'name'        => __('Archive Description', 'lsx-health-plan'),
69
+				'description' => __('This will show up on the post type archive.', 'lsx-health-plan'),
70 70
 				'options'     => array(
71 71
 					'textarea_rows' => get_option('default_post_edit_rows', 6),
72 72
 				),
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
 
76 76
 		$cmb->add_field(
77 77
 			array(
78
-				'name'    => __( 'Your Meal Plan Intro', 'lsx-health-plan' ),
78
+				'name'    => __('Your Meal Plan Intro', 'lsx-health-plan'),
79 79
 				'id'      => 'meal_plan_intro',
80 80
 				'type'    => 'textarea_small',
81 81
 				'value'   => '',
82
-				'default' => __( 'Get the right mix of nutrients to keep muscles strong & healthy.', 'lsx-health-plan' ),
82
+				'default' => __('Get the right mix of nutrients to keep muscles strong & healthy.', 'lsx-health-plan'),
83 83
 			)
84 84
 		);
85 85
 
86 86
 		$cmb->add_field(
87 87
 			array(
88 88
 				'before_row' => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
89
-				'name'       =>  __( 'Meal Slug', 'lsx-health-plan' ),
89
+				'name'       =>  __('Meal Slug', 'lsx-health-plan'),
90 90
 				'id'         => 'endpoint_meal',
91 91
 				'type'       => 'input',
92 92
 				'value'      => '',
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		);
96 96
 		$cmb->add_field(
97 97
 			array(
98
-				'name'    =>  __( 'Meals Archive Slug', 'lsx-health-plan' ),
98
+				'name'    =>  __('Meals Archive Slug', 'lsx-health-plan'),
99 99
 				'id'      => 'endpoint_meal_archive',
100 100
 				'type'    => 'input',
101 101
 				'value'   => '',
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		);
105 105
 		$cmb->add_field(
106 106
 			array(
107
-				'name'    =>  __( 'Single Meal Slug', 'lsx-health-plan' ),
107
+				'name'    =>  __('Single Meal Slug', 'lsx-health-plan'),
108 108
 				'id'      => 'meal_single_slug',
109 109
 				'type'    => 'input',
110 110
 				'value'   => '',
@@ -115,40 +115,40 @@  discard block
 block discarded – undo
115 115
 		$cmb->add_field(
116 116
 			array(
117 117
 				'before_row'  => '<h4><b><u>Default Options</u></b></h4>',
118
-				'name'        => __( 'Default Meal Plan', 'lsx-health-plan' ),
119
-				'description' => __( 'Set a default meal plan.', 'lsx-health-plan' ),
118
+				'name'        => __('Default Meal Plan', 'lsx-health-plan'),
119
+				'description' => __('Set a default meal plan.', 'lsx-health-plan'),
120 120
 				'limit'       => 1,
121 121
 				'id'          => 'connected_meals',
122 122
 				'type'        => 'post_search_ajax',
123 123
 				'query_args'  => array(
124 124
 					'post_type'      => 'meal',
125
-					'post_status'    => array( 'publish' ),
125
+					'post_status'    => array('publish'),
126 126
 					'posts_per_page' => -1,
127 127
 				),
128 128
 			)
129 129
 		);
130
-		if ( function_exists( 'download_monitor' ) ) {
130
+		if (function_exists('download_monitor')) {
131 131
 			$page_url    = 'https://wordpress.org/plugins/download-monitor/';
132 132
 			$plugin_name = 'Download Monitor';
133 133
 			$description = sprintf(
134 134
 				/* translators: %s: The subscription info */
135
-				__( 'If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search' ),
135
+				__('If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search'),
136 136
 				$page_url,
137 137
 				$plugin_name
138 138
 			);
139 139
 			$cmb->add_field(
140 140
 				array(
141
-					'name'        => __( 'Default Meal Plan PDF', 'lsx-health-plan' ),
141
+					'name'        => __('Default Meal Plan PDF', 'lsx-health-plan'),
142 142
 					'description' => $description,
143 143
 					'id'          => 'download_meal',
144 144
 					'type'        => 'post_search_ajax',
145 145
 					'limit'       => 1,
146 146
 					'query_args'  => array(
147
-						'post_type'      => array( 'dlm_download' ),
148
-						'post_status'    => array( 'publish' ),
147
+						'post_type'      => array('dlm_download'),
148
+						'post_status'    => array('publish'),
149 149
 						'posts_per_page' => -1,
150 150
 					),
151
-					'after_row'   => __( '<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan' ),
151
+					'after_row'   => __('<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan'),
152 152
 				)
153 153
 			);
154 154
 		}
Please login to merge, or discard this patch.
classes/admin/settings/class-plan.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_plan_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_plan_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,23 +49,23 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Plan Filters', 'lsx-health-plan' ),
55
+				'name'        => __('Plan Filters', 'lsx-health-plan'),
56 56
 				'id'          => 'plan_filters_disabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Toggle the display of the tab filters on the post type archive.', 'lsx-health-plan' ),
60
+				'description' => __('Toggle the display of the tab filters on the post type archive.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 
64 64
 		$cmb->add_field(
65 65
 			array(
66 66
 				'before_row'  => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
67
-				'name'        =>  __( 'My Plan Slug', 'lsx-health-plan' ),
68
-				'description' => __( 'This will be the slug url for redirecting users after login, use the login page slug.', 'lsx-health-plan' ),
67
+				'name'        =>  __('My Plan Slug', 'lsx-health-plan'),
68
+				'description' => __('This will be the slug url for redirecting users after login, use the login page slug.', 'lsx-health-plan'),
69 69
 				'id'          => 'my_plan_slug',
70 70
 				'type'        => 'input',
71 71
 				'value'       => '',
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		);
75 75
 		$cmb->add_field(
76 76
 			array(
77
-				'name'    =>  __( 'Single Plan Slug', 'lsx-health-plan' ),
77
+				'name'    =>  __('Single Plan Slug', 'lsx-health-plan'),
78 78
 				'id'      => 'plan_single_slug',
79 79
 				'type'    => 'input',
80 80
 				'value'   => '',
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		);
84 84
 		$cmb->add_field(
85 85
 			array(
86
-				'name'    =>  __( 'Plans Archive Slug', 'lsx-health-plan' ),
86
+				'name'    =>  __('Plans Archive Slug', 'lsx-health-plan'),
87 87
 				'id'      => 'endpoint_plan_archive',
88 88
 				'type'    => 'input',
89 89
 				'value'   => '',
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		$cmb->add_field(
95 95
 			array(
96 96
 				'before_row' => '<h4><b><u>My Stats Options</u></b></h4>',
97
-				'name'       => __( 'Disable All Stats', 'lsx-health-plan' ),
97
+				'name'       => __('Disable All Stats', 'lsx-health-plan'),
98 98
 				'desc'       => 'Disable All Stats',
99 99
 				'id'         => 'disable_all_stats',
100 100
 				'type'       => 'checkbox',
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		);
105 105
 		$cmb->add_field(
106 106
 			array(
107
-				'name'    => __( 'Disable Weight', 'lsx-health-plan' ),
107
+				'name'    => __('Disable Weight', 'lsx-health-plan'),
108 108
 				'id'      => 'disable_weight_checkbox',
109 109
 				'type'    => 'checkbox',
110 110
 				'value'   => 1,
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		);
114 114
 		$cmb->add_field(
115 115
 			array(
116
-				'name'    => __( 'Disable Height', 'lsx-health-plan' ),
116
+				'name'    => __('Disable Height', 'lsx-health-plan'),
117 117
 				'id'      => 'disable_height_checkbox',
118 118
 				'type'    => 'checkbox',
119 119
 				'value'   => 1,
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		);
123 123
 		$cmb->add_field(
124 124
 			array(
125
-				'name'    => __( 'Disable Waist', 'lsx-health-plan' ),
125
+				'name'    => __('Disable Waist', 'lsx-health-plan'),
126 126
 				'id'      => 'disable_waist_checkbox',
127 127
 				'type'    => 'checkbox',
128 128
 				'value'   => 1,
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
 		);
132 132
 		$cmb->add_field(
133 133
 			array(
134
-				'name'      => __( 'Disable BMI', 'lsx-health-plan' ),
134
+				'name'      => __('Disable BMI', 'lsx-health-plan'),
135 135
 				'id'        => 'disable_bmi_checkbox',
136 136
 				'type'      => 'checkbox',
137 137
 				'value'     => 1,
138 138
 				'default'   => 0,
139
-				'after_row' => __( '<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan' ),
139
+				'after_row' => __('<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan'),
140 140
 			)
141 141
 		);
142 142
 	}
Please login to merge, or discard this patch.
classes/admin/settings/class-recipe.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_recipe_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_recipe_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Disable Recipes', 'lsx-health-plan' ),
55
+				'name'        => __('Disable Recipes', 'lsx-health-plan'),
56 56
 				'id'          => 'recipe_disabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Disable recipe post type if you are wanting a minimal site.', 'lsx-health-plan' ),
60
+				'description' => __('Disable recipe post type if you are wanting a minimal site.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 			array(
66 66
 				'id'          => 'recipe_archive_description',
67 67
 				'type'        => 'wysiwyg',
68
-				'name'        => __( 'Archive Description', 'lsx-health-plan' ),
69
-				'description' => __( 'This will show up on the post type archive.', 'lsx-health-plan' ),
68
+				'name'        => __('Archive Description', 'lsx-health-plan'),
69
+				'description' => __('This will show up on the post type archive.', 'lsx-health-plan'),
70 70
 				'options'     => array(
71 71
 					'textarea_rows' => get_option('default_post_edit_rows', 6),
72 72
 				),
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
 
76 76
 		$cmb->add_field(
77 77
 			array(
78
-				'name'    => __( 'Recipes Intro', 'lsx-health-plan' ),
78
+				'name'    => __('Recipes Intro', 'lsx-health-plan'),
79 79
 				'id'      => 'recipes_intro',
80 80
 				'type'    => 'textarea_small',
81 81
 				'value'   => '',
82
-				'default' => __( "Let's get cooking! Delicious and easy to follow recipes.", 'lsx-health-plan' ),
82
+				'default' => __("Let's get cooking! Delicious and easy to follow recipes.", 'lsx-health-plan'),
83 83
 			)
84 84
 		);
85 85
 
86 86
 		$cmb->add_field(
87 87
 			array(
88 88
 				'before_row' => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
89
-				'name'       =>  __( 'Recipes Slug', 'lsx-health-plan' ),
89
+				'name'       =>  __('Recipes Slug', 'lsx-health-plan'),
90 90
 				'id'         => 'endpoint_recipe',
91 91
 				'type'       => 'input',
92 92
 				'value'      => '',
@@ -97,40 +97,40 @@  discard block
 block discarded – undo
97 97
 		$cmb->add_field(
98 98
 			array(
99 99
 				'before_row'  => '<h4><b><u>Default Options</u></b></h4>',
100
-				'name'        => __( 'Recipe', 'lsx-health-plan' ),
101
-				'description' => __( 'Set a default recipe.', 'lsx-health-plan' ),
100
+				'name'        => __('Recipe', 'lsx-health-plan'),
101
+				'description' => __('Set a default recipe.', 'lsx-health-plan'),
102 102
 				'limit'       => 1,
103 103
 				'id'          => 'connected_recipes',
104 104
 				'type'        => 'post_search_ajax',
105 105
 				'query_args'  => array(
106 106
 					'post_type'      => 'recipe',
107
-					'post_status'    => array( 'publish' ),
107
+					'post_status'    => array('publish'),
108 108
 					'posts_per_page' => -1,
109 109
 				),
110 110
 			)
111 111
 		);
112
-		if ( function_exists( 'download_monitor' ) ) {
112
+		if (function_exists('download_monitor')) {
113 113
 			$page_url    = 'https://wordpress.org/plugins/download-monitor/';
114 114
 			$plugin_name = 'Download Monitor';
115 115
 			$description = sprintf(
116 116
 				/* translators: %s: The subscription info */
117
-				__( 'If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your recipe here.', 'lsx-search' ),
117
+				__('If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your recipe here.', 'lsx-search'),
118 118
 				$page_url,
119 119
 				$plugin_name
120 120
 			);
121 121
 			$cmb->add_field(
122 122
 				array(
123
-					'name'        => __( 'Default Recipe PDF', 'lsx-health-plan' ),
123
+					'name'        => __('Default Recipe PDF', 'lsx-health-plan'),
124 124
 					'description' => $description,
125 125
 					'id'          => 'download_recipe',
126 126
 					'type'        => 'post_search_ajax',
127 127
 					'limit'       => 1,
128 128
 					'query_args'  => array(
129
-						'post_type'      => array( 'dlm_download' ),
130
-						'post_status'    => array( 'publish' ),
129
+						'post_type'      => array('dlm_download'),
130
+						'post_status'    => array('publish'),
131 131
 						'posts_per_page' => -1,
132 132
 					),
133
-					'after_row'   => __( '<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan' ),
133
+					'after_row'   => __('<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan'),
134 134
 				)
135 135
 			);
136 136
 		}
Please login to merge, or discard this patch.