Passed
Pull Request — master (#338)
by Virginia
02:04
created
includes/customizer.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage customizer
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_customizer_core_controls' ) ) :
13
+if ( ! function_exists('lsx_customizer_core_controls')) :
14 14
 
15 15
 	/**
16 16
 	 * Returns an array of the core panel.
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	 *
21 21
 	 * @return $lsx_controls array()
22 22
 	 */
23
-	function lsx_customizer_core_controls( $lsx_controls ) {
23
+	function lsx_customizer_core_controls($lsx_controls) {
24 24
 		$lsx_controls['sections']['lsx-core'] = array(
25
-			'title'       => esc_html__( 'Core Settings', 'lsx' ),
26
-			'description' => esc_html__( 'Change the core settings.', 'lsx' ),
25
+			'title'       => esc_html__('Core Settings', 'lsx'),
26
+			'description' => esc_html__('Change the core settings.', 'lsx'),
27 27
 			'priority'    => 21,
28 28
 		);
29 29
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		);
35 35
 
36 36
 		$lsx_controls['fields']['lsx_preloader_content_status'] = array(
37
-			'label'   => esc_html__( 'Preloader Content', 'lsx' ),
37
+			'label'   => esc_html__('Preloader Content', 'lsx'),
38 38
 			'section' => 'lsx-core',
39 39
 			'type'    => 'checkbox',
40 40
 		);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		);
47 47
 
48 48
 		$lsx_controls['fields']['lsx_disable_fonts'] = array(
49
-			'label'   => esc_html__( 'Disable Fonts', 'lsx' ),
49
+			'label'   => esc_html__('Disable Fonts', 'lsx'),
50 50
 			'section' => 'lsx-core',
51 51
 			'type'    => 'checkbox',
52 52
 		);
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 
57 57
 endif;
58 58
 
59
-add_filter( 'lsx_customizer_controls', 'lsx_customizer_core_controls' );
59
+add_filter('lsx_customizer_controls', 'lsx_customizer_core_controls');
60 60
 
61
-if ( ! function_exists( 'lsx_customizer_layout_controls' ) ) :
61
+if ( ! function_exists('lsx_customizer_layout_controls')) :
62 62
 
63 63
 	/**
64 64
 	 * Returns an array of the layout panel.
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 	 *
69 69
 	 * @return $lsx_controls array()
70 70
 	 */
71
-	function lsx_customizer_layout_controls( $lsx_controls ) {
71
+	function lsx_customizer_layout_controls($lsx_controls) {
72 72
 		$lsx_controls['sections']['lsx-layout'] = array(
73
-			'title'       => esc_html__( 'Layout', 'lsx' ),
74
-			'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ),
73
+			'title'       => esc_html__('Layout', 'lsx'),
74
+			'description' => esc_html__('Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx'),
75 75
 			'priority'    => 22,
76 76
 		);
77 77
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		);
83 83
 
84 84
 		$lsx_controls['fields']['lsx_header_layout'] = array(
85
-			'label'   => esc_html__( 'Header', 'lsx' ),
85
+			'label'   => esc_html__('Header', 'lsx'),
86 86
 			'section' => 'lsx-layout',
87 87
 			'control' => 'LSX_Customize_Header_Layout_Control',
88 88
 			'choices' => array(
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		);
100 100
 
101 101
 		$lsx_controls['fields']['lsx_header_mobile_layout'] = array(
102
-			'label'   => esc_html__( 'Mobile Header', 'lsx' ),
102
+			'label'   => esc_html__('Mobile Header', 'lsx'),
103 103
 			'section' => 'lsx-layout',
104 104
 			'control' => 'LSX_Customize_Mobile_Header_Layout_Control',
105 105
 			'choices' => array(
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 		);
116 116
 
117 117
 		$lsx_controls['fields']['lsx_layout'] = array(
118
-			'label'   => esc_html__( 'Body', 'lsx' ),
118
+			'label'   => esc_html__('Body', 'lsx'),
119 119
 			'section' => 'lsx-layout',
120 120
 			'control' => 'LSX_Customize_Layout_Control',
121 121
 			'choices' => array(
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		);
133 133
 
134 134
 		$lsx_controls['fields']['lsx_header_fixed'] = array(
135
-			'label'   => esc_html__( 'Fixed Header', 'lsx' ),
135
+			'label'   => esc_html__('Fixed Header', 'lsx'),
136 136
 			'section' => 'lsx-layout',
137 137
 			'type'    => 'checkbox',
138 138
 		);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 		);
145 145
 
146 146
 		$lsx_controls['fields']['lsx_header_search'] = array(
147
-			'label'   => esc_html__( 'Search Box in Header', 'lsx' ),
147
+			'label'   => esc_html__('Search Box in Header', 'lsx'),
148 148
 			'section' => 'lsx-layout',
149 149
 			'type'    => 'checkbox',
150 150
 		);
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
 		$lsx_controls['selective_refresh']['lsx_header_search'] = array(
153 153
 			'selector'        => '#lsx-header-search-css',
154 154
 			'render_callback' => function() {
155
-				$search_form = get_theme_mod( 'lsx_header_search' );
155
+				$search_form = get_theme_mod('lsx_header_search');
156 156
 
157
-				if ( false !== $search_form ) {
157
+				if (false !== $search_form) {
158 158
 					echo 'body #searchform { display: block; }';
159 159
 				} else {
160 160
 					echo 'body #searchform { display: none; }';
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
 
168 168
 endif;
169 169
 
170
-add_filter( 'lsx_customizer_controls', 'lsx_customizer_layout_controls' );
170
+add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls');
171 171
 
172
-if ( ! function_exists( 'lsx_get_customizer_controls' ) ) :
172
+if ( ! function_exists('lsx_get_customizer_controls')) :
173 173
 
174 174
 	/**
175 175
 	 * Returns an array of $controls for the customizer class to generate.
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	function lsx_get_customizer_controls() {
183 183
 		$lsx_controls = array();
184
-		$lsx_controls = apply_filters( 'lsx_customizer_controls', $lsx_controls );
184
+		$lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls);
185 185
 		return $lsx_controls;
186 186
 	}
187 187
 
188 188
 endif;
189 189
 
190
-$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() );
190
+$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls());
Please login to merge, or discard this patch.
includes/the-events-calendar/the-events-calendar.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage the-events-calendar
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_tec_scripts_add_styles' ) ) :
13
+if ( ! function_exists('lsx_tec_scripts_add_styles')) :
14 14
 
15 15
 	/**
16 16
 	 * The Events Calendar enqueue styles.
@@ -22,26 +22,26 @@  discard block
 block discarded – undo
22 22
 
23 23
 		// Get plugin version.
24 24
 		$plugin  = 'the-events-calendar/the-events-calendar.php';
25
-		$data    = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
25
+		$data    = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin);
26 26
 		$version = $data['Version'];
27 27
 
28
-		if ( substr( $version, 0, 1 ) >= '5' ) {
28
+		if (substr($version, 0, 1) >= '5') {
29 29
 			// New Version 5.0 and up.
30
-			wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array( 'lsx_main' ), LSX_VERSION );
30
+			wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array('lsx_main'), LSX_VERSION);
31 31
 		} else {
32 32
 			// Old Version.
33
-			wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION );
33
+			wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array('lsx_main'), LSX_VERSION);
34 34
 		}
35 35
 
36
-		wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION );
37
-		wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' );
36
+		wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array('lsx_main'), LSX_VERSION);
37
+		wp_style_add_data('the-events-calendar-lsx', 'rtl', 'replace');
38 38
 	}
39 39
 
40
-	add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' );
40
+	add_action('wp_enqueue_scripts', 'lsx_tec_scripts_add_styles');
41 41
 
42 42
 endif;
43 43
 
44
-if ( ! function_exists( 'lsx_tec_theme_wrapper_start' ) ) :
44
+if ( ! function_exists('lsx_tec_theme_wrapper_start')) :
45 45
 
46 46
 	/**
47 47
 	 * The Events Calendar wrapper start.
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	function lsx_tec_theme_wrapper_start() {
53 53
 		lsx_content_wrap_before();
54
-		echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">';
54
+		echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">';
55 55
 		lsx_content_before();
56 56
 		echo '<main id="main" class="site-main" role="main">';
57 57
 		lsx_content_top();
58 58
 	}
59 59
 
60
-	add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 );
60
+	add_action('tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9);
61 61
 
62 62
 endif;
63 63
 
64
-if ( ! function_exists( 'lsx_tec_theme_wrapper_end' ) ) :
64
+if ( ! function_exists('lsx_tec_theme_wrapper_end')) :
65 65
 
66 66
 	/**
67 67
 	 * The Events Calendar wrapper end.
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 		lsx_content_wrap_after();
78 78
 	}
79 79
 
80
-	add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 );
80
+	add_action('tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11);
81 81
 
82 82
 endif;
83 83
 
84
-if ( ! function_exists( 'lsx_tec_global_header_title' ) ) :
84
+if ( ! function_exists('lsx_tec_global_header_title')) :
85 85
 
86 86
 	/**
87 87
 	 * Move the events title into the global header
@@ -89,98 +89,98 @@  discard block
 block discarded – undo
89 89
 	 * @package    lsx
90 90
 	 * @subpackage the-events-calendar
91 91
 	 */
92
-	function lsx_tec_global_header_title( $title ) {
92
+	function lsx_tec_global_header_title($title) {
93 93
 
94
-		if ( tribe_is_community_edit_event_page() ) {
94
+		if (tribe_is_community_edit_event_page()) {
95 95
 
96
-			$is_route = get_query_var( 'WP_Route' );
97
-			switch ( $is_route ) {
96
+			$is_route = get_query_var('WP_Route');
97
+			switch ($is_route) {
98 98
 				case 'ce-edit-route':
99
-					$title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) );
99
+					$title = apply_filters('tribe_ce_edit_event_page_title', __('Edit an Event', 'lsx'));
100 100
 					break;
101 101
 
102 102
 				case 'ce-edit-organizer-route':
103
-					$title = __( 'Edit an Organizer', 'lsx' );
103
+					$title = __('Edit an Organizer', 'lsx');
104 104
 					break;
105 105
 
106 106
 				case 'ce-edit-venue-route':
107
-					$title = __( 'Edit a Venue', 'lsx' );
107
+					$title = __('Edit a Venue', 'lsx');
108 108
 					break;
109 109
 
110 110
 				default:
111
-					$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) );
111
+					$title = apply_filters('tribe_ce_submit_event_page_title', __('Submit an Event', 'lsx'));
112 112
 					break;
113 113
 			}
114
-		} elseif ( tribe_is_community_my_events_page() ) {
115
-			$title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) );
116
-		} elseif ( tribe_is_event() ) {
114
+		} elseif (tribe_is_community_my_events_page()) {
115
+			$title = apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx'));
116
+		} elseif (tribe_is_event()) {
117 117
 			$title = tribe_get_events_title();
118 118
 		}
119 119
 
120 120
 		// Only disable the title after we have retrieved it.
121
-		add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 );
121
+		add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1);
122 122
 
123
-		if ( is_singular( 'tribe_events' ) ) {
124
-			add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 );
123
+		if (is_singular('tribe_events')) {
124
+			add_filter('the_title', 'lsx_text_disable_body_title', 200, 1);
125 125
 		}
126 126
 		return $title;
127 127
 	}
128
-	add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 );
128
+	add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1);
129 129
 
130 130
 endif;
131 131
 
132
-if ( ! function_exists( 'lsx_text_disable_body_title' ) ) :
132
+if ( ! function_exists('lsx_text_disable_body_title')) :
133 133
 	/**
134 134
 	 * Disable the events title for the post archive if the dynamic setting is active.
135 135
 	 *
136 136
 	 * @param $title
137 137
 	 * @return string
138 138
 	 */
139
-	function lsx_text_disable_body_title( $title ) {
139
+	function lsx_text_disable_body_title($title) {
140 140
 		$title = '';
141
-		remove_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 );
141
+		remove_filter('the_title', 'lsx_text_disable_body_title', 200, 1);
142 142
 		return $title;
143 143
 	}
144 144
 
145 145
 endif;
146 146
 
147
-if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) :
147
+if ( ! function_exists('lsx_tec_breadcrumb_filter')) :
148 148
 	/**
149 149
 	 * Fixes the community events breadcrumb
150 150
 	 *
151 151
 	 * @package    lsx
152 152
 	 * @subpackage the-events-calendar
153 153
 	 */
154
-	function lsx_tec_breadcrumb_filter( $crumbs ) {
154
+	function lsx_tec_breadcrumb_filter($crumbs) {
155 155
 
156
-		if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) {
156
+		if (tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) {
157 157
 			$new_crumbs    = array();
158 158
 			$new_crumbs[0] = $crumbs[0];
159 159
 
160
-			if ( function_exists( 'woocommerce_breadcrumb' ) ) {
160
+			if (function_exists('woocommerce_breadcrumb')) {
161 161
 				$new_crumbs[1] = array(
162
-					0 => __( 'Events', 'lsx' ),
163
-					1 => get_post_type_archive_link( 'tribe_events' ),
162
+					0 => __('Events', 'lsx'),
163
+					1 => get_post_type_archive_link('tribe_events'),
164 164
 				);
165 165
 			} else {
166 166
 				$new_crumbs[1] = array(
167
-					'text' => __( 'Events', 'lsx' ),
168
-					'url'  => get_post_type_archive_link( 'tribe_events' ),
167
+					'text' => __('Events', 'lsx'),
168
+					'url'  => get_post_type_archive_link('tribe_events'),
169 169
 				);
170 170
 			}
171 171
 
172
-			if ( tribe_is_community_my_events_page() ) {
172
+			if (tribe_is_community_my_events_page()) {
173 173
 				$new_crumbs[2] = $crumbs[2];
174
-			} elseif ( tribe_is_community_edit_event_page() ) {
174
+			} elseif (tribe_is_community_edit_event_page()) {
175 175
 
176
-				if ( function_exists( 'woocommerce_breadcrumb' ) ) {
176
+				if (function_exists('woocommerce_breadcrumb')) {
177 177
 					$new_crumbs[2] = array(
178
-						0 => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ),
178
+						0 => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')),
179 179
 						1 => tribe_community_events_list_events_link(),
180 180
 					);
181 181
 				} else {
182 182
 					$new_crumbs[2] = array(
183
-						'text' => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ),
183
+						'text' => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')),
184 184
 						'url'  => tribe_community_events_list_events_link(),
185 185
 					);
186 186
 				}
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		}
194 194
 		return $crumbs;
195 195
 	}
196
-	add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 );
197
-	add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 );
196
+	add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1);
197
+	add_filter('woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1);
198 198
 
199 199
 endif;
Please login to merge, or discard this patch.