Passed
Push — add/multiplan ( ff384a...295be3 )
by Warwick
04:03
created
lsx-health-plan.php 1 patch
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.
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 1 patch
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.
includes/functions/triggers.php 1 patch
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.