| @@ -12,7 +12,7 @@ discard block | ||
| 12 | 12 | |
| 13 | 13 | <?php lsx_content_wrap_before(); ?> | 
| 14 | 14 | |
| 15 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> | |
| 15 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> | |
| 16 | 16 | |
| 17 | 17 | <?php lsx_content_before(); ?> | 
| 18 | 18 | |
| @@ -20,9 +20,9 @@ discard block | ||
| 20 | 20 | |
| 21 | 21 | <?php lsx_content_top(); ?> | 
| 22 | 22 | |
| 23 | - <?php if ( have_posts() ) : ?> | |
| 23 | + <?php if (have_posts()) : ?> | |
| 24 | 24 | |
| 25 | - <?php while ( have_posts() ) : the_post(); ?> | |
| 25 | + <?php while (have_posts()) : the_post(); ?> | |
| 26 | 26 | |
| 27 | 27 | <?php lsx_entry_before(); ?> | 
| 28 | 28 | |
| @@ -32,31 +32,31 @@ discard block | ||
| 32 | 32 | |
| 33 | 33 | <div class="entry-content"> | 
| 34 | 34 | <?php | 
| 35 | -						if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'edit-account' ) ) { | |
| 35 | +						if (function_exists('is_wc_endpoint_url') && is_wc_endpoint_url('edit-account')) { | |
| 36 | 36 | $classes = get_body_class(); | 
| 37 | -							if ( in_array( 'has-block-banner', $classes ) ) { | |
| 38 | - $blocks = parse_blocks( get_the_content() ); | |
| 39 | -								foreach ( $blocks as $block ) { | |
| 40 | -									if ( 'lsx-blocks/lsx-banner-box' === $block['blockName'] ) { | |
| 41 | - echo wp_kses_post( $block['innerHTML'] ); | |
| 37 | +							if (in_array('has-block-banner', $classes)) { | |
| 38 | + $blocks = parse_blocks(get_the_content()); | |
| 39 | +								foreach ($blocks as $block) { | |
| 40 | +									if ('lsx-blocks/lsx-banner-box' === $block['blockName']) { | |
| 41 | + echo wp_kses_post($block['innerHTML']); | |
| 42 | 42 | } | 
| 43 | 43 | } | 
| 44 | 44 | } | 
| 45 | -							if ( in_array( 'has-block-cover', $classes ) ) { | |
| 46 | - $blocks = parse_blocks( get_the_content() ); | |
| 47 | -								foreach ( $blocks as $block ) { | |
| 45 | +							if (in_array('has-block-cover', $classes)) { | |
| 46 | + $blocks = parse_blocks(get_the_content()); | |
| 47 | +								foreach ($blocks as $block) { | |
| 48 | 48 | //print( '<pre>' . print_r( $block, true ) . '</pre>' ); | 
| 49 | -									if ( 'core/cover' === $block['blockName'] ) { | |
| 50 | - echo wp_kses_post( render_block( $block ) ); | |
| 49 | +									if ('core/cover' === $block['blockName']) { | |
| 50 | + echo wp_kses_post(render_block($block)); | |
| 51 | 51 | } | 
| 52 | 52 | } | 
| 53 | 53 | } | 
| 54 | 54 | |
| 55 | - $my_profile_string = esc_html__( 'My Profile', 'lsx-health-plan' ); | |
| 56 | - $my_profile_tagline = esc_html__( 'Update your details below', 'lsx-health-plan' ); | |
| 57 | - echo do_shortcode( '<div id="edit-account-tab">[lsx_health_plan_my_profile_tabs]<div class="edit-account-section"><h2 class="title-lined">' . $my_profile_string . '</h2><p>' . $my_profile_tagline . '</p>[woocommerce_my_account]</div></div>' ); | |
| 58 | -						} else if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'lost-password' ) ) { | |
| 59 | - echo do_shortcode( '[woocommerce_my_account]' ); | |
| 55 | +							$my_profile_string  = esc_html__('My Profile', 'lsx-health-plan'); | |
| 56 | +							$my_profile_tagline = esc_html__('Update your details below', 'lsx-health-plan'); | |
| 57 | +							echo do_shortcode('<div id="edit-account-tab">[lsx_health_plan_my_profile_tabs]<div class="edit-account-section"><h2 class="title-lined">' . $my_profile_string . '</h2><p>' . $my_profile_tagline . '</p>[woocommerce_my_account]</div></div>'); | |
| 58 | +						} else if (function_exists('is_wc_endpoint_url') && is_wc_endpoint_url('lost-password')) { | |
| 59 | +							echo do_shortcode('[woocommerce_my_account]'); | |
| 60 | 60 |  						} else { | 
| 61 | 61 | the_content(); | 
| 62 | 62 | } | 
| @@ -32,35 +32,35 @@ | ||
| 32 | 32 | |
| 33 | 33 | <div class="entry-content"> | 
| 34 | 34 | <?php | 
| 35 | -						if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'edit-account' ) ) { | |
| 36 | - $classes = get_body_class(); | |
| 37 | -							if ( in_array( 'has-block-banner', $classes ) ) { | |
| 38 | - $blocks = parse_blocks( get_the_content() ); | |
| 39 | -								foreach ( $blocks as $block ) { | |
| 40 | -									if ( 'lsx-blocks/lsx-banner-box' === $block['blockName'] ) { | |
| 41 | - echo wp_kses_post( $block['innerHTML'] ); | |
| 42 | - } | |
| 43 | - } | |
| 44 | - } | |
| 45 | -							if ( in_array( 'has-block-cover', $classes ) ) { | |
| 46 | - $blocks = parse_blocks( get_the_content() ); | |
| 47 | -								foreach ( $blocks as $block ) { | |
| 48 | - //print( '<pre>' . print_r( $block, true ) . '</pre>' ); | |
| 49 | -									if ( 'core/cover' === $block['blockName'] ) { | |
| 50 | - echo wp_kses_post( render_block( $block ) ); | |
| 51 | - } | |
| 52 | - } | |
| 53 | - } | |
| 54 | - | |
| 55 | - $my_profile_string = esc_html__( 'My Profile', 'lsx-health-plan' ); | |
| 56 | - $my_profile_tagline = esc_html__( 'Update your details below', 'lsx-health-plan' ); | |
| 57 | - echo do_shortcode( '<div id="edit-account-tab">[lsx_health_plan_my_profile_tabs]<div class="edit-account-section"><h2 class="title-lined">' . $my_profile_string . '</h2><p>' . $my_profile_tagline . '</p>[woocommerce_my_account]</div></div>' ); | |
| 58 | -						} else if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'lost-password' ) ) { | |
| 59 | - echo do_shortcode( '[woocommerce_my_account]' ); | |
| 60 | -						} else { | |
| 61 | - the_content(); | |
| 62 | - } | |
| 63 | - ?> | |
| 35 | +                              if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'edit-account' ) ) { | |
| 36 | + $classes = get_body_class(); | |
| 37 | +                                   if ( in_array( 'has-block-banner', $classes ) ) { | |
| 38 | + $blocks = parse_blocks( get_the_content() ); | |
| 39 | +                                        foreach ( $blocks as $block ) { | |
| 40 | +                                             if ( 'lsx-blocks/lsx-banner-box' === $block['blockName'] ) { | |
| 41 | + echo wp_kses_post( $block['innerHTML'] ); | |
| 42 | + } | |
| 43 | + } | |
| 44 | + } | |
| 45 | +                                   if ( in_array( 'has-block-cover', $classes ) ) { | |
| 46 | + $blocks = parse_blocks( get_the_content() ); | |
| 47 | +                                        foreach ( $blocks as $block ) { | |
| 48 | + //print( '<pre>' . print_r( $block, true ) . '</pre>' ); | |
| 49 | +                                             if ( 'core/cover' === $block['blockName'] ) { | |
| 50 | + echo wp_kses_post( render_block( $block ) ); | |
| 51 | + } | |
| 52 | + } | |
| 53 | + } | |
| 54 | + | |
| 55 | + $my_profile_string = esc_html__( 'My Profile', 'lsx-health-plan' ); | |
| 56 | + $my_profile_tagline = esc_html__( 'Update your details below', 'lsx-health-plan' ); | |
| 57 | + echo do_shortcode( '<div id="edit-account-tab">[lsx_health_plan_my_profile_tabs]<div class="edit-account-section"><h2 class="title-lined">' . $my_profile_string . '</h2><p>' . $my_profile_tagline . '</p>[woocommerce_my_account]</div></div>' ); | |
| 58 | +                              } else if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'lost-password' ) ) { | |
| 59 | + echo do_shortcode( '[woocommerce_my_account]' ); | |
| 60 | +                              } else { | |
| 61 | + the_content(); | |
| 62 | + } | |
| 63 | + ?> | |
| 64 | 64 | </div><!-- .entry-content --> | 
| 65 | 65 | |
| 66 | 66 | <?php lsx_entry_bottom(); ?> | 
| @@ -20,31 +20,31 @@ | ||
| 20 | 20 | <?php | 
| 21 | 21 | the_content(); | 
| 22 | 22 | |
| 23 | - wp_link_pages( array( | |
| 23 | + wp_link_pages(array( | |
| 24 | 24 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', | 
| 25 | 25 | 'after' => '</div></div>', | 
| 26 | 26 | 'link_before' => '<span>', | 
| 27 | 27 | 'link_after' => '</span>', | 
| 28 | - ) ); | |
| 28 | + )); | |
| 29 | 29 | ?> | 
| 30 | 30 | </div><!-- .entry-content --> | 
| 31 | 31 | |
| 32 | 32 | <footer class="footer-meta clearfix"> | 
| 33 | - <?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> | |
| 33 | +		<?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> | |
| 34 | 34 | <div class="post-tags-wrapper"> | 
| 35 | 35 | <?php lsx_content_post_tags(); ?> | 
| 36 | 36 | |
| 37 | 37 | <?php | 
| 38 | -				if ( class_exists( 'LSX_Sharing' ) ) { | |
| 38 | +				if (class_exists('LSX_Sharing')) { | |
| 39 | 39 | lsx_content_sharing(); | 
| 40 | 40 |  				} else { | 
| 41 | -					if ( function_exists( 'sharing_display' ) ) { | |
| 42 | - sharing_display( '', true ); | |
| 41 | +					if (function_exists('sharing_display')) { | |
| 42 | +						sharing_display('', true); | |
| 43 | 43 | } | 
| 44 | 44 | |
| 45 | -					if ( class_exists( 'Jetpack_Likes' ) ) { | |
| 45 | +					if (class_exists('Jetpack_Likes')) { | |
| 46 | 46 | $custom_likes = new Jetpack_Likes(); | 
| 47 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); | |
| 47 | +						echo wp_kses_post($custom_likes->post_likes('')); | |
| 48 | 48 | } | 
| 49 | 49 | } | 
| 50 | 50 | ?> | 
| @@ -18,15 +18,15 @@ discard block | ||
| 18 | 18 | |
| 19 | 19 | <div class="entry-content"> | 
| 20 | 20 | <?php | 
| 21 | - the_content(); | |
| 22 | - | |
| 23 | - wp_link_pages( array( | |
| 24 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', | |
| 25 | - 'after' => '</div></div>', | |
| 26 | - 'link_before' => '<span>', | |
| 27 | - 'link_after' => '</span>', | |
| 28 | - ) ); | |
| 29 | - ?> | |
| 21 | + the_content(); | |
| 22 | + | |
| 23 | + wp_link_pages( array( | |
| 24 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', | |
| 25 | + 'after' => '</div></div>', | |
| 26 | + 'link_before' => '<span>', | |
| 27 | + 'link_after' => '</span>', | |
| 28 | + ) ); | |
| 29 | + ?> | |
| 30 | 30 | </div><!-- .entry-content --> | 
| 31 | 31 | |
| 32 | 32 | <footer class="footer-meta clearfix"> | 
| @@ -35,19 +35,19 @@ discard block | ||
| 35 | 35 | <?php lsx_content_post_tags(); ?> | 
| 36 | 36 | |
| 37 | 37 | <?php | 
| 38 | -				if ( class_exists( 'LSX_Sharing' ) ) { | |
| 39 | - lsx_content_sharing(); | |
| 40 | -				} else { | |
| 41 | -					if ( function_exists( 'sharing_display' ) ) { | |
| 42 | - sharing_display( '', true ); | |
| 43 | - } | |
| 44 | - | |
| 45 | -					if ( class_exists( 'Jetpack_Likes' ) ) { | |
| 46 | - $custom_likes = new Jetpack_Likes(); | |
| 47 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); | |
| 48 | - } | |
| 49 | - } | |
| 50 | - ?> | |
| 38 | +                    if ( class_exists( 'LSX_Sharing' ) ) { | |
| 39 | + lsx_content_sharing(); | |
| 40 | +                    } else { | |
| 41 | +                         if ( function_exists( 'sharing_display' ) ) { | |
| 42 | + sharing_display( '', true ); | |
| 43 | + } | |
| 44 | + | |
| 45 | +                         if ( class_exists( 'Jetpack_Likes' ) ) { | |
| 46 | + $custom_likes = new Jetpack_Likes(); | |
| 47 | + echo wp_kses_post( $custom_likes->post_likes( '' ) ); | |
| 48 | + } | |
| 49 | + } | |
| 50 | + ?> | |
| 51 | 51 | <?php endif ?> | 
| 52 | 52 | </footer><!-- .footer-meta --> | 
| 53 | 53 | |
| @@ -5,8 +5,8 @@ discard block | ||
| 5 | 5 | * @package lsx-health-plan | 
| 6 | 6 | */ | 
| 7 | 7 | |
| 8 | -if ( have_posts() ) : | |
| 9 | - while ( have_posts() ) : | |
| 8 | +if (have_posts()) : | |
| 9 | + while (have_posts()) : | |
| 10 | 10 | the_post(); | 
| 11 | 11 | include LSX_HEALTH_PLAN_PATH . '/templates/content-plan.php'; | 
| 12 | 12 | endwhile; | 
| @@ -15,31 +15,31 @@ discard block | ||
| 15 | 15 | |
| 16 | 16 | <div class="row tab-content-plan"> | 
| 17 | 17 | <?php | 
| 18 | -	if ( lsx_health_plan_has_warmup() ) { | |
| 18 | +	if (lsx_health_plan_has_warmup()) { | |
| 19 | 19 | lsx_health_plan_warmup_box(); | 
| 20 | 20 | } | 
| 21 | 21 | ?> | 
| 22 | 22 | |
| 23 | 23 | <?php | 
| 24 | -	if ( lsx_health_plan_has_workout() ) { | |
| 24 | +	if (lsx_health_plan_has_workout()) { | |
| 25 | 25 | lsx_health_plan_workout_box(); | 
| 26 | 26 | } | 
| 27 | 27 | ?> | 
| 28 | 28 | |
| 29 | 29 | <?php | 
| 30 | -	if ( lsx_health_plan_has_meal() ) { | |
| 30 | +	if (lsx_health_plan_has_meal()) { | |
| 31 | 31 | lsx_health_plan_meal_box(); | 
| 32 | 32 | } | 
| 33 | 33 | ?> | 
| 34 | 34 | |
| 35 | 35 | <?php | 
| 36 | -	if ( lsx_health_plan_has_recipe() ) { | |
| 36 | +	if (lsx_health_plan_has_recipe()) { | |
| 37 | 37 | lsx_health_plan_recipe_box(); | 
| 38 | 38 | } | 
| 39 | 39 | ?> | 
| 40 | 40 | |
| 41 | 41 | <?php | 
| 42 | -	if ( lsx_health_plan_has_downloads() ) { | |
| 42 | +	if (lsx_health_plan_has_downloads()) { | |
| 43 | 43 | lsx_health_plan_downloads_box(); | 
| 44 | 44 | } | 
| 45 | 45 | ?> | 
| @@ -6,41 +6,41 @@ | ||
| 6 | 6 | */ | 
| 7 | 7 | |
| 8 | 8 | if ( have_posts() ) : | 
| 9 | - while ( have_posts() ) : | |
| 10 | - the_post(); | |
| 11 | - include LSX_HEALTH_PLAN_PATH . '/templates/content-plan.php'; | |
| 12 | - endwhile; | |
| 9 | + while ( have_posts() ) : | |
| 10 | + the_post(); | |
| 11 | + include LSX_HEALTH_PLAN_PATH . '/templates/content-plan.php'; | |
| 12 | + endwhile; | |
| 13 | 13 | endif; | 
| 14 | 14 | ?> | 
| 15 | 15 | |
| 16 | 16 | <div class="row tab-content-plan"> | 
| 17 | 17 | <?php | 
| 18 | -	if ( lsx_health_plan_has_warmup() ) { | |
| 19 | - lsx_health_plan_warmup_box(); | |
| 20 | - } | |
| 21 | - ?> | |
| 18 | +     if ( lsx_health_plan_has_warmup() ) { | |
| 19 | + lsx_health_plan_warmup_box(); | |
| 20 | + } | |
| 21 | + ?> | |
| 22 | 22 | |
| 23 | 23 | <?php | 
| 24 | -	if ( lsx_health_plan_has_workout() ) { | |
| 25 | - lsx_health_plan_workout_box(); | |
| 26 | - } | |
| 27 | - ?> | |
| 24 | +     if ( lsx_health_plan_has_workout() ) { | |
| 25 | + lsx_health_plan_workout_box(); | |
| 26 | + } | |
| 27 | + ?> | |
| 28 | 28 | |
| 29 | 29 | <?php | 
| 30 | -	if ( lsx_health_plan_has_meal() ) { | |
| 31 | - lsx_health_plan_meal_box(); | |
| 32 | - } | |
| 33 | - ?> | |
| 30 | +     if ( lsx_health_plan_has_meal() ) { | |
| 31 | + lsx_health_plan_meal_box(); | |
| 32 | + } | |
| 33 | + ?> | |
| 34 | 34 | |
| 35 | 35 | <?php | 
| 36 | -	if ( lsx_health_plan_has_recipe() ) { | |
| 37 | - lsx_health_plan_recipe_box(); | |
| 38 | - } | |
| 39 | - ?> | |
| 36 | +     if ( lsx_health_plan_has_recipe() ) { | |
| 37 | + lsx_health_plan_recipe_box(); | |
| 38 | + } | |
| 39 | + ?> | |
| 40 | 40 | |
| 41 | 41 | <?php | 
| 42 | -	if ( lsx_health_plan_has_downloads() ) { | |
| 43 | - lsx_health_plan_downloads_box(); | |
| 44 | - } | |
| 45 | - ?> | |
| 42 | +     if ( lsx_health_plan_has_downloads() ) { | |
| 43 | + lsx_health_plan_downloads_box(); | |
| 44 | + } | |
| 45 | + ?> | |
| 46 | 46 | </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 | <div class="workout-content"> | 
| @@ -38,7 +38,7 @@ discard block | ||
| 38 | 38 | |
| 39 | 39 | <?php else : ?> | 
| 40 | 40 | |
| 41 | - <?php get_template_part( 'partials/content', 'none' ); ?> | |
| 41 | +			<?php get_template_part('partials/content', 'none'); ?> | |
| 42 | 42 | |
| 43 | 43 | <?php endif; ?> | 
| 44 | 44 | |
| @@ -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 | <div class="workout-content"> | 
| 29 | 29 | <?php the_content(); ?> | 
| 30 | 30 | </div> | 
| @@ -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 | |
| @@ -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> | 
| @@ -5,15 +5,15 @@ discard block | ||
| 5 | 5 | * @package lsx-health-plan | 
| 6 | 6 | */ | 
| 7 | 7 | global $shortcode_args; | 
| 8 | -$connected_tips = get_post_meta( get_the_ID(), 'connected_tips', true ); | |
| 8 | +$connected_tips = get_post_meta(get_the_ID(), 'connected_tips', true); | |
| 9 | 9 | $args = array(); | 
| 10 | 10 | |
| 11 | 11 | // Check for any shortcode overrides. | 
| 12 | -if ( null !== $shortcode_args && isset( $shortcode_args['include'] ) ) { | |
| 13 | - $connected_tips = array( get_the_ID() ); | |
| 12 | +if (null !== $shortcode_args && isset($shortcode_args['include'])) { | |
| 13 | + $connected_tips = array(get_the_ID()); | |
| 14 | 14 | } | 
| 15 | 15 | |
| 16 | -if ( empty( $connected_tips ) ) { | |
| 16 | +if (empty($connected_tips)) { | |
| 17 | 17 | // Featured Tips Global | 
| 18 | 18 | $connected_tips = 'tip_featured_tip'; | 
| 19 | 19 | $args = array( | 
| @@ -24,8 +24,8 @@ discard block | ||
| 24 | 24 | 'meta_key' => $connected_tips, | 
| 25 | 25 | ); | 
| 26 | 26 |  } else { | 
| 27 | - $connected_tips = \lsx_health_plan\functions\check_posts_exist( $connected_tips ); | |
| 28 | -	if ( ! empty( $connected_tips ) ) { | |
| 27 | + $connected_tips = \lsx_health_plan\functions\check_posts_exist($connected_tips); | |
| 28 | +	if ( ! empty($connected_tips)) { | |
| 29 | 29 | $args = array( | 
| 30 | 30 | 'orderby' => 'date', | 
| 31 | 31 | 'order' => 'ASC', | 
| @@ -36,14 +36,14 @@ discard block | ||
| 36 | 36 | } | 
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | -if ( ! empty( $args ) ) { | |
| 40 | - $tips = new WP_Query( $args ); | |
| 39 | +if ( ! empty($args)) { | |
| 40 | + $tips = new WP_Query($args); | |
| 41 | 41 | ?> | 
| 42 | 42 | <div id="lsx-tips-shortcode" class="daily-plan-block content-box box-shadow"> | 
| 43 | 43 | <div class="lsx-tips-shortcode lsx-tips-slider slick-slider slick-dotted" > | 
| 44 | 44 | <?php | 
| 45 | -		if ( $tips->have_posts() ) { | |
| 46 | -			while ( $tips->have_posts() ) { | |
| 45 | +		if ($tips->have_posts()) { | |
| 46 | +			while ($tips->have_posts()) { | |
| 47 | 47 | $tips->the_post(); | 
| 48 | 48 | include LSX_HEALTH_PLAN_PATH . 'templates/content-archive-tip.php'; | 
| 49 | 49 | } | 
| @@ -10,45 +10,45 @@ | ||
| 10 | 10 | |
| 11 | 11 | // Check for any shortcode overrides. | 
| 12 | 12 |  if ( null !== $shortcode_args && isset( $shortcode_args['include'] ) ) { | 
| 13 | - $connected_tips = array( get_the_ID() ); | |
| 13 | + $connected_tips = array( get_the_ID() ); | |
| 14 | 14 | } | 
| 15 | 15 | |
| 16 | 16 |  if ( empty( $connected_tips ) ) { | 
| 17 | - // Featured Tips Global | |
| 18 | - $connected_tips = 'tip_featured_tip'; | |
| 19 | - $args = array( | |
| 20 | - 'orderby' => 'date', | |
| 21 | - 'order' => 'ASC', | |
| 22 | - 'post_type' => 'tip', | |
| 23 | - 'posts_per_page' => 3, | |
| 24 | - 'meta_key' => $connected_tips, | |
| 25 | - ); | |
| 17 | + // Featured Tips Global | |
| 18 | + $connected_tips = 'tip_featured_tip'; | |
| 19 | + $args = array( | |
| 20 | + 'orderby' => 'date', | |
| 21 | + 'order' => 'ASC', | |
| 22 | + 'post_type' => 'tip', | |
| 23 | + 'posts_per_page' => 3, | |
| 24 | + 'meta_key' => $connected_tips, | |
| 25 | + ); | |
| 26 | 26 |  } else { | 
| 27 | - $connected_tips = \lsx_health_plan\functions\check_posts_exist( $connected_tips ); | |
| 28 | -	if ( ! empty( $connected_tips ) ) { | |
| 29 | - $args = array( | |
| 30 | - 'orderby' => 'date', | |
| 31 | - 'order' => 'ASC', | |
| 32 | - 'post_type' => 'tip', | |
| 33 | - 'posts_per_page' => 3, | |
| 34 | - 'post__in' => $connected_tips, | |
| 35 | - ); | |
| 36 | - } | |
| 27 | + $connected_tips = \lsx_health_plan\functions\check_posts_exist( $connected_tips ); | |
| 28 | +     if ( ! empty( $connected_tips ) ) { | |
| 29 | + $args = array( | |
| 30 | + 'orderby' => 'date', | |
| 31 | + 'order' => 'ASC', | |
| 32 | + 'post_type' => 'tip', | |
| 33 | + 'posts_per_page' => 3, | |
| 34 | + 'post__in' => $connected_tips, | |
| 35 | + ); | |
| 36 | + } | |
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | 39 |  if ( ! empty( $args ) ) { | 
| 40 | - $tips = new WP_Query( $args ); | |
| 41 | - ?> | |
| 40 | + $tips = new WP_Query( $args ); | |
| 41 | + ?> | |
| 42 | 42 | <div id="lsx-tips-shortcode" class="daily-plan-block content-box box-shadow"> | 
| 43 | 43 | <div class="lsx-tips-shortcode lsx-tips-slider slick-slider slick-dotted" > | 
| 44 | 44 | <?php | 
| 45 | -		if ( $tips->have_posts() ) { | |
| 46 | -			while ( $tips->have_posts() ) { | |
| 47 | - $tips->the_post(); | |
| 48 | - include LSX_HEALTH_PLAN_PATH . 'templates/content-archive-tip.php'; | |
| 49 | - } | |
| 50 | - } | |
| 51 | - ?> | |
| 45 | +          if ( $tips->have_posts() ) { | |
| 46 | +               while ( $tips->have_posts() ) { | |
| 47 | + $tips->the_post(); | |
| 48 | + include LSX_HEALTH_PLAN_PATH . 'templates/content-archive-tip.php'; | |
| 49 | + } | |
| 50 | + } | |
| 51 | + ?> | |
| 52 | 52 | </div> | 
| 53 | 53 | </div> | 
| 54 | 54 | <?php | 
| @@ -13,33 +13,33 @@ | ||
| 13 | 13 | <?php lsx_entry_top(); ?> | 
| 14 | 14 | |
| 15 | 15 | <div class="workout-feature-img"> | 
| 16 | - <a href="<?php echo esc_url( get_permalink() ); ?>"> | |
| 16 | + <a href="<?php echo esc_url(get_permalink()); ?>"> | |
| 17 | 17 | <?php | 
| 18 | 18 | $featured_image = get_the_post_thumbnail(); | 
| 19 | -			if ( ! empty( $featured_image ) && '' !== $featured_image ) { | |
| 20 | - the_post_thumbnail( 'lsx-thumbnail-square', array( | |
| 19 | +			if ( ! empty($featured_image) && '' !== $featured_image) { | |
| 20 | +				the_post_thumbnail('lsx-thumbnail-square', array( | |
| 21 | 21 | 'class' => 'aligncenter', | 
| 22 | - ) ); | |
| 22 | + )); | |
| 23 | 23 |  			} else { | 
| 24 | 24 | ?> | 
| 25 | - <img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>"> | |
| 25 | + <img src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>"> | |
| 26 | 26 | <?php | 
| 27 | 27 | } | 
| 28 | 28 | ?> | 
| 29 | 29 | </a> | 
| 30 | 30 | </div> | 
| 31 | 31 | <div class="content-box workout-content-box white-bg"> | 
| 32 | - <?php the_title( '<h3 class="workout-title">', '</h3>' ); ?> | |
| 32 | +			<?php the_title('<h3 class="workout-title">', '</h3>'); ?> | |
| 33 | 33 | <?php | 
| 34 | -			if ( ! has_excerpt() ) { | |
| 35 | - $content = wp_trim_words( get_the_content(), 20 ); | |
| 34 | +			if ( ! has_excerpt()) { | |
| 35 | + $content = wp_trim_words(get_the_content(), 20); | |
| 36 | 36 | $content = '<p>' . $content . '</p>'; | 
| 37 | 37 |  			} else { | 
| 38 | - $content = apply_filters( 'the_excerpt', get_the_excerpt() ); | |
| 38 | +				$content = apply_filters('the_excerpt', get_the_excerpt()); | |
| 39 | 39 | } | 
| 40 | - echo wp_kses_post( $content ); | |
| 40 | + echo wp_kses_post($content); | |
| 41 | 41 | ?> | 
| 42 | - <a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See workout', 'lsx-health-plan' ); ?></a> | |
| 42 | +			<a href="<?php echo esc_url(get_permalink()); ?>" class="btn border-btn"><?php esc_html_e('See workout', 'lsx-health-plan'); ?></a> | |
| 43 | 43 | </div> | 
| 44 | 44 | <?php lsx_entry_bottom(); ?> | 
| 45 | 45 | </article> | 
| @@ -15,30 +15,30 @@ | ||
| 15 | 15 | <div class="workout-feature-img"> | 
| 16 | 16 | <a href="<?php echo esc_url( get_permalink() ); ?>"> | 
| 17 | 17 | <?php | 
| 18 | - $featured_image = get_the_post_thumbnail(); | |
| 19 | -			if ( ! empty( $featured_image ) && '' !== $featured_image ) { | |
| 20 | - the_post_thumbnail( 'lsx-thumbnail-square', array( | |
| 21 | - 'class' => 'aligncenter', | |
| 22 | - ) ); | |
| 23 | -			} else { | |
| 24 | - ?> | |
| 18 | + $featured_image = get_the_post_thumbnail(); | |
| 19 | +               if ( ! empty( $featured_image ) && '' !== $featured_image ) { | |
| 20 | + the_post_thumbnail( 'lsx-thumbnail-square', array( | |
| 21 | + 'class' => 'aligncenter', | |
| 22 | + ) ); | |
| 23 | +               } else { | |
| 24 | + ?> | |
| 25 | 25 | <img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>"> | 
| 26 | 26 | <?php | 
| 27 | - } | |
| 28 | - ?> | |
| 27 | + } | |
| 28 | + ?> | |
| 29 | 29 | </a> | 
| 30 | 30 | </div> | 
| 31 | 31 | <div class="content-box workout-content-box white-bg"> | 
| 32 | 32 | <?php the_title( '<h3 class="workout-title">', '</h3>' ); ?> | 
| 33 | 33 | <?php | 
| 34 | -			if ( ! has_excerpt() ) { | |
| 35 | - $content = wp_trim_words( get_the_content(), 20 ); | |
| 36 | - $content = '<p>' . $content . '</p>'; | |
| 37 | -			} else { | |
| 38 | - $content = apply_filters( 'the_excerpt', get_the_excerpt() ); | |
| 39 | - } | |
| 40 | - echo wp_kses_post( $content ); | |
| 41 | - ?> | |
| 34 | +               if ( ! has_excerpt() ) { | |
| 35 | + $content = wp_trim_words( get_the_content(), 20 ); | |
| 36 | + $content = '<p>' . $content . '</p>'; | |
| 37 | +               } else { | |
| 38 | + $content = apply_filters( 'the_excerpt', get_the_excerpt() ); | |
| 39 | + } | |
| 40 | + echo wp_kses_post( $content ); | |
| 41 | + ?> | |
| 42 | 42 | <a href="<?php echo esc_url( get_permalink() ); ?>" class="btn border-btn"><?php esc_html_e( 'See workout', 'lsx-health-plan' ); ?></a> | 
| 43 | 43 | </div> | 
| 44 | 44 | <?php lsx_entry_bottom(); ?> | 
| @@ -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', $page_id ) ) { | |
| 23 | +		if (current_user_can('wc_memberships_view_restricted_post_content', $page_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 workout-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', $page_id ) ) { | |
| 24 | - ?> | |
| 23 | +          if ( current_user_can( 'wc_memberships_view_restricted_post_content', $page_id ) ) { | |
| 24 | + ?> | |
| 25 | 25 | <main id="main" role="main"> | 
| 26 | 26 | |
| 27 | 27 | <?php lsx_content_top(); ?> | 
| @@ -30,9 +30,9 @@ discard block | ||
| 30 | 30 | <div class="row"> | 
| 31 | 31 | <?php if ( have_posts() ) : ?> | 
| 32 | 32 | <?php | 
| 33 | - while ( have_posts() ) : | |
| 34 | - the_post(); | |
| 35 | - ?> | |
| 33 | + while ( have_posts() ) : | |
| 34 | + the_post(); | |
| 35 | + ?> | |
| 36 | 36 | |
| 37 | 37 | <?php include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-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 | |
| @@ -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> | 
| @@ -5,24 +5,24 @@ discard block | ||
| 5 | 5 | * @package lsx-health-plan | 
| 6 | 6 | */ | 
| 7 | 7 | |
| 8 | -global $group_name,$shortcode_args; | |
| 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 ); | |
| 8 | +global $group_name, $shortcode_args; | |
| 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 | -$link_setting = \lsx_health_plan\functions\get_option( 'workout_tab_link', 'single' ); | |
| 14 | -$content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_content', '' ); | |
| 15 | -$modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' ); | |
| 13 | +$link_setting          = \lsx_health_plan\functions\get_option('workout_tab_link', 'single'); | |
| 14 | +$content_setting       = \lsx_health_plan\functions\get_option('workout_tab_content', ''); | |
| 15 | +$modal_content_setting = \lsx_health_plan\functions\get_option('workout_tab_modal_content', 'excerpt'); | |
| 16 | 16 | |
| 17 | 17 | // Check for shortcode overrides. | 
| 18 | -if ( null !== $shortcode_args ) { | |
| 19 | -	if ( isset( $shortcode_args['link'] ) ) { | |
| 18 | +if (null !== $shortcode_args) { | |
| 19 | +	if (isset($shortcode_args['link'])) { | |
| 20 | 20 | $link_setting = $shortcode_args['link']; | 
| 21 | 21 | } | 
| 22 | -	if ( isset( $shortcode_args['description'] ) ) { | |
| 22 | +	if (isset($shortcode_args['description'])) { | |
| 23 | 23 | $content_setting = $shortcode_args['description']; | 
| 24 | 24 | } | 
| 25 | -	if ( isset( $shortcode_args['modal_content'] ) ) { | |
| 25 | +	if (isset($shortcode_args['modal_content'])) { | |
| 26 | 26 | $modal_content_setting = $shortcode_args['modal_content']; | 
| 27 | 27 | } | 
| 28 | 28 | } | 
| @@ -31,21 +31,21 @@ discard block | ||
| 31 | 31 | 'modal_content' => $modal_content_setting, | 
| 32 | 32 | ); | 
| 33 | 33 | |
| 34 | -if ( ! empty( $groups ) ) { | |
| 34 | +if ( ! empty($groups)) { | |
| 35 | 35 | ?> | 
| 36 | 36 | <div class="set-list"> | 
| 37 | 37 | <div class="workout-list"> | 
| 38 | 38 | <?php | 
| 39 | -			foreach ( $groups as $group ) { | |
| 40 | -				if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) { | |
| 39 | +			foreach ($groups as $group) { | |
| 40 | +				if (isset($group['connected_exercises']) && '' !== $group['connected_exercises']) { | |
| 41 | 41 | $reps = ''; | 
| 42 | -					if ( isset( $group['reps'] ) && '' !== $group['reps'] ) { | |
| 43 | - $reps = '<span class="reps">' . esc_html( $group['reps'] ) . '</span>'; | |
| 42 | +					if (isset($group['reps']) && '' !== $group['reps']) { | |
| 43 | + $reps = '<span class="reps">' . esc_html($group['reps']) . '</span>'; | |
| 44 | 44 | } | 
| 45 | 45 | // Setup our link and content. | 
| 46 | -					switch ( $link_setting ) { | |
| 46 | +					switch ($link_setting) { | |
| 47 | 47 | case 'single': | 
| 48 | - $link_html = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">'; | |
| 48 | + $link_html = '<a href="' . get_permalink($group['connected_exercises']) . '">'; | |
| 49 | 49 | $link_close = '</a>'; | 
| 50 | 50 | break; | 
| 51 | 51 | |
| @@ -53,7 +53,7 @@ discard block | ||
| 53 | 53 | $link_html = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">'; | 
| 54 | 54 | $link_close = '</a>'; | 
| 55 | 55 | // We call the button to register the modal, but we do not output it. | 
| 56 | - lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); | |
| 56 | + lsx_health_plan_workout_exercise_button($group['connected_exercises'], $group, false, $modal_args); | |
| 57 | 57 | break; | 
| 58 | 58 | |
| 59 | 59 | case 'none': | 
| @@ -67,43 +67,43 @@ discard block | ||
| 67 | 67 | <div class="row"> | 
| 68 | 68 | <div class="col-sm-6 col-md-2"> | 
| 69 | 69 | <div class="exercise-feature-img"> | 
| 70 | - <?php echo wp_kses_post( $link_html ); ?> | |
| 70 | + <?php echo wp_kses_post($link_html); ?> | |
| 71 | 71 | <?php | 
| 72 | 72 | // We call the button to register the modal, but we do not output it. | 
| 73 | - lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); | |
| 73 | + lsx_health_plan_workout_exercise_button($group['connected_exercises'], $group, false, $modal_args); | |
| 74 | 74 | $thumbnail_args = array( | 
| 75 | 75 | 'class' => 'aligncenter', | 
| 76 | 76 | ); | 
| 77 | - $featured_image = get_the_post_thumbnail( $group['connected_exercises'], 'medium', $thumbnail_args ); | |
| 78 | -										if ( ! empty( $featured_image ) && '' !== $featured_image ) { | |
| 79 | - echo wp_kses_post( $featured_image ); | |
| 77 | + $featured_image = get_the_post_thumbnail($group['connected_exercises'], 'medium', $thumbnail_args); | |
| 78 | +										if ( ! empty($featured_image) && '' !== $featured_image) { | |
| 79 | + echo wp_kses_post($featured_image); | |
| 80 | 80 |  										} else { | 
| 81 | 81 | ?> | 
| 82 | - <img src="<?php echo esc_attr( plugin_dir_url( __DIR__ ) . '../assets/images/placeholder.jpg' ); ?>"> | |
| 82 | + <img src="<?php echo esc_attr(plugin_dir_url(__DIR__) . '../assets/images/placeholder.jpg'); ?>"> | |
| 83 | 83 | <?php | 
| 84 | 84 | } | 
| 85 | 85 | ?> | 
| 86 | - <?php echo wp_kses_post( $link_close ); ?> | |
| 86 | + <?php echo wp_kses_post($link_close); ?> | |
| 87 | 87 | </div> | 
| 88 | 88 | </div> | 
| 89 | 89 | <div class="col-sm-6 col-md-10"> | 
| 90 | 90 | <div class="title"> | 
| 91 | 91 | <h3> | 
| 92 | - <?php echo wp_kses_post( $link_html ); ?> | |
| 92 | + <?php echo wp_kses_post($link_html); ?> | |
| 93 | 93 | <?php | 
| 94 | - $exercise_title = lsx_health_plan_exercise_title( '', '', false, $group['connected_exercises'] ); | |
| 95 | -											if ( '' !== $reps ) { | |
| 94 | +											$exercise_title = lsx_health_plan_exercise_title('', '', false, $group['connected_exercises']); | |
| 95 | +											if ('' !== $reps) { | |
| 96 | 96 | $exercise_title .= $reps; | 
| 97 | 97 | } | 
| 98 | - echo wp_kses_post( $exercise_title ); | |
| 98 | + echo wp_kses_post($exercise_title); | |
| 99 | 99 | ?> | 
| 100 | - <?php echo wp_kses_post( $link_close ); ?> | |
| 100 | + <?php echo wp_kses_post($link_close); ?> | |
| 101 | 101 | </h3> | 
| 102 | 102 | </div> | 
| 103 | -								<?php if ( '' !== $link_html ) { ?> | |
| 104 | - <?php echo wp_kses_post( str_replace( '<a', '<a class="btn border-btn" ', $link_html ) ); ?> | |
| 105 | - <?php esc_html_e( 'How to do it?', 'lsx-health-plan' ); ?> | |
| 106 | - <?php echo wp_kses_post( $link_close ); ?> | |
| 103 | +								<?php if ('' !== $link_html) { ?> | |
| 104 | +									<?php echo wp_kses_post(str_replace('<a', '<a class="btn border-btn" ', $link_html)); ?> | |
| 105 | +									<?php esc_html_e('How to do it?', 'lsx-health-plan'); ?> | |
| 106 | + <?php echo wp_kses_post($link_close); ?> | |
| 107 | 107 | <?php } ?> | 
| 108 | 108 | </div> | 
| 109 | 109 | </div> | 
| @@ -8,7 +8,7 @@ discard block | ||
| 8 | 8 | global $group_name,$shortcode_args; | 
| 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 | $link_setting = \lsx_health_plan\functions\get_option( 'workout_tab_link', 'single' ); | 
| 14 | 14 | $content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_content', '' ); | 
| @@ -16,73 +16,73 @@ discard block | ||
| 16 | 16 | |
| 17 | 17 | // Check for shortcode overrides. | 
| 18 | 18 |  if ( null !== $shortcode_args ) { | 
| 19 | -	if ( isset( $shortcode_args['link'] ) ) { | |
| 20 | - $link_setting = $shortcode_args['link']; | |
| 21 | - } | |
| 22 | -	if ( isset( $shortcode_args['description'] ) ) { | |
| 23 | - $content_setting = $shortcode_args['description']; | |
| 24 | - } | |
| 25 | -	if ( isset( $shortcode_args['modal_content'] ) ) { | |
| 26 | - $modal_content_setting = $shortcode_args['modal_content']; | |
| 27 | - } | |
| 19 | +     if ( isset( $shortcode_args['link'] ) ) { | |
| 20 | + $link_setting = $shortcode_args['link']; | |
| 21 | + } | |
| 22 | +     if ( isset( $shortcode_args['description'] ) ) { | |
| 23 | + $content_setting = $shortcode_args['description']; | |
| 24 | + } | |
| 25 | +     if ( isset( $shortcode_args['modal_content'] ) ) { | |
| 26 | + $modal_content_setting = $shortcode_args['modal_content']; | |
| 27 | + } | |
| 28 | 28 | } | 
| 29 | 29 | |
| 30 | 30 | $modal_args = array( | 
| 31 | - 'modal_content' => $modal_content_setting, | |
| 31 | + 'modal_content' => $modal_content_setting, | |
| 32 | 32 | ); | 
| 33 | 33 | |
| 34 | 34 |  if ( ! empty( $groups ) ) { | 
| 35 | - ?> | |
| 35 | + ?> | |
| 36 | 36 | <div class="set-list"> | 
| 37 | 37 | <div class="workout-list"> | 
| 38 | 38 | <?php | 
| 39 | -			foreach ( $groups as $group ) { | |
| 40 | -				if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) { | |
| 41 | - $reps = ''; | |
| 42 | -					if ( isset( $group['reps'] ) && '' !== $group['reps'] ) { | |
| 43 | - $reps = '<span class="reps">' . esc_html( $group['reps'] ) . '</span>'; | |
| 44 | - } | |
| 45 | - // Setup our link and content. | |
| 46 | -					switch ( $link_setting ) { | |
| 47 | - case 'single': | |
| 48 | - $link_html = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">'; | |
| 49 | - $link_close = '</a>'; | |
| 50 | - break; | |
| 39 | +               foreach ( $groups as $group ) { | |
| 40 | +                    if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) { | |
| 41 | + $reps = ''; | |
| 42 | +                         if ( isset( $group['reps'] ) && '' !== $group['reps'] ) { | |
| 43 | + $reps = '<span class="reps">' . esc_html( $group['reps'] ) . '</span>'; | |
| 44 | + } | |
| 45 | + // Setup our link and content. | |
| 46 | +                         switch ( $link_setting ) { | |
| 47 | + case 'single': | |
| 48 | + $link_html = '<a href="' . get_permalink( $group['connected_exercises'] ) . '">'; | |
| 49 | + $link_close = '</a>'; | |
| 50 | + break; | |
| 51 | 51 | |
| 52 | - case 'modal': | |
| 53 | - $link_html = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">'; | |
| 54 | - $link_close = '</a>'; | |
| 55 | - // We call the button to register the modal, but we do not output it. | |
| 56 | - lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); | |
| 57 | - break; | |
| 52 | + case 'modal': | |
| 53 | + $link_html = '<a data-toggle="modal" href="#workout-exercise-modal-' . $group['connected_exercises'] . '">'; | |
| 54 | + $link_close = '</a>'; | |
| 55 | + // We call the button to register the modal, but we do not output it. | |
| 56 | + lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); | |
| 57 | + break; | |
| 58 | 58 | |
| 59 | - case 'none': | |
| 60 | - default: | |
| 61 | - $link_html = ''; | |
| 62 | - $link_close = ''; | |
| 63 | - break; | |
| 64 | - } | |
| 65 | - ?> | |
| 59 | + case 'none': | |
| 60 | + default: | |
| 61 | + $link_html = ''; | |
| 62 | + $link_close = ''; | |
| 63 | + break; | |
| 64 | + } | |
| 65 | + ?> | |
| 66 | 66 | <article class="lsx-slot box-shadow"> | 
| 67 | 67 | <div class="row"> | 
| 68 | 68 | <div class="col-sm-6 col-md-2"> | 
| 69 | 69 | <div class="exercise-feature-img"> | 
| 70 | 70 | <?php echo wp_kses_post( $link_html ); ?> | 
| 71 | 71 | <?php | 
| 72 | - // We call the button to register the modal, but we do not output it. | |
| 73 | - lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); | |
| 74 | - $thumbnail_args = array( | |
| 75 | - 'class' => 'aligncenter', | |
| 76 | - ); | |
| 77 | - $featured_image = get_the_post_thumbnail( $group['connected_exercises'], 'medium', $thumbnail_args ); | |
| 78 | -										if ( ! empty( $featured_image ) && '' !== $featured_image ) { | |
| 79 | - echo wp_kses_post( $featured_image ); | |
| 80 | -										} else { | |
| 81 | - ?> | |
| 72 | + // We call the button to register the modal, but we do not output it. | |
| 73 | + lsx_health_plan_workout_exercise_button( $group['connected_exercises'], $group, false, $modal_args ); | |
| 74 | + $thumbnail_args = array( | |
| 75 | + 'class' => 'aligncenter', | |
| 76 | + ); | |
| 77 | + $featured_image = get_the_post_thumbnail( $group['connected_exercises'], 'medium', $thumbnail_args ); | |
| 78 | +                                                  if ( ! empty( $featured_image ) && '' !== $featured_image ) { | |
| 79 | + echo wp_kses_post( $featured_image ); | |
| 80 | +                                                  } else { | |
| 81 | + ?> | |
| 82 | 82 | <img src="<?php echo esc_attr( plugin_dir_url( __DIR__ ) . '../assets/images/placeholder.jpg' ); ?>"> | 
| 83 | 83 | <?php | 
| 84 | - } | |
| 85 | - ?> | |
| 84 | + } | |
| 85 | + ?> | |
| 86 | 86 | <?php echo wp_kses_post( $link_close ); ?> | 
| 87 | 87 | </div> | 
| 88 | 88 | </div> | 
| @@ -91,12 +91,12 @@ discard block | ||
| 91 | 91 | <h3> | 
| 92 | 92 | <?php echo wp_kses_post( $link_html ); ?> | 
| 93 | 93 | <?php | 
| 94 | - $exercise_title = lsx_health_plan_exercise_title( '', '', false, $group['connected_exercises'] ); | |
| 95 | -											if ( '' !== $reps ) { | |
| 96 | - $exercise_title .= $reps; | |
| 97 | - } | |
| 98 | - echo wp_kses_post( $exercise_title ); | |
| 99 | - ?> | |
| 94 | + $exercise_title = lsx_health_plan_exercise_title( '', '', false, $group['connected_exercises'] ); | |
| 95 | +                                                       if ( '' !== $reps ) { | |
| 96 | + $exercise_title .= $reps; | |
| 97 | + } | |
| 98 | + echo wp_kses_post( $exercise_title ); | |
| 99 | + ?> | |
| 100 | 100 | <?php echo wp_kses_post( $link_close ); ?> | 
| 101 | 101 | </h3> | 
| 102 | 102 | </div> | 
| @@ -109,9 +109,9 @@ discard block | ||
| 109 | 109 | </div> | 
| 110 | 110 | </article> | 
| 111 | 111 | <?php | 
| 112 | - } | |
| 113 | - } | |
| 114 | - ?> | |
| 112 | + } | |
| 113 | + } | |
| 114 | + ?> | |
| 115 | 115 | </div> | 
| 116 | 116 | </div> | 
| 117 | 117 | <?php |