@@ -14,13 +14,13 @@ discard block |
||
| 14 | 14 | <div id="lsx-tips-shortcode" class="daily-plan-block"> |
| 15 | 15 | <div class="lsx-tips-shortcode lsx-tips-slider slick-slider slick-dotted" > |
| 16 | 16 | <?php |
| 17 | - if (is_array($connected_tips) || is_object($connected_tips)) { |
|
| 18 | - foreach ( $connected_tips as $tip ) { |
|
| 19 | - $tip_link = get_permalink( $tip ); |
|
| 20 | - $tip_name = get_the_title( $tip ); |
|
| 21 | - $tip_content = get_post_field( 'post_content', $tip ); |
|
| 22 | - $icon = LSX_HEALTH_PLAN_URL . 'assets/images/tips-icon.svg'; |
|
| 23 | - ?> |
|
| 17 | + if (is_array($connected_tips) || is_object($connected_tips)) { |
|
| 18 | + foreach ( $connected_tips as $tip ) { |
|
| 19 | + $tip_link = get_permalink( $tip ); |
|
| 20 | + $tip_name = get_the_title( $tip ); |
|
| 21 | + $tip_content = get_post_field( 'post_content', $tip ); |
|
| 22 | + $icon = LSX_HEALTH_PLAN_URL . 'assets/images/tips-icon.svg'; |
|
| 23 | + ?> |
|
| 24 | 24 | <div class="content-box diet-tip-wrapper quick-tip"> |
| 25 | 25 | <div class="row"> |
| 26 | 26 | <div class="col-xs-2"> |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | </div> |
| 34 | 34 | </div> |
| 35 | 35 | <?php |
| 36 | - } |
|
| 37 | - } |
|
| 38 | - ?> |
|
| 36 | + } |
|
| 37 | + } |
|
| 38 | + ?> |
|
| 39 | 39 | </div> |
| 40 | 40 | </div> |
| 41 | 41 | <?php |
@@ -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-plan.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 | |
@@ -16,40 +16,40 @@ discard block |
||
| 16 | 16 | $image_size = $args['image_size']; |
| 17 | 17 | |
| 18 | 18 | $query_array = array( |
| 19 | - 'orderby' => $args['orderby'], |
|
| 20 | - 'order' => $args['order'], |
|
| 21 | - 'post_type' => $args['post_type'], |
|
| 22 | - 'posts_per_page' => $limit, |
|
| 19 | + 'orderby' => $args['orderby'], |
|
| 20 | + 'order' => $args['order'], |
|
| 21 | + 'post_type' => $args['post_type'], |
|
| 22 | + 'posts_per_page' => $limit, |
|
| 23 | 23 | ); |
| 24 | 24 | |
| 25 | 25 | // If we are calling the exercises with the parent workout. |
| 26 | 26 | if ( false !== 'parent' && 'exercise' === $args['post_type'] ) { |
| 27 | - $items = \lsx_health_plan\functions\get_exercises_by_workout( $args['parent'] ); |
|
| 28 | - if ( ! empty( $items ) ) { |
|
| 29 | - $args['include'] = $items; |
|
| 30 | - } |
|
| 27 | + $items = \lsx_health_plan\functions\get_exercises_by_workout( $args['parent'] ); |
|
| 28 | + if ( ! empty( $items ) ) { |
|
| 29 | + $args['include'] = $items; |
|
| 30 | + } |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | if ( isset( $args['include'] ) && ( '' !== $args['include'] ) ) { |
| 34 | - if ( is_array( $args['include'] ) ) { |
|
| 35 | - $include = $args['include']; |
|
| 36 | - } else { |
|
| 37 | - $include = explode( ',', $args['include'] ); |
|
| 38 | - } |
|
| 39 | - $include_filter = $include; |
|
| 40 | - $query_array['post__in'] = $include_filter; |
|
| 41 | - $query_array['orderby'] = 'post__in'; |
|
| 34 | + if ( is_array( $args['include'] ) ) { |
|
| 35 | + $include = $args['include']; |
|
| 36 | + } else { |
|
| 37 | + $include = explode( ',', $args['include'] ); |
|
| 38 | + } |
|
| 39 | + $include_filter = $include; |
|
| 40 | + $query_array['post__in'] = $include_filter; |
|
| 41 | + $query_array['orderby'] = 'post__in'; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | if ( isset( $taxonomy ) && ( '' !== $taxonomy ) && isset( $term ) && ( '' !== $term ) ) { |
| 45 | - $taxonomy_filter = array( |
|
| 46 | - array( |
|
| 47 | - 'taxonomy' => $taxonomy, |
|
| 48 | - 'field' => 'slug', |
|
| 49 | - 'terms' => $term, |
|
| 50 | - ), |
|
| 51 | - ); |
|
| 52 | - $query_array['tax_query'] = $taxonomy_filter; |
|
| 45 | + $taxonomy_filter = array( |
|
| 46 | + array( |
|
| 47 | + 'taxonomy' => $taxonomy, |
|
| 48 | + 'field' => 'slug', |
|
| 49 | + 'terms' => $term, |
|
| 50 | + ), |
|
| 51 | + ); |
|
| 52 | + $query_array['tax_query'] = $taxonomy_filter; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $exercises = new WP_Query( $query_array ); |
@@ -58,46 +58,46 @@ discard block |
||
| 58 | 58 | <div id="lsx-exercises-shortcode" class="daily-plan-block layout-<?php echo esc_html( $args['layout'] ); ?> columns-<?php echo esc_html( $args['columns'] ); ?> shortcode-type-<?php echo esc_html( $args['post_type'] ); ?>"> |
| 59 | 59 | <div class="lsx-exercises-shortcode" > |
| 60 | 60 | <?php |
| 61 | - if ( $exercises->have_posts() ) { |
|
| 62 | - while ( $exercises->have_posts() ) { |
|
| 63 | - $exercises->the_post(); |
|
| 64 | - switch ( $args['post_type'] ) { |
|
| 65 | - case 'workout': |
|
| 66 | - include LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php'; |
|
| 67 | - break; |
|
| 61 | + if ( $exercises->have_posts() ) { |
|
| 62 | + while ( $exercises->have_posts() ) { |
|
| 63 | + $exercises->the_post(); |
|
| 64 | + switch ( $args['post_type'] ) { |
|
| 65 | + case 'workout': |
|
| 66 | + include LSX_HEALTH_PLAN_PATH . 'templates/partials/workout-sets.php'; |
|
| 67 | + break; |
|
| 68 | 68 | |
| 69 | - case 'meal': |
|
| 70 | - include LSX_HEALTH_PLAN_PATH . 'templates/partials/meal-plans.php'; |
|
| 71 | - break; |
|
| 69 | + case 'meal': |
|
| 70 | + include LSX_HEALTH_PLAN_PATH . 'templates/partials/meal-plans.php'; |
|
| 71 | + break; |
|
| 72 | 72 | |
| 73 | - /*case 'exercise': |
|
| 73 | + /*case 'exercise': |
|
| 74 | 74 | include LSX_HEALTH_PLAN_PATH . 'templates/partials/content-shortcode-exercise.php'; |
| 75 | 75 | break;*/ |
| 76 | 76 | |
| 77 | - case 'exercise': |
|
| 78 | - case 'recipe': |
|
| 79 | - case 'tip': |
|
| 80 | - include LSX_HEALTH_PLAN_PATH . 'templates/content-archive-' . $args['post_type'] . '.php'; |
|
| 81 | - break; |
|
| 77 | + case 'exercise': |
|
| 78 | + case 'recipe': |
|
| 79 | + case 'tip': |
|
| 80 | + include LSX_HEALTH_PLAN_PATH . 'templates/content-archive-' . $args['post_type'] . '.php'; |
|
| 81 | + break; |
|
| 82 | 82 | |
| 83 | - default: |
|
| 84 | - include LSX_HEALTH_PLAN_PATH . 'templates/partials/content-default.php'; |
|
| 85 | - break; |
|
| 86 | - } |
|
| 87 | - } |
|
| 88 | - } |
|
| 89 | - wp_reset_postdata(); |
|
| 90 | - ?> |
|
| 83 | + default: |
|
| 84 | + include LSX_HEALTH_PLAN_PATH . 'templates/partials/content-default.php'; |
|
| 85 | + break; |
|
| 86 | + } |
|
| 87 | + } |
|
| 88 | + } |
|
| 89 | + wp_reset_postdata(); |
|
| 90 | + ?> |
|
| 91 | 91 | </div> |
| 92 | 92 | <?php |
| 93 | - if ( isset( $args['view_more'] ) && false !== $args['view_more'] ) { |
|
| 94 | - ?> |
|
| 93 | + if ( isset( $args['view_more'] ) && false !== $args['view_more'] ) { |
|
| 94 | + ?> |
|
| 95 | 95 | <div class="col-md-12"> |
| 96 | 96 | <a class="<?php echo esc_html( $link_class ); ?>" href="<?php echo esc_url( get_post_type_archive_link( $args['post_type'] ) ); ?>"><?php echo esc_html_e( 'Show More', 'lsx-health-plan' ); ?></a> |
| 97 | 97 | </div> |
| 98 | 98 | <?php |
| 99 | - } |
|
| 100 | - ?> |
|
| 99 | + } |
|
| 100 | + ?> |
|
| 101 | 101 | </div> |
| 102 | 102 | <?php |
| 103 | 103 | $shortcode_args = null; |
@@ -20,63 +20,63 @@ discard block |
||
| 20 | 20 | <?php } ?> |
| 21 | 21 | <tbody> |
| 22 | 22 | <?php |
| 23 | - if ( 1 >= (int) $serves ) { |
|
| 24 | - $serves = '1'; |
|
| 25 | - $serves_label = __( 'Person', 'lsx-health-plan' ); |
|
| 26 | - } else { |
|
| 27 | - $serves_label = __( 'People', 'lsx-health-plan' ); |
|
| 28 | - } |
|
| 29 | - ?> |
|
| 23 | + if ( 1 >= (int) $serves ) { |
|
| 24 | + $serves = '1'; |
|
| 25 | + $serves_label = __( 'Person', 'lsx-health-plan' ); |
|
| 26 | + } else { |
|
| 27 | + $serves_label = __( 'People', 'lsx-health-plan' ); |
|
| 28 | + } |
|
| 29 | + ?> |
|
| 30 | 30 | <tr class="serves"> |
| 31 | 31 | <td><?php esc_html_e( 'Serves:', 'lsx-health-plan' ); ?> </td> |
| 32 | 32 | <td> |
| 33 | 33 | <?php |
| 34 | - echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label ); |
|
| 35 | - ?> |
|
| 34 | + echo wp_kses_post( $serves ) . ' ' . esc_html( $serves_label ); |
|
| 35 | + ?> |
|
| 36 | 36 | </td> |
| 37 | 37 | </tr> |
| 38 | 38 | <?php |
| 39 | - if ( ! empty( $prep_time ) ) { |
|
| 40 | - ?> |
|
| 39 | + if ( ! empty( $prep_time ) ) { |
|
| 40 | + ?> |
|
| 41 | 41 | <tr class="prep-time"> |
| 42 | 42 | <td><?php esc_html_e( 'Prep time: ', 'lsx-health-plan' ); ?> </td> |
| 43 | 43 | <td> |
| 44 | 44 | <?php |
| 45 | - echo wp_kses_post( $prep_time ); |
|
| 46 | - ?> |
|
| 45 | + echo wp_kses_post( $prep_time ); |
|
| 46 | + ?> |
|
| 47 | 47 | </td> |
| 48 | 48 | </tr> |
| 49 | 49 | <?php |
| 50 | - } |
|
| 51 | - ?> |
|
| 50 | + } |
|
| 51 | + ?> |
|
| 52 | 52 | <?php |
| 53 | - if ( ! empty( $cooking_time ) ) { |
|
| 54 | - ?> |
|
| 53 | + if ( ! empty( $cooking_time ) ) { |
|
| 54 | + ?> |
|
| 55 | 55 | <tr class="cooking-time"> |
| 56 | 56 | <td><?php esc_html_e( 'Cooking time: ', 'lsx-health-plan' ); ?> </td> |
| 57 | 57 | <td> |
| 58 | 58 | <?php |
| 59 | - echo wp_kses_post( $cooking_time ); |
|
| 60 | - ?> |
|
| 59 | + echo wp_kses_post( $cooking_time ); |
|
| 60 | + ?> |
|
| 61 | 61 | </td> |
| 62 | 62 | </tr> |
| 63 | 63 | <?php |
| 64 | - } |
|
| 65 | - ?> |
|
| 64 | + } |
|
| 65 | + ?> |
|
| 66 | 66 | <?php |
| 67 | - if ( ! empty( $portion ) ) { |
|
| 68 | - ?> |
|
| 67 | + if ( ! empty( $portion ) ) { |
|
| 68 | + ?> |
|
| 69 | 69 | <tr class="portion-size"> |
| 70 | 70 | <td><?php esc_html_e( 'Portion size: ', 'lsx-health-plan' ); ?> </td> |
| 71 | 71 | <td> |
| 72 | 72 | <?php |
| 73 | - echo wp_kses_post( $portion ); |
|
| 74 | - ?> |
|
| 73 | + echo wp_kses_post( $portion ); |
|
| 74 | + ?> |
|
| 75 | 75 | </td> |
| 76 | 76 | </tr> |
| 77 | 77 | <?php |
| 78 | - } |
|
| 79 | - ?> |
|
| 78 | + } |
|
| 79 | + ?> |
|
| 80 | 80 | </tbody> |
| 81 | 81 | </table> |
| 82 | 82 | <?php } ?> |
@@ -89,75 +89,75 @@ discard block |
||
| 89 | 89 | </thead> |
| 90 | 90 | <tbody> |
| 91 | 91 | <?php |
| 92 | - if ( ! empty( $energy ) ) { |
|
| 93 | - ?> |
|
| 92 | + if ( ! empty( $energy ) ) { |
|
| 93 | + ?> |
|
| 94 | 94 | <tr class="energy"> |
| 95 | 95 | <td><?php esc_html_e( 'Energy: ', 'lsx-health-plan' ); ?> </td> |
| 96 | 96 | <td> |
| 97 | 97 | <?php |
| 98 | - echo wp_kses_post( $energy ); |
|
| 99 | - ?> |
|
| 98 | + echo wp_kses_post( $energy ); |
|
| 99 | + ?> |
|
| 100 | 100 | </td> |
| 101 | 101 | </tr> |
| 102 | 102 | <?php |
| 103 | - } |
|
| 104 | - ?> |
|
| 103 | + } |
|
| 104 | + ?> |
|
| 105 | 105 | <?php |
| 106 | - if ( ! empty( $protein ) ) { |
|
| 107 | - ?> |
|
| 106 | + if ( ! empty( $protein ) ) { |
|
| 107 | + ?> |
|
| 108 | 108 | <tr class="protein"> |
| 109 | 109 | <td><?php esc_html_e( 'Protein: ', 'lsx-health-plan' ); ?> </td> |
| 110 | 110 | <td> |
| 111 | 111 | <?php |
| 112 | - echo wp_kses_post( $protein ); |
|
| 113 | - ?> |
|
| 112 | + echo wp_kses_post( $protein ); |
|
| 113 | + ?> |
|
| 114 | 114 | </td> |
| 115 | 115 | </tr> |
| 116 | 116 | <?php |
| 117 | - } |
|
| 118 | - ?> |
|
| 117 | + } |
|
| 118 | + ?> |
|
| 119 | 119 | <?php |
| 120 | - if ( ! empty( $carbohydrates ) ) { |
|
| 121 | - ?> |
|
| 120 | + if ( ! empty( $carbohydrates ) ) { |
|
| 121 | + ?> |
|
| 122 | 122 | <tr class="carbohydrates"> |
| 123 | 123 | <td><?php esc_html_e( 'Carbohydrates: ', 'lsx-health-plan' ); ?> </td> |
| 124 | 124 | <td> |
| 125 | 125 | <?php |
| 126 | - echo wp_kses_post( $carbohydrates ); |
|
| 127 | - ?> |
|
| 126 | + echo wp_kses_post( $carbohydrates ); |
|
| 127 | + ?> |
|
| 128 | 128 | </td> |
| 129 | 129 | </tr> |
| 130 | 130 | <?php |
| 131 | - } |
|
| 132 | - ?> |
|
| 131 | + } |
|
| 132 | + ?> |
|
| 133 | 133 | <?php |
| 134 | - if ( ! empty( $fibre ) ) { |
|
| 135 | - ?> |
|
| 134 | + if ( ! empty( $fibre ) ) { |
|
| 135 | + ?> |
|
| 136 | 136 | <tr class="fibre"> |
| 137 | 137 | <td><?php esc_html_e( 'Fibre: ', 'lsx-health-plan' ); ?> </td> |
| 138 | 138 | <td> |
| 139 | 139 | <?php |
| 140 | - echo wp_kses_post( $fibre ); |
|
| 141 | - ?> |
|
| 140 | + echo wp_kses_post( $fibre ); |
|
| 141 | + ?> |
|
| 142 | 142 | </td> |
| 143 | 143 | </tr> |
| 144 | 144 | <?php |
| 145 | - } |
|
| 146 | - ?> |
|
| 145 | + } |
|
| 146 | + ?> |
|
| 147 | 147 | <?php |
| 148 | - if ( ! empty( $fat ) ) { |
|
| 149 | - ?> |
|
| 148 | + if ( ! empty( $fat ) ) { |
|
| 149 | + ?> |
|
| 150 | 150 | <tr class="fat"> |
| 151 | 151 | <td><?php esc_html_e( 'Fat: ', 'lsx-health-plan' ); ?> </td> |
| 152 | 152 | <td> |
| 153 | 153 | <?php |
| 154 | - echo wp_kses_post( $fat ); |
|
| 155 | - ?> |
|
| 154 | + echo wp_kses_post( $fat ); |
|
| 155 | + ?> |
|
| 156 | 156 | </td> |
| 157 | 157 | </tr> |
| 158 | 158 | <?php |
| 159 | - } |
|
| 160 | - ?> |
|
| 159 | + } |
|
| 160 | + ?> |
|
| 161 | 161 | </tbody> |
| 162 | 162 | </table> |
| 163 | 163 | <?php } ?> |
@@ -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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) { |
|
| 24 | - ?> |
|
| 23 | + if ( current_user_can( 'administrator', $page_id ) || 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-meal.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 | |
@@ -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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) { |
|
| 24 | - ?> |
|
| 23 | + if ( current_user_can( 'administrator', $page_id ) || 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-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 | |
@@ -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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) { |
|
| 24 | - ?> |
|
| 23 | + if ( current_user_can( 'administrator', $page_id ) || 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-workout.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 | |
@@ -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( 'administrator', $page_id ) || current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) { |
|
| 24 | - ?> |
|
| 23 | + if ( current_user_can( 'administrator', $page_id ) || 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 | |
@@ -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 | ?> |