Passed
Push — master ( a38a80...51afd5 )
by Warwick
06:26
created
includes/config.php 1 patch
Indentation   +313 added lines, -313 removed lines patch added patch discarded remove patch
@@ -7,275 +7,275 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 if ( ! defined( 'ABSPATH' ) ) {
10
-	exit;
10
+     exit;
11 11
 }
12 12
 
13 13
 if ( ! function_exists( 'lsx_setup' ) ) :
14 14
 
15
-	/**
16
-	 * Theme after_setup_theme action.
17
-	 *
18
-	 * @package    lsx
19
-	 * @subpackage config
20
-	 */
21
-	function lsx_setup() {
22
-		global $content_width;
23
-		$content_width = 1140;
24
-
25
-		remove_theme_support( 'widgets-block-editor' );
26
-
27
-		load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
28
-
29
-		add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
30
-		add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
31
-		add_image_size( 'lsx-thumbnail-square', 350, 350, true );
32
-		add_image_size( 'lsx-thumbnail-single', 750, 350, true );
33
-		add_image_size( 'lsx-banner', 1920, 600, true );
34
-
35
-		register_nav_menus(
36
-			array(
37
-				'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
38
-				'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
39
-				'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
40
-				'social'        => esc_html__( 'Social Menu', 'lsx' ),
41
-				'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
42
-			)
43
-		);
44
-
45
-		add_theme_support( 'automatic-feed-links' );
46
-		add_theme_support( 'custom-background' );
47
-
48
-		add_theme_support(
49
-			'custom-logo',
50
-			array(
51
-				'height'      => 50,
52
-				'width'       => 160,
53
-				'flex-width'  => true,
54
-				'flex-height' => true,
55
-			)
56
-		);
57
-
58
-		add_theme_support( 'html5', array( 'caption' ) );
59
-
60
-		add_theme_support(
61
-			'post-formats',
62
-			array(
63
-				'image',
64
-				'video',
65
-				'gallery',
66
-				'audio',
67
-				'quote',
68
-			)
69
-		);
70
-
71
-		add_theme_support( 'post-thumbnails' );
72
-		add_theme_support( 'sensei' );
73
-
74
-		add_theme_support(
75
-			'site-logo',
76
-			array(
77
-				'header-text' => array(
78
-					'site-title',
79
-					'site-description',
80
-				),
81
-				'size'        => 'medium',
82
-			)
83
-		);
84
-
85
-		add_theme_support( 'title-tag' );
86
-
87
-		/*
15
+     /**
16
+      * Theme after_setup_theme action.
17
+      *
18
+      * @package    lsx
19
+      * @subpackage config
20
+      */
21
+     function lsx_setup() {
22
+          global $content_width;
23
+          $content_width = 1140;
24
+
25
+          remove_theme_support( 'widgets-block-editor' );
26
+
27
+          load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
28
+
29
+          add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
30
+          add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
31
+          add_image_size( 'lsx-thumbnail-square', 350, 350, true );
32
+          add_image_size( 'lsx-thumbnail-single', 750, 350, true );
33
+          add_image_size( 'lsx-banner', 1920, 600, true );
34
+
35
+          register_nav_menus(
36
+               array(
37
+                    'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
38
+                    'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
39
+                    'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
40
+                    'social'        => esc_html__( 'Social Menu', 'lsx' ),
41
+                    'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
42
+               )
43
+          );
44
+
45
+          add_theme_support( 'automatic-feed-links' );
46
+          add_theme_support( 'custom-background' );
47
+
48
+          add_theme_support(
49
+               'custom-logo',
50
+               array(
51
+                    'height'      => 50,
52
+                    'width'       => 160,
53
+                    'flex-width'  => true,
54
+                    'flex-height' => true,
55
+               )
56
+          );
57
+
58
+          add_theme_support( 'html5', array( 'caption' ) );
59
+
60
+          add_theme_support(
61
+               'post-formats',
62
+               array(
63
+                    'image',
64
+                    'video',
65
+                    'gallery',
66
+                    'audio',
67
+                    'quote',
68
+               )
69
+          );
70
+
71
+          add_theme_support( 'post-thumbnails' );
72
+          add_theme_support( 'sensei' );
73
+
74
+          add_theme_support(
75
+               'site-logo',
76
+               array(
77
+                    'header-text' => array(
78
+                         'site-title',
79
+                         'site-description',
80
+                    ),
81
+                    'size'        => 'medium',
82
+               )
83
+          );
84
+
85
+          add_theme_support( 'title-tag' );
86
+
87
+          /*
88 88
 		 * @TODO - Necessary to test it
89 89
 		 */
90 90
 
91
-		// add_theme_support( 'woocommerce' );.
92
-		add_theme_support( 'starter-content', array(
93
-			'widgets'     => array(
94
-				'sidebar-home'       => array(
95
-					'custom_widget_1' => array(
96
-						'text',
97
-
98
-						array(
99
-							'title' => '',
100
-							'text'  => wp_kses_post( '<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>' ),
101
-						),
102
-					),
103
-
104
-					'custom_widget_2' => array(
105
-						'text',
106
-
107
-						array(
108
-							'title' => '',
109
-							'text'  => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>' ),
110
-						),
111
-					),
112
-
113
-					'custom_widget_3' => array(
114
-						'text',
115
-
116
-						array(
117
-							'title' => '',
118
-							'text'  => wp_kses_post( '<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ),
119
-						),
120
-					),
121
-				),
122
-
123
-				'sidebar-footer'     => array(
124
-					'custom_widget_1' => array(
125
-						'text',
126
-
127
-						array(
128
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
129
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
130
-						),
131
-					),
132
-
133
-					'custom_widget_2' => array(
134
-						'text',
135
-
136
-						array(
137
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
138
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
139
-						),
140
-					),
141
-
142
-					'custom_widget_3' => array(
143
-						'text',
144
-
145
-						array(
146
-							'title' => esc_html__( 'Contact us:', 'lsx' ),
147
-							'text'  => wp_kses_post( '<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment' ),
148
-						),
149
-					),
150
-				),
151
-
152
-				'sidebar-footer-cta' => array(
153
-					'custom_widget_1' => array(
154
-						'text',
155
-
156
-						array(
157
-							'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
158
-							'text'  => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ),
159
-						),
160
-					),
161
-				),
162
-			),
163
-
164
-			'posts'       => array(
165
-				'home'    => array(
166
-					'template'     => 'page-templates/template-front-page.php',
167
-					'thumbnail'    => '{{image-banner-example-01}}',
168
-					'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
169
-					'post_content' => '',
170
-				),
171
-
172
-				'about'   => array(
173
-					'thumbnail' => '{{image-banner-example-02}}',
174
-				),
175
-
176
-				'blog',
177
-
178
-				'contact' => array(
179
-					'thumbnail' => '{{image-banner-example-03}}',
180
-				),
181
-			),
182
-
183
-			'attachments' => array(
184
-				'image-banner-example-01' => array(
185
-					'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
186
-					'file'       => 'assets/images/admin/banner-example-01.jpg',
187
-				),
188
-
189
-				'image-banner-example-02' => array(
190
-					'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
191
-					'file'       => 'assets/images/admin/banner-example-02.jpg',
192
-				),
193
-
194
-				'image-banner-example-03' => array(
195
-					'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
196
-					'file'       => 'assets/images/admin/banner-example-03.jpg',
197
-				),
198
-			),
199
-
200
-			'options'     => array(
201
-				'show_on_front'   => 'page',
202
-				'page_on_front'   => '{{home}}',
203
-				'page_for_posts'  => '{{blog}}',
204
-				'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
205
-			),
206
-
207
-			'nav_menus'   => array(
208
-				'primary'  => array(
209
-					'name'  => esc_html__( 'Primary Menu', 'lsx' ),
210
-
211
-					'items' => array(
212
-						'page_home',
213
-						'page_about',
214
-						'page_blog',
215
-						'page_contact',
216
-					),
217
-				),
218
-
219
-				'top-menu' => array(
220
-					'name'  => esc_html__( 'Top Menu', 'lsx' ),
221
-
222
-					'items' => array(
223
-						'custom_link_1' => array(
224
-							'title'   => 'View Map',
225
-							'url'     => 'https://www.google.com/maps/place/LightSpeed+WordPress+Development/@-33.92945,18.45345,17z/data=!3m1!4b1!4m2!3m1!1s0x1dcc5da1b2446d25:0xc8ecdb1cc8afd170',
226
-							'classes' => 'map',
227
-						),
228
-
229
-						'custom_link_2' => array(
230
-							'title'   => '+27 21 448 9843',
231
-							'url'     => 'tel:+27214489843',
232
-							'classes' => 'tel',
233
-						),
234
-
235
-						'custom_link_3' => array(
236
-							'title'   => '[email protected]',
237
-							'url'     => 'mailto:[email protected]',
238
-							'classes' => 'email',
239
-						),
240
-
241
-						'page_contact'  => array(
242
-							'classes' => 'cta',
243
-						),
244
-					),
245
-				),
246
-
247
-				'social'   => array(
248
-					'name'  => esc_html__( 'Social Menu', 'lsx' ),
249
-
250
-					'items' => array(
251
-						'link_facebook',
252
-						'link_foursquare',
253
-						'link_github',
254
-						'link_instagram',
255
-						'link_linkedin',
256
-						'link_pinterest',
257
-						'link_twitter',
258
-						'link_youtube',
259
-					),
260
-				),
261
-
262
-				'footer'   => array(
263
-					'name'  => esc_html__( 'Footer Menu', 'lsx' ),
264
-
265
-					'items' => array(
266
-						'page_about',
267
-						'page_contact',
268
-					),
269
-				),
270
-			),
271
-
272
-			'theme_mods'  => array(
273
-				'lsx_header_fixed'  => true,
274
-				'lsx_header_search' => false,
275
-				'lsx_layout'        => '1c',
276
-			),
277
-		) );
278
-	}
91
+          // add_theme_support( 'woocommerce' );.
92
+          add_theme_support( 'starter-content', array(
93
+               'widgets'     => array(
94
+                    'sidebar-home'       => array(
95
+                         'custom_widget_1' => array(
96
+                              'text',
97
+
98
+                              array(
99
+                                   'title' => '',
100
+                                   'text'  => wp_kses_post( '<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>' ),
101
+                              ),
102
+                         ),
103
+
104
+                         'custom_widget_2' => array(
105
+                              'text',
106
+
107
+                              array(
108
+                                   'title' => '',
109
+                                   'text'  => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>' ),
110
+                              ),
111
+                         ),
112
+
113
+                         'custom_widget_3' => array(
114
+                              'text',
115
+
116
+                              array(
117
+                                   'title' => '',
118
+                                   'text'  => wp_kses_post( '<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ),
119
+                              ),
120
+                         ),
121
+                    ),
122
+
123
+                    'sidebar-footer'     => array(
124
+                         'custom_widget_1' => array(
125
+                              'text',
126
+
127
+                              array(
128
+                                   'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
129
+                                   'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
130
+                              ),
131
+                         ),
132
+
133
+                         'custom_widget_2' => array(
134
+                              'text',
135
+
136
+                              array(
137
+                                   'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
138
+                                   'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
139
+                              ),
140
+                         ),
141
+
142
+                         'custom_widget_3' => array(
143
+                              'text',
144
+
145
+                              array(
146
+                                   'title' => esc_html__( 'Contact us:', 'lsx' ),
147
+                                   'text'  => wp_kses_post( '<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment' ),
148
+                              ),
149
+                         ),
150
+                    ),
151
+
152
+                    'sidebar-footer-cta' => array(
153
+                         'custom_widget_1' => array(
154
+                              'text',
155
+
156
+                              array(
157
+                                   'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
158
+                                   'text'  => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ),
159
+                              ),
160
+                         ),
161
+                    ),
162
+               ),
163
+
164
+               'posts'       => array(
165
+                    'home'    => array(
166
+                         'template'     => 'page-templates/template-front-page.php',
167
+                         'thumbnail'    => '{{image-banner-example-01}}',
168
+                         'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
169
+                         'post_content' => '',
170
+                    ),
171
+
172
+                    'about'   => array(
173
+                         'thumbnail' => '{{image-banner-example-02}}',
174
+                    ),
175
+
176
+                    'blog',
177
+
178
+                    'contact' => array(
179
+                         'thumbnail' => '{{image-banner-example-03}}',
180
+                    ),
181
+               ),
182
+
183
+               'attachments' => array(
184
+                    'image-banner-example-01' => array(
185
+                         'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
186
+                         'file'       => 'assets/images/admin/banner-example-01.jpg',
187
+                    ),
188
+
189
+                    'image-banner-example-02' => array(
190
+                         'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
191
+                         'file'       => 'assets/images/admin/banner-example-02.jpg',
192
+                    ),
193
+
194
+                    'image-banner-example-03' => array(
195
+                         'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
196
+                         'file'       => 'assets/images/admin/banner-example-03.jpg',
197
+                    ),
198
+               ),
199
+
200
+               'options'     => array(
201
+                    'show_on_front'   => 'page',
202
+                    'page_on_front'   => '{{home}}',
203
+                    'page_for_posts'  => '{{blog}}',
204
+                    'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
205
+               ),
206
+
207
+               'nav_menus'   => array(
208
+                    'primary'  => array(
209
+                         'name'  => esc_html__( 'Primary Menu', 'lsx' ),
210
+
211
+                         'items' => array(
212
+                              'page_home',
213
+                              'page_about',
214
+                              'page_blog',
215
+                              'page_contact',
216
+                         ),
217
+                    ),
218
+
219
+                    'top-menu' => array(
220
+                         'name'  => esc_html__( 'Top Menu', 'lsx' ),
221
+
222
+                         'items' => array(
223
+                              'custom_link_1' => array(
224
+                                   'title'   => 'View Map',
225
+                                   'url'     => 'https://www.google.com/maps/place/LightSpeed+WordPress+Development/@-33.92945,18.45345,17z/data=!3m1!4b1!4m2!3m1!1s0x1dcc5da1b2446d25:0xc8ecdb1cc8afd170',
226
+                                   'classes' => 'map',
227
+                              ),
228
+
229
+                              'custom_link_2' => array(
230
+                                   'title'   => '+27 21 448 9843',
231
+                                   'url'     => 'tel:+27214489843',
232
+                                   'classes' => 'tel',
233
+                              ),
234
+
235
+                              'custom_link_3' => array(
236
+                                   'title'   => '[email protected]',
237
+                                   'url'     => 'mailto:[email protected]',
238
+                                   'classes' => 'email',
239
+                              ),
240
+
241
+                              'page_contact'  => array(
242
+                                   'classes' => 'cta',
243
+                              ),
244
+                         ),
245
+                    ),
246
+
247
+                    'social'   => array(
248
+                         'name'  => esc_html__( 'Social Menu', 'lsx' ),
249
+
250
+                         'items' => array(
251
+                              'link_facebook',
252
+                              'link_foursquare',
253
+                              'link_github',
254
+                              'link_instagram',
255
+                              'link_linkedin',
256
+                              'link_pinterest',
257
+                              'link_twitter',
258
+                              'link_youtube',
259
+                         ),
260
+                    ),
261
+
262
+                    'footer'   => array(
263
+                         'name'  => esc_html__( 'Footer Menu', 'lsx' ),
264
+
265
+                         'items' => array(
266
+                              'page_about',
267
+                              'page_contact',
268
+                         ),
269
+                    ),
270
+               ),
271
+
272
+               'theme_mods'  => array(
273
+                    'lsx_header_fixed'  => true,
274
+                    'lsx_header_search' => false,
275
+                    'lsx_layout'        => '1c',
276
+               ),
277
+          ) );
278
+     }
279 279
 
280 280
 endif;
281 281
 
@@ -283,21 +283,21 @@  discard block
 block discarded – undo
283 283
 
284 284
 if ( ! function_exists( 'lsx_init' ) ) :
285 285
 
286
-	/**
287
-	 * Theme init action.
288
-	 *
289
-	 * @package    lsx
290
-	 * @subpackage config
291
-	 */
292
-	function lsx_init() {
293
-		add_post_type_support( 'page', 'excerpt' );
286
+     /**
287
+      * Theme init action.
288
+      *
289
+      * @package    lsx
290
+      * @subpackage config
291
+      */
292
+     function lsx_init() {
293
+          add_post_type_support( 'page', 'excerpt' );
294 294
 
295
-		if ( class_exists( 'WooCommerce' ) ) {
296
-			remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
297
-		}
295
+          if ( class_exists( 'WooCommerce' ) ) {
296
+               remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
297
+          }
298 298
 
299
-		remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
300
-	}
299
+          remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
300
+     }
301 301
 
302 302
 endif;
303 303
 
@@ -305,19 +305,19 @@  discard block
 block discarded – undo
305 305
 
306 306
 if ( ! function_exists( 'lsx_process_content_width' ) ) :
307 307
 
308
-	/**
309
-	 * Overwrite the $content_width var, based on the layout of the page.
310
-	 *
311
-	 * @package    lsx
312
-	 * @subpackage config
313
-	 */
314
-	function lsx_process_content_width() {
315
-		global $content_width;
308
+     /**
309
+      * Overwrite the $content_width var, based on the layout of the page.
310
+      *
311
+      * @package    lsx
312
+      * @subpackage config
313
+      */
314
+     function lsx_process_content_width() {
315
+          global $content_width;
316 316
 
317
-		if ( is_page_template( 'page-templates/template-front-page.php' ) ) {
318
-			$content_width = 1140;
319
-		}
320
-	}
317
+          if ( is_page_template( 'page-templates/template-front-page.php' ) ) {
318
+               $content_width = 1140;
319
+          }
320
+     }
321 321
 
322 322
 endif;
323 323
 
@@ -325,31 +325,31 @@  discard block
 block discarded – undo
325 325
 
326 326
 if ( ! function_exists( 'lsx_file_get_contents' ) ) :
327 327
 
328
-	/**
329
-	 * Get file contents.
330
-	 *
331
-	 * @package    lsx
332
-	 * @subpackage config
333
-	 */
334
-	function lsx_file_get_contents( $file ) {
335
-		if ( file_exists( $file ) ) {
336
-			global $wp_filesystem;
337
-
338
-			if ( empty( $wp_filesystem ) ) {
339
-				require_once ABSPATH . 'wp-admin/includes/file.php';
340
-				WP_Filesystem();
341
-			}
342
-
343
-			if ( $wp_filesystem ) {
344
-				$contents = $wp_filesystem->get_contents( $file );
345
-
346
-				if ( ! empty( $contents ) ) {
347
-					return $contents;
348
-				}
349
-			}
350
-		}
351
-
352
-		return '';
353
-	}
328
+     /**
329
+      * Get file contents.
330
+      *
331
+      * @package    lsx
332
+      * @subpackage config
333
+      */
334
+     function lsx_file_get_contents( $file ) {
335
+          if ( file_exists( $file ) ) {
336
+               global $wp_filesystem;
337
+
338
+               if ( empty( $wp_filesystem ) ) {
339
+                    require_once ABSPATH . 'wp-admin/includes/file.php';
340
+                    WP_Filesystem();
341
+               }
342
+
343
+               if ( $wp_filesystem ) {
344
+                    $contents = $wp_filesystem->get_contents( $file );
345
+
346
+                    if ( ! empty( $contents ) ) {
347
+                         return $contents;
348
+                    }
349
+               }
350
+          }
351
+
352
+          return '';
353
+     }
354 354
 
355 355
 endif;
Please login to merge, or discard this patch.
functions.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,33 +8,33 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) {
11
-	exit;
11
+     exit;
12 12
 }
13 13
 
14 14
 define( 'LSX_VERSION', '2.9.4' );
15 15
 
16 16
 if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || in_array( 'wordpress-seo-premium/wp-seo-premium.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
17
-	require get_template_directory() . '/includes/yoast/class-lsx-yoast.php';
17
+     require get_template_directory() . '/includes/yoast/class-lsx-yoast.php';
18 18
 }
19 19
 
20 20
 if ( class_exists( 'WooCommerce' ) ) {
21
-	require get_template_directory() . '/includes/woocommerce/woocommerce.php';
21
+     require get_template_directory() . '/includes/woocommerce/woocommerce.php';
22 22
 }
23 23
 
24 24
 if ( class_exists( 'Tribe__Events__Main' ) ) {
25
-	require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php';
25
+     require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php';
26 26
 }
27 27
 
28 28
 if ( class_exists( 'Sensei_Main' ) || class_exists( 'Sensei_WC' ) ) {
29
-	require get_template_directory() . '/includes/sensei/class-lsx-sensei.php';
29
+     require get_template_directory() . '/includes/sensei/class-lsx-sensei.php';
30 30
 }
31 31
 
32 32
 if ( class_exists( 'Popup_Maker' ) ) {
33
-	require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php';
33
+     require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php';
34 34
 }
35 35
 
36 36
 if ( class_exists( 'bbPress' ) ) {
37
-	require get_template_directory() . '/includes/bbpress/bbpress.php';
37
+     require get_template_directory() . '/includes/bbpress/bbpress.php';
38 38
 }
39 39
 
40 40
 require get_template_directory() . '/includes/config.php';
Please login to merge, or discard this patch.