Passed
Push — add/multiplan ( 6df1c3...cc23c7 )
by Warwick
07:00 queued 02:56
created
includes/template-tags/team.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 $tab_experience['content']   = get_post_meta( get_the_ID(), 'team_member_experience', true );
8 8
 $tab_experience['shortcode'] = ''; 
9 9
 if ( ! empty( $tab_experience['content'] ) ) {
10
-	$tabs[] = $tab_experience;
10
+     $tabs[] = $tab_experience;
11 11
 }
12 12
 
13 13
 // Tab Featured plan
@@ -18,75 +18,75 @@  discard block
 block discarded – undo
18 18
 
19 19
 if ( ! empty( $tab_plans['posts'] ) ) {
20 20
 
21
-	$plan_content = '';
21
+     $plan_content = '';
22 22
 
23
-	$include = implode( ',', $tab_plans['posts'] );
24
-	$args = array(
25
-		'orderby'        => 'menu_order',
26
-		'order'          => 'ASC',
27
-		'post_type'      => 'plan',
28
-		'post__in'       => $tab_plans['posts'],
29
-	);
30
-	//$the_query = new WP_Query( $args );
23
+     $include = implode( ',', $tab_plans['posts'] );
24
+     $args = array(
25
+          'orderby'        => 'menu_order',
26
+          'order'          => 'ASC',
27
+          'post_type'      => 'plan',
28
+          'post__in'       => $tab_plans['posts'],
29
+     );
30
+     //$the_query = new WP_Query( $args );
31 31
 
32
-	$plan_content = '<div class="all-plans-block plan-grid block-all-plans-block team-member-plans">
32
+     $plan_content = '<div class="all-plans-block plan-grid block-all-plans-block team-member-plans">
33 33
 	<div class="row">';
34 34
 
35
-	foreach ( $tab_plans['posts'] as $index => $post ) {
36
-
37
-		$plan_content .= '<div class="col-xs-12 col-sm-6 col-md-4">';
38
-		$plan_content .= '<article class="lsx-slot lsx-hp-shadow">';
39
-		$plan_content .= '<div class="plan-feature-img">';
40
-		$plan_content .= '<a href="' . get_permalink( $post ) . '">';
41
-
42
-		$linked_product  = false;
43
-		$restricted      = false;
44
-		$product         = null;
45
-		if ( \lsx_health_plan\functions\woocommerce\plan_has_products( $post ) ) {
46
-			$products       = \lsx_health_plan\functions\woocommerce\get_plan_products( $post );
47
-			$linked_product = wc_get_product( $products[0] );
48
-			$product        = $linked_product;
49
-		}
50
-		if ( function_exists( 'wc_memberships_is_post_content_restricted' ) ) {
51
-			$restricted = wc_memberships_is_post_content_restricted( get_the_ID() ) && ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() );
52
-		}
53
-
54
-		$featured_image = get_the_post_thumbnail( $post );
55
-		if ( ! empty( $featured_image ) && '' !== $featured_image ) {
56
-			$plan_content .= $featured_image;
57
-		} else {
58
-			$plan_content .= '<img loading="lazy" class="placeholder" src="' . plugin_dir_url( __DIR__ ) . '../assets/images/placeholder.jpg' . '">';
59
-		}
60
-		$plan_content .= '</a>';
61
-		$plan_content .= '</div>';
62
-
63
-		$plan_content .= '<div class="content-box plan-content-box">';
64
-		$plan_content .= '<h3 class="plan"><a href="' . get_permalink( $post ) . '">' . get_the_title( $post ) . '</a></h3>';
65
-
66
-		if ( false !== $linked_product && false !== $restricted ) {
67
-			$plan_content .= $linked_product->get_price_html();
68
-		}
69
-
70
-		$plan_content .= '<div class="excerpt">';
71
-		if ( ! has_excerpt( $post ) ) {
72
-			$content = wp_trim_words( get_the_content( $post ), 20 );
73
-			$plan_content .= '<p>' . $content . '</p>';
74
-		} else {
75
-			$plan_content .= apply_filters( 'the_excerpt', get_the_excerpt( $post ) );
76
-		}
77
-		$plan_content .= '</div>';
78
-
79
-		$plan_content .= '</div>';
80
-		$plan_content .= '</article>';
81
-		$plan_content .= '</div>';
82
-
83
-	}
84
-	$plan_content .= '</div></div>';
85
-
86
-	$tab_plans['content'] = $plan_content;
35
+     foreach ( $tab_plans['posts'] as $index => $post ) {
36
+
37
+          $plan_content .= '<div class="col-xs-12 col-sm-6 col-md-4">';
38
+          $plan_content .= '<article class="lsx-slot lsx-hp-shadow">';
39
+          $plan_content .= '<div class="plan-feature-img">';
40
+          $plan_content .= '<a href="' . get_permalink( $post ) . '">';
41
+
42
+          $linked_product  = false;
43
+          $restricted      = false;
44
+          $product         = null;
45
+          if ( \lsx_health_plan\functions\woocommerce\plan_has_products( $post ) ) {
46
+               $products       = \lsx_health_plan\functions\woocommerce\get_plan_products( $post );
47
+               $linked_product = wc_get_product( $products[0] );
48
+               $product        = $linked_product;
49
+          }
50
+          if ( function_exists( 'wc_memberships_is_post_content_restricted' ) ) {
51
+               $restricted = wc_memberships_is_post_content_restricted( get_the_ID() ) && ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() );
52
+          }
53
+
54
+          $featured_image = get_the_post_thumbnail( $post );
55
+          if ( ! empty( $featured_image ) && '' !== $featured_image ) {
56
+               $plan_content .= $featured_image;
57
+          } else {
58
+               $plan_content .= '<img loading="lazy" class="placeholder" src="' . plugin_dir_url( __DIR__ ) . '../assets/images/placeholder.jpg' . '">';
59
+          }
60
+          $plan_content .= '</a>';
61
+          $plan_content .= '</div>';
62
+
63
+          $plan_content .= '<div class="content-box plan-content-box">';
64
+          $plan_content .= '<h3 class="plan"><a href="' . get_permalink( $post ) . '">' . get_the_title( $post ) . '</a></h3>';
65
+
66
+          if ( false !== $linked_product && false !== $restricted ) {
67
+               $plan_content .= $linked_product->get_price_html();
68
+          }
69
+
70
+          $plan_content .= '<div class="excerpt">';
71
+          if ( ! has_excerpt( $post ) ) {
72
+               $content = wp_trim_words( get_the_content( $post ), 20 );
73
+               $plan_content .= '<p>' . $content . '</p>';
74
+          } else {
75
+               $plan_content .= apply_filters( 'the_excerpt', get_the_excerpt( $post ) );
76
+          }
77
+          $plan_content .= '</div>';
78
+
79
+          $plan_content .= '</div>';
80
+          $plan_content .= '</article>';
81
+          $plan_content .= '</div>';
82
+
83
+     }
84
+     $plan_content .= '</div></div>';
85
+
86
+     $tab_plans['content'] = $plan_content;
87 87
 }
88 88
 if ( ! empty( $tab_plans['content'] ) ) {
89
-	$tabs[] = $tab_plans;
89
+     $tabs[] = $tab_plans;
90 90
 }
91 91
 
92 92
 
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
 $tab_testimonial['content']   = '';
98 98
 
99 99
 if ( is_plugin_active( 'lsx-testimonials/lsx-testimonials.php' ) && ( ! empty( $tab_testimonial['posts'] ) ) ) {
100
-	if ( count( $tab_testimonial['posts'] ) <= 2 ) {
101
-		$columns = count( $tab_testimonial['posts'] );
102
-	} else {
103
-		$columns = 3;
104
-	}
105
-
106
-	$post_ids = join( ',', $tab_testimonial['posts'] );
107
-	$tab_testimonial['shortcode'] = '[lsx_testimonials columns="' . $columns . '" include="' . $post_ids . '" orderby="date" order="DESC" display="excerpt"]';
108
-	$tabs[] = $tab_testimonial;
100
+     if ( count( $tab_testimonial['posts'] ) <= 2 ) {
101
+          $columns = count( $tab_testimonial['posts'] );
102
+     } else {
103
+          $columns = 3;
104
+     }
105
+
106
+     $post_ids = join( ',', $tab_testimonial['posts'] );
107
+     $tab_testimonial['shortcode'] = '[lsx_testimonials columns="' . $columns . '" include="' . $post_ids . '" orderby="date" order="DESC" display="excerpt"]';
108
+     $tabs[] = $tab_testimonial;
109 109
 }
110 110
 
111 111
 if ( count( $tabs ) > 0 ) : ?>
Please login to merge, or discard this patch.