Passed
Push — add/multiplan ( 0816bf...806c57 )
by Virginia
04:04
created
classes/admin/class-settings.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function __construct() {
56 56
 		$this->load_classes();
57
-		add_action( 'cmb2_admin_init', array( $this, 'register_settings_page' ) );
58
-		add_action( 'lsx_hp_settings_page', array( $this, 'generate_tabs' ), 1, 1 );
57
+		add_action('cmb2_admin_init', array($this, 'register_settings_page'));
58
+		add_action('lsx_hp_settings_page', array($this, 'generate_tabs'), 1, 1);
59 59
 
60
-		add_action( 'lsx_hp_settings_page_general_top', array( $this, 'general_settings' ), 1, 1 );
60
+		add_action('lsx_hp_settings_page_general_top', array($this, 'general_settings'), 1, 1);
61 61
 		//add_action( 'lsx_hp_settings_page', array( $this, 'global_defaults' ), 3, 1 );
62 62
 		//add_action( 'lsx_hp_settings_page', array( $this, 'global_downloads' ), 5, 1 );
63 63
 		//add_action( 'lsx_hp_settings_page', array( $this, 'stat_disable' ), 6, 1 );
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public static function get_instance() {
77 77
 		// If the single instance hasn't been set, set it now.
78
-		if ( null === self::$instance ) {
78
+		if (null === self::$instance) {
79 79
 			self::$instance = new self();
80 80
 		}
81 81
 		return self::$instance;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			//'tip',
96 96
 		);
97 97
 
98
-		foreach ( $this->post_types as $post_type ) {
98
+		foreach ($this->post_types as $post_type) {
99 99
 			$this->$post_type = require_once LSX_HEALTH_PLAN_PATH . 'classes/admin/settings/class-' . $post_type . '.php';
100 100
 		}
101 101
 	}
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 		// 	),
130 130
 		// );
131 131
 
132
-		if ( post_type_exists( 'meal' ) ) {
132
+		if (post_type_exists('meal')) {
133 133
 			// $this->download_types['meal']     = array(
134 134
 			// 	'title'       => __( 'Meal Plan', 'lsx-health-plan' ),
135 135
 			// 	'description' => __( 'Set a default meal plan.', 'lsx-health-plan' ),
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 			// 	'default' => 'meal',
154 154
 			// );
155 155
 		}
156
-		if ( post_type_exists( 'recipe' ) ) {
156
+		if (post_type_exists('recipe')) {
157 157
 			// $this->download_types['recipe'] = array(
158 158
 			// 	'title'       => __( 'Recipe', 'lsx-health-plan' ),
159 159
 			// 	'description' => __( 'Set a default recipe.', 'lsx-health-plan' ),
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 			// 	'default' => 'recipe',
169 169
 			// );
170 170
 		}
171
-		if ( post_type_exists( 'workout' ) ) {
171
+		if (post_type_exists('workout')) {
172 172
 			// $this->download_types['workout'] = array(
173 173
 			// 	'title'       => __( 'Workout', 'lsx-health-plan' ),
174 174
 			// 	'description' => __( 'Set a default workout routine PDF.', 'lsx-health-plan' ),
@@ -238,14 +238,14 @@  discard block
 block discarded – undo
238 238
 		$cmb = new_cmb2_box(
239 239
 			array(
240 240
 				'id'           => $this->screen_id,
241
-				'title'        => esc_html__( 'Settings', 'lsx-health-plan' ),
242
-				'object_types' => array( 'options-page' ),
241
+				'title'        => esc_html__('Settings', 'lsx-health-plan'),
242
+				'object_types' => array('options-page'),
243 243
 				'option_key'   => 'lsx_health_plan_options', // The option key and admin menu page slug.
244 244
 				'parent_slug'  => 'edit.php?post_type=plan', // Make options page a submenu item of the themes menu.
245 245
 				'capability'   => 'manage_options', // Cap required to view options-page.
246 246
 			)
247 247
 		);
248
-		do_action( 'lsx_hp_settings_page', $cmb );
248
+		do_action('lsx_hp_settings_page', $cmb);
249 249
 	}
250 250
 
251 251
 	/**
@@ -254,18 +254,18 @@  discard block
 block discarded – undo
254 254
 	 * @param object $cmb new_cmb2_box().
255 255
 	 * @return void
256 256
 	 */
257
-	public function general_settings( $cmb ) {
258
-		if ( function_exists( 'wc_memberships_is_post_content_restricted' ) ) {
257
+	public function general_settings($cmb) {
258
+		if (function_exists('wc_memberships_is_post_content_restricted')) {
259 259
 			$cmb->add_field(
260 260
 				array(
261
-					'name'       => __( 'Membership Product', 'lsx-health-plan' ),
261
+					'name'       => __('Membership Product', 'lsx-health-plan'),
262 262
 					'id'         => 'membership_product',
263 263
 					'type'       => 'post_search_ajax',
264 264
 					'limit'      => 1,
265 265
 					'sortable'   => false,
266 266
 					'query_args' => array(
267
-						'post_type'      => array( 'product' ),
268
-						'post_status'    => array( 'publish' ),
267
+						'post_type'      => array('product'),
268
+						'post_status'    => array('publish'),
269 269
 						'posts_per_page' => -1,
270 270
 					),
271 271
 				)
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 
275 275
 		$cmb->add_field(
276 276
 			array(
277
-				'name'    =>  __( 'Login Slug', 'lsx-health-plan' ),
277
+				'name'    =>  __('Login Slug', 'lsx-health-plan'),
278 278
 				'id'      => 'login_slug',
279 279
 				'type'    => 'input',
280 280
 				'value'   => '',
@@ -553,10 +553,10 @@  discard block
 block discarded – undo
553 553
 	 * @param string $section either engine,archive or single.
554 554
 	 * @return void
555 555
 	 */
556
-	public function generate_tabs( $cmb ) {
556
+	public function generate_tabs($cmb) {
557 557
 		$tabs = $this->get_settings_tabs();
558 558
 
559
-		foreach ( $tabs as $tab_key => $tab ) {
559
+		foreach ($tabs as $tab_key => $tab) {
560 560
 			$cmb->add_field(
561 561
 				array(
562 562
 					'id'          => 'settings_' . $tab_key . '_title',
@@ -566,11 +566,11 @@  discard block
 block discarded – undo
566 566
 					'description' => $tab['desc'],
567 567
 				)
568 568
 			);
569
-			do_action( 'lsx_hp_settings_page_' . $tab_key . '_top', $cmb );
569
+			do_action('lsx_hp_settings_page_' . $tab_key . '_top', $cmb);
570 570
 
571
-			do_action( 'lsx_hp_settings_page_' . $tab_key . '_middle', $cmb );
571
+			do_action('lsx_hp_settings_page_' . $tab_key . '_middle', $cmb);
572 572
 
573
-			do_action( 'lsx_hp_settings_page_' . $tab_key . '_bottom', $cmb );
573
+			do_action('lsx_hp_settings_page_' . $tab_key . '_bottom', $cmb);
574 574
 
575 575
 			$cmb->add_field(
576 576
 				array(
@@ -590,26 +590,26 @@  discard block
 block discarded – undo
590 590
 	public function get_settings_tabs() {
591 591
 		$tabs = array(
592 592
 			'general' => array(
593
-				'title' => __( 'General', 'lsx-health-plan' ),
594
-				'desc'  => __( 'Control the sitewide settings for the LSX HP site.', 'lsx-health-plan' ),
593
+				'title' => __('General', 'lsx-health-plan'),
594
+				'desc'  => __('Control the sitewide settings for the LSX HP site.', 'lsx-health-plan'),
595 595
 			),
596 596
 		);
597 597
 
598
-		foreach ( $this->post_types as $post_type ) {
599
-			switch ( $post_type ) {
598
+		foreach ($this->post_types as $post_type) {
599
+			switch ($post_type) {
600 600
 				default:
601 601
 					//if ( ! in_array( $post_type, \lsx\search\includes\get_restricted_post_types() ) ) {
602
-						$temp_post_type = get_post_type_object( $post_type );
603
-						if ( ! is_wp_error( $temp_post_type ) ) {
604
-							$page_url    = get_post_type_archive_link( $temp_post_type->name );
602
+						$temp_post_type = get_post_type_object($post_type);
603
+						if ( ! is_wp_error($temp_post_type)) {
604
+							$page_url    = get_post_type_archive_link($temp_post_type->name);
605 605
 							$description = sprintf(
606 606
 								/* translators: %s: The subscription info */
607
-								__( 'Control the settings for your <a target="_blank" href="%1$s">%2$s</a> archive.', 'lsx-search' ),
607
+								__('Control the settings for your <a target="_blank" href="%1$s">%2$s</a> archive.', 'lsx-search'),
608 608
 								$page_url,
609 609
 								$temp_post_type->label
610 610
 							);
611 611
 
612
-							$tabs[ $post_type ] = array(
612
+							$tabs[$post_type] = array(
613 613
 								'title' => $temp_post_type->label,
614 614
 								'desc'  => $description,
615 615
 							);
Please login to merge, or discard this patch.
classes/admin/settings/class-meal.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_meal_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_meal_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Disable Meals', 'lsx-health-plan' ),
55
+				'name'        => __('Disable Meals', 'lsx-health-plan'),
56 56
 				'id'          => 'meal_disabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Disable meal post type if you are wanting a minimal site.', 'lsx-health-plan' ),
60
+				'description' => __('Disable meal post type if you are wanting a minimal site.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 			array(
66 66
 				'id'          => 'meal_archive_description',
67 67
 				'type'        => 'wysiwyg',
68
-				'name'        => __( 'Archive Description', 'lsx-health-plan' ),
69
-				'description' => __( 'This will show up on the post type archive.', 'lsx-health-plan' ),
68
+				'name'        => __('Archive Description', 'lsx-health-plan'),
69
+				'description' => __('This will show up on the post type archive.', 'lsx-health-plan'),
70 70
 				'options'     => array(
71 71
 					'textarea_rows' => get_option('default_post_edit_rows', 6),
72 72
 				),
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
 
76 76
 		$cmb->add_field(
77 77
 			array(
78
-				'name'    => __( 'Your Meal Plan Intro', 'lsx-health-plan' ),
78
+				'name'    => __('Your Meal Plan Intro', 'lsx-health-plan'),
79 79
 				'id'      => 'meal_plan_intro',
80 80
 				'type'    => 'textarea_small',
81 81
 				'value'   => '',
82
-				'default' => __( 'Get the right mix of nutrients to keep muscles strong & healthy.', 'lsx-health-plan' ),
82
+				'default' => __('Get the right mix of nutrients to keep muscles strong & healthy.', 'lsx-health-plan'),
83 83
 			)
84 84
 		);
85 85
 
86 86
 		$cmb->add_field(
87 87
 			array(
88 88
 				'before_row' => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
89
-				'name'       =>  __( 'Meal Endpoint', 'lsx-health-plan' ),
89
+				'name'       =>  __('Meal Endpoint', 'lsx-health-plan'),
90 90
 				'id'         => 'endpoint_meal',
91 91
 				'type'       => 'input',
92 92
 				'value'      => '',
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		);
96 96
 		$cmb->add_field(
97 97
 			array(
98
-				'name'    =>  __( 'Meals Archive Endpoint', 'lsx-health-plan' ),
98
+				'name'    =>  __('Meals Archive Endpoint', 'lsx-health-plan'),
99 99
 				'id'      => 'endpoint_meal_archive',
100 100
 				'type'    => 'input',
101 101
 				'value'   => '',
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		);
105 105
 		$cmb->add_field(
106 106
 			array(
107
-				'name'    =>  __( 'Single Meal Slu', 'lsx-health-plan' ),
107
+				'name'    =>  __('Single Meal Slu', 'lsx-health-plan'),
108 108
 				'id'      => 'meal_single_slug',
109 109
 				'type'    => 'input',
110 110
 				'value'   => '',
@@ -115,37 +115,37 @@  discard block
 block discarded – undo
115 115
 		$cmb->add_field(
116 116
 			array(
117 117
 				'before_row'  => '<h4><b><u>Default Options</u></b></h4>',
118
-				'name'        => __( 'Default Meal Plan', 'lsx-health-plan' ),
119
-				'description' => __( 'Set a default meal plan.', 'lsx-health-plan' ),
118
+				'name'        => __('Default Meal Plan', 'lsx-health-plan'),
119
+				'description' => __('Set a default meal plan.', 'lsx-health-plan'),
120 120
 				'limit'       => 1,
121 121
 				'id'          => 'connected_meals',
122 122
 				'type'        => 'post_search_ajax',
123 123
 				'query_args'  => array(
124 124
 					'post_type'      => 'meal',
125
-					'post_status'    => array( 'publish' ),
125
+					'post_status'    => array('publish'),
126 126
 					'posts_per_page' => -1,
127 127
 				),
128 128
 			)
129 129
 		);
130
-		if ( function_exists( 'download_monitor' ) ) {
130
+		if (function_exists('download_monitor')) {
131 131
 			$page_url    = 'https://wordpress.org/plugins/download-monitor/';
132 132
 			$plugin_name = 'Download Monitor';
133 133
 			$description = sprintf(
134 134
 				/* translators: %s: The subscription info */
135
-				__( 'If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search' ),
135
+				__('If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search'),
136 136
 				$page_url,
137 137
 				$plugin_name
138 138
 			);
139 139
 			$cmb->add_field(
140 140
 				array(
141
-					'name'        => __( 'Default Meal Plan PDF', 'lsx-health-plan' ),
141
+					'name'        => __('Default Meal Plan PDF', 'lsx-health-plan'),
142 142
 					'description' => $description,
143 143
 					'id'          => 'download_meal',
144 144
 					'type'        => 'post_search_ajax',
145 145
 					'limit'       => 1,
146 146
 					'query_args'  => array(
147
-						'post_type'      => array( 'dlm_download' ),
148
-						'post_status'    => array( 'publish' ),
147
+						'post_type'      => array('dlm_download'),
148
+						'post_status'    => array('publish'),
149 149
 						'posts_per_page' => -1,
150 150
 					),
151 151
 				)
Please login to merge, or discard this patch.
classes/admin/settings/class-workout.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_workout_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_workout_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,34 +49,34 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Disable Workouts', 'lsx-health-plan' ),
55
+				'name'        => __('Disable Workouts', 'lsx-health-plan'),
56 56
 				'id'          => 'workout_disabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Disable workout post type if you are wanting a minimal site.', 'lsx-health-plan' ),
60
+				'description' => __('Disable workout post type if you are wanting a minimal site.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 		$cmb->add_field(
64 64
 			array(
65
-				'name'    => __( 'Your Warm-up Intro', 'lsx-health-plan' ),
65
+				'name'    => __('Your Warm-up Intro', 'lsx-health-plan'),
66 66
 				'id'      => 'warmup_intro',
67 67
 				'type'    => 'textarea_small',
68 68
 				'value'   => '',
69
-				'default' => __( "Don't forget your warm-up! It's a vital part of your daily workout routine.", 'lsx-health-plan' ),
69
+				'default' => __("Don't forget your warm-up! It's a vital part of your daily workout routine.", 'lsx-health-plan'),
70 70
 			)
71 71
 		);
72
-		if ( post_type_exists( 'workout' ) ) {
72
+		if (post_type_exists('workout')) {
73 73
 			$cmb->add_field(
74 74
 				array(
75
-					'name'    => __( 'Your Workout Intro', 'lsx-health-plan' ),
75
+					'name'    => __('Your Workout Intro', 'lsx-health-plan'),
76 76
 					'id'      => 'workout_intro',
77 77
 					'type'    => 'textarea_small',
78 78
 					'value'   => '',
79
-					'default' => __( "Let's do this! Smash your daily workout and reach your fitness goals.", 'lsx-health-plan' ),
79
+					'default' => __("Let's do this! Smash your daily workout and reach your fitness goals.", 'lsx-health-plan'),
80 80
 				)
81 81
 			);
82 82
 		}
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
 			array(
85 85
 				'id'          => 'workout_tab_layout',
86 86
 				'type'        => 'select',
87
-				'name'        => __( 'Workout Tab Layout', 'lsx-health-plan' ),
88
-				'description' => __( 'Choose the layout for the workouts.', 'lsx-health-plan' ),
87
+				'name'        => __('Workout Tab Layout', 'lsx-health-plan'),
88
+				'description' => __('Choose the layout for the workouts.', 'lsx-health-plan'),
89 89
 				'options'     => array(
90
-					'table' => __( 'Table', 'lsx-health-plan' ),
91
-					'list'  => __( 'List', 'lsx-health-plan' ),
92
-					'grid'  => __( 'Grid', 'lsx-health-plan' ),
90
+					'table' => __('Table', 'lsx-health-plan'),
91
+					'list'  => __('List', 'lsx-health-plan'),
92
+					'grid'  => __('Grid', 'lsx-health-plan'),
93 93
 				),
94 94
 			)
95 95
 		);
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 			array(
98 98
 				'id'          => 'workout_tab_link',
99 99
 				'type'        => 'select',
100
-				'name'        => __( 'Workout Tab Link', 'lsx-health-plan' ),
101
-				'description' => __( 'Choose to show the excerpt, full content or nothing.', 'lsx-health-plan' ),
100
+				'name'        => __('Workout Tab Link', 'lsx-health-plan'),
101
+				'description' => __('Choose to show the excerpt, full content or nothing.', 'lsx-health-plan'),
102 102
 				'options'     => array(
103
-					''       => __( 'None', 'lsx-health-plan' ),
104
-					'single' => __( 'Single', 'lsx-health-plan' ),
105
-					'modal'  => __( 'Modal', 'lsx-health-plan' ),
103
+					''       => __('None', 'lsx-health-plan'),
104
+					'single' => __('Single', 'lsx-health-plan'),
105
+					'modal'  => __('Modal', 'lsx-health-plan'),
106 106
 				),
107 107
 				'default' => 'modal',
108 108
 			)
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 			array(
112 112
 				'id'          => 'workout_tab_modal_content',
113 113
 				'type'        => 'select',
114
-				'name'        => __( 'Modal Content', 'lsx-health-plan' ),
115
-				'description' => __( 'Choose to show the excerpt, full content or nothing. For the modal content only', 'lsx-health-plan' ),
114
+				'name'        => __('Modal Content', 'lsx-health-plan'),
115
+				'description' => __('Choose to show the excerpt, full content or nothing. For the modal content only', 'lsx-health-plan'),
116 116
 				'options'     => array(
117
-					''        => __( 'None', 'lsx-health-plan' ),
118
-					'excerpt' => __( 'Excerpt', 'lsx-health-plan' ),
119
-					'full'    => __( 'Full Content', 'lsx-health-plan' ),
117
+					''        => __('None', 'lsx-health-plan'),
118
+					'excerpt' => __('Excerpt', 'lsx-health-plan'),
119
+					'full'    => __('Full Content', 'lsx-health-plan'),
120 120
 				),
121 121
 				'default' => '',
122 122
 			)
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
 			array(
126 126
 				'id'          => 'workout_tab_columns',
127 127
 				'type'        => 'select',
128
-				'name'        => __( 'Grid Columns', 'lsx-health-plan' ),
129
-				'description' => __( 'If you are displaying a grid, set the amount of columns you want to use.', 'lsx-health-plan' ),
128
+				'name'        => __('Grid Columns', 'lsx-health-plan'),
129
+				'description' => __('If you are displaying a grid, set the amount of columns you want to use.', 'lsx-health-plan'),
130 130
 				'options'     => array(
131
-					'12' => __( '1', 'lsx-health-plan' ),
132
-					'6'  => __( '2', 'lsx-health-plan' ),
133
-					'4'  => __( '3', 'lsx-health-plan' ),
134
-					'3'  => __( '4', 'lsx-health-plan' ),
135
-					'2'  => __( '6', 'lsx-health-plan' ),
131
+					'12' => __('1', 'lsx-health-plan'),
132
+					'6'  => __('2', 'lsx-health-plan'),
133
+					'4'  => __('3', 'lsx-health-plan'),
134
+					'3'  => __('4', 'lsx-health-plan'),
135
+					'2'  => __('6', 'lsx-health-plan'),
136 136
 				),
137 137
 				'default' => '4',
138 138
 			)
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 			array(
142 142
 				'id'          => 'workout_tab_content',
143 143
 				'type'        => 'select',
144
-				'name'        => __( 'Grid Content', 'lsx-health-plan' ),
145
-				'description' => __( 'Choose to show the excerpt, full content or nothing. For the grid layout only', 'lsx-health-plan' ),
144
+				'name'        => __('Grid Content', 'lsx-health-plan'),
145
+				'description' => __('Choose to show the excerpt, full content or nothing. For the grid layout only', 'lsx-health-plan'),
146 146
 				'options'     => array(
147
-					''        => __( 'None', 'lsx-health-plan' ),
148
-					'excerpt' => __( 'Excerpt', 'lsx-health-plan' ),
149
-					'full'    => __( 'Full Content', 'lsx-health-plan' ),
147
+					''        => __('None', 'lsx-health-plan'),
148
+					'excerpt' => __('Excerpt', 'lsx-health-plan'),
149
+					'full'    => __('Full Content', 'lsx-health-plan'),
150 150
 				),
151 151
 				'default'     => '',
152 152
 			)
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		$cmb->add_field(
156 156
 			array(
157 157
 				'before_row' => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
158
-				'name'       =>  __( 'Single Workout Endpoint', 'lsx-health-plan' ),
158
+				'name'       =>  __('Single Workout Endpoint', 'lsx-health-plan'),
159 159
 				'id'         => 'endpoint_workout',
160 160
 				'type'       => 'input',
161 161
 				'value'      => '',
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		);
165 165
 		$cmb->add_field(
166 166
 			array(
167
-				'name'    =>  __( 'Workouts Archive Endpoint', 'lsx-health-plan' ),
167
+				'name'    =>  __('Workouts Archive Endpoint', 'lsx-health-plan'),
168 168
 				'id'      => 'endpoint_workout_archive',
169 169
 				'type'    => 'input',
170 170
 				'value'   => '',
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 		);
174 174
 		$cmb->add_field(
175 175
 			array(
176
-				'name'    =>  __( 'Warm Up Endpoint', 'lsx-health-plan' ),
176
+				'name'    =>  __('Warm Up Endpoint', 'lsx-health-plan'),
177 177
 				'id'      => 'endpoint_warm_up',
178 178
 				'type'    => 'input',
179 179
 				'value'   => '',
@@ -185,65 +185,65 @@  discard block
 block discarded – undo
185 185
 		$cmb->add_field(
186 186
 			array(
187 187
 				'before_row'  => '<h4><b><u>Default Options</u></b></h4>',
188
-				'name'        => __( 'Warm Up', 'lsx-health-plan' ),
189
-				'description' => __( 'Set a default warm up routine.', 'lsx-health-plan' ),
188
+				'name'        => __('Warm Up', 'lsx-health-plan'),
189
+				'description' => __('Set a default warm up routine.', 'lsx-health-plan'),
190 190
 				'limit'       => 1,
191 191
 				'id'          => 'plan_warmup',
192 192
 				'type'        => 'post_search_ajax',
193 193
 				'query_args'  => array(
194 194
 					'post_type'      => 'post',
195
-					'post_status'    => array( 'publish' ),
195
+					'post_status'    => array('publish'),
196 196
 					'posts_per_page' => -1,
197 197
 				),
198 198
 			)
199 199
 		);
200 200
 		$cmb->add_field(
201 201
 			array(
202
-				'name'        => __( 'Workout', 'lsx-health-plan' ),
203
-				'description' => __( 'Set a default workout routine.', 'lsx-health-plan' ),
202
+				'name'        => __('Workout', 'lsx-health-plan'),
203
+				'description' => __('Set a default workout routine.', 'lsx-health-plan'),
204 204
 				'limit'       => 1,
205 205
 				'id'          => 'connected_workouts',
206 206
 				'type'        => 'post_search_ajax',
207 207
 				'query_args'  => array(
208 208
 					'post_type'      => 'workout',
209
-					'post_status'    => array( 'publish' ),
209
+					'post_status'    => array('publish'),
210 210
 					'posts_per_page' => -1,
211 211
 				),
212 212
 			)
213 213
 		);
214
-		if ( function_exists( 'download_monitor' ) ) {
214
+		if (function_exists('download_monitor')) {
215 215
 			$page_url    = 'https://wordpress.org/plugins/download-monitor/';
216 216
 			$plugin_name = 'Download Monitor';
217 217
 			$description = sprintf(
218 218
 				/* translators: %s: The subscription info */
219
-				__( 'If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search' ),
219
+				__('If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search'),
220 220
 				$page_url,
221 221
 				$plugin_name
222 222
 			);
223 223
 			$cmb->add_field(
224 224
 				array(
225
-					'name'        => __( 'Default Warm Up PDF', 'lsx-health-plan' ),
225
+					'name'        => __('Default Warm Up PDF', 'lsx-health-plan'),
226 226
 					'description' => $description,
227 227
 					'id'          => 'download_page',
228 228
 					'type'        => 'post_search_ajax',
229 229
 					'limit'       => 1,
230 230
 					'query_args'  => array(
231
-						'post_type'      => array( 'dlm_download' ),
232
-						'post_status'    => array( 'publish' ),
231
+						'post_type'      => array('dlm_download'),
232
+						'post_status'    => array('publish'),
233 233
 						'posts_per_page' => -1,
234 234
 					),
235 235
 				)
236 236
 			);
237 237
 			$cmb->add_field(
238 238
 				array(
239
-					'name'        => __( 'Default Workout PDF', 'lsx-health-plan' ),
239
+					'name'        => __('Default Workout PDF', 'lsx-health-plan'),
240 240
 					'description' => $description,
241 241
 					'id'          => 'download_workout',
242 242
 					'type'        => 'post_search_ajax',
243 243
 					'limit'       => 1,
244 244
 					'query_args'  => array(
245
-						'post_type'      => array( 'dlm_download' ),
246
-						'post_status'    => array( 'publish' ),
245
+						'post_type'      => array('dlm_download'),
246
+						'post_status'    => array('publish'),
247 247
 						'posts_per_page' => -1,
248 248
 					),
249 249
 				)
Please login to merge, or discard this patch.
classes/admin/settings/class-exercise.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_exercise_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_exercise_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,23 +49,23 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Exercises', 'lsx-health-plan' ),
55
+				'name'        => __('Exercises', 'lsx-health-plan'),
56 56
 				'id'          => 'exercise_enabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Enabling the exercise post type will automatically replace the Video post type.', 'lsx-health-plan' ),
60
+				'description' => __('Enabling the exercise post type will automatically replace the Video post type.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 		$cmb->add_field(
64 64
 			array(
65 65
 				'id'          => 'exercise_archive_description',
66 66
 				'type'        => 'wysiwyg',
67
-				'name'        => __( 'Archive Description', 'lsx-health-plan' ),
68
-				'description' => __( 'This will show up on the post type archive.', 'lsx-health-plan' ),
67
+				'name'        => __('Archive Description', 'lsx-health-plan'),
68
+				'description' => __('This will show up on the post type archive.', 'lsx-health-plan'),
69 69
 				'options'     => array(
70 70
 					'textarea_rows' => get_option('default_post_edit_rows', 6),
71 71
 				),
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		$cmb->add_field(
75 75
 			array(
76 76
 				'before_row' => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
77
-				'name'       =>  __( 'Single Exercise Slug', 'lsx-health-plan' ),
77
+				'name'       =>  __('Single Exercise Slug', 'lsx-health-plan'),
78 78
 				'id'         => 'endpoint_exercise_single',
79 79
 				'type'       => 'input',
80 80
 				'value'      => '',
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		);
84 84
 		$cmb->add_field(
85 85
 			array(
86
-				'name'    =>  __( 'Archive Exercise Slug', 'lsx-health-plan' ),
86
+				'name'    =>  __('Archive Exercise Slug', 'lsx-health-plan'),
87 87
 				'id'      => 'endpoint_exercise_archive',
88 88
 				'type'    => 'input',
89 89
 				'value'   => '',
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		);
93 93
 		$cmb->add_field(
94 94
 			array(
95
-				'name'    =>  __( 'Exercise Type Slug', 'lsx-health-plan' ),
95
+				'name'    =>  __('Exercise Type Slug', 'lsx-health-plan'),
96 96
 				'id'      => 'endpoint_exercise_type',
97 97
 				'type'    => 'input',
98 98
 				'value'   => '',
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		);
102 102
 		$cmb->add_field(
103 103
 			array(
104
-				'name'    =>  __( 'Equipment Slug', 'lsx-health-plan' ),
104
+				'name'    =>  __('Equipment Slug', 'lsx-health-plan'),
105 105
 				'id'      => 'endpoint_exercise_equipment',
106 106
 				'type'    => 'input',
107 107
 				'value'   => '',
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		);
111 111
 		$cmb->add_field(
112 112
 			array(
113
-				'name'    =>  __( 'Muscle Group Slug', 'lsx-health-plan' ),
113
+				'name'    =>  __('Muscle Group Slug', 'lsx-health-plan'),
114 114
 				'id'      => 'endpoint_exercise_musclegroup',
115 115
 				'type'    => 'input',
116 116
 				'value'   => '',
Please login to merge, or discard this patch.
classes/admin/settings/class-plan.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_plan_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_plan_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,23 +49,23 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Plan Filters', 'lsx-health-plan' ),
55
+				'name'        => __('Plan Filters', 'lsx-health-plan'),
56 56
 				'id'          => 'plan_filters_disabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Toggle the display of the tab filters on the post type archive.', 'lsx-health-plan' ),
60
+				'description' => __('Toggle the display of the tab filters on the post type archive.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 
64 64
 		$cmb->add_field(
65 65
 			array(
66 66
 				'before_row'  => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
67
-				'name'        =>  __( 'My Plan Slug', 'lsx-health-plan' ),
68
-				'description' => __( 'This will be the slug url for redirecting users after login, use the login page slug.', 'lsx-health-plan' ),
67
+				'name'        =>  __('My Plan Slug', 'lsx-health-plan'),
68
+				'description' => __('This will be the slug url for redirecting users after login, use the login page slug.', 'lsx-health-plan'),
69 69
 				'id'          => 'my_plan_slug',
70 70
 				'type'        => 'input',
71 71
 				'value'       => '',
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		);
75 75
 		$cmb->add_field(
76 76
 			array(
77
-				'name'    =>  __( 'Single Plan Slug', 'lsx-health-plan' ),
77
+				'name'    =>  __('Single Plan Slug', 'lsx-health-plan'),
78 78
 				'id'      => 'plan_single_slug',
79 79
 				'type'    => 'input',
80 80
 				'value'   => '',
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		);
84 84
 		$cmb->add_field(
85 85
 			array(
86
-				'name'    =>  __( 'Plans Archive Endpoint', 'lsx-health-plan' ),
86
+				'name'    =>  __('Plans Archive Endpoint', 'lsx-health-plan'),
87 87
 				'id'      => 'endpoint_plan_archive',
88 88
 				'type'    => 'input',
89 89
 				'value'   => '',
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		$cmb->add_field(
95 95
 			array(
96 96
 				'before_row' => '<h4><b><u>My Stats Options</u></b></h4>',
97
-				'name'       => __( 'Disable All Stats', 'lsx-health-plan' ),
97
+				'name'       => __('Disable All Stats', 'lsx-health-plan'),
98 98
 				'desc'       => 'Disable All Stats',
99 99
 				'id'         => 'disable_all_stats',
100 100
 				'type'       => 'checkbox',
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		);
105 105
 		$cmb->add_field(
106 106
 			array(
107
-				'name'    => __( 'Disable Weight', 'lsx-health-plan' ),
107
+				'name'    => __('Disable Weight', 'lsx-health-plan'),
108 108
 				'id'      => 'disable_weight_checkbox',
109 109
 				'type'    => 'checkbox',
110 110
 				'value'   => 1,
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		);
114 114
 		$cmb->add_field(
115 115
 			array(
116
-				'name'    => __( 'Disable Height', 'lsx-health-plan' ),
116
+				'name'    => __('Disable Height', 'lsx-health-plan'),
117 117
 				'id'      => 'disable_height_checkbox',
118 118
 				'type'    => 'checkbox',
119 119
 				'value'   => 1,
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		);
123 123
 		$cmb->add_field(
124 124
 			array(
125
-				'name'    => __( 'Disable Waist', 'lsx-health-plan' ),
125
+				'name'    => __('Disable Waist', 'lsx-health-plan'),
126 126
 				'id'      => 'disable_waist_checkbox',
127 127
 				'type'    => 'checkbox',
128 128
 				'value'   => 1,
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		);
132 132
 		$cmb->add_field(
133 133
 			array(
134
-				'name'    => __( 'Disable BMI', 'lsx-health-plan' ),
134
+				'name'    => __('Disable BMI', 'lsx-health-plan'),
135 135
 				'id'      => 'disable_bmi_checkbox',
136 136
 				'type'    => 'checkbox',
137 137
 				'value'   => 1,
Please login to merge, or discard this patch.
classes/admin/settings/class-recipe.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * Constructor
26 26
 	 */
27 27
 	public function __construct() {
28
-		add_action( 'lsx_hp_settings_page_recipe_top', array( $this, 'settings' ), 1, 1 );
28
+		add_action('lsx_hp_settings_page_recipe_top', array($this, 'settings'), 1, 1);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function get_instance() {
39 39
 		// If the single instance hasn't been set, set it now.
40
-		if ( null === self::$instance ) {
40
+		if (null === self::$instance) {
41 41
 			self::$instance = new self();
42 42
 		}
43 43
 		return self::$instance;
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
 	 * @param object $cmb new_cmb2_box().
50 50
 	 * @return void
51 51
 	 */
52
-	public function settings( $cmb ) {
52
+	public function settings($cmb) {
53 53
 		$cmb->add_field(
54 54
 			array(
55
-				'name'        => __( 'Disable Recipes', 'lsx-health-plan' ),
55
+				'name'        => __('Disable Recipes', 'lsx-health-plan'),
56 56
 				'id'          => 'recipe_disabled',
57 57
 				'type'        => 'checkbox',
58 58
 				'value'       => 1,
59 59
 				'default'     => 0,
60
-				'description' => __( 'Disable recipe post type if you are wanting a minimal site.', 'lsx-health-plan' ),
60
+				'description' => __('Disable recipe post type if you are wanting a minimal site.', 'lsx-health-plan'),
61 61
 			)
62 62
 		);
63 63
 
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 			array(
66 66
 				'id'          => 'recipe_archive_description',
67 67
 				'type'        => 'wysiwyg',
68
-				'name'        => __( 'Archive Description', 'lsx-health-plan' ),
69
-				'description' => __( 'This will show up on the post type archive.', 'lsx-health-plan' ),
68
+				'name'        => __('Archive Description', 'lsx-health-plan'),
69
+				'description' => __('This will show up on the post type archive.', 'lsx-health-plan'),
70 70
 				'options'     => array(
71 71
 					'textarea_rows' => get_option('default_post_edit_rows', 6),
72 72
 				),
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
 
76 76
 		$cmb->add_field(
77 77
 			array(
78
-				'name'    => __( 'Recipes Intro', 'lsx-health-plan' ),
78
+				'name'    => __('Recipes Intro', 'lsx-health-plan'),
79 79
 				'id'      => 'recipes_intro',
80 80
 				'type'    => 'textarea_small',
81 81
 				'value'   => '',
82
-				'default' => __( "Let's get cooking! Delicious and easy to follow recipes.", 'lsx-health-plan' ),
82
+				'default' => __("Let's get cooking! Delicious and easy to follow recipes.", 'lsx-health-plan'),
83 83
 			)
84 84
 		);
85 85
 
86 86
 		$cmb->add_field(
87 87
 			array(
88 88
 				'before_row' => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>',
89
-				'name'       =>  __( 'Recipes Endpoint', 'lsx-health-plan' ),
89
+				'name'       =>  __('Recipes Endpoint', 'lsx-health-plan'),
90 90
 				'id'         => 'endpoint_recipe',
91 91
 				'type'       => 'input',
92 92
 				'value'      => '',
@@ -97,37 +97,37 @@  discard block
 block discarded – undo
97 97
 		$cmb->add_field(
98 98
 			array(
99 99
 				'before_row'  => '<h4><b><u>Default Options</u></b></h4>',
100
-				'name'        => __( 'Recipe', 'lsx-health-plan' ),
101
-				'description' => __( 'Set a default recipe.', 'lsx-health-plan' ),
100
+				'name'        => __('Recipe', 'lsx-health-plan'),
101
+				'description' => __('Set a default recipe.', 'lsx-health-plan'),
102 102
 				'limit'       => 1,
103 103
 				'id'          => 'connected_recipes',
104 104
 				'type'        => 'post_search_ajax',
105 105
 				'query_args'  => array(
106 106
 					'post_type'      => 'recipe',
107
-					'post_status'    => array( 'publish' ),
107
+					'post_status'    => array('publish'),
108 108
 					'posts_per_page' => -1,
109 109
 				),
110 110
 			)
111 111
 		);
112
-		if ( function_exists( 'download_monitor' ) ) {
112
+		if (function_exists('download_monitor')) {
113 113
 			$page_url    = 'https://wordpress.org/plugins/download-monitor/';
114 114
 			$plugin_name = 'Download Monitor';
115 115
 			$description = sprintf(
116 116
 				/* translators: %s: The subscription info */
117
-				__( 'If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your recipe here.', 'lsx-search' ),
117
+				__('If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your recipe here.', 'lsx-search'),
118 118
 				$page_url,
119 119
 				$plugin_name
120 120
 			);
121 121
 			$cmb->add_field(
122 122
 				array(
123
-					'name'        => __( 'Default Recipe PDF', 'lsx-health-plan' ),
123
+					'name'        => __('Default Recipe PDF', 'lsx-health-plan'),
124 124
 					'description' => $description,
125 125
 					'id'          => 'download_recipe',
126 126
 					'type'        => 'post_search_ajax',
127 127
 					'limit'       => 1,
128 128
 					'query_args'  => array(
129
-						'post_type'      => array( 'dlm_download' ),
130
-						'post_status'    => array( 'publish' ),
129
+						'post_type'      => array('dlm_download'),
130
+						'post_status'    => array('publish'),
131 131
 						'posts_per_page' => -1,
132 132
 					),
133 133
 				)
Please login to merge, or discard this patch.