@@ -28,35 +28,35 @@ discard block |
||
| 28 | 28 | ?> |
| 29 | 29 | <div class="single-plan-inner workout-content"> |
| 30 | 30 | <?php |
| 31 | - if ( ! is_singular( 'workout' ) ) { ?> |
|
| 31 | + if ( ! is_singular('workout')) { ?> |
|
| 32 | 32 | <div class="single-plan-section-title workout"> |
| 33 | - <?php lsx_get_svg_icon( 'work.svg' ); ?> |
|
| 34 | - <h2 class="title-lined"><?php esc_html_e( 'My Workout', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2> |
|
| 33 | + <?php lsx_get_svg_icon('work.svg'); ?> |
|
| 34 | + <h2 class="title-lined"><?php esc_html_e('My Workout', 'lsx-health-plan'); ?> <span class="blue-title"><?php the_title(); ?></span></h2> |
|
| 35 | 35 | </div> |
| 36 | 36 | <?php } ?> |
| 37 | 37 | <?php |
| 38 | - if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) { |
|
| 38 | + if (lsx_health_plan_has_warmup() && ( ! is_singular('workout'))) { |
|
| 39 | 39 | ?> |
| 40 | 40 | <div class="workout-instructions"> |
| 41 | 41 | <div class="row"> |
| 42 | 42 | <div class="col-md-6"> |
| 43 | - <h3><?php esc_html_e( "Don't forget your warm up!", 'lsx-health-plan' ); ?></h3> |
|
| 44 | - <p><?php esc_html_e( 'Be sure to do the warm-up before every workout session.', 'lsx-health-plan' ); ?></p> |
|
| 43 | + <h3><?php esc_html_e("Don't forget your warm up!", 'lsx-health-plan'); ?></h3> |
|
| 44 | + <p><?php esc_html_e('Be sure to do the warm-up before every workout session.', 'lsx-health-plan'); ?></p> |
|
| 45 | 45 | </div> |
| 46 | 46 | <div class="col-md-6"> |
| 47 | 47 | <div class="single-plan-inner-buttons"> |
| 48 | 48 | <?php |
| 49 | - $download = \lsx_health_plan\functions\get_option( 'download_page', false ); |
|
| 50 | - if ( ! empty( $download ) ) { |
|
| 49 | + $download = \lsx_health_plan\functions\get_option('download_page', false); |
|
| 50 | + if ( ! empty($download)) { |
|
| 51 | 51 | ?> |
| 52 | 52 | <div class="complete-plan-btn"> |
| 53 | 53 | <?php |
| 54 | - echo wp_kses_post( do_shortcode( '[download id="' . $download . '"]' ) ); |
|
| 54 | + echo wp_kses_post(do_shortcode('[download id="' . $download . '"]')); |
|
| 55 | 55 | ?> |
| 56 | 56 | </div> |
| 57 | 57 | <?php } ?> |
| 58 | 58 | <div class="back-plan-btn"> |
| 59 | - <a class="btn secondary-btn wrm-up-btn" href="<?php the_permalink(); ?>warm-up/"><?php esc_html_e( 'See Warm-Up', 'lsx-health-plan' ); ?></a> |
|
| 59 | + <a class="btn secondary-btn wrm-up-btn" href="<?php the_permalink(); ?>warm-up/"><?php esc_html_e('See Warm-Up', 'lsx-health-plan'); ?></a> |
|
| 60 | 60 | </div> |
| 61 | 61 | </div> |
| 62 | 62 | </div> |
@@ -66,32 +66,32 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | ?> |
| 68 | 68 | <!-- Pre Workout--> |
| 69 | - <?php lsx_workout_snacks( 'pre' ); ?> |
|
| 69 | + <?php lsx_workout_snacks('pre'); ?> |
|
| 70 | 70 | |
| 71 | 71 | <?php lsx_health_plan_workout_sets(); ?> |
| 72 | 72 | |
| 73 | 73 | <!-- Post Workout--> |
| 74 | - <?php lsx_workout_snacks( 'post' ); ?> |
|
| 74 | + <?php lsx_workout_snacks('post'); ?> |
|
| 75 | 75 | </div> |
| 76 | 76 | |
| 77 | 77 | </div><!-- .entry-content --> |
| 78 | 78 | |
| 79 | 79 | <footer class="footer-meta clearfix"> |
| 80 | - <?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
| 80 | + <?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
| 81 | 81 | <div class="post-tags-wrapper"> |
| 82 | 82 | <?php lsx_content_post_tags(); ?> |
| 83 | 83 | |
| 84 | 84 | <?php |
| 85 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
| 85 | + if (class_exists('LSX_Sharing')) { |
|
| 86 | 86 | lsx_content_sharing(); |
| 87 | 87 | } else { |
| 88 | - if ( function_exists( 'sharing_display' ) ) { |
|
| 89 | - sharing_display( '', true ); |
|
| 88 | + if (function_exists('sharing_display')) { |
|
| 89 | + sharing_display('', true); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 92 | + if (class_exists('Jetpack_Likes')) { |
|
| 93 | 93 | $custom_likes = new Jetpack_Likes(); |
| 94 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
| 94 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | ?> |
@@ -14,13 +14,13 @@ discard block |
||
| 14 | 14 | $redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id; |
| 15 | 15 | ?> |
| 16 | 16 | |
| 17 | - <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
| 17 | + <div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
| 18 | 18 | |
| 19 | 19 | <?php lsx_content_before(); ?> |
| 20 | 20 | |
| 21 | 21 | <!-- Begining restricted content --> |
| 22 | 22 | <?php |
| 23 | - if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) { |
|
| 23 | + if (current_user_can('wc_memberships_view_restricted_post_content', $post_id)) { |
|
| 24 | 24 | ?> |
| 25 | 25 | <main id="main" role="main"> |
| 26 | 26 | |
@@ -28,9 +28,9 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | <div class="post-wrapper archive-plan"> |
| 30 | 30 | <div class="row"> |
| 31 | - <?php if ( have_posts() ) : ?> |
|
| 31 | + <?php if (have_posts()) : ?> |
|
| 32 | 32 | <?php |
| 33 | - while ( have_posts() ) : |
|
| 33 | + while (have_posts()) : |
|
| 34 | 34 | the_post(); |
| 35 | 35 | ?> |
| 36 | 36 | |
@@ -40,7 +40,7 @@ discard block |
||
| 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 |
||
| 52 | 52 | |
| 53 | 53 | <?php |
| 54 | 54 | } else { |
| 55 | - wp_redirect( $redirect ); |
|
| 55 | + wp_redirect($redirect); |
|
| 56 | 56 | exit; |
| 57 | 57 | } |
| 58 | 58 | ?> |
@@ -38,9 +38,12 @@ |
||
| 38 | 38 | |
| 39 | 39 | <?php endwhile; ?> |
| 40 | 40 | |
| 41 | - <?php else : ?> |
|
| 41 | + <?php else { |
|
| 42 | + : ?> |
|
| 42 | 43 | |
| 43 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
| 44 | + <?php get_template_part( 'partials/content', 'none' ); |
|
| 45 | +} |
|
| 46 | +?> |
|
| 44 | 47 | |
| 45 | 48 | <?php endif; ?> |
| 46 | 49 | </div> |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | <div class="entry-content"> |
| 18 | 18 | <div class="single-plan-section-title meal-plan"> |
| 19 | - <?php lsx_get_svg_icon( 'meal.svg' ); ?> |
|
| 20 | - <h2 class="title-lined"><?php esc_html_e( 'My Meal Plan', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2> |
|
| 19 | + <?php lsx_get_svg_icon('meal.svg'); ?> |
|
| 20 | + <h2 class="title-lined"><?php esc_html_e('My Meal Plan', 'lsx-health-plan'); ?> <span class="blue-title"><?php the_title(); ?></span></h2> |
|
| 21 | 21 | </div> |
| 22 | 22 | <div class="single-plan-inner meal-content"> |
| 23 | 23 | <?php require LSX_HEALTH_PLAN_PATH . 'templates/partials/meal-plans.php'; ?> |
@@ -25,21 +25,21 @@ discard block |
||
| 25 | 25 | </div><!-- .entry-content --> |
| 26 | 26 | |
| 27 | 27 | <footer class="footer-meta clearfix"> |
| 28 | - <?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
| 28 | + <?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
| 29 | 29 | <div class="post-tags-wrapper"> |
| 30 | 30 | <?php lsx_content_post_tags(); ?> |
| 31 | 31 | |
| 32 | 32 | <?php |
| 33 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
| 33 | + if (class_exists('LSX_Sharing')) { |
|
| 34 | 34 | lsx_content_sharing(); |
| 35 | 35 | } else { |
| 36 | - if ( function_exists( 'sharing_display' ) ) { |
|
| 37 | - sharing_display( '', true ); |
|
| 36 | + if (function_exists('sharing_display')) { |
|
| 37 | + sharing_display('', true); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
| 40 | + if (class_exists('Jetpack_Likes')) { |
|
| 41 | 41 | $custom_likes = new Jetpack_Likes(); |
| 42 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
| 42 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | ?> |
@@ -5,17 +5,17 @@ discard block |
||
| 5 | 5 | $muscle_group = lsx_health_plan_muscle_group_equipment(); |
| 6 | 6 | |
| 7 | 7 | ?> |
| 8 | -<?php if ( ( ! empty( $type ) ) || ( ! empty( $equipment ) ) || ( ! empty( $muscle_group ) ) ) { ?> |
|
| 8 | +<?php if (( ! empty($type)) || ( ! empty($equipment)) || ( ! empty($muscle_group))) { ?> |
|
| 9 | 9 | <table class="exercise-table"> |
| 10 | 10 | <tbody> |
| 11 | 11 | <?php |
| 12 | - if ( ! empty( $type ) ) { |
|
| 12 | + if ( ! empty($type)) { |
|
| 13 | 13 | ?> |
| 14 | 14 | <tr class="types"> |
| 15 | - <td><?php esc_html_e( 'Type:', 'lsx-health-plan' ); ?> </td> |
|
| 15 | + <td><?php esc_html_e('Type:', 'lsx-health-plan'); ?> </td> |
|
| 16 | 16 | <td> |
| 17 | 17 | <?php |
| 18 | - echo wp_kses_post( $type ); |
|
| 18 | + echo wp_kses_post($type); |
|
| 19 | 19 | ?> |
| 20 | 20 | </td> |
| 21 | 21 | </tr> |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | ?> |
| 25 | 25 | <?php |
| 26 | - if ( ! empty( $muscle_group ) ) { |
|
| 26 | + if ( ! empty($muscle_group)) { |
|
| 27 | 27 | ?> |
| 28 | 28 | <tr class="muscle-group"> |
| 29 | - <td><?php esc_html_e( 'Muscle Group:', 'lsx-health-plan' ); ?> </td> |
|
| 29 | + <td><?php esc_html_e('Muscle Group:', 'lsx-health-plan'); ?> </td> |
|
| 30 | 30 | <td> |
| 31 | 31 | <?php |
| 32 | - echo wp_kses_post( $muscle_group ); |
|
| 32 | + echo wp_kses_post($muscle_group); |
|
| 33 | 33 | ?> |
| 34 | 34 | </td> |
| 35 | 35 | </tr> |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | ?> |
| 39 | 39 | <?php |
| 40 | - if ( ! empty( $equipment ) ) { |
|
| 40 | + if ( ! empty($equipment)) { |
|
| 41 | 41 | ?> |
| 42 | 42 | <tr class="equipment"> |
| 43 | - <td><?php esc_html_e( 'Equipment:', 'lsx-health-plan' ); ?> </td> |
|
| 43 | + <td><?php esc_html_e('Equipment:', 'lsx-health-plan'); ?> </td> |
|
| 44 | 44 | <td> |
| 45 | 45 | <?php |
| 46 | - echo wp_kses_post( $equipment ); |
|
| 46 | + echo wp_kses_post($equipment); |
|
| 47 | 47 | ?> |
| 48 | 48 | </td> |
| 49 | 49 | </tr> |
@@ -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> |
@@ -8,42 +8,42 @@ |
||
| 8 | 8 | ?> |
| 9 | 9 | <div id="single-plan-nav"> |
| 10 | 10 | <ul class="nav nav-pills"> |
| 11 | - <li class="<?php lsx_health_plan_nav_class( '' ); ?>"><a class="overview-tab" href="<?php the_permalink(); ?>"><?php lsx_get_svg_icon( 'eye.svg' ); ?> <?php esc_html_e( 'Overview', 'lsx-health-plan' ); ?></a></li> |
|
| 11 | + <li class="<?php lsx_health_plan_nav_class(''); ?>"><a class="overview-tab" href="<?php the_permalink(); ?>"><?php lsx_get_svg_icon('eye.svg'); ?> <?php esc_html_e('Overview', 'lsx-health-plan'); ?></a></li> |
|
| 12 | 12 | <?php |
| 13 | - if ( lsx_health_plan_has_warmup() ) { |
|
| 14 | - $warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false ); |
|
| 15 | - if ( false === $warm_up ) { |
|
| 13 | + if (lsx_health_plan_has_warmup()) { |
|
| 14 | + $warm_up = \lsx_health_plan\functions\get_option('endpoint_warm_up', false); |
|
| 15 | + if (false === $warm_up) { |
|
| 16 | 16 | $warm_up = 'warm-up'; |
| 17 | 17 | } |
| 18 | 18 | ?> |
| 19 | - <li class="<?php lsx_health_plan_nav_class( 'warm-up' ); ?>"><a class="warm-up-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $warm_up ); ?>/"><?php lsx_get_svg_icon( 'warm.svg' ); ?> <?php esc_html_e( 'Warm-up', 'lsx-health-plan' ); ?></a></li> |
|
| 19 | + <li class="<?php lsx_health_plan_nav_class('warm-up'); ?>"><a class="warm-up-tab" href="<?php the_permalink(); ?><?php echo esc_attr($warm_up); ?>/"><?php lsx_get_svg_icon('warm.svg'); ?> <?php esc_html_e('Warm-up', 'lsx-health-plan'); ?></a></li> |
|
| 20 | 20 | <?php |
| 21 | 21 | } |
| 22 | - if ( lsx_health_plan_has_workout() ) { |
|
| 23 | - $workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false ); |
|
| 24 | - if ( false === $workout ) { |
|
| 22 | + if (lsx_health_plan_has_workout()) { |
|
| 23 | + $workout = \lsx_health_plan\functions\get_option('endpoint_workout', false); |
|
| 24 | + if (false === $workout) { |
|
| 25 | 25 | $workout = 'workout'; |
| 26 | 26 | } |
| 27 | 27 | ?> |
| 28 | - <li class="<?php lsx_health_plan_nav_class( 'workout' ); ?>"><a class="workout-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $workout ); ?>/"><?php lsx_get_svg_icon( 'work.svg' ); ?> <?php esc_html_e( 'Workout', 'lsx-health-plan' ); ?></a></li> |
|
| 28 | + <li class="<?php lsx_health_plan_nav_class('workout'); ?>"><a class="workout-tab" href="<?php the_permalink(); ?><?php echo esc_attr($workout); ?>/"><?php lsx_get_svg_icon('work.svg'); ?> <?php esc_html_e('Workout', 'lsx-health-plan'); ?></a></li> |
|
| 29 | 29 | <?php |
| 30 | 30 | } |
| 31 | - if ( lsx_health_plan_has_meal() ) { |
|
| 32 | - $meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false ); |
|
| 33 | - if ( false === $meal ) { |
|
| 31 | + if (lsx_health_plan_has_meal()) { |
|
| 32 | + $meal = \lsx_health_plan\functions\get_option('endpoint_meal', false); |
|
| 33 | + if (false === $meal) { |
|
| 34 | 34 | $meal = 'meal'; |
| 35 | 35 | } |
| 36 | 36 | ?> |
| 37 | - <li class="<?php lsx_health_plan_nav_class( 'meal' ); ?>"><a class="meal-plan-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $meal ); ?>/"><?php lsx_get_svg_icon( 'meal.svg' ); ?> <?php esc_html_e( 'Meal Plan', 'lsx-health-plan' ); ?></a></li> |
|
| 37 | + <li class="<?php lsx_health_plan_nav_class('meal'); ?>"><a class="meal-plan-tab" href="<?php the_permalink(); ?><?php echo esc_attr($meal); ?>/"><?php lsx_get_svg_icon('meal.svg'); ?> <?php esc_html_e('Meal Plan', 'lsx-health-plan'); ?></a></li> |
|
| 38 | 38 | <?php |
| 39 | 39 | } |
| 40 | - if ( lsx_health_plan_has_recipe() ) { |
|
| 41 | - $recipe = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false ); |
|
| 42 | - if ( false === $recipe ) { |
|
| 40 | + if (lsx_health_plan_has_recipe()) { |
|
| 41 | + $recipe = \lsx_health_plan\functions\get_option('endpoint_recipe', false); |
|
| 42 | + if (false === $recipe) { |
|
| 43 | 43 | $recipe = 'recipes'; |
| 44 | 44 | } |
| 45 | 45 | ?> |
| 46 | - <li class="<?php lsx_health_plan_nav_class( 'recipes' ); ?>"><a class="recipes-tab" href="<?php the_permalink(); ?><?php echo esc_attr( $recipe ); ?>/"><?php lsx_get_svg_icon( 'recipes.svg' ); ?> <?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?></a></li> |
|
| 46 | + <li class="<?php lsx_health_plan_nav_class('recipes'); ?>"><a class="recipes-tab" href="<?php the_permalink(); ?><?php echo esc_attr($recipe); ?>/"><?php lsx_get_svg_icon('recipes.svg'); ?> <?php esc_html_e('Recipes', 'lsx-health-plan'); ?></a></li> |
|
| 47 | 47 | <?php |
| 48 | 48 | } |
| 49 | 49 | ?> |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | function restricted_content() { |
| 16 | 16 | $content = ''; |
| 17 | - if ( ! is_user_logged_in() ) { |
|
| 17 | + if ( ! is_user_logged_in()) { |
|
| 18 | 18 | ob_start(); |
| 19 | - echo do_shortcode( '[woocommerce_my_account]' ); |
|
| 19 | + echo do_shortcode('[woocommerce_my_account]'); |
|
| 20 | 20 | $content = ob_get_clean(); |
| 21 | 21 | } |
| 22 | 22 | return $content; |
@@ -51,17 +51,17 @@ discard block |
||
| 51 | 51 | * |
| 52 | 52 | * @return void |
| 53 | 53 | */ |
| 54 | -function day_plan_box( $args = array() ) { |
|
| 54 | +function day_plan_box($args = array()) { |
|
| 55 | 55 | $defaults = array( |
| 56 | 56 | 'week_view' => false, |
| 57 | 57 | 'show_downloads' => false, |
| 58 | 58 | ); |
| 59 | - $args = wp_parse_args( $args, $defaults ); |
|
| 59 | + $args = wp_parse_args($args, $defaults); |
|
| 60 | 60 | ob_start(); |
| 61 | - if ( false === $args['week_view'] ) { |
|
| 61 | + if (false === $args['week_view']) { |
|
| 62 | 62 | echo lsx_health_plan_day_plan_block(); // WPCS: XSS OK. |
| 63 | 63 | } else { |
| 64 | - echo lsx_health_plan_week_plan_block( $args ); // WPCS: XSS OK. |
|
| 64 | + echo lsx_health_plan_week_plan_block($args); // WPCS: XSS OK. |
|
| 65 | 65 | } |
| 66 | 66 | $content = ob_get_clean(); |
| 67 | 67 | return $content; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * @param array $args |
| 74 | 74 | * @return void |
| 75 | 75 | */ |
| 76 | -function exercise_box( $args = array() ) { |
|
| 76 | +function exercise_box($args = array()) { |
|
| 77 | 77 | $defaults = array( |
| 78 | 78 | 'include' => '', |
| 79 | 79 | 'term' => '', |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | 'parent' => false, |
| 93 | 93 | 'modal_content' => 'excerpt', |
| 94 | 94 | ); |
| 95 | - $args = wp_parse_args( $args, $defaults ); |
|
| 95 | + $args = wp_parse_args($args, $defaults); |
|
| 96 | 96 | ob_start(); |
| 97 | - echo lsx_health_plan_items( $args ); // WPCS: XSS OK. |
|
| 97 | + echo lsx_health_plan_items($args); // WPCS: XSS OK. |
|
| 98 | 98 | $content = ob_get_clean(); |
| 99 | 99 | return $content; |
| 100 | 100 | } |
@@ -109,8 +109,8 @@ discard block |
||
| 109 | 109 | echo lsx_health_plan_featured_video_block(); // WPCS: XSS OK. |
| 110 | 110 | $content = ob_get_clean(); |
| 111 | 111 | |
| 112 | - wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true ); |
|
| 113 | - wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true ); |
|
| 112 | + wp_enqueue_script('slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array('jquery'), LSX_HEALTH_PLAN_VER, true); |
|
| 113 | + wp_enqueue_script('lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array('slick'), LSX_HEALTH_PLAN_VER, true); |
|
| 114 | 114 | return $content; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | ob_start(); |
| 124 | 124 | echo lsx_health_plan_featured_recipes_block(); // WPCS: XSS OK. |
| 125 | 125 | $content = ob_get_clean(); |
| 126 | - wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true ); |
|
| 127 | - wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true ); |
|
| 126 | + wp_enqueue_script('slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array('jquery'), LSX_HEALTH_PLAN_VER, true); |
|
| 127 | + wp_enqueue_script('lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array('slick'), LSX_HEALTH_PLAN_VER, true); |
|
| 128 | 128 | return $content; |
| 129 | 129 | } |
| 130 | 130 | |
@@ -137,8 +137,8 @@ discard block |
||
| 137 | 137 | ob_start(); |
| 138 | 138 | echo lsx_health_plan_featured_tips_block(); // WPCS: XSS OK. |
| 139 | 139 | $content = ob_get_clean(); |
| 140 | - wp_enqueue_script( 'slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array( 'jquery' ), LSX_HEALTH_PLAN_VER, true ); |
|
| 141 | - wp_enqueue_script( 'lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array( 'slick' ), LSX_HEALTH_PLAN_VER, true ); |
|
| 140 | + wp_enqueue_script('slick', LSX_HEALTH_PLAN_URL . 'assets/js/slick.min.js', array('jquery'), LSX_HEALTH_PLAN_VER, true); |
|
| 141 | + wp_enqueue_script('lsx-health-plan-slider', LSX_HEALTH_PLAN_URL . 'assets/js/lsx-health-plan-slider.min.js', array('slick'), LSX_HEALTH_PLAN_VER, true); |
|
| 142 | 142 | return $content; |
| 143 | 143 | } |
| 144 | 144 | |
@@ -149,8 +149,8 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | function account_notices() { |
| 151 | 151 | $content = ''; |
| 152 | - if ( function_exists( 'wc_print_notices' ) ) { |
|
| 153 | - $content = wc_print_notices( true ); |
|
| 152 | + if (function_exists('wc_print_notices')) { |
|
| 153 | + $content = wc_print_notices(true); |
|
| 154 | 154 | } |
| 155 | 155 | return $content; |
| 156 | 156 | } |
@@ -14,23 +14,23 @@ discard block |
||
| 14 | 14 | ?> |
| 15 | 15 | <div class="col-md-4" > |
| 16 | 16 | <div class="lsx-health-plan-box"> |
| 17 | - <h3 class="title warm-up-title title-lined"><?php esc_html_e( 'Your Warm-up', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'warm.svg' ); ?></h3> |
|
| 17 | + <h3 class="title warm-up-title title-lined"><?php esc_html_e('Your Warm-up', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('warm.svg'); ?></h3> |
|
| 18 | 18 | <div class="spacer"></div> |
| 19 | 19 | <?php |
| 20 | - $intro_text = \lsx_health_plan\functions\get_option( 'warmup_intro', false ); |
|
| 21 | - if ( false !== $intro_text ) { |
|
| 20 | + $intro_text = \lsx_health_plan\functions\get_option('warmup_intro', false); |
|
| 21 | + if (false !== $intro_text) { |
|
| 22 | 22 | ?> |
| 23 | 23 | <div class="excerpt"> |
| 24 | - <p><?php echo wp_kses_post( $intro_text ); ?></p> |
|
| 24 | + <p><?php echo wp_kses_post($intro_text); ?></p> |
|
| 25 | 25 | </div> |
| 26 | 26 | <?php |
| 27 | 27 | } |
| 28 | - $warm_up = \lsx_health_plan\functions\get_option( 'endpoint_warm_up', false ); |
|
| 29 | - if ( false === $warm_up ) { |
|
| 28 | + $warm_up = \lsx_health_plan\functions\get_option('endpoint_warm_up', false); |
|
| 29 | + if (false === $warm_up) { |
|
| 30 | 30 | $warm_up = 'warm-up'; |
| 31 | 31 | } |
| 32 | 32 | ?> |
| 33 | - <a href="<?php the_permalink(); ?><?php echo esc_attr( $warm_up ); ?>/" class="btn"><?php esc_html_e( 'Start your warm-up', 'lsx-health-plan' ); ?></a> |
|
| 33 | + <a href="<?php the_permalink(); ?><?php echo esc_attr($warm_up); ?>/" class="btn"><?php esc_html_e('Start your warm-up', 'lsx-health-plan'); ?></a> |
|
| 34 | 34 | </div> |
| 35 | 35 | </div> |
| 36 | 36 | <?php |
@@ -42,29 +42,29 @@ discard block |
||
| 42 | 42 | * @return void |
| 43 | 43 | */ |
| 44 | 44 | function lsx_health_plan_workout_box() { |
| 45 | - if ( ! post_type_exists( 'workout' ) ) { |
|
| 45 | + if ( ! post_type_exists('workout')) { |
|
| 46 | 46 | return; |
| 47 | 47 | } |
| 48 | 48 | ?> |
| 49 | 49 | <div class="col-md-4" > |
| 50 | 50 | <div class="lsx-health-plan-box"> |
| 51 | - <h3 class="title work-out-title title-lined"><?php esc_html_e( 'Your Workout', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'work.svg' ); ?></h3> |
|
| 51 | + <h3 class="title work-out-title title-lined"><?php esc_html_e('Your Workout', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('work.svg'); ?></h3> |
|
| 52 | 52 | <div class="spacer"></div> |
| 53 | 53 | <?php |
| 54 | - $intro_text = \lsx_health_plan\functions\get_option( 'workout_intro', false ); |
|
| 55 | - if ( false !== $intro_text ) { |
|
| 54 | + $intro_text = \lsx_health_plan\functions\get_option('workout_intro', false); |
|
| 55 | + if (false !== $intro_text) { |
|
| 56 | 56 | ?> |
| 57 | 57 | <div class="excerpt"> |
| 58 | - <p><?php echo wp_kses_post( $intro_text ); ?></p> |
|
| 58 | + <p><?php echo wp_kses_post($intro_text); ?></p> |
|
| 59 | 59 | </div> |
| 60 | 60 | <?php |
| 61 | 61 | } |
| 62 | - $workout = \lsx_health_plan\functions\get_option( 'endpoint_workout', false ); |
|
| 63 | - if ( false === $workout ) { |
|
| 62 | + $workout = \lsx_health_plan\functions\get_option('endpoint_workout', false); |
|
| 63 | + if (false === $workout) { |
|
| 64 | 64 | $workout = 'workout'; |
| 65 | 65 | } |
| 66 | 66 | ?> |
| 67 | - <a href="<?php the_permalink(); ?><?php echo esc_attr( $workout ); ?>/" class="btn"><?php esc_html_e( 'Start your workout', 'lsx-health-plan' ); ?></a> |
|
| 67 | + <a href="<?php the_permalink(); ?><?php echo esc_attr($workout); ?>/" class="btn"><?php esc_html_e('Start your workout', 'lsx-health-plan'); ?></a> |
|
| 68 | 68 | </div> |
| 69 | 69 | </div> |
| 70 | 70 | <?php |
@@ -76,29 +76,29 @@ discard block |
||
| 76 | 76 | * @return void |
| 77 | 77 | */ |
| 78 | 78 | function lsx_health_plan_meal_box() { |
| 79 | - if ( ! post_type_exists( 'meal' ) ) { |
|
| 79 | + if ( ! post_type_exists('meal')) { |
|
| 80 | 80 | return; |
| 81 | 81 | } |
| 82 | 82 | ?> |
| 83 | 83 | <div class="col-md-4" > |
| 84 | 84 | <div class="lsx-health-plan-box"> |
| 85 | - <h3 class="title meal-plan-title title-lined"><?php esc_html_e( 'Your Meal Plan', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'meal.svg' ); ?></h3> |
|
| 85 | + <h3 class="title meal-plan-title title-lined"><?php esc_html_e('Your Meal Plan', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('meal.svg'); ?></h3> |
|
| 86 | 86 | <div class="spacer"></div> |
| 87 | 87 | <?php |
| 88 | - $intro_text = \lsx_health_plan\functions\get_option( 'meal_plan_intro', false ); |
|
| 89 | - if ( false !== $intro_text ) { |
|
| 88 | + $intro_text = \lsx_health_plan\functions\get_option('meal_plan_intro', false); |
|
| 89 | + if (false !== $intro_text) { |
|
| 90 | 90 | ?> |
| 91 | 91 | <div class="excerpt"> |
| 92 | - <p><?php echo wp_kses_post( $intro_text ); ?></p> |
|
| 92 | + <p><?php echo wp_kses_post($intro_text); ?></p> |
|
| 93 | 93 | </div> |
| 94 | 94 | <?php |
| 95 | 95 | } |
| 96 | - $meal = \lsx_health_plan\functions\get_option( 'endpoint_meal', false ); |
|
| 97 | - if ( false === $meal ) { |
|
| 96 | + $meal = \lsx_health_plan\functions\get_option('endpoint_meal', false); |
|
| 97 | + if (false === $meal) { |
|
| 98 | 98 | $meal = 'meal'; |
| 99 | 99 | } |
| 100 | 100 | ?> |
| 101 | - <a href="<?php the_permalink(); ?><?php echo esc_attr( $meal ); ?>/" class="btn"><?php esc_html_e( 'View your meal plan', 'lsx-health-plan' ); ?></a> |
|
| 101 | + <a href="<?php the_permalink(); ?><?php echo esc_attr($meal); ?>/" class="btn"><?php esc_html_e('View your meal plan', 'lsx-health-plan'); ?></a> |
|
| 102 | 102 | </div> |
| 103 | 103 | </div> |
| 104 | 104 | <?php |
@@ -110,29 +110,29 @@ discard block |
||
| 110 | 110 | * @return void |
| 111 | 111 | */ |
| 112 | 112 | function lsx_health_plan_recipe_box() { |
| 113 | - if ( ! post_type_exists( 'recipe' ) ) { |
|
| 113 | + if ( ! post_type_exists('recipe')) { |
|
| 114 | 114 | return; |
| 115 | 115 | } |
| 116 | 116 | ?> |
| 117 | 117 | <div class="col-md-4" > |
| 118 | 118 | <div class="lsx-health-plan-box"> |
| 119 | - <h3 class="title recipes-title title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'recipes.svg' ); ?></h3> |
|
| 119 | + <h3 class="title recipes-title title-lined"><?php esc_html_e('Recipes', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('recipes.svg'); ?></h3> |
|
| 120 | 120 | <div class="spacer"></div> |
| 121 | 121 | <?php |
| 122 | - $intro_text = \lsx_health_plan\functions\get_option( 'recipes_intro', false ); |
|
| 123 | - if ( false !== $intro_text ) { |
|
| 122 | + $intro_text = \lsx_health_plan\functions\get_option('recipes_intro', false); |
|
| 123 | + if (false !== $intro_text) { |
|
| 124 | 124 | ?> |
| 125 | 125 | <div class="excerpt"> |
| 126 | - <p><?php echo wp_kses_post( $intro_text ); ?></p> |
|
| 126 | + <p><?php echo wp_kses_post($intro_text); ?></p> |
|
| 127 | 127 | </div> |
| 128 | 128 | <?php |
| 129 | 129 | } |
| 130 | - $recipes = \lsx_health_plan\functions\get_option( 'endpoint_recipe', false ); |
|
| 131 | - if ( false === $recipes ) { |
|
| 130 | + $recipes = \lsx_health_plan\functions\get_option('endpoint_recipe', false); |
|
| 131 | + if (false === $recipes) { |
|
| 132 | 132 | $recipes = 'recipes'; |
| 133 | 133 | } |
| 134 | 134 | ?> |
| 135 | - <a href="<?php the_permalink(); ?><?php echo esc_attr( $recipes ); ?>/" class="btn"><?php esc_html_e( 'View all recipes', 'lsx-health-plan' ); ?></a> |
|
| 135 | + <a href="<?php the_permalink(); ?><?php echo esc_attr($recipes); ?>/" class="btn"><?php esc_html_e('View all recipes', 'lsx-health-plan'); ?></a> |
|
| 136 | 136 | </div> |
| 137 | 137 | </div> |
| 138 | 138 | <?php |
@@ -148,15 +148,15 @@ discard block |
||
| 148 | 148 | ?> |
| 149 | 149 | <div class="col-md-4 day-download-box" > |
| 150 | 150 | <div class="lsx-health-plan-box"> |
| 151 | - <h3 class="title downloads-title title-lined"><?php esc_html_e( 'Downloads', 'lsx-health-plan' ); ?><?php lsx_get_svg_icon( 'download.svg' ); ?></h3> |
|
| 151 | + <h3 class="title downloads-title title-lined"><?php esc_html_e('Downloads', 'lsx-health-plan'); ?><?php lsx_get_svg_icon('download.svg'); ?></h3> |
|
| 152 | 152 | <div class="spacer"></div> |
| 153 | 153 | <div class="download-list"> |
| 154 | 154 | <ul> |
| 155 | 155 | <?php |
| 156 | 156 | $downloads = \lsx_health_plan\functions\get_downloads(); |
| 157 | - if ( ! empty( $downloads ) ) { |
|
| 158 | - foreach ( $downloads as $download ) { |
|
| 159 | - echo wp_kses_post( '<li><a href=""><i class="fa fa-file-pdf"></i>' . do_shortcode( '[download id="' . $download . '"]' ) . '</a></li>' ); |
|
| 157 | + if ( ! empty($downloads)) { |
|
| 158 | + foreach ($downloads as $download) { |
|
| 159 | + echo wp_kses_post('<li><a href=""><i class="fa fa-file-pdf"></i>' . do_shortcode('[download id="' . $download . '"]') . '</a></li>'); |
|
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | ?> |
@@ -173,15 +173,15 @@ discard block |
||
| 173 | 173 | * @param string $tab |
| 174 | 174 | * @return void |
| 175 | 175 | */ |
| 176 | -function lsx_health_plan_nav_class( $tab = '' ) { |
|
| 176 | +function lsx_health_plan_nav_class($tab = '') { |
|
| 177 | 177 | $nav_classes = array(); |
| 178 | - if ( function_exists( 'is_wc_endpoint_url' ) && 'edit-account' === $tab && is_wc_endpoint_url( 'edit-account' ) ) { |
|
| 178 | + if (function_exists('is_wc_endpoint_url') && 'edit-account' === $tab && is_wc_endpoint_url('edit-account')) { |
|
| 179 | 179 | $nav_classes[] = 'active'; |
| 180 | - } elseif ( lsx_health_plan_is_current_tab( $tab ) ) { |
|
| 180 | + } elseif (lsx_health_plan_is_current_tab($tab)) { |
|
| 181 | 181 | $nav_classes[] = 'active'; |
| 182 | 182 | } |
| 183 | - if ( ! empty( $nav_classes ) ) { |
|
| 184 | - echo wp_kses_post( implode( ' ', $nav_classes ) ); |
|
| 183 | + if ( ! empty($nav_classes)) { |
|
| 184 | + echo wp_kses_post(implode(' ', $nav_classes)); |
|
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | |
@@ -196,19 +196,19 @@ discard block |
||
| 196 | 196 | <ul class="nav nav-pills"> |
| 197 | 197 | <li class=" |
| 198 | 198 | <?php |
| 199 | - if ( ( function_exists( 'is_wc_endpoint_url' ) && ! is_wc_endpoint_url( 'edit-account' ) ) || ! function_exists( 'is_wc_endpoint_url' ) ) { |
|
| 200 | - echo esc_attr( 'active' ); |
|
| 199 | + if ((function_exists('is_wc_endpoint_url') && ! is_wc_endpoint_url('edit-account')) || ! function_exists('is_wc_endpoint_url')) { |
|
| 200 | + echo esc_attr('active'); |
|
| 201 | 201 | } |
| 202 | 202 | ?> |
| 203 | - "><a class="my-plan-tab" href="<?php the_permalink(); ?>"><?php esc_html_e( 'My Plan', 'lsx-health-plan' ); ?></a></li> |
|
| 203 | + "><a class="my-plan-tab" href="<?php the_permalink(); ?>"><?php esc_html_e('My Plan', 'lsx-health-plan'); ?></a></li> |
|
| 204 | 204 | <li class=" |
| 205 | 205 | <?php |
| 206 | - if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'edit-account' ) ) { |
|
| 207 | - echo esc_attr( 'active' ); |
|
| 206 | + if (function_exists('is_wc_endpoint_url') && is_wc_endpoint_url('edit-account')) { |
|
| 207 | + echo esc_attr('active'); |
|
| 208 | 208 | } |
| 209 | 209 | ?> |
| 210 | - "><a class="account-details-tab" href="<?php the_permalink(); ?>edit-account/"><?php esc_html_e( 'Account Details', 'lsx-health-plan' ); ?></a></li> |
|
| 211 | - <li class=""><a class="logout-tab" href="<?php echo esc_url( wp_logout_url( get_permalink() ) ); ?>"><?php esc_html_e( 'Logout', 'lsx-health-plan' ); ?></a></li> |
|
| 210 | + "><a class="account-details-tab" href="<?php the_permalink(); ?>edit-account/"><?php esc_html_e('Account Details', 'lsx-health-plan'); ?></a></li> |
|
| 211 | + <li class=""><a class="logout-tab" href="<?php echo esc_url(wp_logout_url(get_permalink())); ?>"><?php esc_html_e('Logout', 'lsx-health-plan'); ?></a></li> |
|
| 212 | 212 | </ul> |
| 213 | 213 | </div> |
| 214 | 214 | <?php |
@@ -227,48 +227,48 @@ discard block |
||
| 227 | 227 | <?php |
| 228 | 228 | global $current_user; |
| 229 | 229 | get_current_user(); |
| 230 | - echo get_avatar( $current_user->ID, 240 ); |
|
| 230 | + echo get_avatar($current_user->ID, 240); |
|
| 231 | 231 | ?> |
| 232 | 232 | </div> |
| 233 | 233 | <div class="edit-profile"> |
| 234 | 234 | <?php |
| 235 | - if ( function_exists( 'wc_get_page_id' ) ) { |
|
| 236 | - $url_id = wc_get_page_id( 'myaccount' ); |
|
| 235 | + if (function_exists('wc_get_page_id')) { |
|
| 236 | + $url_id = wc_get_page_id('myaccount'); |
|
| 237 | 237 | } else { |
| 238 | 238 | $url_id = ''; |
| 239 | 239 | } |
| 240 | 240 | ?> |
| 241 | - <a class="btn btn-green" href="<?php echo esc_url( get_permalink( $url_id ) ); ?>edit-account/"><?php esc_html_e( 'Edit Profile', 'lsx-health-plan' ); ?></a> |
|
| 241 | + <a class="btn btn-green" href="<?php echo esc_url(get_permalink($url_id)); ?>edit-account/"><?php esc_html_e('Edit Profile', 'lsx-health-plan'); ?></a> |
|
| 242 | 242 | </div> |
| 243 | 243 | </div> |
| 244 | 244 | |
| 245 | 245 | <div class="profile-details"> |
| 246 | - <h1 class="title-lined"><?php echo esc_html( $current_user->display_name ); ?></h1> |
|
| 246 | + <h1 class="title-lined"><?php echo esc_html($current_user->display_name); ?></h1> |
|
| 247 | 247 | <?php |
| 248 | - $disable_stats = \lsx_health_plan\functions\get_option( 'disable_all_stats', false ); |
|
| 249 | - if ( 'on' !== $disable_stats ) { |
|
| 248 | + $disable_stats = \lsx_health_plan\functions\get_option('disable_all_stats', false); |
|
| 249 | + if ('on' !== $disable_stats) { |
|
| 250 | 250 | |
| 251 | - $is_weight_disabled = \lsx_health_plan\functions\get_option( 'disable_weight_checkbox', false ); |
|
| 252 | - $is_waist_disabled = \lsx_health_plan\functions\get_option( 'disable_waist_checkbox', false ); |
|
| 253 | - $is_fitness_disabled = \lsx_health_plan\functions\get_option( 'disable_fitness_checkbox', false ); |
|
| 251 | + $is_weight_disabled = \lsx_health_plan\functions\get_option('disable_weight_checkbox', false); |
|
| 252 | + $is_waist_disabled = \lsx_health_plan\functions\get_option('disable_waist_checkbox', false); |
|
| 253 | + $is_fitness_disabled = \lsx_health_plan\functions\get_option('disable_fitness_checkbox', false); |
|
| 254 | 254 | ?> |
| 255 | 255 | <table class="table personal-information"> |
| 256 | 256 | <thead> |
| 257 | 257 | <tr> |
| 258 | 258 | <th scope="col"></th> |
| 259 | - <th scope="col"><strong><?php esc_html_e( 'Start', 'lsx-health-plan' ); ?></strong></th> |
|
| 260 | - <th scope="col"><strong><?php esc_html_e( 'Goal', 'lsx-health-plan' ); ?></strong></th> |
|
| 261 | - <th scope="col"><strong><?php esc_html_e( 'Current', 'lsx-health-plan' ); ?></strong></th> |
|
| 259 | + <th scope="col"><strong><?php esc_html_e('Start', 'lsx-health-plan'); ?></strong></th> |
|
| 260 | + <th scope="col"><strong><?php esc_html_e('Goal', 'lsx-health-plan'); ?></strong></th> |
|
| 261 | + <th scope="col"><strong><?php esc_html_e('Current', 'lsx-health-plan'); ?></strong></th> |
|
| 262 | 262 | </tr> |
| 263 | 263 | </thead> |
| 264 | 264 | <tbody> |
| 265 | - <?php if ( 'on' !== $is_weight_disabled ) { ?> |
|
| 265 | + <?php if ('on' !== $is_weight_disabled) { ?> |
|
| 266 | 266 | <tr> |
| 267 | - <th scope="row"><strong><?php esc_html_e( 'Weight:', 'lsx-health-plan' ); ?></strong></th> |
|
| 267 | + <th scope="row"><strong><?php esc_html_e('Weight:', 'lsx-health-plan'); ?></strong></th> |
|
| 268 | 268 | <td> |
| 269 | 269 | <?php |
| 270 | - if ( '' !== get_user_meta( get_current_user_id(), 'weight_start', true ) ) { |
|
| 271 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_start', true ) . ' kg' ); |
|
| 270 | + if ('' !== get_user_meta(get_current_user_id(), 'weight_start', true)) { |
|
| 271 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'weight_start', true) . ' kg'); |
|
| 272 | 272 | } else { |
| 273 | 273 | echo '/'; |
| 274 | 274 | } |
@@ -276,8 +276,8 @@ discard block |
||
| 276 | 276 | </td> |
| 277 | 277 | <td> |
| 278 | 278 | <?php |
| 279 | - if ( '' !== get_user_meta( get_current_user_id(), 'weight_goal', true ) ) { |
|
| 280 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_goal', true ) . ' kg' ); |
|
| 279 | + if ('' !== get_user_meta(get_current_user_id(), 'weight_goal', true)) { |
|
| 280 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'weight_goal', true) . ' kg'); |
|
| 281 | 281 | } else { |
| 282 | 282 | echo '/'; |
| 283 | 283 | } |
@@ -285,8 +285,8 @@ discard block |
||
| 285 | 285 | </td> |
| 286 | 286 | <td> |
| 287 | 287 | <?php |
| 288 | - if ( '' !== get_user_meta( get_current_user_id(), 'weight_end', true ) ) { |
|
| 289 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'weight_end', true ) . ' kg' ); |
|
| 288 | + if ('' !== get_user_meta(get_current_user_id(), 'weight_end', true)) { |
|
| 289 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'weight_end', true) . ' kg'); |
|
| 290 | 290 | } else { |
| 291 | 291 | echo '/'; |
| 292 | 292 | } |
@@ -294,13 +294,13 @@ discard block |
||
| 294 | 294 | </td> |
| 295 | 295 | </tr> |
| 296 | 296 | <?php } ?> |
| 297 | - <?php if ( 'on' !== $is_waist_disabled ) { ?> |
|
| 297 | + <?php if ('on' !== $is_waist_disabled) { ?> |
|
| 298 | 298 | <tr> |
| 299 | - <th scope="row"><strong><?php esc_html_e( 'Waist:', 'lsx-health-plan' ); ?></strong></th> |
|
| 299 | + <th scope="row"><strong><?php esc_html_e('Waist:', 'lsx-health-plan'); ?></strong></th> |
|
| 300 | 300 | <td> |
| 301 | 301 | <?php |
| 302 | - if ( '' !== get_user_meta( get_current_user_id(), 'waist_start', true ) ) { |
|
| 303 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_start', true ) . ' cm' ); |
|
| 302 | + if ('' !== get_user_meta(get_current_user_id(), 'waist_start', true)) { |
|
| 303 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'waist_start', true) . ' cm'); |
|
| 304 | 304 | } else { |
| 305 | 305 | echo '/'; |
| 306 | 306 | } |
@@ -308,8 +308,8 @@ discard block |
||
| 308 | 308 | </td> |
| 309 | 309 | <td> |
| 310 | 310 | <?php |
| 311 | - if ( '' !== get_user_meta( get_current_user_id(), 'waist_goal', true ) ) { |
|
| 312 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_goal', true ) . ' cm' ); |
|
| 311 | + if ('' !== get_user_meta(get_current_user_id(), 'waist_goal', true)) { |
|
| 312 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'waist_goal', true) . ' cm'); |
|
| 313 | 313 | } else { |
| 314 | 314 | echo '/'; |
| 315 | 315 | } |
@@ -317,8 +317,8 @@ discard block |
||
| 317 | 317 | </td> |
| 318 | 318 | <td> |
| 319 | 319 | <?php |
| 320 | - if ( '' !== get_user_meta( get_current_user_id(), 'waist_end', true ) ) { |
|
| 321 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'waist_end', true ) . ' cm' ); |
|
| 320 | + if ('' !== get_user_meta(get_current_user_id(), 'waist_end', true)) { |
|
| 321 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'waist_end', true) . ' cm'); |
|
| 322 | 322 | } else { |
| 323 | 323 | echo '/'; |
| 324 | 324 | } |
@@ -326,13 +326,13 @@ discard block |
||
| 326 | 326 | </td> |
| 327 | 327 | </tr> |
| 328 | 328 | <?php } ?> |
| 329 | - <?php if ( 'on' !== $is_fitness_disabled ) { ?> |
|
| 329 | + <?php if ('on' !== $is_fitness_disabled) { ?> |
|
| 330 | 330 | <tr> |
| 331 | - <th scope="row"><strong><?php esc_html_e( 'Fitness:', 'lsx-health-plan' ); ?></strong></th> |
|
| 331 | + <th scope="row"><strong><?php esc_html_e('Fitness:', 'lsx-health-plan'); ?></strong></th> |
|
| 332 | 332 | <td> |
| 333 | 333 | <?php |
| 334 | - if ( '' !== get_user_meta( get_current_user_id(), 'fitness_start', true ) ) { |
|
| 335 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_start', true ) ); |
|
| 334 | + if ('' !== get_user_meta(get_current_user_id(), 'fitness_start', true)) { |
|
| 335 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'fitness_start', true)); |
|
| 336 | 336 | } else { |
| 337 | 337 | echo '/'; |
| 338 | 338 | } |
@@ -340,8 +340,8 @@ discard block |
||
| 340 | 340 | </td> |
| 341 | 341 | <td> |
| 342 | 342 | <?php |
| 343 | - if ( '' !== get_user_meta( get_current_user_id(), 'fitness_goal', true ) ) { |
|
| 344 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_goal', true ) ); |
|
| 343 | + if ('' !== get_user_meta(get_current_user_id(), 'fitness_goal', true)) { |
|
| 344 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'fitness_goal', true)); |
|
| 345 | 345 | } else { |
| 346 | 346 | echo '/'; |
| 347 | 347 | } |
@@ -349,8 +349,8 @@ discard block |
||
| 349 | 349 | </td> |
| 350 | 350 | <td> |
| 351 | 351 | <?php |
| 352 | - if ( '' !== get_user_meta( get_current_user_id(), 'fitness_end', true ) ) { |
|
| 353 | - echo wp_kses_post( get_user_meta( get_current_user_id(), 'fitness_end', true ) ); |
|
| 352 | + if ('' !== get_user_meta(get_current_user_id(), 'fitness_end', true)) { |
|
| 353 | + echo wp_kses_post(get_user_meta(get_current_user_id(), 'fitness_end', true)); |
|
| 354 | 354 | } else { |
| 355 | 355 | echo '/'; |
| 356 | 356 | } |
@@ -374,26 +374,26 @@ discard block |
||
| 374 | 374 | * @return void |
| 375 | 375 | */ |
| 376 | 376 | function lsx_health_plan_day_plan_block() { |
| 377 | - $args = array( |
|
| 377 | + $args = array( |
|
| 378 | 378 | 'orderby' => 'menu_order', |
| 379 | 379 | 'order' => 'ASC', |
| 380 | 380 | 'post_type' => 'plan', |
| 381 | 381 | 'posts_per_page' => -1, |
| 382 | 382 | 'nopagin' => true, |
| 383 | 383 | ); |
| 384 | - $the_query = new WP_Query( $args ); |
|
| 384 | + $the_query = new WP_Query($args); |
|
| 385 | 385 | ?> |
| 386 | 386 | <div class="daily-plan-block day-grid"> |
| 387 | 387 | <?php |
| 388 | - if ( $the_query->have_posts() ) : |
|
| 389 | - while ( $the_query->have_posts() ) : |
|
| 388 | + if ($the_query->have_posts()) : |
|
| 389 | + while ($the_query->have_posts()) : |
|
| 390 | 390 | $the_query->the_post(); |
| 391 | 391 | $completed_class = ''; |
| 392 | - if ( lsx_health_plan_is_day_complete() ) { |
|
| 392 | + if (lsx_health_plan_is_day_complete()) { |
|
| 393 | 393 | $completed_class = 'completed'; |
| 394 | 394 | } |
| 395 | 395 | ?> |
| 396 | - <a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr( $completed_class ); ?>"> |
|
| 396 | + <a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr($completed_class); ?>"> |
|
| 397 | 397 | <div class="plan-content"><?php the_title(); ?></div> |
| 398 | 398 | </a> |
| 399 | 399 | <?php endwhile; ?> |
@@ -410,11 +410,11 @@ discard block |
||
| 410 | 410 | * @param array $args An array of arguments. |
| 411 | 411 | * @return void |
| 412 | 412 | */ |
| 413 | -function lsx_health_plan_week_plan_block( $args = array() ) { |
|
| 413 | +function lsx_health_plan_week_plan_block($args = array()) { |
|
| 414 | 414 | $defaults = array( |
| 415 | 415 | 'show_downloads' => false, |
| 416 | 416 | ); |
| 417 | - $args = wp_parse_args( $args, $defaults ); |
|
| 417 | + $args = wp_parse_args($args, $defaults); |
|
| 418 | 418 | $weeks = get_terms( |
| 419 | 419 | array( |
| 420 | 420 | 'taxonomy' => 'week', |
@@ -422,13 +422,13 @@ discard block |
||
| 422 | 422 | 'order' => 'ASC', |
| 423 | 423 | ) |
| 424 | 424 | ); |
| 425 | - if ( ! empty( $weeks ) ) { |
|
| 425 | + if ( ! empty($weeks)) { |
|
| 426 | 426 | $counter = 1; |
| 427 | 427 | $section_open = false; |
| 428 | 428 | |
| 429 | - foreach ( $weeks as $week ) { |
|
| 429 | + foreach ($weeks as $week) { |
|
| 430 | 430 | // Grab the days of the week. |
| 431 | - $query_args = array( |
|
| 431 | + $query_args = array( |
|
| 432 | 432 | 'orderby' => 'menu_order', |
| 433 | 433 | 'order' => 'ASC', |
| 434 | 434 | 'post_type' => 'plan', |
@@ -438,22 +438,22 @@ discard block |
||
| 438 | 438 | array( |
| 439 | 439 | 'taxonomy' => 'week', |
| 440 | 440 | 'field' => 'slug', |
| 441 | - 'terms' => array( $week->slug ), |
|
| 441 | + 'terms' => array($week->slug), |
|
| 442 | 442 | ), |
| 443 | 443 | ), |
| 444 | 444 | ); |
| 445 | - $the_query = new WP_Query( $query_args ); |
|
| 445 | + $the_query = new WP_Query($query_args); |
|
| 446 | 446 | $collapse_class = ''; |
| 447 | 447 | |
| 448 | 448 | // Determine if the current week is complete. |
| 449 | - if ( $the_query->have_posts() ) { |
|
| 450 | - $day_ids = wp_list_pluck( $the_query->posts, 'ID' ); |
|
| 449 | + if ($the_query->have_posts()) { |
|
| 450 | + $day_ids = wp_list_pluck($the_query->posts, 'ID'); |
|
| 451 | 451 | |
| 452 | - if ( false === $section_open ) { |
|
| 453 | - if ( 1 === $counter && ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) { |
|
| 452 | + if (false === $section_open) { |
|
| 453 | + if (1 === $counter && ! \lsx_health_plan\functions\is_week_complete(false, $day_ids)) { |
|
| 454 | 454 | $collapse_class = 'in'; |
| 455 | 455 | $section_open = true; |
| 456 | - } elseif ( ! \lsx_health_plan\functions\is_week_complete( false, $day_ids ) ) { |
|
| 456 | + } elseif ( ! \lsx_health_plan\functions\is_week_complete(false, $day_ids)) { |
|
| 457 | 457 | $collapse_class = 'in'; |
| 458 | 458 | $section_open = true; |
| 459 | 459 | } |
@@ -461,32 +461,32 @@ discard block |
||
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | // Determine if there are any weekly downloads. |
| 464 | - if ( isset( $args['show_downloads'] ) && false !== $args['show_downloads'] ) { |
|
| 465 | - $weekly_downloads = \lsx_health_plan\functions\get_weekly_downloads( $week->slug ); |
|
| 466 | - if ( ! empty( $weekly_downloads ) ) { |
|
| 464 | + if (isset($args['show_downloads']) && false !== $args['show_downloads']) { |
|
| 465 | + $weekly_downloads = \lsx_health_plan\functions\get_weekly_downloads($week->slug); |
|
| 466 | + if ( ! empty($weekly_downloads)) { |
|
| 467 | 467 | $week_downloads_view = 'week-downloads-view-on'; |
| 468 | 468 | } |
| 469 | 469 | } |
| 470 | 470 | ?> |
| 471 | 471 | <div class="daily-plan-block week-grid"> |
| 472 | - <a href="#week-<?php echo esc_attr( $week->slug ); ?>" data-toggle="collapse" class="week-title"><?php echo esc_attr( $week->name ); ?></a> |
|
| 473 | - <div id="week-<?php echo esc_attr( $week->slug ); ?>" class="week-row collapse <?php echo esc_attr( $collapse_class ); ?>"> |
|
| 474 | - <div class="week-row-inner <?php echo esc_html( $week_downloads_view ); ?>"> |
|
| 472 | + <a href="#week-<?php echo esc_attr($week->slug); ?>" data-toggle="collapse" class="week-title"><?php echo esc_attr($week->name); ?></a> |
|
| 473 | + <div id="week-<?php echo esc_attr($week->slug); ?>" class="week-row collapse <?php echo esc_attr($collapse_class); ?>"> |
|
| 474 | + <div class="week-row-inner <?php echo esc_html($week_downloads_view); ?>"> |
|
| 475 | 475 | <div class="week-meals-recipes-box"> |
| 476 | - <?php if ( ! empty( $week_downloads_view ) ) { ?> |
|
| 477 | - <h3 class="title"><?php lsx_get_svg_icon( 'daily-plan.svg' ); ?><?php echo esc_html_e( 'Daily Plan', 'lsx-health-plan' ); ?></h3> |
|
| 476 | + <?php if ( ! empty($week_downloads_view)) { ?> |
|
| 477 | + <h3 class="title"><?php lsx_get_svg_icon('daily-plan.svg'); ?><?php echo esc_html_e('Daily Plan', 'lsx-health-plan'); ?></h3> |
|
| 478 | 478 | <?php } ?> |
| 479 | 479 | <div class="week-meals-recipes-box-inner"> |
| 480 | 480 | <?php |
| 481 | - if ( $the_query->have_posts() ) : |
|
| 482 | - while ( $the_query->have_posts() ) : |
|
| 481 | + if ($the_query->have_posts()) : |
|
| 482 | + while ($the_query->have_posts()) : |
|
| 483 | 483 | $the_query->the_post(); |
| 484 | 484 | $completed_class = ''; |
| 485 | - if ( lsx_health_plan_is_day_complete() ) { |
|
| 485 | + if (lsx_health_plan_is_day_complete()) { |
|
| 486 | 486 | $completed_class = 'completed'; |
| 487 | 487 | } |
| 488 | 488 | ?> |
| 489 | - <a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr( $completed_class ); ?>"> |
|
| 489 | + <a href="<?php the_permalink(); ?>" class="day id-<?php the_ID(); ?> <?php echo esc_attr($completed_class); ?>"> |
|
| 490 | 490 | <div class="plan-content"><?php the_title(); ?></div> |
| 491 | 491 | </a> |
| 492 | 492 | <?php |
@@ -497,8 +497,8 @@ discard block |
||
| 497 | 497 | </div> |
| 498 | 498 | </div> |
| 499 | 499 | <?php |
| 500 | - if ( ! empty( $week_downloads_view ) ) { |
|
| 501 | - lsx_health_plan_weekly_downloads( $weekly_downloads ); |
|
| 500 | + if ( ! empty($week_downloads_view)) { |
|
| 501 | + lsx_health_plan_weekly_downloads($weekly_downloads); |
|
| 502 | 502 | } |
| 503 | 503 | ?> |
| 504 | 504 | </div> |
@@ -516,16 +516,16 @@ discard block |
||
| 516 | 516 | * @param array $weekly_downloads An array of the download ids. |
| 517 | 517 | * @return void |
| 518 | 518 | */ |
| 519 | -function lsx_health_plan_weekly_downloads( $weekly_downloads = array() ) { |
|
| 520 | - if ( ! empty( $weekly_downloads ) ) { |
|
| 519 | +function lsx_health_plan_weekly_downloads($weekly_downloads = array()) { |
|
| 520 | + if ( ! empty($weekly_downloads)) { |
|
| 521 | 521 | ?> |
| 522 | 522 | <div class="week-download-box"> |
| 523 | - <h3 class="title"><?php lsx_get_svg_icon( 'download.svg' ); ?><?php echo esc_html_e( 'Downloads', 'lsx-health-plan' ); ?></h3> |
|
| 523 | + <h3 class="title"><?php lsx_get_svg_icon('download.svg'); ?><?php echo esc_html_e('Downloads', 'lsx-health-plan'); ?></h3> |
|
| 524 | 524 | <ul class="week-download-box-list"> |
| 525 | 525 | <?php |
| 526 | - foreach ( $weekly_downloads as $weekly_download ) { |
|
| 526 | + foreach ($weekly_downloads as $weekly_download) { |
|
| 527 | 527 | ?> |
| 528 | - <li><?php echo wp_kses_post( do_shortcode( '[download id="' . $weekly_download . '"]' ) ); ?></li> |
|
| 528 | + <li><?php echo wp_kses_post(do_shortcode('[download id="' . $weekly_download . '"]')); ?></li> |
|
| 529 | 529 | <?php |
| 530 | 530 | } |
| 531 | 531 | ?> |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | * |
| 541 | 541 | * @return void |
| 542 | 542 | */ |
| 543 | -function lsx_health_plan_items( $args = array() ) { |
|
| 543 | +function lsx_health_plan_items($args = array()) { |
|
| 544 | 544 | global $shortcode_args; |
| 545 | 545 | $shortcode_args = $args; |
| 546 | 546 | include LSX_HEALTH_PLAN_PATH . '/templates/partials/shortcode-loop.php'; |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | * @return void |
| 553 | 553 | */ |
| 554 | 554 | function lsx_health_plan_featured_video_block() { |
| 555 | - if ( ! post_type_exists( 'video' ) ) { |
|
| 555 | + if ( ! post_type_exists('video')) { |
|
| 556 | 556 | return; |
| 557 | 557 | } |
| 558 | 558 | include LSX_HEALTH_PLAN_PATH . '/templates/featured-videos.php'; |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | * @return void |
| 565 | 565 | */ |
| 566 | 566 | function lsx_health_plan_featured_recipes_block() { |
| 567 | - if ( ! post_type_exists( 'recipe' ) ) { |
|
| 567 | + if ( ! post_type_exists('recipe')) { |
|
| 568 | 568 | return; |
| 569 | 569 | } |
| 570 | 570 | include LSX_HEALTH_PLAN_PATH . '/templates/featured-recipes.php'; |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | * @return void |
| 577 | 577 | */ |
| 578 | 578 | function lsx_health_plan_featured_tips_block() { |
| 579 | - if ( ! post_type_exists( 'tip' ) ) { |
|
| 579 | + if ( ! post_type_exists('tip')) { |
|
| 580 | 580 | return; |
| 581 | 581 | } |
| 582 | 582 | include LSX_HEALTH_PLAN_PATH . '/templates/featured-tips.php'; |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | * @return void |
| 590 | 590 | */ |
| 591 | 591 | function lsx_health_plan_day_button() { |
| 592 | - if ( lsx_health_plan_is_day_complete() ) { |
|
| 592 | + if (lsx_health_plan_is_day_complete()) { |
|
| 593 | 593 | lsx_health_plan_unlock_button(); |
| 594 | 594 | } else { |
| 595 | 595 | lsx_health_plan_complete_button(); |
@@ -605,15 +605,15 @@ discard block |
||
| 605 | 605 | ?> |
| 606 | 606 | <div class="single-plan-inner-buttons"> |
| 607 | 607 | <form action="<?php the_permalink(); ?>" method="post" class="form-complete-day complete-plan-btn"> |
| 608 | - <?php wp_nonce_field( 'complete', 'lsx-health-plan-actions' ); ?> |
|
| 609 | - <input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr( get_the_ID() ); ?>" /> |
|
| 610 | - <button class="btn cta-btn" type="submit"><?php esc_html_e( 'Complete Day', 'lsx-health-plan' ); ?></button> |
|
| 608 | + <?php wp_nonce_field('complete', 'lsx-health-plan-actions'); ?> |
|
| 609 | + <input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr(get_the_ID()); ?>" /> |
|
| 610 | + <button class="btn cta-btn" type="submit"><?php esc_html_e('Complete Day', 'lsx-health-plan'); ?></button> |
|
| 611 | 611 | </form> |
| 612 | 612 | <div class="back-plan-btn"> |
| 613 | 613 | <?php |
| 614 | - if ( function_exists( 'wc_get_page_id' ) ) { |
|
| 614 | + if (function_exists('wc_get_page_id')) { |
|
| 615 | 615 | ?> |
| 616 | - <a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Back To My Plan', 'lsx-health-plan' ); ?></a> |
|
| 616 | + <a class="btn" href="<?php echo wp_kses_post(get_permalink(wc_get_page_id('myaccount'))); ?>"><?php esc_html_e('Back To My Plan', 'lsx-health-plan'); ?></a> |
|
| 617 | 617 | <?php |
| 618 | 618 | } |
| 619 | 619 | ?> |
@@ -631,15 +631,15 @@ discard block |
||
| 631 | 631 | ?> |
| 632 | 632 | <div class="single-plan-inner-buttons"> |
| 633 | 633 | <form action="<?php the_permalink(); ?>" method="post" class="form-complete-day complete-plan-btn"> |
| 634 | - <?php wp_nonce_field( 'unlock', 'lsx-health-plan-actions' ); ?> |
|
| 635 | - <input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr( get_the_ID() ); ?>" /> |
|
| 636 | - <button class="btn secondary-btn" type="submit"><?php esc_html_e( 'Im not done!', 'lsx-health-plan' ); ?></button> |
|
| 634 | + <?php wp_nonce_field('unlock', 'lsx-health-plan-actions'); ?> |
|
| 635 | + <input type="hidden" name="lsx-health-plan-id" value="<?php echo esc_attr(get_the_ID()); ?>" /> |
|
| 636 | + <button class="btn secondary-btn" type="submit"><?php esc_html_e('Im not done!', 'lsx-health-plan'); ?></button> |
|
| 637 | 637 | </form> |
| 638 | 638 | <div class="back-plan-btn"> |
| 639 | 639 | <?php |
| 640 | - if ( function_exists( 'wc_get_page_id' ) ) { |
|
| 640 | + if (function_exists('wc_get_page_id')) { |
|
| 641 | 641 | ?> |
| 642 | - <a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Back To My Plan', 'lsx-health-plan' ); ?></a> |
|
| 642 | + <a class="btn" href="<?php echo wp_kses_post(get_permalink(wc_get_page_id('myaccount'))); ?>"><?php esc_html_e('Back To My Plan', 'lsx-health-plan'); ?></a> |
|
| 643 | 643 | <?php |
| 644 | 644 | } |
| 645 | 645 | ?> |
@@ -655,8 +655,8 @@ discard block |
||
| 655 | 655 | * @return void |
| 656 | 656 | */ |
| 657 | 657 | function lsx_health_plan_single_nav() { |
| 658 | - $tab_template_path = apply_filters( 'lsx_health_plan_single_nav_path', LSX_HEALTH_PLAN_PATH . '/templates/single-plan-tabs.php' ); |
|
| 659 | - if ( '' !== $tab_template_path ) { |
|
| 658 | + $tab_template_path = apply_filters('lsx_health_plan_single_nav_path', LSX_HEALTH_PLAN_PATH . '/templates/single-plan-tabs.php'); |
|
| 659 | + if ('' !== $tab_template_path) { |
|
| 660 | 660 | require $tab_template_path; |
| 661 | 661 | } |
| 662 | 662 | } |
@@ -668,8 +668,8 @@ discard block |
||
| 668 | 668 | * @return void |
| 669 | 669 | */ |
| 670 | 670 | function lsx_health_plan_single_tabs() { |
| 671 | - $endpoint = get_query_var( 'endpoint' ); |
|
| 672 | - switch ( $endpoint ) { |
|
| 671 | + $endpoint = get_query_var('endpoint'); |
|
| 672 | + switch ($endpoint) { |
|
| 673 | 673 | case 'meal': |
| 674 | 674 | $tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-meal.php'; |
| 675 | 675 | break; |
@@ -690,8 +690,8 @@ discard block |
||
| 690 | 690 | $tab_template_path = LSX_HEALTH_PLAN_PATH . '/templates/tab-content-plan.php'; |
| 691 | 691 | break; |
| 692 | 692 | } |
| 693 | - $tab_template_path = apply_filters( 'lsx_health_plan_single_tab_path', $tab_template_path ); |
|
| 694 | - if ( '' !== $tab_template_path ) { |
|
| 693 | + $tab_template_path = apply_filters('lsx_health_plan_single_tab_path', $tab_template_path); |
|
| 694 | + if ('' !== $tab_template_path) { |
|
| 695 | 695 | include $tab_template_path; |
| 696 | 696 | } |
| 697 | 697 | } |
@@ -711,9 +711,9 @@ discard block |
||
| 711 | 711 | * @return recipe_type |
| 712 | 712 | */ |
| 713 | 713 | function lsx_health_plan_recipe_type() { |
| 714 | - $term_obj_list = get_the_terms( get_the_ID(), 'recipe-type' ); |
|
| 714 | + $term_obj_list = get_the_terms(get_the_ID(), 'recipe-type'); |
|
| 715 | 715 | $recipe_type = $term_obj_list[0]->name; |
| 716 | - if ( ! empty( $recipe_type ) ) { |
|
| 716 | + if ( ! empty($recipe_type)) { |
|
| 717 | 717 | return $recipe_type; |
| 718 | 718 | } |
| 719 | 719 | } |
@@ -725,32 +725,32 @@ discard block |
||
| 725 | 725 | * @param array $group |
| 726 | 726 | * @return void |
| 727 | 727 | */ |
| 728 | -function lsx_health_plan_workout_video_play_button( $m, $group, $echo = true ) { |
|
| 728 | +function lsx_health_plan_workout_video_play_button($m, $group, $echo = true) { |
|
| 729 | 729 | $workout_video = ''; |
| 730 | 730 | $giphy = ''; |
| 731 | 731 | $youtube = ''; |
| 732 | - if ( isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] ) { |
|
| 733 | - $workout_video = esc_html( $group['connected_videos'] ); |
|
| 734 | - $giphy = get_post_meta( $workout_video, 'video_giphy_source', true ); |
|
| 735 | - $youtube = esc_url( get_post_meta( $workout_video, 'video_youtube_source', 1 ) ); |
|
| 736 | - $content = get_post_field( 'post_content', $workout_video ); |
|
| 732 | + if (isset($group['connected_videos']) && '' !== $group['connected_videos']) { |
|
| 733 | + $workout_video = esc_html($group['connected_videos']); |
|
| 734 | + $giphy = get_post_meta($workout_video, 'video_giphy_source', true); |
|
| 735 | + $youtube = esc_url(get_post_meta($workout_video, 'video_youtube_source', 1)); |
|
| 736 | + $content = get_post_field('post_content', $workout_video); |
|
| 737 | 737 | $play_button = '<button data-toggle="modal" data-target="#workout-video-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>'; |
| 738 | 738 | |
| 739 | 739 | $modal_body = ''; |
| 740 | - if ( ! empty( $giphy ) ) { |
|
| 741 | - $giphy = \lsx_health_plan\functions\get_video_url( $giphy ); |
|
| 740 | + if ( ! empty($giphy)) { |
|
| 741 | + $giphy = \lsx_health_plan\functions\get_video_url($giphy); |
|
| 742 | 742 | $modal_body = $giphy; // WPCS: XSS OK. |
| 743 | - } elseif ( ! empty( $youtube ) ) { |
|
| 744 | - $modal_body = wp_oembed_get( $youtube, array( // WPCS: XSS OK. |
|
| 743 | + } elseif ( ! empty($youtube)) { |
|
| 744 | + $modal_body = wp_oembed_get($youtube, array( // WPCS: XSS OK. |
|
| 745 | 745 | 'width' => 480, |
| 746 | - ) ); |
|
| 746 | + )); |
|
| 747 | 747 | } |
| 748 | 748 | $modal_body .= '<h5 class="modal-title title-lined">' . $group['name'] . '</h5>'; |
| 749 | 749 | $modal_body .= $content; |
| 750 | - \lsx_health_plan\functions\register_modal( 'workout-video-modal-' . $m, '', $modal_body ); |
|
| 750 | + \lsx_health_plan\functions\register_modal('workout-video-modal-' . $m, '', $modal_body); |
|
| 751 | 751 | |
| 752 | - if ( true === $echo ) { |
|
| 753 | - echo wp_kses_post( $play_button ); |
|
| 752 | + if (true === $echo) { |
|
| 753 | + echo wp_kses_post($play_button); |
|
| 754 | 754 | } else { |
| 755 | 755 | return $play_button; |
| 756 | 756 | } |
@@ -764,17 +764,17 @@ discard block |
||
| 764 | 764 | */ |
| 765 | 765 | function lsx_health_plan_recipe_archive_description() { |
| 766 | 766 | $description = ''; |
| 767 | - if ( is_post_type_archive( 'recipe' ) ) { |
|
| 768 | - $description = \lsx_health_plan\functions\get_option( 'recipe_archive_description', '' ); |
|
| 769 | - } elseif ( is_post_type_archive( 'exercise' ) ) { |
|
| 770 | - $description = \lsx_health_plan\functions\get_option( 'exercise_archive_description', '' ); |
|
| 771 | - } elseif ( is_tax() ) { |
|
| 767 | + if (is_post_type_archive('recipe')) { |
|
| 768 | + $description = \lsx_health_plan\functions\get_option('recipe_archive_description', ''); |
|
| 769 | + } elseif (is_post_type_archive('exercise')) { |
|
| 770 | + $description = \lsx_health_plan\functions\get_option('exercise_archive_description', ''); |
|
| 771 | + } elseif (is_tax()) { |
|
| 772 | 772 | $description = get_the_archive_description(); |
| 773 | 773 | } |
| 774 | - if ( '' !== $description ) { |
|
| 774 | + if ('' !== $description) { |
|
| 775 | 775 | ?> |
| 776 | 776 | <div class="lsx-hp-archive-description row"> |
| 777 | - <div class="col-xs-12 description-wrapper"><?php echo wp_kses_post( $description ); ?></div> |
|
| 777 | + <div class="col-xs-12 description-wrapper"><?php echo wp_kses_post($description); ?></div> |
|
| 778 | 778 | </div> |
| 779 | 779 | <?php |
| 780 | 780 | } |
@@ -786,21 +786,21 @@ discard block |
||
| 786 | 786 | * @param string $index |
| 787 | 787 | * @return void |
| 788 | 788 | */ |
| 789 | -function lsx_health_plan_workout_tab_content( $index = 1 ) { |
|
| 790 | - global $group_name,$shortcode_args; |
|
| 789 | +function lsx_health_plan_workout_tab_content($index = 1) { |
|
| 790 | + global $group_name, $shortcode_args; |
|
| 791 | 791 | $group_name = 'workout_section_' . $index; |
| 792 | - if ( false !== \lsx_health_plan\functions\get_option( 'exercise_enabled', false ) ) { |
|
| 793 | - $layout = strtolower( \lsx_health_plan\functions\get_option( 'workout_tab_layout', 'table' ) ); |
|
| 792 | + if (false !== \lsx_health_plan\functions\get_option('exercise_enabled', false)) { |
|
| 793 | + $layout = strtolower(\lsx_health_plan\functions\get_option('workout_tab_layout', 'table')); |
|
| 794 | 794 | |
| 795 | 795 | // Check for shortcode overrides. |
| 796 | - if ( null !== $shortcode_args && isset( $shortcode_args['layout'] ) ) { |
|
| 796 | + if (null !== $shortcode_args && isset($shortcode_args['layout'])) { |
|
| 797 | 797 | $layout = $shortcode_args['layout']; |
| 798 | 798 | } |
| 799 | 799 | } else { |
| 800 | 800 | $layout = 'table'; |
| 801 | 801 | } |
| 802 | 802 | |
| 803 | - switch ( $layout ) { |
|
| 803 | + switch ($layout) { |
|
| 804 | 804 | case 'list': |
| 805 | 805 | $tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-list.php'; |
| 806 | 806 | break; |
@@ -813,8 +813,8 @@ discard block |
||
| 813 | 813 | $tab_template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-table.php'; |
| 814 | 814 | break; |
| 815 | 815 | } |
| 816 | - $tab_template_path = apply_filters( 'lsx_health_plan_workout_tab_content_path', $tab_template_path ); |
|
| 817 | - if ( '' !== $tab_template_path ) { |
|
| 816 | + $tab_template_path = apply_filters('lsx_health_plan_workout_tab_content_path', $tab_template_path); |
|
| 817 | + if ('' !== $tab_template_path) { |
|
| 818 | 818 | include $tab_template_path; |
| 819 | 819 | } |
| 820 | 820 | } |
@@ -825,13 +825,13 @@ discard block |
||
| 825 | 825 | * @return void |
| 826 | 826 | */ |
| 827 | 827 | function lsx_health_plan_workout_sets() { |
| 828 | - if ( is_singular( 'workout' ) ) { |
|
| 828 | + if (is_singular('workout')) { |
|
| 829 | 829 | global $connected_workouts; |
| 830 | - $connected_workouts = array( get_the_ID() ); |
|
| 830 | + $connected_workouts = array(get_the_ID()); |
|
| 831 | 831 | } |
| 832 | 832 | $template_path = LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php'; |
| 833 | - $template_path = apply_filters( 'lsx_health_plan_workout_set_template_path', $template_path ); |
|
| 834 | - if ( '' !== $template_path && ! empty( $template_path ) ) { |
|
| 833 | + $template_path = apply_filters('lsx_health_plan_workout_set_template_path', $template_path); |
|
| 834 | + if ('' !== $template_path && ! empty($template_path)) { |
|
| 835 | 835 | include $template_path; |
| 836 | 836 | } |
| 837 | 837 | } |
@@ -14,17 +14,17 @@ |
||
| 14 | 14 | * @param string $item_id |
| 15 | 15 | * @return string |
| 16 | 16 | */ |
| 17 | -function lsx_health_plan_gallery( $before = '', $after = '', $echo = true, $item_id = false ) { |
|
| 17 | +function lsx_health_plan_gallery($before = '', $after = '', $echo = true, $item_id = false) { |
|
| 18 | 18 | $gallery = ''; |
| 19 | 19 | $lsx_hp = lsx_health_plan(); |
| 20 | - if ( false === $item_id ) { |
|
| 20 | + if (false === $item_id) { |
|
| 21 | 21 | $item_id = get_the_ID(); |
| 22 | 22 | } |
| 23 | - if ( $lsx_hp->frontend->gallery->has_gallery( $item_id ) ) { |
|
| 23 | + if ($lsx_hp->frontend->gallery->has_gallery($item_id)) { |
|
| 24 | 24 | $gallery = $before . $lsx_hp->frontend->gallery->get_gallery() . $after; |
| 25 | 25 | } |
| 26 | - if ( true === $echo ) { |
|
| 27 | - echo wp_kses_post( $gallery ); |
|
| 26 | + if (true === $echo) { |
|
| 27 | + echo wp_kses_post($gallery); |
|
| 28 | 28 | } else { |
| 29 | 29 | return $gallery; |
| 30 | 30 | } |