Passed
Push — add/multiplan ( ff384a...295be3 )
by Warwick
04:03
created
lsx-health-plan.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 // If this file is called directly, abort.
15 15
 if ( ! defined( 'WPINC' ) ) {
16
-	die;
16
+     die;
17 17
 }
18 18
 define( 'LSX_HEALTH_PLAN_PATH', plugin_dir_path( __FILE__ ) );
19 19
 define( 'LSX_HEALTH_PLAN_CORE', __FILE__ );
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
  * @return void
31 31
  */
32 32
 function lsx_remove_extra_meta_box() {
33
-	global $wp_meta_boxes;
34
-	$all_post_types = [ 'plan', 'video', 'workout', 'tip', 'recipe', 'meal' ];
35
-	//remove_meta_box( 'wpseo_meta', $all_post_types, 'normal' );
36
-	remove_meta_box( 'commentsdiv', $all_post_types, 'normal' );
37
-	remove_meta_box( 'commentstatusdiv', $all_post_types, 'normal' );
38
-	remove_meta_box( 'lsx_blocks_title_meta', $all_post_types, 'side' );
33
+     global $wp_meta_boxes;
34
+     $all_post_types = [ 'plan', 'video', 'workout', 'tip', 'recipe', 'meal' ];
35
+     //remove_meta_box( 'wpseo_meta', $all_post_types, 'normal' );
36
+     remove_meta_box( 'commentsdiv', $all_post_types, 'normal' );
37
+     remove_meta_box( 'commentstatusdiv', $all_post_types, 'normal' );
38
+     remove_meta_box( 'lsx_blocks_title_meta', $all_post_types, 'side' );
39 39
 }
40 40
 add_action( 'add_meta_boxes', 'lsx_remove_extra_meta_box', 100 );
41 41
 
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
  * @return void
46 46
  */
47 47
 function lsx_login_redirect() {
48
-	$plan_slug = \lsx_health_plan\functions\get_option( 'my_plan_slug', false );
49
-	if ( false === $plan_slug ) {
50
-		$plan_slug = 'my-plan';
51
-	}
52
-	return home_url( $plan_slug );
48
+     $plan_slug = \lsx_health_plan\functions\get_option( 'my_plan_slug', false );
49
+     if ( false === $plan_slug ) {
50
+          $plan_slug = 'my-plan';
51
+     }
52
+     return home_url( $plan_slug );
53 53
 }
54 54
 add_filter( 'woocommerce_login_redirect', 'lsx_login_redirect' );
55 55
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
  * @return object lsx_health_plan\classes\Core::get_instance();
60 60
  */
61 61
 function lsx_health_plan() {
62
-	return \lsx_health_plan\classes\Core::get_instance();
62
+     return \lsx_health_plan\classes\Core::get_instance();
63 63
 }
64 64
 lsx_health_plan();
65 65
 
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
  * @return void
70 70
  */
71 71
 function lsx_get_svg_icon( $icon ) {
72
-	$path = '/assets/images/';
72
+     $path = '/assets/images/';
73 73
 
74
-	if ( file_exists( LSX_HEALTH_PLAN_PATH . $path . $icon ) ) {
75
-		// Load and return the contents of the file.
76
-		return include LSX_HEALTH_PLAN_PATH . $path . $icon;
77
-	}
74
+     if ( file_exists( LSX_HEALTH_PLAN_PATH . $path . $icon ) ) {
75
+          // Load and return the contents of the file.
76
+          return include LSX_HEALTH_PLAN_PATH . $path . $icon;
77
+     }
78 78
 
79
-	// Return a blank string if we can't find the file.
80
-	return '';
79
+     // Return a blank string if we can't find the file.
80
+     return '';
81 81
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // If this file is called directly, abort.
15
-if ( ! defined( 'WPINC' ) ) {
15
+if ( ! defined('WPINC')) {
16 16
 	die;
17 17
 }
18
-define( 'LSX_HEALTH_PLAN_PATH', plugin_dir_path( __FILE__ ) );
19
-define( 'LSX_HEALTH_PLAN_CORE', __FILE__ );
20
-define( 'LSX_HEALTH_PLAN_URL', plugin_dir_url( __FILE__ ) );
21
-define( 'LSX_HEALTH_PLAN_VER', '1.4.0' );
18
+define('LSX_HEALTH_PLAN_PATH', plugin_dir_path(__FILE__));
19
+define('LSX_HEALTH_PLAN_CORE', __FILE__);
20
+define('LSX_HEALTH_PLAN_URL', plugin_dir_url(__FILE__));
21
+define('LSX_HEALTH_PLAN_VER', '1.4.0');
22 22
 
23 23
 /* ======================= Below is the Plugin Class init ========================= */
24 24
 
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
  */
32 32
 function lsx_remove_extra_meta_box() {
33 33
 	global $wp_meta_boxes;
34
-	$all_post_types = [ 'plan', 'video', 'workout', 'tip', 'recipe', 'meal' ];
34
+	$all_post_types = ['plan', 'video', 'workout', 'tip', 'recipe', 'meal'];
35 35
 	//remove_meta_box( 'wpseo_meta', $all_post_types, 'normal' );
36
-	remove_meta_box( 'commentsdiv', $all_post_types, 'normal' );
37
-	remove_meta_box( 'commentstatusdiv', $all_post_types, 'normal' );
38
-	remove_meta_box( 'lsx_blocks_title_meta', $all_post_types, 'side' );
36
+	remove_meta_box('commentsdiv', $all_post_types, 'normal');
37
+	remove_meta_box('commentstatusdiv', $all_post_types, 'normal');
38
+	remove_meta_box('lsx_blocks_title_meta', $all_post_types, 'side');
39 39
 }
40
-add_action( 'add_meta_boxes', 'lsx_remove_extra_meta_box', 100 );
40
+add_action('add_meta_boxes', 'lsx_remove_extra_meta_box', 100);
41 41
 
42 42
 /**
43 43
  * Redirect user after login or redirect
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
  * @return void
46 46
  */
47 47
 function lsx_login_redirect() {
48
-	$plan_slug = \lsx_health_plan\functions\get_option( 'my_plan_slug', false );
49
-	if ( false === $plan_slug ) {
48
+	$plan_slug = \lsx_health_plan\functions\get_option('my_plan_slug', false);
49
+	if (false === $plan_slug) {
50 50
 		$plan_slug = 'my-plan';
51 51
 	}
52
-	return home_url( $plan_slug );
52
+	return home_url($plan_slug);
53 53
 }
54
-add_filter( 'woocommerce_login_redirect', 'lsx_login_redirect' );
54
+add_filter('woocommerce_login_redirect', 'lsx_login_redirect');
55 55
 
56 56
 /**
57 57
  * Undocumented function
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
  *
69 69
  * @return void
70 70
  */
71
-function lsx_get_svg_icon( $icon ) {
71
+function lsx_get_svg_icon($icon) {
72 72
 	$path = '/assets/images/';
73 73
 
74
-	if ( file_exists( LSX_HEALTH_PLAN_PATH . $path . $icon ) ) {
74
+	if (file_exists(LSX_HEALTH_PLAN_PATH . $path . $icon)) {
75 75
 		// Load and return the contents of the file.
76 76
 		return include LSX_HEALTH_PLAN_PATH . $path . $icon;
77 77
 	}
Please login to merge, or discard this patch.
classes/class-core.php 1 patch
Indentation   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -8,116 +8,116 @@
 block discarded – undo
8 8
  */
9 9
 class Core {
10 10
 
11
-	/**
12
-	 * Holds class instance
13
-	 *
14
-	 * @since 1.0.0
15
-	 *
16
-	 * @var      object \lsx_health_plan\classes\Core()
17
-	 */
18
-	protected static $instance = null;
19
-
20
-	/**
21
-	 * @var object \lsx_health_plan\classes\Setup();
22
-	 */
23
-	public $setup;
24
-
25
-	/**
26
-	 * @var object \lsx_health_plan\classes\Admin();
27
-	 */
28
-	public $admin;
29
-
30
-	/**
31
-	 * @var object \lsx_health_plan\classes\Frontend();
32
-	 */
33
-	public $frontend;
34
-
35
-	/**
36
-	 * @var object \lsx_health_plan\classes\Integrations();
37
-	 */
38
-	public $integrations;
39
-
40
-	/**
41
-	 * @var object \lsx_health_plan\classes\Integrations();
42
-	 */
43
-	public $scpo_engine;
44
-
45
-	/**
46
-	 * Constructor
47
-	 */
48
-	public function __construct() {
49
-		$this->load_includes();
50
-		$this->load_classes();
51
-	}
52
-
53
-	/**
54
-	 * Return an instance of this class.
55
-	 *
56
-	 * @since 1.0.0
57
-	 *
58
-	 * @return    object \lsx_health_plan\classes\Core()    A single instance of this class.
59
-	 */
60
-	public static function get_instance() {
61
-
62
-		// If the single instance hasn't been set, set it now.
63
-		if ( null === self::$instance ) {
64
-			self::$instance = new self();
65
-		}
66
-
67
-		return self::$instance;
68
-
69
-	}
70
-
71
-	/**
72
-	 * Loads the variable classes and the static classes.
73
-	 */
74
-	private function load_classes() {
75
-
76
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-setup.php';
77
-		$this->setup = Setup::get_instance();
78
-
79
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-admin.php';
80
-		$this->admin = Admin::get_instance();
81
-
82
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-frontend.php';
83
-		$this->frontend = Frontend::get_instance();
84
-
85
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-integrations.php';
86
-		$this->integrations = Integrations::get_instance();
87
-
88
-		require_once LSX_HEALTH_PLAN_PATH . 'classes/class-scpo-engine.php';
89
-		$this->scpo_engine = SCPO_Engine::get_instance();
90
-	}
91
-
92
-	/**
93
-	 * Loads the plugin functions.
94
-	 */
95
-	private function load_includes() {
96
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions.php';
97
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/triggers.php';
98
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/recipes.php';
99
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/plan.php';
100
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/conditionals.php';
101
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags.php';
102
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/exercise.php';
103
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/gallery.php';
104
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/plan.php';
105
-		require_once LSX_HEALTH_PLAN_PATH . '/includes/shortcodes.php';
106
-	}
107
-
108
-	/**
109
-	 * Returns the post types currently active
110
-	 *
111
-	 * @return void
112
-	 */
113
-	public function get_post_types() {
114
-		$post_types = apply_filters( 'lsx_health_plan_post_types', isset( $this->post_types ) );
115
-		foreach ( $post_types as $index => $post_type ) {
116
-			$is_disabled = \cmb2_get_option( 'lsx_health_plan_options', $post_type . '_disabled', false );
117
-			if ( true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled ) {
118
-				unset( $post_types[ $index ] );
119
-			}
120
-		}
121
-		return $post_types;
122
-	}
11
+     /**
12
+      * Holds class instance
13
+      *
14
+      * @since 1.0.0
15
+      *
16
+      * @var      object \lsx_health_plan\classes\Core()
17
+      */
18
+     protected static $instance = null;
19
+
20
+     /**
21
+      * @var object \lsx_health_plan\classes\Setup();
22
+      */
23
+     public $setup;
24
+
25
+     /**
26
+      * @var object \lsx_health_plan\classes\Admin();
27
+      */
28
+     public $admin;
29
+
30
+     /**
31
+      * @var object \lsx_health_plan\classes\Frontend();
32
+      */
33
+     public $frontend;
34
+
35
+     /**
36
+      * @var object \lsx_health_plan\classes\Integrations();
37
+      */
38
+     public $integrations;
39
+
40
+     /**
41
+      * @var object \lsx_health_plan\classes\Integrations();
42
+      */
43
+     public $scpo_engine;
44
+
45
+     /**
46
+      * Constructor
47
+      */
48
+     public function __construct() {
49
+          $this->load_includes();
50
+          $this->load_classes();
51
+     }
52
+
53
+     /**
54
+      * Return an instance of this class.
55
+      *
56
+      * @since 1.0.0
57
+      *
58
+      * @return    object \lsx_health_plan\classes\Core()    A single instance of this class.
59
+      */
60
+     public static function get_instance() {
61
+
62
+          // If the single instance hasn't been set, set it now.
63
+          if ( null === self::$instance ) {
64
+               self::$instance = new self();
65
+          }
66
+
67
+          return self::$instance;
68
+
69
+     }
70
+
71
+     /**
72
+      * Loads the variable classes and the static classes.
73
+      */
74
+     private function load_classes() {
75
+
76
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-setup.php';
77
+          $this->setup = Setup::get_instance();
78
+
79
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-admin.php';
80
+          $this->admin = Admin::get_instance();
81
+
82
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-frontend.php';
83
+          $this->frontend = Frontend::get_instance();
84
+
85
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-integrations.php';
86
+          $this->integrations = Integrations::get_instance();
87
+
88
+          require_once LSX_HEALTH_PLAN_PATH . 'classes/class-scpo-engine.php';
89
+          $this->scpo_engine = SCPO_Engine::get_instance();
90
+     }
91
+
92
+     /**
93
+      * Loads the plugin functions.
94
+      */
95
+     private function load_includes() {
96
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions.php';
97
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/triggers.php';
98
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/recipes.php';
99
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/functions/plan.php';
100
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/conditionals.php';
101
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags.php';
102
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/exercise.php';
103
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/gallery.php';
104
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/template-tags/plan.php';
105
+          require_once LSX_HEALTH_PLAN_PATH . '/includes/shortcodes.php';
106
+     }
107
+
108
+     /**
109
+      * Returns the post types currently active
110
+      *
111
+      * @return void
112
+      */
113
+     public function get_post_types() {
114
+          $post_types = apply_filters( 'lsx_health_plan_post_types', isset( $this->post_types ) );
115
+          foreach ( $post_types as $index => $post_type ) {
116
+               $is_disabled = \cmb2_get_option( 'lsx_health_plan_options', $post_type . '_disabled', false );
117
+               if ( true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled ) {
118
+                    unset( $post_types[ $index ] );
119
+               }
120
+          }
121
+          return $post_types;
122
+     }
123 123
 }
Please login to merge, or discard this patch.
includes/template-tags/team.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 $tab_experience['content']   = get_post_meta( get_the_ID(), 'team_member_experience', true );
9 9
 $tab_experience['shortcode'] = '';
10 10
 if ( ! empty( $tab_experience['content'] ) ) {
11
-	$tabs[] = $tab_experience;
11
+     $tabs[] = $tab_experience;
12 12
 }
13 13
 
14 14
 // Tab Featured plan
@@ -19,36 +19,36 @@  discard block
 block discarded – undo
19 19
 
20 20
 if ( ! empty( $tab_plans['posts'] ) ) {
21 21
 
22
-	$plan_content = '';
22
+     $plan_content = '';
23 23
 
24
-	$include = implode( ',', $tab_plans['posts'] );
25
-	$args = array(
26
-		'orderby'        => 'menu_order',
27
-		'order'          => 'ASC',
28
-		'post_type'      => 'plan',
29
-		'post__in'       => $tab_plans['posts'],
30
-	);
31
-	$plan_query = new WP_Query( $args );
24
+     $include = implode( ',', $tab_plans['posts'] );
25
+     $args = array(
26
+          'orderby'        => 'menu_order',
27
+          'order'          => 'ASC',
28
+          'post_type'      => 'plan',
29
+          'post__in'       => $tab_plans['posts'],
30
+     );
31
+     $plan_query = new WP_Query( $args );
32 32
 
33
-	$plan_content = '<div class="all-plans-block plan-grid block-all-plans-block team-member-plans"><div class="row">';
33
+     $plan_content = '<div class="all-plans-block plan-grid block-all-plans-block team-member-plans"><div class="row">';
34 34
 
35
-	if ( $plan_query->have_posts() ) {
36
-		add_action( 'lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10 );
37
-		while ( $plan_query->have_posts() ) {
38
-			$plan_query->the_post();
39
-			ob_start();
40
-			include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-plan.php';
41
-			$plan_content .= ob_get_clean();
42
-		}
43
-		wp_reset_postdata();
44
-		remove_action( 'lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10 );
45
-	}
46
-	$plan_content .= '</div></div>';
35
+     if ( $plan_query->have_posts() ) {
36
+          add_action( 'lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10 );
37
+          while ( $plan_query->have_posts() ) {
38
+               $plan_query->the_post();
39
+               ob_start();
40
+               include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-plan.php';
41
+               $plan_content .= ob_get_clean();
42
+          }
43
+          wp_reset_postdata();
44
+          remove_action( 'lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10 );
45
+     }
46
+     $plan_content .= '</div></div>';
47 47
 
48
-	$tab_plans['content'] = $plan_content;
48
+     $tab_plans['content'] = $plan_content;
49 49
 }
50 50
 if ( ! empty( $tab_plans['content'] ) ) {
51
-	$tabs[] = $tab_plans;
51
+     $tabs[] = $tab_plans;
52 52
 }
53 53
 
54 54
 
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 $tab_testimonial['content']   = '';
60 60
 
61 61
 if ( is_plugin_active( 'lsx-testimonials/lsx-testimonials.php' ) && ( ! empty( $tab_testimonial['posts'] ) ) ) {
62
-	if ( count( $tab_testimonial['posts'] ) <= 2 ) {
63
-		$columns = count( $tab_testimonial['posts'] );
64
-	} else {
65
-		$columns = 3;
66
-	}
62
+     if ( count( $tab_testimonial['posts'] ) <= 2 ) {
63
+          $columns = count( $tab_testimonial['posts'] );
64
+     } else {
65
+          $columns = 3;
66
+     }
67 67
 
68
-	$post_ids = join( ',', $tab_testimonial['posts'] );
69
-	$tab_testimonial['shortcode'] = '[lsx_testimonials columns="' . $columns . '" include="' . $post_ids . '" orderby="date" order="DESC" display="excerpt"]';
70
-	$tabs[] = $tab_testimonial;
68
+     $post_ids = join( ',', $tab_testimonial['posts'] );
69
+     $tab_testimonial['shortcode'] = '[lsx_testimonials columns="' . $columns . '" include="' . $post_ids . '" orderby="date" order="DESC" display="excerpt"]';
70
+     $tabs[] = $tab_testimonial;
71 71
 }
72 72
 
73 73
 if ( count( $tabs ) > 0 ) : ?>
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -4,85 +4,85 @@
 block discarded – undo
4 4
 $tabs = array();
5 5
 
6 6
 // Tab Experience
7
-$tab_experience['title']     = esc_html__( 'Experience', 'lsx-team' );
8
-$tab_experience['content']   = get_post_meta( get_the_ID(), 'team_member_experience', true );
7
+$tab_experience['title']     = esc_html__('Experience', 'lsx-team');
8
+$tab_experience['content']   = get_post_meta(get_the_ID(), 'team_member_experience', true);
9 9
 $tab_experience['shortcode'] = '';
10
-if ( ! empty( $tab_experience['content'] ) ) {
10
+if ( ! empty($tab_experience['content'])) {
11 11
 	$tabs[] = $tab_experience;
12 12
 }
13 13
 
14 14
 // Tab Featured plan
15
-$tab_plans['title']     = esc_html__( 'Featured Plans', 'lsx-team' );
16
-$tab_plans['posts']     = get_post_meta( get_the_ID(), 'connected_team_member_plan', true );
15
+$tab_plans['title']     = esc_html__('Featured Plans', 'lsx-team');
16
+$tab_plans['posts']     = get_post_meta(get_the_ID(), 'connected_team_member_plan', true);
17 17
 $tab_plans['content']   = '';
18 18
 $tab_plans['shortcode'] = '';
19 19
 
20
-if ( ! empty( $tab_plans['posts'] ) ) {
20
+if ( ! empty($tab_plans['posts'])) {
21 21
 
22 22
 	$plan_content = '';
23 23
 
24
-	$include = implode( ',', $tab_plans['posts'] );
24
+	$include = implode(',', $tab_plans['posts']);
25 25
 	$args = array(
26 26
 		'orderby'        => 'menu_order',
27 27
 		'order'          => 'ASC',
28 28
 		'post_type'      => 'plan',
29 29
 		'post__in'       => $tab_plans['posts'],
30 30
 	);
31
-	$plan_query = new WP_Query( $args );
31
+	$plan_query = new WP_Query($args);
32 32
 
33 33
 	$plan_content = '<div class="all-plans-block plan-grid block-all-plans-block team-member-plans"><div class="row">';
34 34
 
35
-	if ( $plan_query->have_posts() ) {
36
-		add_action( 'lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10 );
37
-		while ( $plan_query->have_posts() ) {
35
+	if ($plan_query->have_posts()) {
36
+		add_action('lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10);
37
+		while ($plan_query->have_posts()) {
38 38
 			$plan_query->the_post();
39 39
 			ob_start();
40 40
 			include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-plan.php';
41 41
 			$plan_content .= ob_get_clean();
42 42
 		}
43 43
 		wp_reset_postdata();
44
-		remove_action( 'lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10 );
44
+		remove_action('lsx_sharing_is_disabled', '\lsx_health_plan\functions\triggers\disable_sharing', 10);
45 45
 	}
46 46
 	$plan_content .= '</div></div>';
47 47
 
48 48
 	$tab_plans['content'] = $plan_content;
49 49
 }
50
-if ( ! empty( $tab_plans['content'] ) ) {
50
+if ( ! empty($tab_plans['content'])) {
51 51
 	$tabs[] = $tab_plans;
52 52
 }
53 53
 
54 54
 
55 55
 // Tab Testimonials
56 56
 $tab_testimonial['post_type'] = 'testimonial';
57
-$tab_testimonial['title']     = esc_html__( 'Testimonials', 'lsx-team' );
58
-$tab_testimonial['posts']     = get_post_meta( get_the_ID(), 'testimonial_to_team', true );
57
+$tab_testimonial['title']     = esc_html__('Testimonials', 'lsx-team');
58
+$tab_testimonial['posts']     = get_post_meta(get_the_ID(), 'testimonial_to_team', true);
59 59
 $tab_testimonial['content']   = '';
60 60
 
61
-if ( is_plugin_active( 'lsx-testimonials/lsx-testimonials.php' ) && ( ! empty( $tab_testimonial['posts'] ) ) ) {
62
-	if ( count( $tab_testimonial['posts'] ) <= 2 ) {
63
-		$columns = count( $tab_testimonial['posts'] );
61
+if (is_plugin_active('lsx-testimonials/lsx-testimonials.php') && ( ! empty($tab_testimonial['posts']))) {
62
+	if (count($tab_testimonial['posts']) <= 2) {
63
+		$columns = count($tab_testimonial['posts']);
64 64
 	} else {
65 65
 		$columns = 3;
66 66
 	}
67 67
 
68
-	$post_ids = join( ',', $tab_testimonial['posts'] );
68
+	$post_ids = join(',', $tab_testimonial['posts']);
69 69
 	$tab_testimonial['shortcode'] = '[lsx_testimonials columns="' . $columns . '" include="' . $post_ids . '" orderby="date" order="DESC" display="excerpt"]';
70 70
 	$tabs[] = $tab_testimonial;
71 71
 }
72 72
 
73
-if ( count( $tabs ) > 0 ) : ?>
73
+if (count($tabs) > 0) : ?>
74 74
 	<div class="entry-tabs hp-entry-tabs">
75 75
 		<ul class="nav nav-tabs">
76
-			<?php foreach ( $tabs as $i => $tab ) : ?>
77
-				<li<?php if ( 0 === $i ) echo ' class="active"'; ?>><a data-toggle="tab" href="#<?php echo esc_attr( sanitize_title( $tab['title'] ) ); ?>"><?php echo esc_html( $tab['title'] ); ?></a></li>
76
+			<?php foreach ($tabs as $i => $tab) : ?>
77
+				<li<?php if (0 === $i) echo ' class="active"'; ?>><a data-toggle="tab" href="#<?php echo esc_attr(sanitize_title($tab['title'])); ?>"><?php echo esc_html($tab['title']); ?></a></li>
78 78
 			<?php endforeach; ?>
79 79
 		</ul>
80 80
 
81 81
 		<div class="tab-content">
82
-			<?php foreach ( $tabs as $i => $tab ) : ?>
83
-				<div id="<?php echo esc_attr( sanitize_title( $tab['title'] ) ); ?>" class="tab-pane fade<?php if ( 0 === $i ) echo ' in active'; ?>">
84
-					<?php echo do_shortcode( $tab['shortcode'] ); ?>
85
-					<?php echo wp_kses_post( $tab['content'] ); ?>
82
+			<?php foreach ($tabs as $i => $tab) : ?>
83
+				<div id="<?php echo esc_attr(sanitize_title($tab['title'])); ?>" class="tab-pane fade<?php if (0 === $i) echo ' in active'; ?>">
84
+					<?php echo do_shortcode($tab['shortcode']); ?>
85
+					<?php echo wp_kses_post($tab['content']); ?>
86 86
 				</div>
87 87
 			<?php endforeach; ?>
88 88
 		</div>
Please login to merge, or discard this patch.
includes/functions/triggers.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,5 @@
 block discarded – undo
13 13
  * @return boolean
14 14
  */
15 15
 function disable_sharing( $disabled ) {
16
-	return true;
16
+     return true;
17 17
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
  *
13 13
  * @return boolean
14 14
  */
15
-function disable_sharing( $disabled ) {
15
+function disable_sharing($disabled) {
16 16
 	return true;
17 17
 }
Please login to merge, or discard this patch.
templates/content-archive-plan.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -17,40 +17,40 @@  discard block
 block discarded – undo
17 17
 $link_close      = '';
18 18
 $linked_product  = false;
19 19
 $restricted      = '';
20
-if ( \lsx_health_plan\functions\woocommerce\plan_has_products() ) {
20
+if (\lsx_health_plan\functions\woocommerce\plan_has_products()) {
21 21
 	$products       = \lsx_health_plan\functions\woocommerce\get_plan_products();
22
-	$linked_product = wc_get_product( $products[0] );
22
+	$linked_product = wc_get_product($products[0]);
23 23
 	$product        = $linked_product;
24 24
 
25
-	if ( function_exists( 'wc_memberships_is_post_content_restricted' ) && wc_memberships_is_post_content_restricted( get_the_ID() ) ) {
26
-		$restricted = ! current_user_can( 'wc_memberships_view_restricted_post_content', get_the_ID() );
25
+	if (function_exists('wc_memberships_is_post_content_restricted') && wc_memberships_is_post_content_restricted(get_the_ID())) {
26
+		$restricted = ! current_user_can('wc_memberships_view_restricted_post_content', get_the_ID());
27 27
 	}
28 28
 }
29 29
 
30 30
 // Check for shortcode overrides.
31
-if ( null !== $shortcode_args ) {
32
-	if ( isset( $shortcode_args['columns'] ) ) {
31
+if (null !== $shortcode_args) {
32
+	if (isset($shortcode_args['columns'])) {
33 33
 		$column_class = $shortcode_args['columns'];
34
-		$column_class = \lsx_health_plan\functions\column_class( $column_class );
34
+		$column_class = \lsx_health_plan\functions\column_class($column_class);
35 35
 	}
36
-	if ( isset( $shortcode_args['link'] ) ) {
36
+	if (isset($shortcode_args['link'])) {
37 37
 		$link_setting = $shortcode_args['link'];
38 38
 		// Setup our link and content.
39
-		switch ( $link_setting ) {
39
+		switch ($link_setting) {
40 40
 			case 'single':
41
-				$link_html  = '<a href="' . get_permalink( $group['connected_plans'] ) . '">';
41
+				$link_html  = '<a href="' . get_permalink($group['connected_plans']) . '">';
42 42
 				$link_close = '</a>';
43 43
 				break;
44 44
 
45 45
 			case 'modal':
46 46
 				$link_html  = '<a data-toggle="modal" href="#workout-plan-modal-' . $group['connected_plans'] . '">';
47 47
 				$link_close = '</a>';
48
-				$modal_content_setting = \lsx_health_plan\functions\get_option( 'workout_tab_modal_content', 'excerpt' );
48
+				$modal_content_setting = \lsx_health_plan\functions\get_option('workout_tab_modal_content', 'excerpt');
49 49
 				$modal_args = array(
50 50
 					'modal_content' => $modal_content_setting,
51 51
 				);
52 52
 				// We call the button to register the modal, but we do not output it.
53
-				lsx_health_plan_workout_plan_button( $group['connected_plans'], $group, false, $modal_args );
53
+				lsx_health_plan_workout_plan_button($group['connected_plans'], $group, false, $modal_args);
54 54
 				break;
55 55
 
56 56
 			case 'none':
@@ -60,79 +60,79 @@  discard block
 block discarded – undo
60 60
 				break;
61 61
 		}
62 62
 	}
63
-	if ( isset( $shortcode_args['description'] ) ) {
63
+	if (isset($shortcode_args['description'])) {
64 64
 		$content_setting = $shortcode_args['description'];
65 65
 	}
66 66
 }
67 67
 
68
-$featured      = get_post_meta( get_the_ID(), 'plan_featured_plan', true );
68
+$featured = get_post_meta(get_the_ID(), 'plan_featured_plan', true);
69 69
 ?>
70 70
 
71
-<div class="lsx-plan-column col-xs-12 col-sm-6 col-md-<?php echo esc_attr( $column_class ); ?> <?php echo esc_attr( lsx_hp_plan_get_classes() ); ?>">
71
+<div class="lsx-plan-column col-xs-12 col-sm-6 col-md-<?php echo esc_attr($column_class); ?> <?php echo esc_attr(lsx_hp_plan_get_classes()); ?>">
72 72
 	<article class="lsx-slot box-shadow">
73 73
 		<?php lsx_entry_top(); ?>
74 74
 
75 75
 		<div class="plan-feature-img">
76
-			<?php if ( $featured ) { ?>
76
+			<?php if ($featured) { ?>
77 77
 				<span class="featured-plan"><?php //lsx_get_svg_icon( 'icon-featured.svg' ); ?></span>
78 78
 			<?php } ?>
79
-			<a href="<?php echo esc_url( get_permalink() ); ?>">
79
+			<a href="<?php echo esc_url(get_permalink()); ?>">
80 80
 			<?php
81 81
 			$featured_image = get_the_post_thumbnail();
82
-			if ( ! empty( $featured_image ) && '' !== $featured_image ) {
83
-				the_post_thumbnail( 'lsx-thumbnail', array(
82
+			if ( ! empty($featured_image) && '' !== $featured_image) {
83
+				the_post_thumbnail('lsx-thumbnail', array(
84 84
 					'class' => 'aligncenter',
85
-				) );
85
+				));
86 86
 			} else {
87 87
 				?>
88
-				<img loading="lazy" class="placeholder" src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>">
88
+				<img loading="lazy" class="placeholder" src="<?php echo esc_attr(plugin_dir_url(__FILE__) . '../assets/images/placeholder.jpg'); ?>">
89 89
 				<?php
90 90
 			}
91 91
 			?>
92 92
 			</a>
93 93
 		</div>
94 94
 		<div class="content-box plan-content-box white-bg">
95
-			<h3 class="plan id-<?php the_ID(); ?> <?php echo esc_attr( $completed_class ); ?>"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php the_title(); ?></a></h3>
95
+			<h3 class="plan id-<?php the_ID(); ?> <?php echo esc_attr($completed_class); ?>"><a href="<?php echo esc_url(get_permalink()); ?>"><?php the_title(); ?></a></h3>
96 96
 			<?php
97
-				echo wp_kses_post( \lsx_health_plan\functions\hp_get_plan_type_meta( $post ) );
97
+				echo wp_kses_post(\lsx_health_plan\functions\hp_get_plan_type_meta($post));
98 98
 			?>
99 99
 			<?php
100
-			if ( false !== $linked_product ) {
101
-				echo wp_kses_post( $linked_product->get_price_html() );
100
+			if (false !== $linked_product) {
101
+				echo wp_kses_post($linked_product->get_price_html());
102 102
 			}
103 103
 			?>
104 104
 			<div class="excerpt">
105 105
 				<?php
106
-				if ( ! has_excerpt() ) {
107
-					$content = wp_trim_words( get_the_content(), 20 );
106
+				if ( ! has_excerpt()) {
107
+					$content = wp_trim_words(get_the_content(), 20);
108 108
 					$content = '<p>' . $content . '</p>';
109 109
 				} else {
110
-					$content = apply_filters( 'the_excerpt', get_the_excerpt() );
110
+					$content = apply_filters('the_excerpt', get_the_excerpt());
111 111
 				}
112
-				echo wp_kses_post( $content );
112
+				echo wp_kses_post($content);
113 113
 				?>
114 114
 			</div>
115 115
 
116 116
 			<?php
117 117
 			$button_link  = get_permalink();
118
-			$button_text  = __( 'View', 'lsx-health-plan' );
118
+			$button_text  = __('View', 'lsx-health-plan');
119 119
 			$button_class = '';
120 120
 
121
-			if ( true === $restricted ) {
122
-				if ( 1 < count( $products ) ) {
123
-					$button_text = __( 'Select Options', 'lsx-health-plan' );
121
+			if (true === $restricted) {
122
+				if (1 < count($products)) {
123
+					$button_text = __('Select Options', 'lsx-health-plan');
124 124
 				} else {
125 125
 					$button_link = $linked_product->add_to_cart_url() . '&plan_id=' . get_the_ID();
126 126
 					$button_text = $linked_product->add_to_cart_text();
127 127
 				}
128 128
 				?>
129 129
 				<?php
130
-			} elseif ( false === $restricted ) {
131
-				$button_text  = __( 'Already Signed Up', 'lsx-health-plan' );
130
+			} elseif (false === $restricted) {
131
+				$button_text  = __('Already Signed Up', 'lsx-health-plan');
132 132
 				$button_class = 'btn-disabled';
133 133
 			}
134 134
 			?>
135
-			<a class="btn <?php echo esc_attr( $button_class ); ?>" href="<?php echo esc_attr( $button_link ); ?>"><?php echo esc_attr( $button_text ); ?></a>
135
+			<a class="btn <?php echo esc_attr($button_class); ?>" href="<?php echo esc_attr($button_link); ?>"><?php echo esc_attr($button_text); ?></a>
136 136
 		</div>
137 137
 		<?php lsx_entry_bottom(); ?>
138 138
 	</article>
Please login to merge, or discard this patch.