@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | <?php if ( have_posts() ) : ?> |
21 | 21 | |
22 | 22 | <?php |
23 | - while ( have_posts() ) : |
|
24 | - the_post(); |
|
25 | - ?> |
|
23 | + while ( have_posts() ) : |
|
24 | + the_post(); |
|
25 | + ?> |
|
26 | 26 | |
27 | 27 | <?php include LSX_HEALTH_PLAN_PATH . '/templates/content-recipe.php'; ?> |
28 | 28 | |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | <?php lsx_content_after(); ?> |
38 | 38 | |
39 | 39 | <?php |
40 | - if ( is_singular( 'post' ) ) { |
|
41 | - lsx_post_nav(); |
|
42 | - } |
|
43 | - ?> |
|
40 | + if ( is_singular( 'post' ) ) { |
|
41 | + lsx_post_nav(); |
|
42 | + } |
|
43 | + ?> |
|
44 | 44 | |
45 | 45 | </div><!-- #primary --> |
46 | 46 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | $sharing = 'sharing-disabled'; |
13 | 13 | if ( class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : |
14 | - $sharing = 'sharing-enabled'; |
|
14 | + $sharing = 'sharing-enabled'; |
|
15 | 15 | endif; |
16 | 16 | |
17 | 17 | ?> |
@@ -32,19 +32,19 @@ discard block |
||
32 | 32 | <?php if ( class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
33 | 33 | |
34 | 34 | <?php |
35 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
36 | - lsx_content_sharing(); |
|
37 | - } else { |
|
38 | - if ( function_exists( 'sharing_display' ) ) { |
|
39 | - sharing_display( '', true ); |
|
40 | - } |
|
41 | - |
|
42 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
43 | - $custom_likes = new Jetpack_Likes(); |
|
44 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
45 | - } |
|
46 | - } |
|
47 | - ?> |
|
35 | + if ( class_exists( 'LSX_Sharing' ) ) { |
|
36 | + lsx_content_sharing(); |
|
37 | + } else { |
|
38 | + if ( function_exists( 'sharing_display' ) ) { |
|
39 | + sharing_display( '', true ); |
|
40 | + } |
|
41 | + |
|
42 | + if ( class_exists( 'Jetpack_Likes' ) ) { |
|
43 | + $custom_likes = new Jetpack_Likes(); |
|
44 | + echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
45 | + } |
|
46 | + } |
|
47 | + ?> |
|
48 | 48 | <?php endif ?> |
49 | 49 | |
50 | 50 | <?php lsx_health_plan_exercise_title( '<h2>', '</h2>' ); ?> |
@@ -55,23 +55,23 @@ discard block |
||
55 | 55 | <div class="col-md-6 exercise-image lsx-hp-shadow"> |
56 | 56 | |
57 | 57 | <?php |
58 | - $lsx_hp = lsx_health_plan(); |
|
59 | - |
|
60 | - if ( $lsx_hp->frontend->gallery->has_gallery( get_the_ID() ) ) { |
|
61 | - lsx_health_plan_gallery(); |
|
62 | - } else { |
|
63 | - $featured_image = get_the_post_thumbnail(); |
|
64 | - if ( ! empty( $featured_image ) && '' !== $featured_image ) { |
|
65 | - the_post_thumbnail( 'large', array( |
|
66 | - 'class' => 'aligncenter', |
|
67 | - ) ); |
|
68 | - } else { |
|
69 | - ?> |
|
58 | + $lsx_hp = lsx_health_plan(); |
|
59 | + |
|
60 | + if ( $lsx_hp->frontend->gallery->has_gallery( get_the_ID() ) ) { |
|
61 | + lsx_health_plan_gallery(); |
|
62 | + } else { |
|
63 | + $featured_image = get_the_post_thumbnail(); |
|
64 | + if ( ! empty( $featured_image ) && '' !== $featured_image ) { |
|
65 | + the_post_thumbnail( 'large', array( |
|
66 | + 'class' => 'aligncenter', |
|
67 | + ) ); |
|
68 | + } else { |
|
69 | + ?> |
|
70 | 70 | <img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>"> |
71 | 71 | <?php |
72 | - } |
|
73 | - } |
|
74 | - ?> |
|
72 | + } |
|
73 | + } |
|
74 | + ?> |
|
75 | 75 | |
76 | 76 | <?php if ( ( ! empty( $type ) ) || ( ! empty( $equipment ) ) || ( ! empty( $muscle_group ) ) ) { ?> |
77 | 77 | <div class="exercise-data"> |
@@ -83,25 +83,25 @@ discard block |
||
83 | 83 | <?php the_content(); ?> |
84 | 84 | <div class="back-plan-btn"> |
85 | 85 | <?php |
86 | - if ( function_exists( 'wc_get_page_id' ) ) { |
|
87 | - ?> |
|
86 | + if ( function_exists( 'wc_get_page_id' ) ) { |
|
87 | + ?> |
|
88 | 88 | <a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Smashed it! Back to my exercises', 'lsx-health-plan' ); ?></a> |
89 | 89 | <?php |
90 | - } |
|
91 | - ?> |
|
90 | + } |
|
91 | + ?> |
|
92 | 92 | </div> |
93 | 93 | </div> |
94 | 94 | </div> |
95 | 95 | <?php |
96 | - wp_link_pages( |
|
97 | - array( |
|
98 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
99 | - 'after' => '</div></div>', |
|
100 | - 'link_before' => '<span>', |
|
101 | - 'link_after' => '</span>', |
|
102 | - ) |
|
103 | - ); |
|
104 | - ?> |
|
96 | + wp_link_pages( |
|
97 | + array( |
|
98 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
99 | + 'after' => '</div></div>', |
|
100 | + 'link_before' => '<span>', |
|
101 | + 'link_after' => '</span>', |
|
102 | + ) |
|
103 | + ); |
|
104 | + ?> |
|
105 | 105 | </div><!-- .entry-content --> |
106 | 106 | |
107 | 107 | <footer class="footer-meta clearfix"> |
@@ -8,71 +8,71 @@ |
||
8 | 8 | |
9 | 9 | $warm_up = get_post_meta( get_the_ID(), 'plan_warmup', true ); |
10 | 10 | if ( false === $warm_up || '' === $warm_up ) { |
11 | - $options = \lsx_health_plan\functions\get_option( 'all' ); |
|
12 | - if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) { |
|
13 | - $warm_up = $options['plan_warmup']; |
|
14 | - } |
|
11 | + $options = \lsx_health_plan\functions\get_option( 'all' ); |
|
12 | + if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) { |
|
13 | + $warm_up = $options['plan_warmup']; |
|
14 | + } |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | if ( false !== $warm_up && '' !== $warm_up ) { |
18 | - if ( ! is_array( $warm_up ) ) { |
|
19 | - $warm_up = array( $warm_up ); |
|
20 | - } |
|
18 | + if ( ! is_array( $warm_up ) ) { |
|
19 | + $warm_up = array( $warm_up ); |
|
20 | + } |
|
21 | 21 | |
22 | - $warmup_type = array( 'page', 'workout', 'exercise' ); |
|
23 | - $warmup_query = new WP_Query( |
|
24 | - array( |
|
25 | - 'post__in' => $warm_up, |
|
26 | - 'post_type' => $warmup_type, |
|
27 | - ) |
|
28 | - ); |
|
22 | + $warmup_type = array( 'page', 'workout', 'exercise' ); |
|
23 | + $warmup_query = new WP_Query( |
|
24 | + array( |
|
25 | + 'post__in' => $warm_up, |
|
26 | + 'post_type' => $warmup_type, |
|
27 | + ) |
|
28 | + ); |
|
29 | 29 | |
30 | - if ( $warmup_query->have_posts() ) { |
|
31 | - while ( $warmup_query->have_posts() ) { |
|
32 | - $warmup_query->the_post(); |
|
33 | - lsx_entry_before(); |
|
34 | - if ( 'workout' === get_post_type() ) { |
|
35 | - $connected_workouts = array( get_the_ID() ); |
|
36 | - ?> |
|
30 | + if ( $warmup_query->have_posts() ) { |
|
31 | + while ( $warmup_query->have_posts() ) { |
|
32 | + $warmup_query->the_post(); |
|
33 | + lsx_entry_before(); |
|
34 | + if ( 'workout' === get_post_type() ) { |
|
35 | + $connected_workouts = array( get_the_ID() ); |
|
36 | + ?> |
|
37 | 37 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
38 | 38 | <?php lsx_entry_top(); ?> |
39 | 39 | <div class="entry-content"> |
40 | 40 | <?php |
41 | - the_content(); |
|
42 | - wp_link_pages( array( |
|
43 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
44 | - 'after' => '</div></div>', |
|
45 | - 'link_before' => '<span>', |
|
46 | - 'link_after' => '</span>', |
|
47 | - ) ); |
|
48 | - ?> |
|
41 | + the_content(); |
|
42 | + wp_link_pages( array( |
|
43 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
44 | + 'after' => '</div></div>', |
|
45 | + 'link_before' => '<span>', |
|
46 | + 'link_after' => '</span>', |
|
47 | + ) ); |
|
48 | + ?> |
|
49 | 49 | </div><!-- .entry-content --> |
50 | 50 | <?php lsx_entry_bottom(); ?> |
51 | 51 | </article><!-- #post-## --> |
52 | 52 | <?php |
53 | - lsx_health_plan_workout_sets(); |
|
54 | - } else { |
|
55 | - ?> |
|
53 | + lsx_health_plan_workout_sets(); |
|
54 | + } else { |
|
55 | + ?> |
|
56 | 56 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
57 | 57 | <?php lsx_entry_top(); ?> |
58 | 58 | <div class="entry-content"> |
59 | 59 | <?php |
60 | - the_content(); |
|
61 | - wp_link_pages( array( |
|
62 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
63 | - 'after' => '</div></div>', |
|
64 | - 'link_before' => '<span>', |
|
65 | - 'link_after' => '</span>', |
|
66 | - ) ); |
|
67 | - ?> |
|
60 | + the_content(); |
|
61 | + wp_link_pages( array( |
|
62 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
63 | + 'after' => '</div></div>', |
|
64 | + 'link_before' => '<span>', |
|
65 | + 'link_after' => '</span>', |
|
66 | + ) ); |
|
67 | + ?> |
|
68 | 68 | </div><!-- .entry-content --> |
69 | 69 | <?php lsx_entry_bottom(); ?> |
70 | 70 | </article><!-- #post-## --> |
71 | 71 | <?php |
72 | - } |
|
72 | + } |
|
73 | 73 | |
74 | - lsx_entry_after(); |
|
75 | - } |
|
76 | - wp_reset_postdata(); |
|
77 | - } |
|
74 | + lsx_entry_after(); |
|
75 | + } |
|
76 | + wp_reset_postdata(); |
|
77 | + } |
|
78 | 78 | } |
@@ -17,40 +17,40 @@ discard block |
||
17 | 17 | |
18 | 18 | // Check for shortcode overrides. |
19 | 19 | if ( null !== $shortcode_args ) { |
20 | - if ( isset( $shortcode_args['columns'] ) ) { |
|
21 | - $column_class = $shortcode_args['columns']; |
|
22 | - $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
23 | - } |
|
24 | - if ( isset( $shortcode_args['link'] ) ) { |
|
25 | - $link_setting = $shortcode_args['link']; |
|
26 | - // Setup our link and content. |
|
27 | - switch ( $link_setting ) { |
|
28 | - case 'single': |
|
29 | - $link_html = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">'; |
|
30 | - $link_close = '</a>'; |
|
31 | - break; |
|
20 | + if ( isset( $shortcode_args['columns'] ) ) { |
|
21 | + $column_class = $shortcode_args['columns']; |
|
22 | + $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
23 | + } |
|
24 | + if ( isset( $shortcode_args['link'] ) ) { |
|
25 | + $link_setting = $shortcode_args['link']; |
|
26 | + // Setup our link and content. |
|
27 | + switch ( $link_setting ) { |
|
28 | + case 'single': |
|
29 | + $link_html = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">'; |
|
30 | + $link_close = '</a>'; |
|
31 | + break; |
|
32 | 32 | |
33 | - case 'modal': |
|
34 | - $link_html = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">'; |
|
35 | - $link_close = '</a>'; |
|
36 | - $modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' ); |
|
37 | - $modal_args = array( |
|
38 | - 'modal_content' => $modal_content_setting, |
|
39 | - ); |
|
40 | - // We call the button to register the modal, but we do not output it. |
|
41 | - lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); |
|
42 | - break; |
|
33 | + case 'modal': |
|
34 | + $link_html = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">'; |
|
35 | + $link_close = '</a>'; |
|
36 | + $modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' ); |
|
37 | + $modal_args = array( |
|
38 | + 'modal_content' => $modal_content_setting, |
|
39 | + ); |
|
40 | + // We call the button to register the modal, but we do not output it. |
|
41 | + lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); |
|
42 | + break; |
|
43 | 43 | |
44 | - case 'none': |
|
45 | - default: |
|
46 | - $link_html = ''; |
|
47 | - $link_close = ''; |
|
48 | - break; |
|
49 | - } |
|
50 | - } |
|
51 | - if ( isset( $shortcode_args['description'] ) ) { |
|
52 | - $content_setting = $shortcode_args['description']; |
|
53 | - } |
|
44 | + case 'none': |
|
45 | + default: |
|
46 | + $link_html = ''; |
|
47 | + $link_close = ''; |
|
48 | + break; |
|
49 | + } |
|
50 | + } |
|
51 | + if ( isset( $shortcode_args['description'] ) ) { |
|
52 | + $content_setting = $shortcode_args['description']; |
|
53 | + } |
|
54 | 54 | } |
55 | 55 | ?> |
56 | 56 | |
@@ -61,17 +61,17 @@ discard block |
||
61 | 61 | <div class="exercise-feature-img"> |
62 | 62 | <a href="<?php echo esc_url( get_permalink() ); ?>"> |
63 | 63 | <?php |
64 | - $featured_image = get_the_post_thumbnail(); |
|
65 | - if ( ! empty( $featured_image ) && '' !== $featured_image ) { |
|
66 | - the_post_thumbnail( 'medium', array( |
|
67 | - 'class' => 'aligncenter', |
|
68 | - ) ); |
|
69 | - } else { |
|
70 | - ?> |
|
64 | + $featured_image = get_the_post_thumbnail(); |
|
65 | + if ( ! empty( $featured_image ) && '' !== $featured_image ) { |
|
66 | + the_post_thumbnail( 'medium', array( |
|
67 | + 'class' => 'aligncenter', |
|
68 | + ) ); |
|
69 | + } else { |
|
70 | + ?> |
|
71 | 71 | <img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>"> |
72 | 72 | <?php |
73 | - } |
|
74 | - ?> |
|
73 | + } |
|
74 | + ?> |
|
75 | 75 | </a> |
76 | 76 | </div> |
77 | 77 | <div class="content-box exercise-content-box white-bg"> |
@@ -80,16 +80,16 @@ discard block |
||
80 | 80 | <?php lsx_health_plan_exercise_data(); ?> |
81 | 81 | </div> |
82 | 82 | <?php |
83 | - if ( '' !== $content_setting && 'excerpt' === $content_setting ) { |
|
84 | - if ( ! has_excerpt() ) { |
|
85 | - $content = wp_trim_words( get_the_content(), 20 ); |
|
86 | - $content = '<p>' . $content . '</p>'; |
|
87 | - } else { |
|
88 | - $content = apply_filters( 'the_excerpt', get_the_excerpt() ); |
|
89 | - } |
|
90 | - echo wp_kses_post( $content ); |
|
91 | - } |
|
92 | - ?> |
|
83 | + if ( '' !== $content_setting && 'excerpt' === $content_setting ) { |
|
84 | + if ( ! has_excerpt() ) { |
|
85 | + $content = wp_trim_words( get_the_content(), 20 ); |
|
86 | + $content = '<p>' . $content . '</p>'; |
|
87 | + } else { |
|
88 | + $content = apply_filters( 'the_excerpt', get_the_excerpt() ); |
|
89 | + } |
|
90 | + echo wp_kses_post( $content ); |
|
91 | + } |
|
92 | + ?> |
|
93 | 93 | <a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See exercise', 'lsx-health-plan' ); ?></a> |
94 | 94 | </div> |
95 | 95 | <?php lsx_entry_bottom(); ?> |
@@ -17,15 +17,15 @@ discard block |
||
17 | 17 | |
18 | 18 | <div class="entry-content"> |
19 | 19 | <?php |
20 | - //the_content(); |
|
20 | + //the_content(); |
|
21 | 21 | |
22 | - wp_link_pages( array( |
|
23 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
24 | - 'after' => '</div></div>', |
|
25 | - 'link_before' => '<span>', |
|
26 | - 'link_after' => '</span>', |
|
27 | - ) ); |
|
28 | - ?> |
|
22 | + wp_link_pages( array( |
|
23 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
24 | + 'after' => '</div></div>', |
|
25 | + 'link_before' => '<span>', |
|
26 | + 'link_after' => '</span>', |
|
27 | + ) ); |
|
28 | + ?> |
|
29 | 29 | <div class="single-plan-section-title recipes-plan"> |
30 | 30 | <?php lsx_get_svg_icon( 'recipes.svg' ); ?> |
31 | 31 | <h2 class="title-lined"><?php esc_html_e( 'Recipes', 'lsx-health-plan' ); ?> <span class="blue-title"><?php the_title(); ?></span></h2> |
@@ -34,30 +34,30 @@ discard block |
||
34 | 34 | <div class="recipes"> |
35 | 35 | <div class="row eating-row"> |
36 | 36 | <?php |
37 | - $connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true ); |
|
38 | - if ( empty( $connected_recipes ) ) { |
|
39 | - $options = \lsx_health_plan\functions\get_option( 'all' ); |
|
40 | - if ( isset( $options['connected_recipes'] ) && '' !== $options['connected_recipes'] && ! empty( $options['connected_recipes'] ) ) { |
|
41 | - $connected_recipes = $options['connected_recipes']; |
|
42 | - if ( ! array( $connected_recipes ) ) { |
|
43 | - $connected_recipes = array( $connected_recipes ); |
|
44 | - } |
|
45 | - } |
|
46 | - } |
|
47 | - $args = array( |
|
48 | - 'orderby' => 'date', |
|
49 | - 'order' => 'DESC', |
|
50 | - 'post_type' => 'recipe', |
|
51 | - 'post__in' => $connected_recipes, |
|
52 | - ); |
|
53 | - $recipes = new WP_Query( $args ); |
|
37 | + $connected_recipes = get_post_meta( get_the_ID(), 'connected_recipes', true ); |
|
38 | + if ( empty( $connected_recipes ) ) { |
|
39 | + $options = \lsx_health_plan\functions\get_option( 'all' ); |
|
40 | + if ( isset( $options['connected_recipes'] ) && '' !== $options['connected_recipes'] && ! empty( $options['connected_recipes'] ) ) { |
|
41 | + $connected_recipes = $options['connected_recipes']; |
|
42 | + if ( ! array( $connected_recipes ) ) { |
|
43 | + $connected_recipes = array( $connected_recipes ); |
|
44 | + } |
|
45 | + } |
|
46 | + } |
|
47 | + $args = array( |
|
48 | + 'orderby' => 'date', |
|
49 | + 'order' => 'DESC', |
|
50 | + 'post_type' => 'recipe', |
|
51 | + 'post__in' => $connected_recipes, |
|
52 | + ); |
|
53 | + $recipes = new WP_Query( $args ); |
|
54 | 54 | |
55 | - if ( $recipes->have_posts() ) { |
|
56 | - while ( $recipes->have_posts() ) { |
|
57 | - $recipes->the_post(); |
|
58 | - $post_id = get_the_id(); |
|
55 | + if ( $recipes->have_posts() ) { |
|
56 | + while ( $recipes->have_posts() ) { |
|
57 | + $recipes->the_post(); |
|
58 | + $post_id = get_the_id(); |
|
59 | 59 | |
60 | - ?> |
|
60 | + ?> |
|
61 | 61 | <div class="col-md-4 recipe-column"> |
62 | 62 | <div class="content-box box-shadow"> |
63 | 63 | <h3 class="recipe-title title-lined"><?php the_title(); ?></h3> |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | </div> |
67 | 67 | </div> |
68 | 68 | <?php |
69 | - } |
|
70 | - } |
|
71 | - ?> |
|
69 | + } |
|
70 | + } |
|
71 | + ?> |
|
72 | 72 | <?php wp_reset_postdata(); ?> |
73 | 73 | </div> |
74 | 74 | </div> |
@@ -81,19 +81,19 @@ discard block |
||
81 | 81 | <?php lsx_content_post_tags(); ?> |
82 | 82 | |
83 | 83 | <?php |
84 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
85 | - lsx_content_sharing(); |
|
86 | - } else { |
|
87 | - if ( function_exists( 'sharing_display' ) ) { |
|
88 | - sharing_display( '', true ); |
|
89 | - } |
|
84 | + if ( class_exists( 'LSX_Sharing' ) ) { |
|
85 | + lsx_content_sharing(); |
|
86 | + } else { |
|
87 | + if ( function_exists( 'sharing_display' ) ) { |
|
88 | + sharing_display( '', true ); |
|
89 | + } |
|
90 | 90 | |
91 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
92 | - $custom_likes = new Jetpack_Likes(); |
|
93 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
94 | - } |
|
95 | - } |
|
96 | - ?> |
|
91 | + if ( class_exists( 'Jetpack_Likes' ) ) { |
|
92 | + $custom_likes = new Jetpack_Likes(); |
|
93 | + echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
94 | + } |
|
95 | + } |
|
96 | + ?> |
|
97 | 97 | <?php endif ?> |
98 | 98 | </footer><!-- .footer-meta --> |
99 | 99 |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | <?php lsx_content_wrap_before(); ?> |
11 | 11 | |
12 | 12 | <?php |
13 | - $page_id = get_the_ID(); |
|
14 | - $redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id; |
|
13 | + $page_id = get_the_ID(); |
|
14 | + $redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id; |
|
15 | 15 | ?> |
16 | 16 | |
17 | 17 | <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | |
21 | 21 | <!-- Begining restricted content --> |
22 | 22 | <?php |
23 | - if ( current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) { |
|
24 | - ?> |
|
23 | + if ( current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) { |
|
24 | + ?> |
|
25 | 25 | <main id="main" role="main"> |
26 | 26 | |
27 | 27 | <?php lsx_content_top(); ?> |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | <div class="row"> |
31 | 31 | <?php if ( have_posts() ) : ?> |
32 | 32 | <?php |
33 | - while ( have_posts() ) : |
|
34 | - the_post(); |
|
35 | - ?> |
|
33 | + while ( have_posts() ) : |
|
34 | + the_post(); |
|
35 | + ?> |
|
36 | 36 | |
37 | 37 | <?php include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-exercise.php'; ?> |
38 | 38 | |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | </main><!-- #main --> |
52 | 52 | |
53 | 53 | <?php |
54 | - } else { |
|
55 | - wp_redirect( $redirect ); |
|
56 | - exit; |
|
57 | - } |
|
58 | - ?> |
|
54 | + } else { |
|
55 | + wp_redirect( $redirect ); |
|
56 | + exit; |
|
57 | + } |
|
58 | + ?> |
|
59 | 59 | |
60 | 60 | <?php lsx_content_after(); ?> |
61 | 61 |
@@ -33,17 +33,17 @@ discard block |
||
33 | 33 | <div class="row"> |
34 | 34 | <div class="col-md-6 recipe-image lsx-hp-shadow"> |
35 | 35 | <?php |
36 | - $featured_image = get_the_post_thumbnail(); |
|
37 | - if ( ! empty( $featured_image ) && '' !== $featured_image ) { |
|
38 | - the_post_thumbnail( 'large', array( |
|
39 | - 'class' => 'aligncenter', |
|
40 | - ) ); |
|
41 | - } else { |
|
42 | - ?> |
|
36 | + $featured_image = get_the_post_thumbnail(); |
|
37 | + if ( ! empty( $featured_image ) && '' !== $featured_image ) { |
|
38 | + the_post_thumbnail( 'large', array( |
|
39 | + 'class' => 'aligncenter', |
|
40 | + ) ); |
|
41 | + } else { |
|
42 | + ?> |
|
43 | 43 | <img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>"> |
44 | 44 | <?php |
45 | - } |
|
46 | - ?> |
|
45 | + } |
|
46 | + ?> |
|
47 | 47 | <?php if ( ( ! empty( $prep_time ) ) || ( ! empty( $cooking_time ) ) || ( ! empty( $serves ) ) || ( ! empty( $portion ) ) || ( ! empty( $energy ) ) || ( ! empty( $protein ) ) || ( ! empty( $carbohydrates ) ) || ( ! empty( $fibre ) ) || ( ! empty( $fat ) ) ) { ?> |
48 | 48 | <div class="recipe-data"> |
49 | 49 | <?php lsx_health_plan_recipe_data(); ?> |
@@ -54,25 +54,25 @@ discard block |
||
54 | 54 | <?php the_content(); ?> |
55 | 55 | <div class="back-plan-btn"> |
56 | 56 | <?php |
57 | - if ( function_exists( 'wc_get_page_id' ) ) { |
|
58 | - ?> |
|
57 | + if ( function_exists( 'wc_get_page_id' ) ) { |
|
58 | + ?> |
|
59 | 59 | <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> |
60 | 60 | <?php |
61 | - } |
|
62 | - ?> |
|
61 | + } |
|
62 | + ?> |
|
63 | 63 | </div> |
64 | 64 | </div> |
65 | 65 | </div> |
66 | 66 | <?php |
67 | - wp_link_pages( |
|
68 | - array( |
|
69 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
70 | - 'after' => '</div></div>', |
|
71 | - 'link_before' => '<span>', |
|
72 | - 'link_after' => '</span>', |
|
73 | - ) |
|
74 | - ); |
|
75 | - ?> |
|
67 | + wp_link_pages( |
|
68 | + array( |
|
69 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
70 | + 'after' => '</div></div>', |
|
71 | + 'link_before' => '<span>', |
|
72 | + 'link_after' => '</span>', |
|
73 | + ) |
|
74 | + ); |
|
75 | + ?> |
|
76 | 76 | </div><!-- .entry-content --> |
77 | 77 | |
78 | 78 | <footer class="footer-meta clearfix"> |
@@ -81,19 +81,19 @@ discard block |
||
81 | 81 | <?php lsx_content_post_tags(); ?> |
82 | 82 | |
83 | 83 | <?php |
84 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
85 | - lsx_content_sharing(); |
|
86 | - } else { |
|
87 | - if ( function_exists( 'sharing_display' ) ) { |
|
88 | - sharing_display( '', true ); |
|
89 | - } |
|
84 | + if ( class_exists( 'LSX_Sharing' ) ) { |
|
85 | + lsx_content_sharing(); |
|
86 | + } else { |
|
87 | + if ( function_exists( 'sharing_display' ) ) { |
|
88 | + sharing_display( '', true ); |
|
89 | + } |
|
90 | 90 | |
91 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
92 | - $custom_likes = new Jetpack_Likes(); |
|
93 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
94 | - } |
|
95 | - } |
|
96 | - ?> |
|
91 | + if ( class_exists( 'Jetpack_Likes' ) ) { |
|
92 | + $custom_likes = new Jetpack_Likes(); |
|
93 | + echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
94 | + } |
|
95 | + } |
|
96 | + ?> |
|
97 | 97 | <?php endif ?> |
98 | 98 | </footer><!-- .footer-meta --> |
99 | 99 |
@@ -22,9 +22,9 @@ |
||
22 | 22 | <div class="post-wrapper"> |
23 | 23 | |
24 | 24 | <?php |
25 | - while ( have_posts() ) : |
|
26 | - the_post(); |
|
27 | - ?> |
|
25 | + while ( have_posts() ) : |
|
26 | + the_post(); |
|
27 | + ?> |
|
28 | 28 | |
29 | 29 | <?php include LSX_HEALTH_PLAN_PATH . '/templates/content-plan.php'; ?> |
30 | 30 |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | $args = array( |
9 | - 'orderby' => 'date', |
|
10 | - 'order' => 'DESC', |
|
11 | - 'post_type' => 'video', |
|
12 | - 'posts_per_page' => 3, |
|
13 | - 'meta_key' => 'video_featured_video', |
|
14 | - 'meta_compare' => 'EXISTS', |
|
9 | + 'orderby' => 'date', |
|
10 | + 'order' => 'DESC', |
|
11 | + 'post_type' => 'video', |
|
12 | + 'posts_per_page' => 3, |
|
13 | + 'meta_key' => 'video_featured_video', |
|
14 | + 'meta_compare' => 'EXISTS', |
|
15 | 15 | ); |
16 | 16 | $videos = new WP_Query( $args ); |
17 | 17 | ?> |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | <h2 class="title-lined"><?php esc_html_e( 'Featured Workout', 'lsx-health-plan' ); ?></h2> |
21 | 21 | <div class="lsx-videos-shortcode lsx-videos-slider slick-slider slick-dotted slick-has-arrows" data-slick="{'slidesToShow': 1, 'slidesToScroll': 1}" > |
22 | 22 | <?php |
23 | - if ( $videos->have_posts() ) : |
|
24 | - while ( $videos->have_posts() ) : |
|
25 | - $videos->the_post(); |
|
23 | + if ( $videos->have_posts() ) : |
|
24 | + while ( $videos->have_posts() ) : |
|
25 | + $videos->the_post(); |
|
26 | 26 | |
27 | - $featured = get_post_meta( get_the_ID(), 'video_featured_video', true ); |
|
28 | - $giphy = get_post_meta( get_the_ID(), 'video_giphy_source', true ); |
|
29 | - $youtube = esc_url( get_post_meta( get_the_ID(), 'video_youtube_source', 1 ) ); |
|
30 | - ?> |
|
27 | + $featured = get_post_meta( get_the_ID(), 'video_featured_video', true ); |
|
28 | + $giphy = get_post_meta( get_the_ID(), 'video_giphy_source', true ); |
|
29 | + $youtube = esc_url( get_post_meta( get_the_ID(), 'video_youtube_source', 1 ) ); |
|
30 | + ?> |
|
31 | 31 | <div class="lsx-videos-slot"> |
32 | 32 | <div class="row"> |
33 | 33 | <div class="col-md-4"> |
@@ -36,12 +36,12 @@ discard block |
||
36 | 36 | </div> |
37 | 37 | <div class="col-md-8"> |
38 | 38 | <?php |
39 | - if ( ! empty( $giphy ) ) { |
|
40 | - echo $giphy; // WPCS: XSS OK. |
|
41 | - } elseif ( ! empty( $youtube ) ) { |
|
42 | - echo wp_oembed_get( $youtube ); // WPCS: XSS OK. |
|
43 | - } |
|
44 | - ?> |
|
39 | + if ( ! empty( $giphy ) ) { |
|
40 | + echo $giphy; // WPCS: XSS OK. |
|
41 | + } elseif ( ! empty( $youtube ) ) { |
|
42 | + echo wp_oembed_get( $youtube ); // WPCS: XSS OK. |
|
43 | + } |
|
44 | + ?> |
|
45 | 45 | </div> |
46 | 46 | </div> |
47 | 47 | </div> |