@@ -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 exercise-archive-plan archive-plan"> |
30 | 30 | <div class="row"> |
31 | - <?php if ( have_posts() ) : ?> |
|
31 | + <?php if (have_posts()) : ?> |
|
32 | 32 | <?php |
33 | - while ( have_posts() ) : |
|
33 | + while (have_posts()) : |
|
34 | 34 | the_post(); |
35 | 35 | ?> |
36 | 36 | |
@@ -40,7 +40,7 @@ discard block |
||
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 | ?> |
@@ -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', $post_id ) ) { |
|
24 | - ?> |
|
23 | + if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_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 |
@@ -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> |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | global $group_name; |
9 | -$groups = get_post_meta( get_the_ID(), $group_name, true ); |
|
10 | -if ( is_singular( 'workout' ) ) { |
|
11 | - $groups = get_post_meta( get_queried_object_id(), $group_name, true ); |
|
9 | +$groups = get_post_meta(get_the_ID(), $group_name, true); |
|
10 | +if (is_singular('workout')) { |
|
11 | + $groups = get_post_meta(get_queried_object_id(), $group_name, true); |
|
12 | 12 | } |
13 | -if ( ! empty( $groups ) ) { |
|
13 | +if ( ! empty($groups)) { |
|
14 | 14 | ?> |
15 | 15 | <div class="set-table"> |
16 | 16 | <table class="workout-table"> |
@@ -18,99 +18,99 @@ discard block |
||
18 | 18 | $table_headers = array(); |
19 | 19 | $table_body = array(); |
20 | 20 | |
21 | - foreach ( $groups as $group ) { |
|
21 | + foreach ($groups as $group) { |
|
22 | 22 | $this_row = array(); |
23 | 23 | |
24 | 24 | $this_row[] = '<tr>'; |
25 | 25 | |
26 | 26 | // Getting the connected exercise. |
27 | - if ( post_type_exists( 'exercise' ) ) { |
|
28 | - if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) { |
|
27 | + if (post_type_exists('exercise')) { |
|
28 | + if (isset($group['connected_exercises']) && '' !== $group['connected_exercises'] && ! empty(\lsx_health_plan\functions\check_posts_exist(array($group['connected_exercises'])))) { |
|
29 | 29 | $exercise = $group['connected_exercises']; |
30 | - $exercise_id = get_post( $exercise ); |
|
30 | + $exercise_id = get_post($exercise); |
|
31 | 31 | } |
32 | 32 | } else { |
33 | 33 | $exercise = false; |
34 | 34 | $exercise_id = false; |
35 | 35 | } |
36 | 36 | |
37 | - if ( false !== $exercise && '' !== $exercise ) { |
|
38 | - $exercise_name = get_the_title( $exercise_id ); |
|
39 | - $this_row[] = '<td class="workout-title-item">' . esc_html( $exercise_name ) . '</td>'; |
|
37 | + if (false !== $exercise && '' !== $exercise) { |
|
38 | + $exercise_name = get_the_title($exercise_id); |
|
39 | + $this_row[] = '<td class="workout-title-item">' . esc_html($exercise_name) . '</td>'; |
|
40 | 40 | $table_headers['name'] = true; |
41 | 41 | } else { |
42 | - if ( isset( $group['name'] ) && '' !== $group['name'] ) { |
|
43 | - $this_row[] = '<td class="workout-title-item">' . esc_html( $group['name'] ) . '</td>'; |
|
42 | + if (isset($group['name']) && '' !== $group['name']) { |
|
43 | + $this_row[] = '<td class="workout-title-item">' . esc_html($group['name']) . '</td>'; |
|
44 | 44 | $table_headers['name'] = true; |
45 | 45 | } |
46 | 46 | } |
47 | 47 | // Only display this is exercise is disabled. |
48 | - if ( false === $exercise && isset( $group['description'] ) && '' !== $group['description'] ) { |
|
49 | - $this_row[] = '<td class="workout-desc-item"><p>' . esc_html( $group['description'] ) . '</td>'; |
|
48 | + if (false === $exercise && isset($group['description']) && '' !== $group['description']) { |
|
49 | + $this_row[] = '<td class="workout-desc-item"><p>' . esc_html($group['description']) . '</td>'; |
|
50 | 50 | $table_headers['description'] = true; |
51 | 51 | } |
52 | 52 | |
53 | - if ( isset( $group['reps'] ) && '' !== $group['reps'] ) { |
|
54 | - $this_row[] = '<td class="reps-field-item center-mobile">' . esc_html( $group['reps'] ) . '</td>'; |
|
53 | + if (isset($group['reps']) && '' !== $group['reps']) { |
|
54 | + $this_row[] = '<td class="reps-field-item center-mobile">' . esc_html($group['reps']) . '</td>'; |
|
55 | 55 | $table_headers['reps'] = true; |
56 | 56 | } |
57 | 57 | |
58 | 58 | // Only display this is exercise is disabled. |
59 | - if ( false === $exercise ) { |
|
60 | - if ( isset( $group['equipment'] ) && '' !== $group['equipment'] ) { |
|
61 | - $this_row[] = '<td class="equipment-field-item center-mobile">' . esc_html( $group['equipment'] ) . '</td>'; |
|
59 | + if (false === $exercise) { |
|
60 | + if (isset($group['equipment']) && '' !== $group['equipment']) { |
|
61 | + $this_row[] = '<td class="equipment-field-item center-mobile">' . esc_html($group['equipment']) . '</td>'; |
|
62 | 62 | $table_headers['equipment'] = true; |
63 | 63 | } |
64 | - if ( isset( $group['muscle'] ) && '' !== $group['muscle'] ) { |
|
65 | - $this_row[] = '<td class="muscle-field-item center-mobile">' . esc_html( $group['muscle'] ) . '</td>'; |
|
64 | + if (isset($group['muscle']) && '' !== $group['muscle']) { |
|
65 | + $this_row[] = '<td class="muscle-field-item center-mobile">' . esc_html($group['muscle']) . '</td>'; |
|
66 | 66 | $table_headers['muscle'] = true; |
67 | 67 | } |
68 | 68 | } |
69 | - if ( post_type_exists( 'video' ) && isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_videos'] ) ) ) ) { |
|
70 | - $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button( $m, $group, false ) . '</td>'; |
|
69 | + if (post_type_exists('video') && isset($group['connected_videos']) && '' !== $group['connected_videos'] && ! empty(\lsx_health_plan\functions\check_posts_exist(array($group['connected_videos'])))) { |
|
70 | + $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button($m, $group, false) . '</td>'; |
|
71 | 71 | $table_headers['video'] = true; |
72 | 72 | } |
73 | - if ( post_type_exists( 'exercise' ) && isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) { |
|
74 | - $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button( $m, $group, false ) . '</td>'; |
|
73 | + if (post_type_exists('exercise') && isset($group['connected_exercises']) && '' !== $group['connected_exercises'] && ! empty(\lsx_health_plan\functions\check_posts_exist(array($group['connected_exercises'])))) { |
|
74 | + $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button($m, $group, false) . '</td>'; |
|
75 | 75 | $table_headers['exercise'] = true; |
76 | 76 | } |
77 | 77 | $this_row[] = '</tr>'; |
78 | 78 | |
79 | - $table_body[] = implode( '', $this_row ); |
|
79 | + $table_body[] = implode('', $this_row); |
|
80 | 80 | $m++; |
81 | 81 | } |
82 | 82 | |
83 | 83 | // Now we build the table header. |
84 | 84 | $table_header = array(); |
85 | 85 | $table_header[] = '<tr>'; |
86 | - if ( isset( $table_headers['name'] ) ) { |
|
87 | - $table_header[] = '<th class="center-mobile">' . __( 'Workout', 'lsx-health-plan' ) . '</th>'; |
|
86 | + if (isset($table_headers['name'])) { |
|
87 | + $table_header[] = '<th class="center-mobile">' . __('Workout', 'lsx-health-plan') . '</th>'; |
|
88 | 88 | } |
89 | - if ( isset( $table_headers['description'] ) ) { |
|
90 | - $table_header[] = '<th class="center-mobile">' . __( 'Description', 'lsx-health-plan' ) . '</th>'; |
|
89 | + if (isset($table_headers['description'])) { |
|
90 | + $table_header[] = '<th class="center-mobile">' . __('Description', 'lsx-health-plan') . '</th>'; |
|
91 | 91 | } |
92 | - if ( isset( $table_headers['reps'] ) ) { |
|
93 | - $table_header[] = '<th class="center-mobile">' . __( 'Reps / Time / Distance', 'lsx-health-plan' ) . '</th>'; |
|
92 | + if (isset($table_headers['reps'])) { |
|
93 | + $table_header[] = '<th class="center-mobile">' . __('Reps / Time / Distance', 'lsx-health-plan') . '</th>'; |
|
94 | 94 | } |
95 | - if ( isset( $table_headers['equipment'] ) ) { |
|
96 | - $table_header[] = '<th class="center-mobile">' . __( 'Equipment', 'lsx-health-plan' ) . '</th>'; |
|
95 | + if (isset($table_headers['equipment'])) { |
|
96 | + $table_header[] = '<th class="center-mobile">' . __('Equipment', 'lsx-health-plan') . '</th>'; |
|
97 | 97 | } |
98 | - if ( isset( $table_headers['muscle'] ) ) { |
|
99 | - $table_header[] = '<th class="center-mobile">' . __( 'Muscle Group', 'lsx-health-plan' ) . '</th>'; |
|
98 | + if (isset($table_headers['muscle'])) { |
|
99 | + $table_header[] = '<th class="center-mobile">' . __('Muscle Group', 'lsx-health-plan') . '</th>'; |
|
100 | 100 | } |
101 | - if ( isset( $table_headers['video'] ) ) { |
|
102 | - $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>'; |
|
101 | + if (isset($table_headers['video'])) { |
|
102 | + $table_header[] = '<th class="center-mobile">' . __('How To', 'lsx-health-plan') . '</th>'; |
|
103 | 103 | } |
104 | - if ( isset( $table_headers['exercise'] ) ) { |
|
105 | - $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>'; |
|
104 | + if (isset($table_headers['exercise'])) { |
|
105 | + $table_header[] = '<th class="center-mobile">' . __('How To', 'lsx-health-plan') . '</th>'; |
|
106 | 106 | } |
107 | 107 | $table_header[] = '</tr>'; |
108 | 108 | ?> |
109 | 109 | <thead> |
110 | - <?php echo wp_kses_post( implode( '', $table_header ) ); ?> |
|
110 | + <?php echo wp_kses_post(implode('', $table_header)); ?> |
|
111 | 111 | </thead> |
112 | 112 | <tbody> |
113 | - <?php echo wp_kses_post( implode( '', $table_body ) ); ?> |
|
113 | + <?php echo wp_kses_post(implode('', $table_body)); ?> |
|
114 | 114 | </tbody> |
115 | 115 | </table> |
116 | 116 | <?php |
@@ -8,104 +8,104 @@ |
||
8 | 8 | global $group_name; |
9 | 9 | $groups = get_post_meta( get_the_ID(), $group_name, true ); |
10 | 10 | if ( is_singular( 'workout' ) ) { |
11 | - $groups = get_post_meta( get_queried_object_id(), $group_name, true ); |
|
11 | + $groups = get_post_meta( get_queried_object_id(), $group_name, true ); |
|
12 | 12 | } |
13 | 13 | if ( ! empty( $groups ) ) { |
14 | - ?> |
|
14 | + ?> |
|
15 | 15 | <div class="set-table"> |
16 | 16 | <table class="workout-table"> |
17 | 17 | <?php |
18 | - $table_headers = array(); |
|
19 | - $table_body = array(); |
|
18 | + $table_headers = array(); |
|
19 | + $table_body = array(); |
|
20 | 20 | |
21 | - foreach ( $groups as $group ) { |
|
22 | - $this_row = array(); |
|
21 | + foreach ( $groups as $group ) { |
|
22 | + $this_row = array(); |
|
23 | 23 | |
24 | - $this_row[] = '<tr>'; |
|
24 | + $this_row[] = '<tr>'; |
|
25 | 25 | |
26 | - // Getting the connected exercise. |
|
27 | - if ( post_type_exists( 'exercise' ) ) { |
|
28 | - if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) { |
|
29 | - $exercise = $group['connected_exercises']; |
|
30 | - $exercise_id = get_post( $exercise ); |
|
31 | - } |
|
32 | - } else { |
|
33 | - $exercise = false; |
|
34 | - $exercise_id = false; |
|
35 | - } |
|
26 | + // Getting the connected exercise. |
|
27 | + if ( post_type_exists( 'exercise' ) ) { |
|
28 | + if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) { |
|
29 | + $exercise = $group['connected_exercises']; |
|
30 | + $exercise_id = get_post( $exercise ); |
|
31 | + } |
|
32 | + } else { |
|
33 | + $exercise = false; |
|
34 | + $exercise_id = false; |
|
35 | + } |
|
36 | 36 | |
37 | - if ( false !== $exercise && '' !== $exercise ) { |
|
38 | - $exercise_name = get_the_title( $exercise_id ); |
|
39 | - $this_row[] = '<td class="workout-title-item">' . esc_html( $exercise_name ) . '</td>'; |
|
40 | - $table_headers['name'] = true; |
|
41 | - } else { |
|
42 | - if ( isset( $group['name'] ) && '' !== $group['name'] ) { |
|
43 | - $this_row[] = '<td class="workout-title-item">' . esc_html( $group['name'] ) . '</td>'; |
|
44 | - $table_headers['name'] = true; |
|
45 | - } |
|
46 | - } |
|
47 | - // Only display this is exercise is disabled. |
|
48 | - if ( false === $exercise && isset( $group['description'] ) && '' !== $group['description'] ) { |
|
49 | - $this_row[] = '<td class="workout-desc-item"><p>' . esc_html( $group['description'] ) . '</td>'; |
|
50 | - $table_headers['description'] = true; |
|
51 | - } |
|
37 | + if ( false !== $exercise && '' !== $exercise ) { |
|
38 | + $exercise_name = get_the_title( $exercise_id ); |
|
39 | + $this_row[] = '<td class="workout-title-item">' . esc_html( $exercise_name ) . '</td>'; |
|
40 | + $table_headers['name'] = true; |
|
41 | + } else { |
|
42 | + if ( isset( $group['name'] ) && '' !== $group['name'] ) { |
|
43 | + $this_row[] = '<td class="workout-title-item">' . esc_html( $group['name'] ) . '</td>'; |
|
44 | + $table_headers['name'] = true; |
|
45 | + } |
|
46 | + } |
|
47 | + // Only display this is exercise is disabled. |
|
48 | + if ( false === $exercise && isset( $group['description'] ) && '' !== $group['description'] ) { |
|
49 | + $this_row[] = '<td class="workout-desc-item"><p>' . esc_html( $group['description'] ) . '</td>'; |
|
50 | + $table_headers['description'] = true; |
|
51 | + } |
|
52 | 52 | |
53 | - if ( isset( $group['reps'] ) && '' !== $group['reps'] ) { |
|
54 | - $this_row[] = '<td class="reps-field-item center-mobile">' . esc_html( $group['reps'] ) . '</td>'; |
|
55 | - $table_headers['reps'] = true; |
|
56 | - } |
|
53 | + if ( isset( $group['reps'] ) && '' !== $group['reps'] ) { |
|
54 | + $this_row[] = '<td class="reps-field-item center-mobile">' . esc_html( $group['reps'] ) . '</td>'; |
|
55 | + $table_headers['reps'] = true; |
|
56 | + } |
|
57 | 57 | |
58 | - // Only display this is exercise is disabled. |
|
59 | - if ( false === $exercise ) { |
|
60 | - if ( isset( $group['equipment'] ) && '' !== $group['equipment'] ) { |
|
61 | - $this_row[] = '<td class="equipment-field-item center-mobile">' . esc_html( $group['equipment'] ) . '</td>'; |
|
62 | - $table_headers['equipment'] = true; |
|
63 | - } |
|
64 | - if ( isset( $group['muscle'] ) && '' !== $group['muscle'] ) { |
|
65 | - $this_row[] = '<td class="muscle-field-item center-mobile">' . esc_html( $group['muscle'] ) . '</td>'; |
|
66 | - $table_headers['muscle'] = true; |
|
67 | - } |
|
68 | - } |
|
69 | - if ( post_type_exists( 'video' ) && isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_videos'] ) ) ) ) { |
|
70 | - $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button( $m, $group, false ) . '</td>'; |
|
71 | - $table_headers['video'] = true; |
|
72 | - } |
|
73 | - if ( post_type_exists( 'exercise' ) && isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) { |
|
74 | - $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button( $m, $group, false ) . '</td>'; |
|
75 | - $table_headers['exercise'] = true; |
|
76 | - } |
|
77 | - $this_row[] = '</tr>'; |
|
58 | + // Only display this is exercise is disabled. |
|
59 | + if ( false === $exercise ) { |
|
60 | + if ( isset( $group['equipment'] ) && '' !== $group['equipment'] ) { |
|
61 | + $this_row[] = '<td class="equipment-field-item center-mobile">' . esc_html( $group['equipment'] ) . '</td>'; |
|
62 | + $table_headers['equipment'] = true; |
|
63 | + } |
|
64 | + if ( isset( $group['muscle'] ) && '' !== $group['muscle'] ) { |
|
65 | + $this_row[] = '<td class="muscle-field-item center-mobile">' . esc_html( $group['muscle'] ) . '</td>'; |
|
66 | + $table_headers['muscle'] = true; |
|
67 | + } |
|
68 | + } |
|
69 | + if ( post_type_exists( 'video' ) && isset( $group['connected_videos'] ) && '' !== $group['connected_videos'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_videos'] ) ) ) ) { |
|
70 | + $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_video_play_button( $m, $group, false ) . '</td>'; |
|
71 | + $table_headers['video'] = true; |
|
72 | + } |
|
73 | + if ( post_type_exists( 'exercise' ) && isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] && ! empty( \lsx_health_plan\functions\check_posts_exist( array( $group['connected_exercises'] ) ) ) ) { |
|
74 | + $this_row[] = '<td class="video-button-item center-mobile">' . lsx_health_plan_workout_exercise_button( $m, $group, false ) . '</td>'; |
|
75 | + $table_headers['exercise'] = true; |
|
76 | + } |
|
77 | + $this_row[] = '</tr>'; |
|
78 | 78 | |
79 | - $table_body[] = implode( '', $this_row ); |
|
80 | - $m++; |
|
81 | - } |
|
79 | + $table_body[] = implode( '', $this_row ); |
|
80 | + $m++; |
|
81 | + } |
|
82 | 82 | |
83 | - // Now we build the table header. |
|
84 | - $table_header = array(); |
|
85 | - $table_header[] = '<tr>'; |
|
86 | - if ( isset( $table_headers['name'] ) ) { |
|
87 | - $table_header[] = '<th class="center-mobile">' . __( 'Workout', 'lsx-health-plan' ) . '</th>'; |
|
88 | - } |
|
89 | - if ( isset( $table_headers['description'] ) ) { |
|
90 | - $table_header[] = '<th class="center-mobile">' . __( 'Description', 'lsx-health-plan' ) . '</th>'; |
|
91 | - } |
|
92 | - if ( isset( $table_headers['reps'] ) ) { |
|
93 | - $table_header[] = '<th class="center-mobile">' . __( 'Reps / Time / Distance', 'lsx-health-plan' ) . '</th>'; |
|
94 | - } |
|
95 | - if ( isset( $table_headers['equipment'] ) ) { |
|
96 | - $table_header[] = '<th class="center-mobile">' . __( 'Equipment', 'lsx-health-plan' ) . '</th>'; |
|
97 | - } |
|
98 | - if ( isset( $table_headers['muscle'] ) ) { |
|
99 | - $table_header[] = '<th class="center-mobile">' . __( 'Muscle Group', 'lsx-health-plan' ) . '</th>'; |
|
100 | - } |
|
101 | - if ( isset( $table_headers['video'] ) ) { |
|
102 | - $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>'; |
|
103 | - } |
|
104 | - if ( isset( $table_headers['exercise'] ) ) { |
|
105 | - $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>'; |
|
106 | - } |
|
107 | - $table_header[] = '</tr>'; |
|
108 | - ?> |
|
83 | + // Now we build the table header. |
|
84 | + $table_header = array(); |
|
85 | + $table_header[] = '<tr>'; |
|
86 | + if ( isset( $table_headers['name'] ) ) { |
|
87 | + $table_header[] = '<th class="center-mobile">' . __( 'Workout', 'lsx-health-plan' ) . '</th>'; |
|
88 | + } |
|
89 | + if ( isset( $table_headers['description'] ) ) { |
|
90 | + $table_header[] = '<th class="center-mobile">' . __( 'Description', 'lsx-health-plan' ) . '</th>'; |
|
91 | + } |
|
92 | + if ( isset( $table_headers['reps'] ) ) { |
|
93 | + $table_header[] = '<th class="center-mobile">' . __( 'Reps / Time / Distance', 'lsx-health-plan' ) . '</th>'; |
|
94 | + } |
|
95 | + if ( isset( $table_headers['equipment'] ) ) { |
|
96 | + $table_header[] = '<th class="center-mobile">' . __( 'Equipment', 'lsx-health-plan' ) . '</th>'; |
|
97 | + } |
|
98 | + if ( isset( $table_headers['muscle'] ) ) { |
|
99 | + $table_header[] = '<th class="center-mobile">' . __( 'Muscle Group', 'lsx-health-plan' ) . '</th>'; |
|
100 | + } |
|
101 | + if ( isset( $table_headers['video'] ) ) { |
|
102 | + $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>'; |
|
103 | + } |
|
104 | + if ( isset( $table_headers['exercise'] ) ) { |
|
105 | + $table_header[] = '<th class="center-mobile">' . __( 'How To', 'lsx-health-plan' ) . '</th>'; |
|
106 | + } |
|
107 | + $table_header[] = '</tr>'; |
|
108 | + ?> |
|
109 | 109 | <thead> |
110 | 110 | <?php echo wp_kses_post( implode( '', $table_header ) ); ?> |
111 | 111 | </thead> |
@@ -9,47 +9,47 @@ |
||
9 | 9 | |
10 | 10 | $column_class = '4'; |
11 | 11 | // Check for shortcode overrides. |
12 | -if ( null !== $shortcode_args ) { |
|
13 | - if ( isset( $shortcode_args['columns'] ) ) { |
|
12 | +if (null !== $shortcode_args) { |
|
13 | + if (isset($shortcode_args['columns'])) { |
|
14 | 14 | $column_class = $shortcode_args['columns']; |
15 | - $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
15 | + $column_class = \lsx_health_plan\functions\column_class($column_class); |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 | |
19 | 19 | lsx_entry_before(); |
20 | 20 | |
21 | 21 | $post_id = get_the_id(); |
22 | -$featured_image = get_the_post_thumbnail_url( $post_id, $image_size ); |
|
22 | +$featured_image = get_the_post_thumbnail_url($post_id, $image_size); |
|
23 | 23 | ?> |
24 | -<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>"> |
|
25 | - <div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>"> |
|
24 | +<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?>"> |
|
25 | + <div style="background-image:url('<?php echo esc_url($featured_image); ?>')" class="lsx-exercises-item bg-<?php echo esc_html($image_size); ?>"> |
|
26 | 26 | <?php |
27 | 27 | |
28 | - if ( ( 'item' === $link ) || ( 'modal' === $link ) ) { |
|
28 | + if (('item' === $link) || ('modal' === $link)) { |
|
29 | 29 | ?> |
30 | - <a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
|
30 | + <a href="<?php echo esc_url(get_permalink()); ?>" class="exercise-link excerpt-<?php echo esc_html($description); ?>"> |
|
31 | 31 | <?php |
32 | 32 | } else { |
33 | 33 | ?> |
34 | - <div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
|
34 | + <div class="exercise-link excerpt-<?php echo esc_html($description); ?>"> |
|
35 | 35 | <?php |
36 | 36 | } |
37 | 37 | ?> |
38 | 38 | |
39 | - <?php the_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?> |
|
40 | - <?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?> |
|
39 | + <?php the_title('<h4 class="lsx-exercises-title">', '</h4>'); ?> |
|
40 | + <?php if (isset($description) && ('none' !== $description)) { ?> |
|
41 | 41 | <?php |
42 | - if ( 'excerpt' === $description ) { |
|
43 | - $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id ); |
|
42 | + if ('excerpt' === $description) { |
|
43 | + $excerpt = \lsx_health_plan\functions\hp_excerpt($post_id); |
|
44 | 44 | ?> |
45 | - <p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p> |
|
45 | + <p class="lsx-exercises-excerpt"><?php echo wp_kses_post($excerpt); ?></p> |
|
46 | 46 | <?php } ?> |
47 | - <?php if ( 'full' === $description ) { ?> |
|
48 | - <?php echo wp_kses_post( get_the_content() ); ?> |
|
47 | + <?php if ('full' === $description) { ?> |
|
48 | + <?php echo wp_kses_post(get_the_content()); ?> |
|
49 | 49 | <?php } ?> |
50 | 50 | <?php } ?> |
51 | 51 | <?php |
52 | - if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) { |
|
52 | + if (isset($link) && (('item' === $link) || ('modal' === $link))) { |
|
53 | 53 | ?> |
54 | 54 | </a> |
55 | 55 | <?php } else { ?> |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | $column_class = '4'; |
11 | 11 | // Check for shortcode overrides. |
12 | 12 | if ( null !== $shortcode_args ) { |
13 | - if ( isset( $shortcode_args['columns'] ) ) { |
|
14 | - $column_class = $shortcode_args['columns']; |
|
15 | - $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
16 | - } |
|
13 | + if ( isset( $shortcode_args['columns'] ) ) { |
|
14 | + $column_class = $shortcode_args['columns']; |
|
15 | + $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
16 | + } |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | lsx_entry_before(); |
@@ -25,23 +25,23 @@ discard block |
||
25 | 25 | <div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>"> |
26 | 26 | <?php |
27 | 27 | |
28 | - if ( ( 'item' === $link ) || ( 'modal' === $link ) ) { |
|
29 | - ?> |
|
28 | + if ( ( 'item' === $link ) || ( 'modal' === $link ) ) { |
|
29 | + ?> |
|
30 | 30 | <a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
31 | 31 | <?php |
32 | - } else { |
|
33 | - ?> |
|
32 | + } else { |
|
33 | + ?> |
|
34 | 34 | <div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
35 | 35 | <?php |
36 | - } |
|
37 | - ?> |
|
36 | + } |
|
37 | + ?> |
|
38 | 38 | |
39 | 39 | <?php the_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?> |
40 | 40 | <?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?> |
41 | 41 | <?php |
42 | - if ( 'excerpt' === $description ) { |
|
43 | - $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id ); |
|
44 | - ?> |
|
42 | + if ( 'excerpt' === $description ) { |
|
43 | + $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id ); |
|
44 | + ?> |
|
45 | 45 | <p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p> |
46 | 46 | <?php } ?> |
47 | 47 | <?php if ( 'full' === $description ) { ?> |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | <?php } ?> |
50 | 50 | <?php } ?> |
51 | 51 | <?php |
52 | - if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) { |
|
53 | - ?> |
|
52 | + if ( isset( $link ) && ( ( 'item' === $link ) || ( 'modal' === $link ) ) ) { |
|
53 | + ?> |
|
54 | 54 | </a> |
55 | 55 | <?php } else { ?> |
56 | 56 | </div> |
@@ -8,50 +8,50 @@ |
||
8 | 8 | |
9 | 9 | $column_class = '4'; |
10 | 10 | // Check for shortcode overrides. |
11 | -if ( null !== $shortcode_args ) { |
|
12 | - if ( isset( $shortcode_args['columns'] ) ) { |
|
11 | +if (null !== $shortcode_args) { |
|
12 | + if (isset($shortcode_args['columns'])) { |
|
13 | 13 | $column_class = $shortcode_args['columns']; |
14 | - $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
14 | + $column_class = \lsx_health_plan\functions\column_class($column_class); |
|
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | 18 | lsx_entry_before(); |
19 | 19 | |
20 | 20 | $post_id = get_the_id(); |
21 | -$featured_image = get_the_post_thumbnail_url( $post_id, $image_size ); |
|
21 | +$featured_image = get_the_post_thumbnail_url($post_id, $image_size); |
|
22 | 22 | ?> |
23 | -<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>"> |
|
24 | - <div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>"> |
|
23 | +<div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?>"> |
|
24 | + <div style="background-image:url('<?php echo esc_url($featured_image); ?>')" class="lsx-exercises-item bg-<?php echo esc_html($image_size); ?>"> |
|
25 | 25 | <?php |
26 | - if ( isset( $link ) && ( 'modal' === $link ) ) { |
|
27 | - echo wp_kses_post( lsx_health_plan_shortcode_exercise_button( $post_id, true ) ); |
|
26 | + if (isset($link) && ('modal' === $link)) { |
|
27 | + echo wp_kses_post(lsx_health_plan_shortcode_exercise_button($post_id, true)); |
|
28 | 28 | } |
29 | 29 | |
30 | - if ( 'item' === $link ) { |
|
30 | + if ('item' === $link) { |
|
31 | 31 | ?> |
32 | - <a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
|
32 | + <a href="<?php echo esc_url(get_permalink()); ?>" class="exercise-link excerpt-<?php echo esc_html($description); ?>"> |
|
33 | 33 | <?php |
34 | 34 | } else { |
35 | 35 | ?> |
36 | - <div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
|
36 | + <div class="exercise-link excerpt-<?php echo esc_html($description); ?>"> |
|
37 | 37 | <?php |
38 | 38 | } |
39 | 39 | ?> |
40 | 40 | |
41 | - <?php lsx_health_plan_exercise_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?> |
|
42 | - <?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?> |
|
41 | + <?php lsx_health_plan_exercise_title('<h4 class="lsx-exercises-title">', '</h4>'); ?> |
|
42 | + <?php if (isset($description) && ('none' !== $description)) { ?> |
|
43 | 43 | <?php |
44 | - if ( 'excerpt' === $description ) { |
|
45 | - $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id ); |
|
44 | + if ('excerpt' === $description) { |
|
45 | + $excerpt = \lsx_health_plan\functions\hp_excerpt($post_id); |
|
46 | 46 | ?> |
47 | - <p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p> |
|
47 | + <p class="lsx-exercises-excerpt"><?php echo wp_kses_post($excerpt); ?></p> |
|
48 | 48 | <?php } ?> |
49 | - <?php if ( 'full' === $description ) { ?> |
|
50 | - <?php echo wp_kses_post( get_the_content() ); ?> |
|
49 | + <?php if ('full' === $description) { ?> |
|
50 | + <?php echo wp_kses_post(get_the_content()); ?> |
|
51 | 51 | <?php } ?> |
52 | 52 | <?php } ?> |
53 | 53 | <?php |
54 | - if ( isset( $link ) && ( 'item' === $link ) ) { |
|
54 | + if (isset($link) && ('item' === $link)) { |
|
55 | 55 | ?> |
56 | 56 | </a> |
57 | 57 | <?php } else { ?> |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | $column_class = '4'; |
10 | 10 | // Check for shortcode overrides. |
11 | 11 | if ( null !== $shortcode_args ) { |
12 | - if ( isset( $shortcode_args['columns'] ) ) { |
|
13 | - $column_class = $shortcode_args['columns']; |
|
14 | - $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
15 | - } |
|
12 | + if ( isset( $shortcode_args['columns'] ) ) { |
|
13 | + $column_class = $shortcode_args['columns']; |
|
14 | + $column_class = \lsx_health_plan\functions\column_class( $column_class ); |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | lsx_entry_before(); |
@@ -23,27 +23,27 @@ discard block |
||
23 | 23 | <div class="col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?>"> |
24 | 24 | <div style="background-image:url('<?php echo esc_url( $featured_image ); ?>')" class="lsx-exercises-item bg-<?php echo esc_html( $image_size ); ?>"> |
25 | 25 | <?php |
26 | - if ( isset( $link ) && ( 'modal' === $link ) ) { |
|
27 | - echo wp_kses_post( lsx_health_plan_shortcode_exercise_button( $post_id, true ) ); |
|
28 | - } |
|
26 | + if ( isset( $link ) && ( 'modal' === $link ) ) { |
|
27 | + echo wp_kses_post( lsx_health_plan_shortcode_exercise_button( $post_id, true ) ); |
|
28 | + } |
|
29 | 29 | |
30 | - if ( 'item' === $link ) { |
|
31 | - ?> |
|
30 | + if ( 'item' === $link ) { |
|
31 | + ?> |
|
32 | 32 | <a href="<?php echo esc_url( get_permalink() ); ?>" class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
33 | 33 | <?php |
34 | - } else { |
|
35 | - ?> |
|
34 | + } else { |
|
35 | + ?> |
|
36 | 36 | <div class="exercise-link excerpt-<?php echo esc_html( $description ); ?>"> |
37 | 37 | <?php |
38 | - } |
|
39 | - ?> |
|
38 | + } |
|
39 | + ?> |
|
40 | 40 | |
41 | 41 | <?php lsx_health_plan_exercise_title( '<h4 class="lsx-exercises-title">', '</h4>' ); ?> |
42 | 42 | <?php if ( isset( $description ) && ( 'none' !== $description ) ) { ?> |
43 | 43 | <?php |
44 | - if ( 'excerpt' === $description ) { |
|
45 | - $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id ); |
|
46 | - ?> |
|
44 | + if ( 'excerpt' === $description ) { |
|
45 | + $excerpt = \lsx_health_plan\functions\hp_excerpt( $post_id ); |
|
46 | + ?> |
|
47 | 47 | <p class="lsx-exercises-excerpt"><?php echo wp_kses_post( $excerpt ); ?></p> |
48 | 48 | <?php } ?> |
49 | 49 | <?php if ( 'full' === $description ) { ?> |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | <?php } ?> |
52 | 52 | <?php } ?> |
53 | 53 | <?php |
54 | - if ( isset( $link ) && ( 'item' === $link ) ) { |
|
55 | - ?> |
|
54 | + if ( isset( $link ) && ( 'item' === $link ) ) { |
|
55 | + ?> |
|
56 | 56 | </a> |
57 | 57 | <?php } else { ?> |
58 | 58 | </div> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | <?php lsx_content_wrap_before(); ?> |
11 | 11 | |
12 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
12 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
13 | 13 | |
14 | 14 | <?php lsx_content_before(); ?> |
15 | 15 | |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php lsx_content_top(); ?> |
19 | 19 | |
20 | - <?php if ( have_posts() ) : ?> |
|
20 | + <?php if (have_posts()) : ?> |
|
21 | 21 | |
22 | 22 | <?php |
23 | - while ( have_posts() ) : |
|
23 | + while (have_posts()) : |
|
24 | 24 | the_post(); |
25 | 25 | ?> |
26 | 26 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | <?php lsx_content_after(); ?> |
38 | 38 | |
39 | 39 | <?php |
40 | - if ( is_singular( 'post' ) ) { |
|
40 | + if (is_singular('post')) { |
|
41 | 41 | lsx_post_nav(); |
42 | 42 | } |
43 | 43 | ?> |
@@ -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-exercise.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 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @package lsx-health-plan |
6 | 6 | */ |
7 | 7 | |
8 | -$args = array( |
|
8 | +$args = array( |
|
9 | 9 | 'orderby' => 'date', |
10 | 10 | 'order' => 'DESC', |
11 | 11 | 'post_type' => 'recipe', |
@@ -13,31 +13,31 @@ discard block |
||
13 | 13 | 'meta_key' => 'recipe_featured', |
14 | 14 | 'meta_compare' => 'EXISTS', |
15 | 15 | ); |
16 | -$recipes = new WP_Query( $args ); |
|
16 | +$recipes = new WP_Query($args); |
|
17 | 17 | ?> |
18 | 18 | |
19 | 19 | <div id="lsx-recipes-shortcode" class="daily-plan-block"> |
20 | - <h2 class="title-lined"><?php esc_html_e( 'Featured Recipe', 'lsx-health-plan' ); ?></h2> |
|
20 | + <h2 class="title-lined"><?php esc_html_e('Featured Recipe', 'lsx-health-plan'); ?></h2> |
|
21 | 21 | <div class="lsx-recipes-shortcode lsx-recipes-slider slick-slider slick-dotted slick-has-arrows" data-slick="{'slidesToShow': 1, 'slidesToScroll': 1}" > |
22 | 22 | |
23 | 23 | <?php |
24 | - if ( $recipes->have_posts() ) : |
|
25 | - while ( $recipes->have_posts() ) : |
|
24 | + if ($recipes->have_posts()) : |
|
25 | + while ($recipes->have_posts()) : |
|
26 | 26 | $recipes->the_post(); |
27 | 27 | $post_id = get_the_id(); |
28 | - $featured_image = get_the_post_thumbnail( $post_id, array( 600, 300 ) ); |
|
28 | + $featured_image = get_the_post_thumbnail($post_id, array(600, 300)); |
|
29 | 29 | ?> |
30 | 30 | <div class="lsx-recipes-slot"> |
31 | 31 | <div class="row"> |
32 | 32 | <div class="col-md-5 col-sm-6"> |
33 | 33 | <h4 class="lsx-recipes-title"><?php the_title(); ?></h4> |
34 | 34 | <?php lsx_health_plan_recipe_data(); ?> |
35 | - <a href="<?php echo esc_url( get_permalink() ); ?>" class="btn"><?php esc_html_e( 'View Recipe', 'lsx-health-plan' ); ?></a> |
|
35 | + <a href="<?php echo esc_url(get_permalink()); ?>" class="btn"><?php esc_html_e('View Recipe', 'lsx-health-plan'); ?></a> |
|
36 | 36 | </div> |
37 | 37 | <div class="col-md-7 col-sm-6"> |
38 | 38 | <?php |
39 | - if ( ! empty( $featured_image ) ) { |
|
40 | - echo wp_kses_post( $featured_image ); |
|
39 | + if ( ! empty($featured_image)) { |
|
40 | + echo wp_kses_post($featured_image); |
|
41 | 41 | } |
42 | 42 | ?> |
43 | 43 | </div> |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | $args = array( |
9 | - 'orderby' => 'date', |
|
10 | - 'order' => 'DESC', |
|
11 | - 'post_type' => 'recipe', |
|
12 | - 'posts_per_page' => 3, |
|
13 | - 'meta_key' => 'recipe_featured', |
|
14 | - 'meta_compare' => 'EXISTS', |
|
9 | + 'orderby' => 'date', |
|
10 | + 'order' => 'DESC', |
|
11 | + 'post_type' => 'recipe', |
|
12 | + 'posts_per_page' => 3, |
|
13 | + 'meta_key' => 'recipe_featured', |
|
14 | + 'meta_compare' => 'EXISTS', |
|
15 | 15 | ); |
16 | 16 | $recipes = new WP_Query( $args ); |
17 | 17 | ?> |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | <div class="lsx-recipes-shortcode lsx-recipes-slider slick-slider slick-dotted slick-has-arrows" data-slick="{'slidesToShow': 1, 'slidesToScroll': 1}" > |
22 | 22 | |
23 | 23 | <?php |
24 | - if ( $recipes->have_posts() ) : |
|
25 | - while ( $recipes->have_posts() ) : |
|
26 | - $recipes->the_post(); |
|
27 | - $post_id = get_the_id(); |
|
28 | - $featured_image = get_the_post_thumbnail( $post_id, array( 600, 300 ) ); |
|
29 | - ?> |
|
24 | + if ( $recipes->have_posts() ) : |
|
25 | + while ( $recipes->have_posts() ) : |
|
26 | + $recipes->the_post(); |
|
27 | + $post_id = get_the_id(); |
|
28 | + $featured_image = get_the_post_thumbnail( $post_id, array( 600, 300 ) ); |
|
29 | + ?> |
|
30 | 30 | <div class="lsx-recipes-slot"> |
31 | 31 | <div class="row"> |
32 | 32 | <div class="col-md-5 col-sm-6"> |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | </div> |
37 | 37 | <div class="col-md-7 col-sm-6"> |
38 | 38 | <?php |
39 | - if ( ! empty( $featured_image ) ) { |
|
40 | - echo wp_kses_post( $featured_image ); |
|
41 | - } |
|
42 | - ?> |
|
39 | + if ( ! empty( $featured_image ) ) { |
|
40 | + echo wp_kses_post( $featured_image ); |
|
41 | + } |
|
42 | + ?> |
|
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | </div> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | <?php lsx_content_wrap_before(); ?> |
11 | 11 | |
12 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
12 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
13 | 13 | |
14 | 14 | <?php lsx_content_before(); ?> |
15 | 15 | |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php lsx_content_top(); ?> |
19 | 19 | |
20 | - <?php if ( have_posts() ) : ?> |
|
20 | + <?php if (have_posts()) : ?> |
|
21 | 21 | |
22 | 22 | <div class="post-wrapper"> |
23 | 23 | |
24 | 24 | <?php |
25 | - while ( have_posts() ) : |
|
25 | + while (have_posts()) : |
|
26 | 26 | the_post(); |
27 | 27 | ?> |
28 | 28 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | <?php else : ?> |
38 | 38 | |
39 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
39 | + <?php get_template_part('partials/content', 'none'); ?> |
|
40 | 40 | |
41 | 41 | <?php endif; ?> |
42 | 42 |
@@ -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 |
@@ -36,9 +36,12 @@ |
||
36 | 36 | |
37 | 37 | <?php lsx_paging_nav(); ?> |
38 | 38 | |
39 | - <?php else : ?> |
|
39 | + <?php else { |
|
40 | + : ?> |
|
40 | 41 | |
41 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
42 | + <?php get_template_part( 'partials/content', 'none' ); |
|
43 | +} |
|
44 | +?> |
|
42 | 45 | |
43 | 46 | <?php endif; ?> |
44 | 47 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @package lsx-health-plan |
6 | 6 | */ |
7 | 7 | |
8 | -$args = array( |
|
8 | +$args = array( |
|
9 | 9 | 'orderby' => 'date', |
10 | 10 | 'order' => 'DESC', |
11 | 11 | 'post_type' => 'video', |
@@ -13,20 +13,20 @@ discard block |
||
13 | 13 | 'meta_key' => 'video_featured_video', |
14 | 14 | 'meta_compare' => 'EXISTS', |
15 | 15 | ); |
16 | -$videos = new WP_Query( $args ); |
|
16 | +$videos = new WP_Query($args); |
|
17 | 17 | ?> |
18 | 18 | |
19 | 19 | <div id="lsx-videos-shortcode" class="daily-plan-block"> |
20 | - <h2 class="title-lined"><?php esc_html_e( 'Featured Workout', 'lsx-health-plan' ); ?></h2> |
|
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() ) : |
|
23 | + if ($videos->have_posts()) : |
|
24 | + while ($videos->have_posts()) : |
|
25 | 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 ) ); |
|
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 | 30 | ?> |
31 | 31 | <div class="lsx-videos-slot"> |
32 | 32 | <div class="row"> |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | </div> |
37 | 37 | <div class="col-md-8"> |
38 | 38 | <?php |
39 | - if ( ! empty( $giphy ) ) { |
|
39 | + if ( ! empty($giphy)) { |
|
40 | 40 | echo $giphy; // WPCS: XSS OK. |
41 | - } elseif ( ! empty( $youtube ) ) { |
|
42 | - echo wp_oembed_get( $youtube ); // WPCS: XSS OK. |
|
41 | + } elseif ( ! empty($youtube)) { |
|
42 | + echo wp_oembed_get($youtube); // WPCS: XSS OK. |
|
43 | 43 | } |
44 | 44 | ?> |
45 | 45 | </div> |
@@ -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> |
@@ -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 | ?> |
@@ -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', $post_id ) ) { |
|
24 | - ?> |
|
23 | + if ( current_user_can( 'wc_memberships_view_restricted_post_content', $post_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-recipe.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 |
@@ -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> |