@@ -26,24 +26,24 @@ discard block |
||
26 | 26 | |
27 | 27 | <div class="entry-content"> |
28 | 28 | <?php |
29 | - wp_link_pages( |
|
30 | - array( |
|
31 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
32 | - 'after' => '</div></div>', |
|
33 | - 'link_before' => '<span>', |
|
34 | - 'link_after' => '</span>', |
|
35 | - ) |
|
36 | - ); |
|
37 | - ?> |
|
29 | + wp_link_pages( |
|
30 | + array( |
|
31 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
32 | + 'after' => '</div></div>', |
|
33 | + 'link_before' => '<span>', |
|
34 | + 'link_after' => '</span>', |
|
35 | + ) |
|
36 | + ); |
|
37 | + ?> |
|
38 | 38 | <div class="single-plan-inner workout-content"> |
39 | 39 | <?php |
40 | - if ( is_singular( 'workout' ) ) { ?> |
|
40 | + if ( is_singular( 'workout' ) ) { ?> |
|
41 | 41 | <div class="single-plan-section-title workout title-lined"> |
42 | 42 | <?php lsx_get_svg_icon( 'work.svg' ); ?> |
43 | 43 | <h2><?php the_title(); ?></h2> |
44 | 44 | <?php if ( class_exists( 'LSX_Sharing' ) ) { |
45 | - lsx_content_sharing(); |
|
46 | - } ?> |
|
45 | + lsx_content_sharing(); |
|
46 | + } ?> |
|
47 | 47 | </div> |
48 | 48 | <?php } else { ?> |
49 | 49 | <div class="single-plan-section-title workout title-lined"> |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | </div> |
53 | 53 | <?php } ?> |
54 | 54 | <?php |
55 | - if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) { |
|
56 | - ?> |
|
55 | + if ( lsx_health_plan_has_warmup() && ( ! is_singular( 'workout' ) ) ) { |
|
56 | + ?> |
|
57 | 57 | <div class="workout-instructions"> |
58 | 58 | <div class="row"> |
59 | 59 | <div class="col-md-12"> |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | </div> |
66 | 66 | </div> |
67 | 67 | <?php |
68 | - } |
|
69 | - ?> |
|
68 | + } |
|
69 | + ?> |
|
70 | 70 | |
71 | 71 | <?php lsx_health_plan_workout_sets(); ?> |
72 | 72 | </div> |
@@ -82,5 +82,5 @@ discard block |
||
82 | 82 | <?php } ?> |
83 | 83 | <?php |
84 | 84 | if ( ! empty( $connected_articles ) ) { |
85 | - lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) ); |
|
85 | + lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) ); |
|
86 | 86 | } |
@@ -8,10 +8,10 @@ discard block |
||
8 | 8 | $section_key = get_query_var( 'section' ); |
9 | 9 | $endpoint_key = get_query_var( 'endpoint' ); |
10 | 10 | if ( '' !== $section_key && '' === $endpoint && \lsx_health_plan\functions\plan\has_sections() ) { |
11 | - $section_info = \lsx_health_plan\functions\plan\get_section_info( $section_key ); |
|
12 | - if ( isset( $section_info['description'] ) && '' !== $section_info['description'] ) { |
|
13 | - global $shortcode_args; |
|
14 | - ?> |
|
11 | + $section_info = \lsx_health_plan\functions\plan\get_section_info( $section_key ); |
|
12 | + if ( isset( $section_info['description'] ) && '' !== $section_info['description'] ) { |
|
13 | + global $shortcode_args; |
|
14 | + ?> |
|
15 | 15 | <?php lsx_entry_before(); ?> |
16 | 16 | |
17 | 17 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | <div class="entry-content"> |
26 | 26 | <div class="overview"> |
27 | 27 | <?php |
28 | - echo wp_kses_post( apply_filters( 'the_content', $section_info['description'] ) ); |
|
29 | - |
|
30 | - wp_link_pages( array( |
|
31 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
32 | - 'after' => '</div></div>', |
|
33 | - 'link_before' => '<span>', |
|
34 | - 'link_after' => '</span>', |
|
35 | - ) ); |
|
36 | - ?> |
|
28 | + echo wp_kses_post( apply_filters( 'the_content', $section_info['description'] ) ); |
|
29 | + |
|
30 | + wp_link_pages( array( |
|
31 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
32 | + 'after' => '</div></div>', |
|
33 | + 'link_before' => '<span>', |
|
34 | + 'link_after' => '</span>', |
|
35 | + ) ); |
|
36 | + ?> |
|
37 | 37 | </div> |
38 | 38 | </div><!-- .entry-content --> |
39 | 39 | <?php if ( null === $shortcode_args ) { ?> |
@@ -51,6 +51,6 @@ discard block |
||
51 | 51 | </article><!-- #post-## --> |
52 | 52 | |
53 | 53 | <?php |
54 | - } |
|
54 | + } |
|
55 | 55 | } |
56 | 56 | ?> |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | <div class="entry-content"> |
27 | 27 | <div class="single-plan-inner meal-content"> |
28 | 28 | <?php |
29 | - if ( is_singular( 'meal' ) ) { ?> |
|
29 | + if ( is_singular( 'meal' ) ) { ?> |
|
30 | 30 | <div class="single-plan-section-title meal-plan title-lined"> |
31 | 31 | <?php lsx_get_svg_icon( 'meal.svg' ); ?> |
32 | 32 | <h2><?php the_title(); ?></h2> |
33 | 33 | <?php if ( class_exists( 'LSX_Sharing' ) ) { |
34 | - lsx_content_sharing(); |
|
35 | - } ?> |
|
34 | + lsx_content_sharing(); |
|
35 | + } ?> |
|
36 | 36 | </div> |
37 | 37 | <?php } else { ?> |
38 | 38 | <div class="single-plan-section-title meal-plan title-lined"> |
@@ -55,18 +55,18 @@ discard block |
||
55 | 55 | <?php } ?> |
56 | 56 | |
57 | 57 | <?php |
58 | - // Shoping list |
|
59 | - $shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true ); |
|
60 | - if ( ! empty( $shopping_list ) ) { |
|
61 | - ?> |
|
58 | + // Shoping list |
|
59 | + $shopping_list = get_post_meta( get_the_ID(), 'meal_shopping_list', true ); |
|
60 | + if ( ! empty( $shopping_list ) ) { |
|
61 | + ?> |
|
62 | 62 | <a class="btn border-btn btn-shopping" href="<?php echo esc_url( get_page_link( $shopping_list ) ); ?>" target="_blank"><?php esc_html_e( 'Download Shopping List', 'lsx-health-plan' ); ?><i class="fa fa-download" aria-hidden="true"></i></a> |
63 | 63 | <?php |
64 | - } |
|
64 | + } |
|
65 | 65 | |
66 | - ?> |
|
66 | + ?> |
|
67 | 67 | </div> |
68 | 68 | |
69 | 69 | <?php |
70 | 70 | if ( ! empty( $connected_articles ) ) { |
71 | - lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) ); |
|
71 | + lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) ); |
|
72 | 72 | } |
@@ -8,10 +8,10 @@ discard block |
||
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 | ?> |
@@ -19,25 +19,25 @@ discard block |
||
19 | 19 | <?php |
20 | 20 | |
21 | 21 | if ( false !== $warm_up && '' !== $warm_up ) { |
22 | - if ( ! is_array( $warm_up ) ) { |
|
23 | - $warm_up = array( $warm_up ); |
|
24 | - } |
|
22 | + if ( ! is_array( $warm_up ) ) { |
|
23 | + $warm_up = array( $warm_up ); |
|
24 | + } |
|
25 | 25 | |
26 | - $warmup_type = array( 'page', 'workout', 'exercise' ); |
|
27 | - $warmup_query = new WP_Query( |
|
28 | - array( |
|
29 | - 'post__in' => $warm_up, |
|
30 | - 'post_type' => $warmup_type, |
|
31 | - ) |
|
32 | - ); |
|
26 | + $warmup_type = array( 'page', 'workout', 'exercise' ); |
|
27 | + $warmup_query = new WP_Query( |
|
28 | + array( |
|
29 | + 'post__in' => $warm_up, |
|
30 | + 'post_type' => $warmup_type, |
|
31 | + ) |
|
32 | + ); |
|
33 | 33 | |
34 | - if ( $warmup_query->have_posts() ) { |
|
35 | - while ( $warmup_query->have_posts() ) { |
|
36 | - $warmup_query->the_post(); |
|
37 | - lsx_entry_before(); |
|
38 | - if ( 'workout' === get_post_type() ) { |
|
39 | - $connected_workouts = array( get_the_ID() ); |
|
40 | - ?> |
|
34 | + if ( $warmup_query->have_posts() ) { |
|
35 | + while ( $warmup_query->have_posts() ) { |
|
36 | + $warmup_query->the_post(); |
|
37 | + lsx_entry_before(); |
|
38 | + if ( 'workout' === get_post_type() ) { |
|
39 | + $connected_workouts = array( get_the_ID() ); |
|
40 | + ?> |
|
41 | 41 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
42 | 42 | <?php lsx_entry_top(); ?> |
43 | 43 | <div class="entry-content"> |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | <h2><?php esc_html_e( 'Warm Up', 'lsx-health-plan' ); ?></h2> |
48 | 48 | </div> |
49 | 49 | <?php |
50 | - the_content(); |
|
51 | - wp_link_pages( array( |
|
52 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
53 | - 'after' => '</div></div>', |
|
54 | - 'link_before' => '<span>', |
|
55 | - 'link_after' => '</span>', |
|
56 | - ) ); |
|
57 | - ?> |
|
50 | + the_content(); |
|
51 | + wp_link_pages( array( |
|
52 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
53 | + 'after' => '</div></div>', |
|
54 | + 'link_before' => '<span>', |
|
55 | + 'link_after' => '</span>', |
|
56 | + ) ); |
|
57 | + ?> |
|
58 | 58 | </div> |
59 | 59 | </div><!-- .entry-content --> |
60 | 60 | <?php lsx_entry_bottom(); ?> |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | <?php } ?> |
70 | 70 | </article><!-- #post-## --> |
71 | 71 | <?php |
72 | - lsx_health_plan_workout_sets(); |
|
73 | - } else { |
|
74 | - ?> |
|
72 | + lsx_health_plan_workout_sets(); |
|
73 | + } else { |
|
74 | + ?> |
|
75 | 75 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
76 | 76 | <?php lsx_entry_top(); ?> |
77 | 77 | <div class="entry-content"> |
@@ -81,24 +81,24 @@ discard block |
||
81 | 81 | <h2><?php esc_html_e( 'Warm Up', 'lsx-health-plan' ); ?></h2> |
82 | 82 | </div> |
83 | 83 | <?php |
84 | - the_content(); |
|
85 | - wp_link_pages( array( |
|
86 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
87 | - 'after' => '</div></div>', |
|
88 | - 'link_before' => '<span>', |
|
89 | - 'link_after' => '</span>', |
|
90 | - ) ); |
|
91 | - ?> |
|
84 | + the_content(); |
|
85 | + wp_link_pages( array( |
|
86 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
87 | + 'after' => '</div></div>', |
|
88 | + 'link_before' => '<span>', |
|
89 | + 'link_after' => '</span>', |
|
90 | + ) ); |
|
91 | + ?> |
|
92 | 92 | </div> |
93 | 93 | </div><!-- .entry-content --> |
94 | 94 | <?php lsx_entry_bottom(); ?> |
95 | 95 | </article><!-- #post-## --> |
96 | 96 | <?php |
97 | - } |
|
97 | + } |
|
98 | 98 | |
99 | - } |
|
100 | - wp_reset_postdata(); |
|
101 | - } |
|
99 | + } |
|
100 | + wp_reset_postdata(); |
|
101 | + } |
|
102 | 102 | } |
103 | 103 | ?> |
104 | 104 | </div> |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | |
12 | 12 | <?php |
13 | 13 | $args = array( |
14 | - 'post_parent' => get_the_ID(), |
|
15 | - 'post_type' => 'plan', |
|
14 | + 'post_parent' => get_the_ID(), |
|
15 | + 'post_type' => 'plan', |
|
16 | 16 | ); |
17 | 17 | |
18 | 18 | $plan_id = get_the_ID(); |
@@ -28,18 +28,18 @@ discard block |
||
28 | 28 | $small_description = get_post_meta( get_the_ID(), ( $plan . '_short_description' ), true ); |
29 | 29 | |
30 | 30 | if ( ! empty( $has_sections ) && empty( $is_section ) ) { |
31 | - $plan_type_class = 'parent-plan'; |
|
31 | + $plan_type_class = 'parent-plan'; |
|
32 | 32 | } |
33 | 33 | if ( ! empty( $has_sections ) && ! empty( $is_section ) ) { |
34 | - $plan_type_class = 'child-plan'; |
|
34 | + $plan_type_class = 'child-plan'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | // Get the plan restrictions. |
38 | 38 | if ( function_exists( 'wc_memberships_is_post_content_restricted' ) && wc_memberships_is_post_content_restricted( get_the_ID() ) ) { |
39 | - $restricted = ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() ); |
|
39 | + $restricted = ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() ); |
|
40 | 40 | } |
41 | 41 | if ( false === $restricted ) { |
42 | - $round_progress = round( \lsx_health_plan\functions\get_progress( get_the_ID() ), 0 ); |
|
42 | + $round_progress = round( \lsx_health_plan\functions\get_progress( get_the_ID() ), 0 ); |
|
43 | 43 | } |
44 | 44 | ?> |
45 | 45 | |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | <?php } ?> |
60 | 60 | |
61 | 61 | <?php |
62 | - if ( ! empty( $has_sections ) ) { |
|
63 | - if ( false === $is_section ) { |
|
64 | - ?> |
|
62 | + if ( ! empty( $has_sections ) ) { |
|
63 | + if ( false === $is_section ) { |
|
64 | + ?> |
|
65 | 65 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
66 | 66 | <div class="entry-content"> |
67 | 67 | <div class="single-plan-inner main-plan-content"> |
@@ -69,47 +69,47 @@ discard block |
||
69 | 69 | <?php lsx_get_svg_icon( 'my-plan.svg' ); ?> |
70 | 70 | <h2><?php echo esc_html_e( 'Your Plan', 'lsx-health-plan' ); ?></h2> |
71 | 71 | <?php if ( class_exists( 'LSX_Sharing' ) ) { |
72 | - lsx_content_sharing(); |
|
73 | - } ?> |
|
72 | + lsx_content_sharing(); |
|
73 | + } ?> |
|
74 | 74 | </div> |
75 | 75 | <div class="plan"> |
76 | 76 | <div class="set-box set content-box entry-content"> |
77 | 77 | <div class="plan-top-content"> |
78 | 78 | <?php |
79 | - if ( $connected_members ) { |
|
80 | - echo wp_kses_post( lsx_hp_member_connected( $connected_members, $plan ) ); |
|
81 | - } |
|
82 | - if ( false === $restricted ) { |
|
83 | - echo wp_kses_post( '<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>' ); |
|
84 | - } |
|
85 | - if ( $small_description ) { |
|
86 | - ?> |
|
79 | + if ( $connected_members ) { |
|
80 | + echo wp_kses_post( lsx_hp_member_connected( $connected_members, $plan ) ); |
|
81 | + } |
|
82 | + if ( false === $restricted ) { |
|
83 | + echo wp_kses_post( '<span class="progress"><progress class="bar" value="' . $round_progress . '" max="100"> ' . $round_progress . '% </progress><span>' . $round_progress . '%</span></span>' ); |
|
84 | + } |
|
85 | + if ( $small_description ) { |
|
86 | + ?> |
|
87 | 87 | <div class="the-content"> |
88 | 88 | <span><?php echo esc_html( $small_description ); ?></span> |
89 | 89 | </div> |
90 | 90 | <?php |
91 | 91 | |
92 | - } |
|
93 | - ?> |
|
92 | + } |
|
93 | + ?> |
|
94 | 94 | </div> |
95 | 95 | <?php |
96 | - if ( lsx_health_plan_has_tips() ) { |
|
97 | - echo wp_kses_post( do_shortcode( '[lsx_health_plan_featured_tips_block]' ) ); |
|
98 | - } ?> |
|
96 | + if ( lsx_health_plan_has_tips() ) { |
|
97 | + echo wp_kses_post( do_shortcode( '[lsx_health_plan_featured_tips_block]' ) ); |
|
98 | + } ?> |
|
99 | 99 | </div> |
100 | 100 | <div class="the-plan-content"> |
101 | 101 | <?php |
102 | - echo do_shortcode( '[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]' ); |
|
102 | + echo do_shortcode( '[lsx_health_plan_day_plan_block week_view="true" show_downloads="true" plan="' . get_the_ID() . '"]' ); |
|
103 | 103 | |
104 | - ?> |
|
104 | + ?> |
|
105 | 105 | <div class="row status-plan-buttons main-plan-btn"> |
106 | 106 | <?php |
107 | - if ( function_exists( 'wc_get_page_id' ) ) { |
|
108 | - ?> |
|
107 | + if ( function_exists( 'wc_get_page_id' ) ) { |
|
108 | + ?> |
|
109 | 109 | <a class="btn border-btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'My Plans', 'lsx-health-plan' ); ?></a> |
110 | 110 | <?php |
111 | - } |
|
112 | - ?> |
|
111 | + } |
|
112 | + ?> |
|
113 | 113 | </div> |
114 | 114 | </div> |
115 | 115 | </div> |
@@ -118,32 +118,32 @@ discard block |
||
118 | 118 | </div><!-- .entry-content --> |
119 | 119 | </article> |
120 | 120 | <?php |
121 | - } else { |
|
122 | - lsx_health_plan_single_nav(); |
|
123 | - lsx_health_plan_single_tabs(); |
|
124 | - } |
|
125 | - } |
|
126 | - ?> |
|
121 | + } else { |
|
122 | + lsx_health_plan_single_nav(); |
|
123 | + lsx_health_plan_single_tabs(); |
|
124 | + } |
|
125 | + } |
|
126 | + ?> |
|
127 | 127 | </div> |
128 | 128 | |
129 | 129 | <?php |
130 | - // Show the buttons on the single plan tabs. |
|
131 | - if ( ! empty( $has_sections ) && false !== $is_section ) { |
|
132 | - ?> |
|
130 | + // Show the buttons on the single plan tabs. |
|
131 | + if ( ! empty( $has_sections ) && false !== $is_section ) { |
|
132 | + ?> |
|
133 | 133 | <div class="row status-plan-buttons"> |
134 | 134 | <?php lsx_health_plan_day_button(); ?> |
135 | 135 | </div> |
136 | 136 | <?php |
137 | - } |
|
138 | - ?> |
|
137 | + } |
|
138 | + ?> |
|
139 | 139 | |
140 | 140 | <?php lsx_content_bottom(); ?> |
141 | 141 | |
142 | 142 | <?php |
143 | - if ( ! empty( $connected_articles ) ) { |
|
144 | - lsx_hp_single_related( $connected_articles, __( 'Latest articles', 'lsx-health-plan' ) ); |
|
145 | - } |
|
146 | - ?> |
|
143 | + if ( ! empty( $connected_articles ) ) { |
|
144 | + lsx_hp_single_related( $connected_articles, __( 'Latest articles', 'lsx-health-plan' ) ); |
|
145 | + } |
|
146 | + ?> |
|
147 | 147 | |
148 | 148 | |
149 | 149 | </main><!-- #main --> |