@@ -11,10 +11,10 @@ discard block |
||
| 11 | 11 | * @return exercise_type |
| 12 | 12 | */ |
| 13 | 13 | function lsx_health_plan_exercise_type() { |
| 14 | - $term_obj_list = get_the_term_list( get_the_ID(), 'exercise-type', '', ', ' ); |
|
| 15 | - if ( ! empty( $term_obj_list ) ) { |
|
| 16 | - return $term_obj_list; |
|
| 17 | - } |
|
| 14 | + $term_obj_list = get_the_term_list( get_the_ID(), 'exercise-type', '', ', ' ); |
|
| 15 | + if ( ! empty( $term_obj_list ) ) { |
|
| 16 | + return $term_obj_list; |
|
| 17 | + } |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -23,10 +23,10 @@ discard block |
||
| 23 | 23 | * @return muscle_group_equipment |
| 24 | 24 | */ |
| 25 | 25 | function lsx_health_plan_muscle_group_equipment() { |
| 26 | - $term_obj_list = get_the_term_list( get_the_ID(), 'muscle-group', '', ', ' ); |
|
| 27 | - if ( ! empty( $term_obj_list ) ) { |
|
| 28 | - return $term_obj_list; |
|
| 29 | - } |
|
| 26 | + $term_obj_list = get_the_term_list( get_the_ID(), 'muscle-group', '', ', ' ); |
|
| 27 | + if ( ! empty( $term_obj_list ) ) { |
|
| 28 | + return $term_obj_list; |
|
| 29 | + } |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -35,10 +35,10 @@ discard block |
||
| 35 | 35 | * @return exercise_equipment |
| 36 | 36 | */ |
| 37 | 37 | function lsx_health_plan_exercise_equipment() { |
| 38 | - $term_obj_list = get_the_term_list( get_the_ID(), 'equipment', '', ', ' ); |
|
| 39 | - if ( ! empty( $term_obj_list ) ) { |
|
| 40 | - return $term_obj_list; |
|
| 41 | - } |
|
| 38 | + $term_obj_list = get_the_term_list( get_the_ID(), 'equipment', '', ', ' ); |
|
| 39 | + if ( ! empty( $term_obj_list ) ) { |
|
| 40 | + return $term_obj_list; |
|
| 41 | + } |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -47,81 +47,81 @@ discard block |
||
| 47 | 47 | * @return void |
| 48 | 48 | */ |
| 49 | 49 | function lsx_health_plan_exercise_data() { |
| 50 | - include LSX_HEALTH_PLAN_PATH . '/templates/table-exercise-data.php'; |
|
| 50 | + include LSX_HEALTH_PLAN_PATH . '/templates/table-exercise-data.php'; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | function lsx_health_plan_workout_exercise_alt_button( $m, $group, $echo = true, $args = array(), $alt_title, $alt_description, $alt_image ) { |
| 54 | - $defaults = array( |
|
| 55 | - 'modal_trigger' => 'button', |
|
| 56 | - 'modal_content' => 'excerpt', |
|
| 57 | - ); |
|
| 58 | - $args = wp_parse_args( $args, $defaults ); |
|
| 54 | + $defaults = array( |
|
| 55 | + 'modal_trigger' => 'button', |
|
| 56 | + 'modal_content' => 'excerpt', |
|
| 57 | + ); |
|
| 58 | + $args = wp_parse_args( $args, $defaults ); |
|
| 59 | 59 | |
| 60 | - $exercise_id = ''; |
|
| 61 | - if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) { |
|
| 62 | - $exercise_id = esc_html( $group['connected_exercises'] ); |
|
| 63 | - $content = get_post_field( 'post_content', $exercise_id ); |
|
| 64 | - $url = get_permalink( $exercise_id ); |
|
| 65 | - $equipment_group = get_the_term_list( $exercise_id, 'equipment', '', ', ' ); |
|
| 66 | - $muscle_group = get_the_term_list( $exercise_id, 'muscle-group', '', ', ' ); |
|
| 67 | - $lsx_hp = lsx_health_plan(); |
|
| 60 | + $exercise_id = ''; |
|
| 61 | + if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) { |
|
| 62 | + $exercise_id = esc_html( $group['connected_exercises'] ); |
|
| 63 | + $content = get_post_field( 'post_content', $exercise_id ); |
|
| 64 | + $url = get_permalink( $exercise_id ); |
|
| 65 | + $equipment_group = get_the_term_list( $exercise_id, 'equipment', '', ', ' ); |
|
| 66 | + $muscle_group = get_the_term_list( $exercise_id, 'muscle-group', '', ', ' ); |
|
| 67 | + $lsx_hp = lsx_health_plan(); |
|
| 68 | 68 | |
| 69 | - if ( 'excerpt' === $args['modal_content'] ) { |
|
| 70 | - $content = wp_trim_words( $content, 40 ); |
|
| 71 | - } |
|
| 69 | + if ( 'excerpt' === $args['modal_content'] ) { |
|
| 70 | + $content = wp_trim_words( $content, 40 ); |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - if ( 'link' ) { |
|
| 74 | - $play_button = '<a data-toggle="modal" href="#workout-alt-exercise-modal-' . $m . '">' . get_the_title( $exercise_id ) . '</a>'; |
|
| 75 | - } else { |
|
| 76 | - $play_button = '<button data-toggle="alt-modal" data-target="#workout-alt-exercise-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>'; |
|
| 77 | - } |
|
| 73 | + if ( 'link' ) { |
|
| 74 | + $play_button = '<a data-toggle="modal" href="#workout-alt-exercise-modal-' . $m . '">' . get_the_title( $exercise_id ) . '</a>'; |
|
| 75 | + } else { |
|
| 76 | + $play_button = '<button data-toggle="alt-modal" data-target="#workout-alt-exercise-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>'; |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | - $modal_body = ''; |
|
| 79 | + $modal_body = ''; |
|
| 80 | 80 | |
| 81 | - if ( '' !== $alt_image && ! empty( $alt_image ) ) { |
|
| 82 | - $modal_body .= '<div class="modal-image"/><img alt="thumbnail" loading="lazy" class="aligncenter wp-post-image" src="' . $alt_image . '"></div>'; |
|
| 83 | - } else { |
|
| 84 | - if ( $lsx_hp->frontend->gallery->has_gallery( $exercise_id ) ) { |
|
| 85 | - $gallery_args = array( |
|
| 86 | - 'css_class' => 'modal-slider', |
|
| 87 | - ); |
|
| 88 | - $modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args ); |
|
| 89 | - } else { |
|
| 90 | - $modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail( $exercise_id, 'large' ) . '</div>'; |
|
| 91 | - } |
|
| 92 | - } |
|
| 81 | + if ( '' !== $alt_image && ! empty( $alt_image ) ) { |
|
| 82 | + $modal_body .= '<div class="modal-image"/><img alt="thumbnail" loading="lazy" class="aligncenter wp-post-image" src="' . $alt_image . '"></div>'; |
|
| 83 | + } else { |
|
| 84 | + if ( $lsx_hp->frontend->gallery->has_gallery( $exercise_id ) ) { |
|
| 85 | + $gallery_args = array( |
|
| 86 | + 'css_class' => 'modal-slider', |
|
| 87 | + ); |
|
| 88 | + $modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args ); |
|
| 89 | + } else { |
|
| 90 | + $modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail( $exercise_id, 'large' ) . '</div>'; |
|
| 91 | + } |
|
| 92 | + } |
|
| 93 | 93 | |
| 94 | - if ( '' !== $alt_title ) { |
|
| 95 | - $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . $alt_title . '</h5>'; |
|
| 96 | - } else { |
|
| 97 | - $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title( $exercise_id ) . '</h5>'; |
|
| 98 | - } |
|
| 94 | + if ( '' !== $alt_title ) { |
|
| 95 | + $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . $alt_title . '</h5>'; |
|
| 96 | + } else { |
|
| 97 | + $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title( $exercise_id ) . '</h5>'; |
|
| 98 | + } |
|
| 99 | 99 | |
| 100 | - if ( ! empty( $equipment_group ) ) { |
|
| 101 | - $modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>'; |
|
| 102 | - } |
|
| 103 | - if ( ! empty( $muscle_group ) ) { |
|
| 104 | - $modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>'; |
|
| 105 | - } |
|
| 106 | - $modal_body .= '</div>'; |
|
| 107 | - if ( '' !== $args['modal_content'] ) { |
|
| 108 | - if ( '' !== $alt_description ) { |
|
| 109 | - $modal_body .= '<div class="modal-excerpt"/>' . $alt_description . '</div>'; |
|
| 110 | - } else { |
|
| 111 | - $modal_body .= '<div class="modal-excerpt"/>' . $content . '</div>'; |
|
| 112 | - } |
|
| 113 | - } |
|
| 114 | - if ( 'excerpt' === $args['modal_content'] ) { |
|
| 115 | - $modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __( 'Read More', 'lsx-heal-plan' ) . '</a>'; |
|
| 116 | - } |
|
| 117 | - \lsx_health_plan\functions\register_modal( 'workout-alt-exercise-modal-' . $m, '', $modal_body ); |
|
| 100 | + if ( ! empty( $equipment_group ) ) { |
|
| 101 | + $modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>'; |
|
| 102 | + } |
|
| 103 | + if ( ! empty( $muscle_group ) ) { |
|
| 104 | + $modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>'; |
|
| 105 | + } |
|
| 106 | + $modal_body .= '</div>'; |
|
| 107 | + if ( '' !== $args['modal_content'] ) { |
|
| 108 | + if ( '' !== $alt_description ) { |
|
| 109 | + $modal_body .= '<div class="modal-excerpt"/>' . $alt_description . '</div>'; |
|
| 110 | + } else { |
|
| 111 | + $modal_body .= '<div class="modal-excerpt"/>' . $content . '</div>'; |
|
| 112 | + } |
|
| 113 | + } |
|
| 114 | + if ( 'excerpt' === $args['modal_content'] ) { |
|
| 115 | + $modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __( 'Read More', 'lsx-heal-plan' ) . '</a>'; |
|
| 116 | + } |
|
| 117 | + \lsx_health_plan\functions\register_modal( 'workout-alt-exercise-modal-' . $m, '', $modal_body ); |
|
| 118 | 118 | |
| 119 | - if ( true === $echo ) { |
|
| 120 | - echo wp_kses_post( $play_button ); |
|
| 121 | - } else { |
|
| 122 | - return $play_button; |
|
| 123 | - } |
|
| 124 | - } |
|
| 119 | + if ( true === $echo ) { |
|
| 120 | + echo wp_kses_post( $play_button ); |
|
| 121 | + } else { |
|
| 122 | + return $play_button; |
|
| 123 | + } |
|
| 124 | + } |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -134,65 +134,65 @@ discard block |
||
| 134 | 134 | * @return void |
| 135 | 135 | */ |
| 136 | 136 | function lsx_health_plan_workout_exercise_button( $m, $group, $echo = true, $args = array() ) { |
| 137 | - $defaults = array( |
|
| 138 | - 'modal_trigger' => 'button', |
|
| 139 | - 'modal_content' => 'excerpt', |
|
| 140 | - ); |
|
| 141 | - $args = wp_parse_args( $args, $defaults ); |
|
| 137 | + $defaults = array( |
|
| 138 | + 'modal_trigger' => 'button', |
|
| 139 | + 'modal_content' => 'excerpt', |
|
| 140 | + ); |
|
| 141 | + $args = wp_parse_args( $args, $defaults ); |
|
| 142 | 142 | |
| 143 | - $exercise_id = ''; |
|
| 144 | - if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) { |
|
| 145 | - $exercise_id = esc_html( $group['connected_exercises'] ); |
|
| 146 | - $content = get_post_field( 'post_content', $exercise_id ); |
|
| 147 | - $url = get_permalink( $exercise_id ); |
|
| 148 | - $equipment_group = get_the_term_list( $exercise_id, 'equipment', '', ', ' ); |
|
| 149 | - $muscle_group = get_the_term_list( $exercise_id, 'muscle-group', '', ', ' ); |
|
| 150 | - $lsx_hp = lsx_health_plan(); |
|
| 143 | + $exercise_id = ''; |
|
| 144 | + if ( isset( $group['connected_exercises'] ) && '' !== $group['connected_exercises'] ) { |
|
| 145 | + $exercise_id = esc_html( $group['connected_exercises'] ); |
|
| 146 | + $content = get_post_field( 'post_content', $exercise_id ); |
|
| 147 | + $url = get_permalink( $exercise_id ); |
|
| 148 | + $equipment_group = get_the_term_list( $exercise_id, 'equipment', '', ', ' ); |
|
| 149 | + $muscle_group = get_the_term_list( $exercise_id, 'muscle-group', '', ', ' ); |
|
| 150 | + $lsx_hp = lsx_health_plan(); |
|
| 151 | 151 | |
| 152 | - if ( 'excerpt' === $args['modal_content'] ) { |
|
| 153 | - $content = wp_trim_words( $content, 40 ); |
|
| 154 | - } |
|
| 152 | + if ( 'excerpt' === $args['modal_content'] ) { |
|
| 153 | + $content = wp_trim_words( $content, 40 ); |
|
| 154 | + } |
|
| 155 | 155 | |
| 156 | - if ( 'link' ) { |
|
| 157 | - $play_button = '<a data-toggle="modal" href="#workout-exercise-modal-' . $m . '">' . get_the_title( $exercise_id ) . '</a>'; |
|
| 158 | - } else { |
|
| 159 | - $play_button = '<button data-toggle="modal" data-target="#workout-exercise-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>'; |
|
| 160 | - } |
|
| 156 | + if ( 'link' ) { |
|
| 157 | + $play_button = '<a data-toggle="modal" href="#workout-exercise-modal-' . $m . '">' . get_the_title( $exercise_id ) . '</a>'; |
|
| 158 | + } else { |
|
| 159 | + $play_button = '<button data-toggle="modal" data-target="#workout-exercise-modal-' . $m . '"><span class="fa fa-play-circle"></span></button>'; |
|
| 160 | + } |
|
| 161 | 161 | |
| 162 | - $modal_body = ''; |
|
| 162 | + $modal_body = ''; |
|
| 163 | 163 | |
| 164 | - if ( $lsx_hp->frontend->gallery->has_gallery( $exercise_id ) ) { |
|
| 165 | - $gallery_args = array( |
|
| 166 | - 'css_class' => 'modal-slider', |
|
| 167 | - ); |
|
| 168 | - $modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args ); |
|
| 169 | - } else { |
|
| 170 | - $modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail( $exercise_id, 'large' ) . '</div>'; |
|
| 171 | - } |
|
| 164 | + if ( $lsx_hp->frontend->gallery->has_gallery( $exercise_id ) ) { |
|
| 165 | + $gallery_args = array( |
|
| 166 | + 'css_class' => 'modal-slider', |
|
| 167 | + ); |
|
| 168 | + $modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args ); |
|
| 169 | + } else { |
|
| 170 | + $modal_body .= '<div class="modal-image"/>' . get_the_post_thumbnail( $exercise_id, 'large' ) . '</div>'; |
|
| 171 | + } |
|
| 172 | 172 | |
| 173 | - $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title( $exercise_id ) . '</h5>'; |
|
| 173 | + $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . get_the_title( $exercise_id ) . '</h5>'; |
|
| 174 | 174 | |
| 175 | - if ( ! empty( $equipment_group ) ) { |
|
| 176 | - $modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>'; |
|
| 177 | - } |
|
| 178 | - if ( ! empty( $muscle_group ) ) { |
|
| 179 | - $modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>'; |
|
| 180 | - } |
|
| 181 | - $modal_body .= '</div>'; |
|
| 182 | - if ( '' !== $args['modal_content'] ) { |
|
| 183 | - $modal_body .= '<div class="modal-excerpt"/>' . $content . '</div>'; |
|
| 184 | - } |
|
| 185 | - if ( 'excerpt' === $args['modal_content'] ) { |
|
| 186 | - $modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __( 'Read More', 'lsx-heal-plan' ) . '</a>'; |
|
| 187 | - } |
|
| 188 | - \lsx_health_plan\functions\register_modal( 'workout-exercise-modal-' . $m, '', $modal_body ); |
|
| 175 | + if ( ! empty( $equipment_group ) ) { |
|
| 176 | + $modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>'; |
|
| 177 | + } |
|
| 178 | + if ( ! empty( $muscle_group ) ) { |
|
| 179 | + $modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>'; |
|
| 180 | + } |
|
| 181 | + $modal_body .= '</div>'; |
|
| 182 | + if ( '' !== $args['modal_content'] ) { |
|
| 183 | + $modal_body .= '<div class="modal-excerpt"/>' . $content . '</div>'; |
|
| 184 | + } |
|
| 185 | + if ( 'excerpt' === $args['modal_content'] ) { |
|
| 186 | + $modal_body .= '<a class="moretag" target="_blank" href="' . $url . '">' . __( 'Read More', 'lsx-heal-plan' ) . '</a>'; |
|
| 187 | + } |
|
| 188 | + \lsx_health_plan\functions\register_modal( 'workout-exercise-modal-' . $m, '', $modal_body ); |
|
| 189 | 189 | |
| 190 | - if ( true === $echo ) { |
|
| 191 | - echo wp_kses_post( $play_button ); |
|
| 192 | - } else { |
|
| 193 | - return $play_button; |
|
| 194 | - } |
|
| 195 | - } |
|
| 190 | + if ( true === $echo ) { |
|
| 191 | + echo wp_kses_post( $play_button ); |
|
| 192 | + } else { |
|
| 193 | + return $play_button; |
|
| 194 | + } |
|
| 195 | + } |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -203,38 +203,38 @@ discard block |
||
| 203 | 203 | * @return void |
| 204 | 204 | */ |
| 205 | 205 | function lsx_health_plan_shortcode_exercise_button( $m, $content = true ) { |
| 206 | - $equipment_group = get_the_term_list( $m, 'equipment', '', ', ' ); |
|
| 207 | - $muscle_group = get_the_term_list( $m, 'muscle-group', '', ', ' ); |
|
| 208 | - $title = get_the_title(); |
|
| 209 | - $lsx_hp = lsx_health_plan(); |
|
| 210 | - $button = '<a data-toggle="modal" href="#exercise-modal-' . $m . '" data-target="#exercise-modal-' . $m . '"></a>'; |
|
| 206 | + $equipment_group = get_the_term_list( $m, 'equipment', '', ', ' ); |
|
| 207 | + $muscle_group = get_the_term_list( $m, 'muscle-group', '', ', ' ); |
|
| 208 | + $title = get_the_title(); |
|
| 209 | + $lsx_hp = lsx_health_plan(); |
|
| 210 | + $button = '<a data-toggle="modal" href="#exercise-modal-' . $m . '" data-target="#exercise-modal-' . $m . '"></a>'; |
|
| 211 | 211 | |
| 212 | - if ( true === $content ) { |
|
| 213 | - $content = get_the_content(); |
|
| 214 | - } |
|
| 212 | + if ( true === $content ) { |
|
| 213 | + $content = get_the_content(); |
|
| 214 | + } |
|
| 215 | 215 | |
| 216 | - $modal_body = ''; |
|
| 217 | - if ( $lsx_hp->frontend->gallery->has_gallery( $m ) ) { |
|
| 218 | - $gallery_args = array( |
|
| 219 | - 'css_class' => 'modal-slider', |
|
| 220 | - ); |
|
| 221 | - $modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args ); |
|
| 222 | - } else { |
|
| 223 | - $modal_body .= '<div class="modal-image">' . get_the_post_thumbnail( $m, 'large' ) . '</div>'; |
|
| 224 | - } |
|
| 225 | - $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . $title . '</h5>'; |
|
| 216 | + $modal_body = ''; |
|
| 217 | + if ( $lsx_hp->frontend->gallery->has_gallery( $m ) ) { |
|
| 218 | + $gallery_args = array( |
|
| 219 | + 'css_class' => 'modal-slider', |
|
| 220 | + ); |
|
| 221 | + $modal_body .= $lsx_hp->frontend->gallery->get_gallery( '', '', $gallery_args ); |
|
| 222 | + } else { |
|
| 223 | + $modal_body .= '<div class="modal-image">' . get_the_post_thumbnail( $m, 'large' ) . '</div>'; |
|
| 224 | + } |
|
| 225 | + $modal_body .= '<div class="title-lined exercise-modal"><h5 class="modal-title">' . $title . '</h5>'; |
|
| 226 | 226 | |
| 227 | - if ( ! empty( $equipment_group ) ) { |
|
| 228 | - $modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>'; |
|
| 229 | - } |
|
| 230 | - if ( ! empty( $muscle_group ) ) { |
|
| 231 | - $modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>'; |
|
| 232 | - } |
|
| 233 | - $modal_body .= '</div>'; |
|
| 234 | - $modal_body .= $content; |
|
| 235 | - \lsx_health_plan\functions\register_modal( 'exercise-modal-' . $m, '', $modal_body ); |
|
| 227 | + if ( ! empty( $equipment_group ) ) { |
|
| 228 | + $modal_body .= '<span class="equipment-terms">Equipment: ' . $equipment_group . '</span>'; |
|
| 229 | + } |
|
| 230 | + if ( ! empty( $muscle_group ) ) { |
|
| 231 | + $modal_body .= '<span class="muscle-terms">Muscle Group: ' . $muscle_group . '</span>'; |
|
| 232 | + } |
|
| 233 | + $modal_body .= '</div>'; |
|
| 234 | + $modal_body .= $content; |
|
| 235 | + \lsx_health_plan\functions\register_modal( 'exercise-modal-' . $m, '', $modal_body ); |
|
| 236 | 236 | |
| 237 | - return ( $button ); |
|
| 237 | + return ( $button ); |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | /** |
@@ -246,18 +246,18 @@ discard block |
||
| 246 | 246 | * @return string |
| 247 | 247 | */ |
| 248 | 248 | function lsx_health_plan_exercise_title( $before = '', $after = '', $echo = true, $exercise_id = false ) { |
| 249 | - if ( false === $exercise_id ) { |
|
| 250 | - $exercise_id = get_the_ID(); |
|
| 251 | - } |
|
| 252 | - $title = get_the_title( $exercise_id ); |
|
| 253 | - $side = get_post_meta( $exercise_id, 'exercise_side', true ); |
|
| 254 | - if ( '' !== $side ) { |
|
| 255 | - $title .= ' - ' . ucwords( $side ); |
|
| 256 | - } |
|
| 257 | - $title = apply_filters( 'lsx_health_plan_exercise_title', $before . $title . $after, $title, $before, $after, $exercise_id ); |
|
| 258 | - if ( true === $echo ) { |
|
| 259 | - echo wp_kses_post( $title ); |
|
| 260 | - } else { |
|
| 261 | - return $title; |
|
| 262 | - } |
|
| 249 | + if ( false === $exercise_id ) { |
|
| 250 | + $exercise_id = get_the_ID(); |
|
| 251 | + } |
|
| 252 | + $title = get_the_title( $exercise_id ); |
|
| 253 | + $side = get_post_meta( $exercise_id, 'exercise_side', true ); |
|
| 254 | + if ( '' !== $side ) { |
|
| 255 | + $title .= ' - ' . ucwords( $side ); |
|
| 256 | + } |
|
| 257 | + $title = apply_filters( 'lsx_health_plan_exercise_title', $before . $title . $after, $title, $before, $after, $exercise_id ); |
|
| 258 | + if ( true === $echo ) { |
|
| 259 | + echo wp_kses_post( $title ); |
|
| 260 | + } else { |
|
| 261 | + return $title; |
|
| 262 | + } |
|
| 263 | 263 | } |