@@ -8,10 +8,10 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | $warm_up = get_post_meta( get_the_ID(), 'plan_warmup', true ); |
| 10 | 10 | if ( false === $warm_up || '' === $warm_up ) { |
| 11 | - $options = \lsx_health_plan\functions\get_option( 'all' ); |
|
| 12 | - if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) { |
|
| 13 | - $warm_up = $options['plan_warmup']; |
|
| 14 | - } |
|
| 11 | + $options = \lsx_health_plan\functions\get_option( 'all' ); |
|
| 12 | + if ( isset( $options['plan_warmup'] ) && '' !== $options['plan_warmup'] && ! empty( $options['plan_warmup'] ) ) { |
|
| 13 | + $warm_up = $options['plan_warmup']; |
|
| 14 | + } |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | ?> |
@@ -19,25 +19,25 @@ discard block |
||
| 19 | 19 | <?php |
| 20 | 20 | |
| 21 | 21 | if ( false !== $warm_up && '' !== $warm_up ) { |
| 22 | - if ( ! is_array( $warm_up ) ) { |
|
| 23 | - $warm_up = array( $warm_up ); |
|
| 24 | - } |
|
| 22 | + if ( ! is_array( $warm_up ) ) { |
|
| 23 | + $warm_up = array( $warm_up ); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - $warmup_type = array( 'page', 'workout', 'exercise' ); |
|
| 27 | - $warmup_query = new WP_Query( |
|
| 28 | - array( |
|
| 29 | - 'post__in' => $warm_up, |
|
| 30 | - 'post_type' => $warmup_type, |
|
| 31 | - ) |
|
| 32 | - ); |
|
| 26 | + $warmup_type = array( 'page', 'workout', 'exercise' ); |
|
| 27 | + $warmup_query = new WP_Query( |
|
| 28 | + array( |
|
| 29 | + 'post__in' => $warm_up, |
|
| 30 | + 'post_type' => $warmup_type, |
|
| 31 | + ) |
|
| 32 | + ); |
|
| 33 | 33 | |
| 34 | - if ( $warmup_query->have_posts() ) { |
|
| 35 | - while ( $warmup_query->have_posts() ) { |
|
| 36 | - $warmup_query->the_post(); |
|
| 37 | - lsx_entry_before(); |
|
| 38 | - if ( 'workout' === get_post_type() ) { |
|
| 39 | - $connected_workouts = array( get_the_ID() ); |
|
| 40 | - ?> |
|
| 34 | + if ( $warmup_query->have_posts() ) { |
|
| 35 | + while ( $warmup_query->have_posts() ) { |
|
| 36 | + $warmup_query->the_post(); |
|
| 37 | + lsx_entry_before(); |
|
| 38 | + if ( 'workout' === get_post_type() ) { |
|
| 39 | + $connected_workouts = array( get_the_ID() ); |
|
| 40 | + ?> |
|
| 41 | 41 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 42 | 42 | <?php lsx_entry_top(); ?> |
| 43 | 43 | <div class="entry-content"> |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | <?php lsx_entry_bottom(); ?> |
| 52 | 52 | </article><!-- #post-## --> |
| 53 | 53 | <?php |
| 54 | - lsx_health_plan_warmup_sets( $connected_workouts ); |
|
| 55 | - } else { |
|
| 56 | - ?> |
|
| 54 | + lsx_health_plan_warmup_sets( $connected_workouts ); |
|
| 55 | + } else { |
|
| 56 | + ?> |
|
| 57 | 57 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 58 | 58 | <?php lsx_entry_top(); ?> |
| 59 | 59 | <div class="entry-content"> |
@@ -63,24 +63,24 @@ discard block |
||
| 63 | 63 | <h2><?php esc_html_e( 'Warm Up', 'lsx-health-plan' ); ?></h2> |
| 64 | 64 | </div> |
| 65 | 65 | <?php |
| 66 | - the_content(); |
|
| 67 | - wp_link_pages( array( |
|
| 68 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
| 69 | - 'after' => '</div></div>', |
|
| 70 | - 'link_before' => '<span>', |
|
| 71 | - 'link_after' => '</span>', |
|
| 72 | - ) ); |
|
| 73 | - ?> |
|
| 66 | + the_content(); |
|
| 67 | + wp_link_pages( array( |
|
| 68 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
| 69 | + 'after' => '</div></div>', |
|
| 70 | + 'link_before' => '<span>', |
|
| 71 | + 'link_after' => '</span>', |
|
| 72 | + ) ); |
|
| 73 | + ?> |
|
| 74 | 74 | </div> |
| 75 | 75 | </div><!-- .entry-content --> |
| 76 | 76 | <?php lsx_entry_bottom(); ?> |
| 77 | 77 | </article><!-- #post-## --> |
| 78 | 78 | <?php |
| 79 | - } |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | - } |
|
| 82 | - wp_reset_postdata(); |
|
| 83 | - } |
|
| 81 | + } |
|
| 82 | + wp_reset_postdata(); |
|
| 83 | + } |
|
| 84 | 84 | } |
| 85 | 85 | ?> |
| 86 | 86 | </div> |