|
@@ -12,7 +12,7 @@ discard block |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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,35 +32,35 @@ discard block |
|
|
block discarded – undo |
|
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
|
|
- } elseif ( in_array( 'has-block-cover', $classes ) ) { |
|
45
|
|
- $blocks = parse_blocks( get_the_content() ); |
|
46
|
|
- foreach ( $blocks as $block ) { |
|
|
44
|
+ } elseif (in_array('has-block-cover', $classes)) { |
|
|
45
|
+ $blocks = parse_blocks(get_the_content()); |
|
|
46
|
+ foreach ($blocks as $block) { |
|
47
|
47
|
//print( '<pre>' . print_r( $block, true ) . '</pre>' ); |
|
48
|
|
- if ( 'core/cover' === $block['blockName'] ) { |
|
49
|
|
- echo wp_kses_post( render_block( $block ) ); |
|
|
48
|
+ if ('core/cover' === $block['blockName']) { |
|
|
49
|
+ echo wp_kses_post(render_block($block)); |
|
50
|
50
|
} |
|
51
|
51
|
} |
|
52
|
52
|
} else { |
|
53
|
|
- $my_plan_string = esc_html__( 'My Dashboard', 'lsx-health-plan' ); |
|
54
|
|
- echo wp_kses_post( '<div class="lsx-health-plan my-profile-block wp-block-cover alignfull"><div class="wp-block-cover__inner-container"><h2>' . $my_plan_string . '</h2></div></div>' ); |
|
|
53
|
+ $my_plan_string = esc_html__('My Dashboard', 'lsx-health-plan'); |
|
|
54
|
+ echo wp_kses_post('<div class="lsx-health-plan my-profile-block wp-block-cover alignfull"><div class="wp-block-cover__inner-container"><h2>' . $my_plan_string . '</h2></div></div>'); |
|
55
|
55
|
} |
|
56
|
56
|
|
|
57
|
|
- if ( is_user_logged_in() ) { |
|
58
|
|
- $my_profile_string = esc_html__( 'My Profile', 'lsx-health-plan' ); |
|
59
|
|
- $my_profile_tagline = esc_html__( 'Update your details below', 'lsx-health-plan' ); |
|
|
57
|
+ if (is_user_logged_in()) { |
|
|
58
|
+ $my_profile_string = esc_html__('My Profile', 'lsx-health-plan'); |
|
|
59
|
+ $my_profile_tagline = esc_html__('Update your details below', 'lsx-health-plan'); |
|
60
|
60
|
} |
|
61
|
|
- 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>' ); |
|
62
|
|
- } else if ( function_exists( 'is_wc_endpoint_url' ) && is_wc_endpoint_url( 'lost-password' ) ) { |
|
63
|
|
- echo do_shortcode( '[woocommerce_my_account]' ); |
|
|
61
|
+ 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>'); |
|
|
62
|
+ } else if (function_exists('is_wc_endpoint_url') && is_wc_endpoint_url('lost-password')) { |
|
|
63
|
+ echo do_shortcode('[woocommerce_my_account]'); |
|
64
|
64
|
} else { |
|
65
|
65
|
the_content(); |
|
66
|
66
|
} |