@@ -6,29 +6,29 @@ |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | |
9 | -$this_post_type = get_post_type( get_the_ID() ); |
|
9 | +$this_post_type = get_post_type(get_the_ID()); |
|
10 | 10 | |
11 | -$connected_tips = get_post_meta( get_the_ID(), ( $this_post_type . '_connected_tips' ), true ); |
|
11 | +$connected_tips = get_post_meta(get_the_ID(), ($this_post_type . '_connected_tips'), true); |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 | <div id="lsx-tips-shortcode" class="daily-plan-block"> |
15 | 15 | <div class="lsx-tips-shortcode lsx-tips-slider slick-slider slick-dotted" > |
16 | 16 | <?php |
17 | 17 | if (is_array($connected_tips) || is_object($connected_tips)) { |
18 | - foreach ( $connected_tips as $tip ) { |
|
19 | - $tip_link = get_permalink( $tip ); |
|
20 | - $tip_name = get_the_title( $tip ); |
|
21 | - $tip_content = get_post_field( 'post_content', $tip ); |
|
18 | + foreach ($connected_tips as $tip) { |
|
19 | + $tip_link = get_permalink($tip); |
|
20 | + $tip_name = get_the_title($tip); |
|
21 | + $tip_content = get_post_field('post_content', $tip); |
|
22 | 22 | $icon = LSX_HEALTH_PLAN_URL . 'assets/images/tips-icon.svg'; |
23 | 23 | ?> |
24 | 24 | <div class="content-box diet-tip-wrapper quick-tip"> |
25 | 25 | <div class="row"> |
26 | 26 | <div class="col-xs-2"> |
27 | - <img loading="lazy" src="<?php echo esc_url( $icon ); ?>" alt="tip"/> |
|
27 | + <img loading="lazy" src="<?php echo esc_url($icon); ?>" alt="tip"/> |
|
28 | 28 | </div> |
29 | 29 | <div class="col-xs-10"> |
30 | - <h3 class="tip-title"><?php echo esc_html( $tip_name ); ?></h3> |
|
31 | - <?php echo wp_kses_post( $tip_content ); ?> |
|
30 | + <h3 class="tip-title"><?php echo esc_html($tip_name); ?></h3> |
|
31 | + <?php echo wp_kses_post($tip_content); ?> |
|
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | </div> |
@@ -23,26 +23,26 @@ discard block |
||
23 | 23 | ); |
24 | 24 | |
25 | 25 | // If we are calling the exercises with the parent workout. |
26 | -if ( false !== 'parent' && 'exercise' === $args['post_type'] ) { |
|
27 | - $items = \lsx_health_plan\functions\get_exercises_by_workout( $args['parent'] ); |
|
28 | - if ( ! empty( $items ) ) { |
|
26 | +if (false !== 'parent' && 'exercise' === $args['post_type']) { |
|
27 | + $items = \lsx_health_plan\functions\get_exercises_by_workout($args['parent']); |
|
28 | + if ( ! empty($items)) { |
|
29 | 29 | $args['include'] = $items; |
30 | 30 | } |
31 | 31 | } |
32 | 32 | |
33 | -if ( isset( $args['include'] ) && ( '' !== $args['include'] ) ) { |
|
34 | - if ( is_array( $args['include'] ) ) { |
|
33 | +if (isset($args['include']) && ('' !== $args['include'])) { |
|
34 | + if (is_array($args['include'])) { |
|
35 | 35 | $include = $args['include']; |
36 | 36 | } else { |
37 | - $include = explode( ',', $args['include'] ); |
|
37 | + $include = explode(',', $args['include']); |
|
38 | 38 | } |
39 | 39 | $include_filter = $include; |
40 | 40 | $query_array['post__in'] = $include_filter; |
41 | 41 | $query_array['orderby'] = 'post__in'; |
42 | 42 | } |
43 | 43 | |
44 | -if ( isset( $taxonomy ) && ( '' !== $taxonomy ) && isset( $term ) && ( '' !== $term ) ) { |
|
45 | - $taxonomy_filter = array( |
|
44 | +if (isset($taxonomy) && ('' !== $taxonomy) && isset($term) && ('' !== $term)) { |
|
45 | + $taxonomy_filter = array( |
|
46 | 46 | array( |
47 | 47 | 'taxonomy' => $taxonomy, |
48 | 48 | 'field' => 'slug', |
@@ -52,16 +52,16 @@ discard block |
||
52 | 52 | $query_array['tax_query'] = $taxonomy_filter; |
53 | 53 | } |
54 | 54 | |
55 | -$exercises = new WP_Query( $query_array ); |
|
55 | +$exercises = new WP_Query($query_array); |
|
56 | 56 | ?> |
57 | 57 | |
58 | -<div id="lsx-exercises-shortcode" class="daily-plan-block layout-<?php echo esc_html( $args['layout'] ); ?> columns-<?php echo esc_html( $args['columns'] ); ?> shortcode-type-<?php echo esc_html( $args['post_type'] ); ?>"> |
|
58 | +<div id="lsx-exercises-shortcode" class="daily-plan-block layout-<?php echo esc_html($args['layout']); ?> columns-<?php echo esc_html($args['columns']); ?> shortcode-type-<?php echo esc_html($args['post_type']); ?>"> |
|
59 | 59 | <div class="lsx-exercises-shortcode" > |
60 | 60 | <?php |
61 | - if ( $exercises->have_posts() ) { |
|
62 | - while ( $exercises->have_posts() ) { |
|
61 | + if ($exercises->have_posts()) { |
|
62 | + while ($exercises->have_posts()) { |
|
63 | 63 | $exercises->the_post(); |
64 | - switch ( $args['post_type'] ) { |
|
64 | + switch ($args['post_type']) { |
|
65 | 65 | case 'workout': |
66 | 66 | include LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php'; |
67 | 67 | break; |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | ?> |
91 | 91 | </div> |
92 | 92 | <?php |
93 | - if ( isset( $args['view_more'] ) && false !== $args['view_more'] ) { |
|
93 | + if (isset($args['view_more']) && false !== $args['view_more']) { |
|
94 | 94 | ?> |
95 | 95 | <div class="col-md-12"> |
96 | - <a class="<?php echo esc_html( $link_class ); ?>" href="<?php echo esc_url( get_post_type_archive_link( $args['post_type'] ) ); ?>"><?php echo esc_html_e( 'Show More', 'lsx-health-plan' ); ?></a> |
|
96 | + <a class="<?php echo esc_html($link_class); ?>" href="<?php echo esc_url(get_post_type_archive_link($args['post_type'])); ?>"><?php echo esc_html_e('Show More', 'lsx-health-plan'); ?></a> |
|
97 | 97 | </div> |
98 | 98 | <?php |
99 | 99 | } |
@@ -1,17 +1,17 @@ discard block |
||
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 |
||
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' ); ?> </td> |
|
31 | + <td><?php esc_html_e('Serves:', 'lsx-health-plan'); ?> </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' ); ?> </td> |
|
42 | + <td><?php esc_html_e('Prep time: ', 'lsx-health-plan'); ?> </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 |
||
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' ); ?> </td> |
|
56 | + <td><?php esc_html_e('Cooking time: ', 'lsx-health-plan'); ?> </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 |
||
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' ); ?> </td> |
|
70 | + <td><?php esc_html_e('Portion size: ', 'lsx-health-plan'); ?> </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 |
||
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 |
||
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' ); ?> </td> |
|
95 | + <td><?php esc_html_e('Energy: ', 'lsx-health-plan'); ?> </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 |
||
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' ); ?> </td> |
|
109 | + <td><?php esc_html_e('Protein: ', 'lsx-health-plan'); ?> </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 |
||
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' ); ?> </td> |
|
123 | + <td><?php esc_html_e('Carbohydrates: ', 'lsx-health-plan'); ?> </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 |
||
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' ); ?> </td> |
|
137 | + <td><?php esc_html_e('Fibre: ', 'lsx-health-plan'); ?> </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 |
||
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' ); ?> </td> |
|
151 | + <td><?php esc_html_e('Fat: ', 'lsx-health-plan'); ?> </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> |
@@ -7,11 +7,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -12,31 +12,31 @@ discard block |
||
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 |
||
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> |
@@ -20,17 +20,17 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * Constructor |
26 | 26 | */ |
27 | 27 | public function __construct() { |
28 | - add_action( 'lsx_hp_settings_page_exercise_top', array( $this, 'settings' ), 1, 1 ); |
|
28 | + add_action('lsx_hp_settings_page_exercise_top', array($this, 'settings'), 1, 1); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -37,7 +37,7 @@ discard block |
||
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 |
||
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' => __( 'Exercises', 'lsx-health-plan' ), |
|
55 | + 'name' => __('Exercises', 'lsx-health-plan'), |
|
56 | 56 | 'id' => 'exercise_enabled', |
57 | 57 | 'type' => 'checkbox', |
58 | 58 | 'value' => 1, |
59 | 59 | 'default' => 0, |
60 | - 'description' => __( 'Enabling the exercise post type will automatically replace the Video post type.', 'lsx-health-plan' ), |
|
60 | + 'description' => __('Enabling the exercise post type will automatically replace the Video post type.', 'lsx-health-plan'), |
|
61 | 61 | ) |
62 | 62 | ); |
63 | 63 | $cmb->add_field( |
64 | 64 | array( |
65 | 65 | 'id' => 'exercise_archive_description', |
66 | 66 | 'type' => 'wysiwyg', |
67 | - 'name' => __( 'Archive Description', 'lsx-health-plan' ), |
|
68 | - 'description' => __( 'This will show up on the post type archive.', 'lsx-health-plan' ), |
|
67 | + 'name' => __('Archive Description', 'lsx-health-plan'), |
|
68 | + 'description' => __('This will show up on the post type archive.', 'lsx-health-plan'), |
|
69 | 69 | 'options' => array( |
70 | 70 | 'textarea_rows' => get_option('default_post_edit_rows', 6), |
71 | 71 | ), |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $cmb->add_field( |
75 | 75 | array( |
76 | 76 | '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>', |
77 | - 'name' => __( 'Single Exercise Slug', 'lsx-health-plan' ), |
|
77 | + 'name' => __('Single Exercise Slug', 'lsx-health-plan'), |
|
78 | 78 | 'id' => 'endpoint_exercise_single', |
79 | 79 | 'type' => 'input', |
80 | 80 | 'value' => '', |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | ); |
84 | 84 | $cmb->add_field( |
85 | 85 | array( |
86 | - 'name' => __( 'Archive Exercise Slug', 'lsx-health-plan' ), |
|
86 | + 'name' => __('Archive Exercise Slug', 'lsx-health-plan'), |
|
87 | 87 | 'id' => 'endpoint_exercise_archive', |
88 | 88 | 'type' => 'input', |
89 | 89 | 'value' => '', |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | ); |
93 | 93 | $cmb->add_field( |
94 | 94 | array( |
95 | - 'name' => __( 'Exercise Type Slug', 'lsx-health-plan' ), |
|
95 | + 'name' => __('Exercise Type Slug', 'lsx-health-plan'), |
|
96 | 96 | 'id' => 'endpoint_exercise_type', |
97 | 97 | 'type' => 'input', |
98 | 98 | 'value' => '', |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | ); |
102 | 102 | $cmb->add_field( |
103 | 103 | array( |
104 | - 'name' => __( 'Equipment Slug', 'lsx-health-plan' ), |
|
104 | + 'name' => __('Equipment Slug', 'lsx-health-plan'), |
|
105 | 105 | 'id' => 'endpoint_exercise_equipment', |
106 | 106 | 'type' => 'input', |
107 | 107 | 'value' => '', |
@@ -110,12 +110,12 @@ discard block |
||
110 | 110 | ); |
111 | 111 | $cmb->add_field( |
112 | 112 | array( |
113 | - 'name' => __( 'Muscle Group Slug', 'lsx-health-plan' ), |
|
113 | + 'name' => __('Muscle Group Slug', 'lsx-health-plan'), |
|
114 | 114 | 'id' => 'endpoint_exercise_musclegroup', |
115 | 115 | 'type' => 'input', |
116 | 116 | 'value' => '', |
117 | 117 | 'default' => 'muscle-group', |
118 | - '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' ), |
|
118 | + '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'), |
|
119 | 119 | ) |
120 | 120 | ); |
121 | 121 | } |