Passed
Push — master ( ef7154...2f0361 )
by Virginia
09:17 queued 04:43
created
includes/config.php 2 patches
Indentation   +311 added lines, -311 removed lines patch added patch discarded remove patch
@@ -7,273 +7,273 @@  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
-		load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
26
-
27
-		add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
28
-		add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
29
-		add_image_size( 'lsx-thumbnail-square', 350, 350, true );
30
-		add_image_size( 'lsx-thumbnail-single', 750, 350, true );
31
-		add_image_size( 'lsx-banner', 1920, 600, true );
32
-
33
-		register_nav_menus(
34
-			array(
35
-				'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
36
-				'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
37
-				'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
38
-				'social'        => esc_html__( 'Social Menu', 'lsx' ),
39
-				'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
40
-			)
41
-		);
42
-
43
-		add_theme_support( 'automatic-feed-links' );
44
-		add_theme_support( 'custom-background' );
45
-
46
-		add_theme_support(
47
-			'custom-logo',
48
-			array(
49
-				'height'      => 50,
50
-				'width'       => 160,
51
-				'flex-width'  => true,
52
-				'flex-height' => true,
53
-			)
54
-		);
55
-
56
-		add_theme_support( 'html5', array( 'caption' ) );
57
-
58
-		add_theme_support(
59
-			'post-formats',
60
-			array(
61
-				'image',
62
-				'video',
63
-				'gallery',
64
-				'audio',
65
-				'quote',
66
-			)
67
-		);
68
-
69
-		add_theme_support( 'post-thumbnails' );
70
-		add_theme_support( 'sensei' );
71
-
72
-		add_theme_support(
73
-			'site-logo',
74
-			array(
75
-				'header-text' => array(
76
-					'site-title',
77
-					'site-description',
78
-				),
79
-				'size'        => 'medium',
80
-			)
81
-		);
82
-
83
-		add_theme_support( 'title-tag' );
84
-
85
-		/*
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
+          load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
26
+
27
+          add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
28
+          add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
29
+          add_image_size( 'lsx-thumbnail-square', 350, 350, true );
30
+          add_image_size( 'lsx-thumbnail-single', 750, 350, true );
31
+          add_image_size( 'lsx-banner', 1920, 600, true );
32
+
33
+          register_nav_menus(
34
+               array(
35
+                    'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
36
+                    'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
37
+                    'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
38
+                    'social'        => esc_html__( 'Social Menu', 'lsx' ),
39
+                    'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
40
+               )
41
+          );
42
+
43
+          add_theme_support( 'automatic-feed-links' );
44
+          add_theme_support( 'custom-background' );
45
+
46
+          add_theme_support(
47
+               'custom-logo',
48
+               array(
49
+                    'height'      => 50,
50
+                    'width'       => 160,
51
+                    'flex-width'  => true,
52
+                    'flex-height' => true,
53
+               )
54
+          );
55
+
56
+          add_theme_support( 'html5', array( 'caption' ) );
57
+
58
+          add_theme_support(
59
+               'post-formats',
60
+               array(
61
+                    'image',
62
+                    'video',
63
+                    'gallery',
64
+                    'audio',
65
+                    'quote',
66
+               )
67
+          );
68
+
69
+          add_theme_support( 'post-thumbnails' );
70
+          add_theme_support( 'sensei' );
71
+
72
+          add_theme_support(
73
+               'site-logo',
74
+               array(
75
+                    'header-text' => array(
76
+                         'site-title',
77
+                         'site-description',
78
+                    ),
79
+                    'size'        => 'medium',
80
+               )
81
+          );
82
+
83
+          add_theme_support( 'title-tag' );
84
+
85
+          /*
86 86
 		 * @TODO - Necessary to test it
87 87
 		 */
88 88
 
89
-		// add_theme_support( 'woocommerce' );.
90
-		add_theme_support( 'starter-content', array(
91
-			'widgets'     => array(
92
-				'sidebar-home'       => array(
93
-					'custom_widget_1' => array(
94
-						'text',
95
-
96
-						array(
97
-							'title' => '',
98
-							'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>' ),
99
-						),
100
-					),
101
-
102
-					'custom_widget_2' => array(
103
-						'text',
104
-
105
-						array(
106
-							'title' => '',
107
-							'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>' ),
108
-						),
109
-					),
110
-
111
-					'custom_widget_3' => array(
112
-						'text',
113
-
114
-						array(
115
-							'title' => '',
116
-							'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>' ),
117
-						),
118
-					),
119
-				),
120
-
121
-				'sidebar-footer'     => array(
122
-					'custom_widget_1' => array(
123
-						'text',
124
-
125
-						array(
126
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
127
-							'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' ),
128
-						),
129
-					),
130
-
131
-					'custom_widget_2' => array(
132
-						'text',
133
-
134
-						array(
135
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
136
-							'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' ),
137
-						),
138
-					),
139
-
140
-					'custom_widget_3' => array(
141
-						'text',
142
-
143
-						array(
144
-							'title' => esc_html__( 'Contact us:', 'lsx' ),
145
-							'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' ),
146
-						),
147
-					),
148
-				),
149
-
150
-				'sidebar-footer-cta' => array(
151
-					'custom_widget_1' => array(
152
-						'text',
153
-
154
-						array(
155
-							'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
156
-							'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' ),
157
-						),
158
-					),
159
-				),
160
-			),
161
-
162
-			'posts'       => array(
163
-				'home'    => array(
164
-					'template'     => 'page-templates/template-front-page.php',
165
-					'thumbnail'    => '{{image-banner-example-01}}',
166
-					'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
167
-					'post_content' => '',
168
-				),
169
-
170
-				'about'   => array(
171
-					'thumbnail' => '{{image-banner-example-02}}',
172
-				),
173
-
174
-				'blog',
175
-
176
-				'contact' => array(
177
-					'thumbnail' => '{{image-banner-example-03}}',
178
-				),
179
-			),
180
-
181
-			'attachments' => array(
182
-				'image-banner-example-01' => array(
183
-					'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
184
-					'file'       => 'assets/images/admin/banner-example-01.jpg',
185
-				),
186
-
187
-				'image-banner-example-02' => array(
188
-					'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
189
-					'file'       => 'assets/images/admin/banner-example-02.jpg',
190
-				),
191
-
192
-				'image-banner-example-03' => array(
193
-					'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
194
-					'file'       => 'assets/images/admin/banner-example-03.jpg',
195
-				),
196
-			),
197
-
198
-			'options'     => array(
199
-				'show_on_front'   => 'page',
200
-				'page_on_front'   => '{{home}}',
201
-				'page_for_posts'  => '{{blog}}',
202
-				'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
203
-			),
204
-
205
-			'nav_menus'   => array(
206
-				'primary'  => array(
207
-					'name'  => esc_html__( 'Primary Menu', 'lsx' ),
208
-
209
-					'items' => array(
210
-						'page_home',
211
-						'page_about',
212
-						'page_blog',
213
-						'page_contact',
214
-					),
215
-				),
216
-
217
-				'top-menu' => array(
218
-					'name'  => esc_html__( 'Top Menu', 'lsx' ),
219
-
220
-					'items' => array(
221
-						'custom_link_1' => array(
222
-							'title'   => 'View Map',
223
-							'url'     => 'https://www.google.com/maps/place/LightSpeed+WordPress+Development/@-33.92945,18.45345,17z/data=!3m1!4b1!4m2!3m1!1s0x1dcc5da1b2446d25:0xc8ecdb1cc8afd170',
224
-							'classes' => 'map',
225
-						),
226
-
227
-						'custom_link_2' => array(
228
-							'title'   => '+27 21 448 9843',
229
-							'url'     => 'tel:+27214489843',
230
-							'classes' => 'tel',
231
-						),
232
-
233
-						'custom_link_3' => array(
234
-							'title'   => '[email protected]',
235
-							'url'     => 'mailto:[email protected]',
236
-							'classes' => 'email',
237
-						),
238
-
239
-						'page_contact'  => array(
240
-							'classes' => 'cta',
241
-						),
242
-					),
243
-				),
244
-
245
-				'social'   => array(
246
-					'name'  => esc_html__( 'Social Menu', 'lsx' ),
247
-
248
-					'items' => array(
249
-						'link_facebook',
250
-						'link_foursquare',
251
-						'link_github',
252
-						'link_instagram',
253
-						'link_linkedin',
254
-						'link_pinterest',
255
-						'link_twitter',
256
-						'link_youtube',
257
-					),
258
-				),
259
-
260
-				'footer'   => array(
261
-					'name'  => esc_html__( 'Footer Menu', 'lsx' ),
262
-
263
-					'items' => array(
264
-						'page_about',
265
-						'page_contact',
266
-					),
267
-				),
268
-			),
269
-
270
-			'theme_mods'  => array(
271
-				'lsx_header_fixed'  => true,
272
-				'lsx_header_search' => false,
273
-				'lsx_layout'        => '1c',
274
-			),
275
-		) );
276
-	}
89
+          // add_theme_support( 'woocommerce' );.
90
+          add_theme_support( 'starter-content', array(
91
+               'widgets'     => array(
92
+                    'sidebar-home'       => array(
93
+                         'custom_widget_1' => array(
94
+                              'text',
95
+
96
+                              array(
97
+                                   'title' => '',
98
+                                   '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>' ),
99
+                              ),
100
+                         ),
101
+
102
+                         'custom_widget_2' => array(
103
+                              'text',
104
+
105
+                              array(
106
+                                   'title' => '',
107
+                                   '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>' ),
108
+                              ),
109
+                         ),
110
+
111
+                         'custom_widget_3' => array(
112
+                              'text',
113
+
114
+                              array(
115
+                                   'title' => '',
116
+                                   '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>' ),
117
+                              ),
118
+                         ),
119
+                    ),
120
+
121
+                    'sidebar-footer'     => array(
122
+                         'custom_widget_1' => array(
123
+                              'text',
124
+
125
+                              array(
126
+                                   'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
127
+                                   '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' ),
128
+                              ),
129
+                         ),
130
+
131
+                         'custom_widget_2' => array(
132
+                              'text',
133
+
134
+                              array(
135
+                                   'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
136
+                                   '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' ),
137
+                              ),
138
+                         ),
139
+
140
+                         'custom_widget_3' => array(
141
+                              'text',
142
+
143
+                              array(
144
+                                   'title' => esc_html__( 'Contact us:', 'lsx' ),
145
+                                   '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' ),
146
+                              ),
147
+                         ),
148
+                    ),
149
+
150
+                    'sidebar-footer-cta' => array(
151
+                         'custom_widget_1' => array(
152
+                              'text',
153
+
154
+                              array(
155
+                                   'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
156
+                                   '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' ),
157
+                              ),
158
+                         ),
159
+                    ),
160
+               ),
161
+
162
+               'posts'       => array(
163
+                    'home'    => array(
164
+                         'template'     => 'page-templates/template-front-page.php',
165
+                         'thumbnail'    => '{{image-banner-example-01}}',
166
+                         'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
167
+                         'post_content' => '',
168
+                    ),
169
+
170
+                    'about'   => array(
171
+                         'thumbnail' => '{{image-banner-example-02}}',
172
+                    ),
173
+
174
+                    'blog',
175
+
176
+                    'contact' => array(
177
+                         'thumbnail' => '{{image-banner-example-03}}',
178
+                    ),
179
+               ),
180
+
181
+               'attachments' => array(
182
+                    'image-banner-example-01' => array(
183
+                         'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
184
+                         'file'       => 'assets/images/admin/banner-example-01.jpg',
185
+                    ),
186
+
187
+                    'image-banner-example-02' => array(
188
+                         'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
189
+                         'file'       => 'assets/images/admin/banner-example-02.jpg',
190
+                    ),
191
+
192
+                    'image-banner-example-03' => array(
193
+                         'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
194
+                         'file'       => 'assets/images/admin/banner-example-03.jpg',
195
+                    ),
196
+               ),
197
+
198
+               'options'     => array(
199
+                    'show_on_front'   => 'page',
200
+                    'page_on_front'   => '{{home}}',
201
+                    'page_for_posts'  => '{{blog}}',
202
+                    'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
203
+               ),
204
+
205
+               'nav_menus'   => array(
206
+                    'primary'  => array(
207
+                         'name'  => esc_html__( 'Primary Menu', 'lsx' ),
208
+
209
+                         'items' => array(
210
+                              'page_home',
211
+                              'page_about',
212
+                              'page_blog',
213
+                              'page_contact',
214
+                         ),
215
+                    ),
216
+
217
+                    'top-menu' => array(
218
+                         'name'  => esc_html__( 'Top Menu', 'lsx' ),
219
+
220
+                         'items' => array(
221
+                              'custom_link_1' => array(
222
+                                   'title'   => 'View Map',
223
+                                   'url'     => 'https://www.google.com/maps/place/LightSpeed+WordPress+Development/@-33.92945,18.45345,17z/data=!3m1!4b1!4m2!3m1!1s0x1dcc5da1b2446d25:0xc8ecdb1cc8afd170',
224
+                                   'classes' => 'map',
225
+                              ),
226
+
227
+                              'custom_link_2' => array(
228
+                                   'title'   => '+27 21 448 9843',
229
+                                   'url'     => 'tel:+27214489843',
230
+                                   'classes' => 'tel',
231
+                              ),
232
+
233
+                              'custom_link_3' => array(
234
+                                   'title'   => '[email protected]',
235
+                                   'url'     => 'mailto:[email protected]',
236
+                                   'classes' => 'email',
237
+                              ),
238
+
239
+                              'page_contact'  => array(
240
+                                   'classes' => 'cta',
241
+                              ),
242
+                         ),
243
+                    ),
244
+
245
+                    'social'   => array(
246
+                         'name'  => esc_html__( 'Social Menu', 'lsx' ),
247
+
248
+                         'items' => array(
249
+                              'link_facebook',
250
+                              'link_foursquare',
251
+                              'link_github',
252
+                              'link_instagram',
253
+                              'link_linkedin',
254
+                              'link_pinterest',
255
+                              'link_twitter',
256
+                              'link_youtube',
257
+                         ),
258
+                    ),
259
+
260
+                    'footer'   => array(
261
+                         'name'  => esc_html__( 'Footer Menu', 'lsx' ),
262
+
263
+                         'items' => array(
264
+                              'page_about',
265
+                              'page_contact',
266
+                         ),
267
+                    ),
268
+               ),
269
+
270
+               'theme_mods'  => array(
271
+                    'lsx_header_fixed'  => true,
272
+                    'lsx_header_search' => false,
273
+                    'lsx_layout'        => '1c',
274
+               ),
275
+          ) );
276
+     }
277 277
 
278 278
 endif;
279 279
 
@@ -281,21 +281,21 @@  discard block
 block discarded – undo
281 281
 
282 282
 if ( ! function_exists( 'lsx_init' ) ) :
283 283
 
284
-	/**
285
-	 * Theme init action.
286
-	 *
287
-	 * @package    lsx
288
-	 * @subpackage config
289
-	 */
290
-	function lsx_init() {
291
-		add_post_type_support( 'page', 'excerpt' );
284
+     /**
285
+      * Theme init action.
286
+      *
287
+      * @package    lsx
288
+      * @subpackage config
289
+      */
290
+     function lsx_init() {
291
+          add_post_type_support( 'page', 'excerpt' );
292 292
 
293
-		if ( class_exists( 'WooCommerce' ) ) {
294
-			remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
295
-		}
293
+          if ( class_exists( 'WooCommerce' ) ) {
294
+               remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
295
+          }
296 296
 
297
-		remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
298
-	}
297
+          remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
298
+     }
299 299
 
300 300
 endif;
301 301
 
@@ -303,19 +303,19 @@  discard block
 block discarded – undo
303 303
 
304 304
 if ( ! function_exists( 'lsx_process_content_width' ) ) :
305 305
 
306
-	/**
307
-	 * Overwrite the $content_width var, based on the layout of the page.
308
-	 *
309
-	 * @package    lsx
310
-	 * @subpackage config
311
-	 */
312
-	function lsx_process_content_width() {
313
-		global $content_width;
306
+     /**
307
+      * Overwrite the $content_width var, based on the layout of the page.
308
+      *
309
+      * @package    lsx
310
+      * @subpackage config
311
+      */
312
+     function lsx_process_content_width() {
313
+          global $content_width;
314 314
 
315
-		if ( is_page_template( 'page-templates/template-front-page.php' ) ) {
316
-			$content_width = 1140;
317
-		}
318
-	}
315
+          if ( is_page_template( 'page-templates/template-front-page.php' ) ) {
316
+               $content_width = 1140;
317
+          }
318
+     }
319 319
 
320 320
 endif;
321 321
 
@@ -323,31 +323,31 @@  discard block
 block discarded – undo
323 323
 
324 324
 if ( ! function_exists( 'lsx_file_get_contents' ) ) :
325 325
 
326
-	/**
327
-	 * Get file contents.
328
-	 *
329
-	 * @package    lsx
330
-	 * @subpackage config
331
-	 */
332
-	function lsx_file_get_contents( $file ) {
333
-		if ( file_exists( $file ) ) {
334
-			global $wp_filesystem;
335
-
336
-			if ( empty( $wp_filesystem ) ) {
337
-				require_once ABSPATH . 'wp-admin/includes/file.php';
338
-				WP_Filesystem();
339
-			}
340
-
341
-			if ( $wp_filesystem ) {
342
-				$contents = $wp_filesystem->get_contents( $file );
343
-
344
-				if ( ! empty( $contents ) ) {
345
-					return $contents;
346
-				}
347
-			}
348
-		}
349
-
350
-		return '';
351
-	}
326
+     /**
327
+      * Get file contents.
328
+      *
329
+      * @package    lsx
330
+      * @subpackage config
331
+      */
332
+     function lsx_file_get_contents( $file ) {
333
+          if ( file_exists( $file ) ) {
334
+               global $wp_filesystem;
335
+
336
+               if ( empty( $wp_filesystem ) ) {
337
+                    require_once ABSPATH . 'wp-admin/includes/file.php';
338
+                    WP_Filesystem();
339
+               }
340
+
341
+               if ( $wp_filesystem ) {
342
+                    $contents = $wp_filesystem->get_contents( $file );
343
+
344
+                    if ( ! empty( $contents ) ) {
345
+                         return $contents;
346
+                    }
347
+               }
348
+          }
349
+
350
+          return '';
351
+     }
352 352
 
353 353
 endif;
Please login to merge, or discard this patch.
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage config
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_setup' ) ) :
13
+if ( ! function_exists('lsx_setup')) :
14 14
 
15 15
 	/**
16 16
 	 * Theme after_setup_theme action.
@@ -22,26 +22,26 @@  discard block
 block discarded – undo
22 22
 		global $content_width;
23 23
 		$content_width = 1140;
24 24
 
25
-		load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
25
+		load_theme_textdomain('lsx', get_template_directory() . '/languages');
26 26
 
27
-		add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
28
-		add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
29
-		add_image_size( 'lsx-thumbnail-square', 350, 350, true );
30
-		add_image_size( 'lsx-thumbnail-single', 750, 350, true );
31
-		add_image_size( 'lsx-banner', 1920, 600, true );
27
+		add_image_size('lsx-thumbnail-carousel', 350, 230, true);
28
+		add_image_size('lsx-thumbnail-wide', 360, 168, true);
29
+		add_image_size('lsx-thumbnail-square', 350, 350, true);
30
+		add_image_size('lsx-thumbnail-single', 750, 350, true);
31
+		add_image_size('lsx-banner', 1920, 600, true);
32 32
 
33 33
 		register_nav_menus(
34 34
 			array(
35
-				'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
36
-				'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
37
-				'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
38
-				'social'        => esc_html__( 'Social Menu', 'lsx' ),
39
-				'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
35
+				'primary'       => esc_html__('Primary Menu', 'lsx'),
36
+				'top-menu'      => esc_html__('Top Menu (right)', 'lsx'),
37
+				'top-menu-left' => esc_html__('Top Menu (left)', 'lsx'),
38
+				'social'        => esc_html__('Social Menu', 'lsx'),
39
+				'footer'        => esc_html__('Footer Menu', 'lsx'),
40 40
 			)
41 41
 		);
42 42
 
43
-		add_theme_support( 'automatic-feed-links' );
44
-		add_theme_support( 'custom-background' );
43
+		add_theme_support('automatic-feed-links');
44
+		add_theme_support('custom-background');
45 45
 
46 46
 		add_theme_support(
47 47
 			'custom-logo',
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 			)
54 54
 		);
55 55
 
56
-		add_theme_support( 'html5', array( 'caption' ) );
56
+		add_theme_support('html5', array('caption'));
57 57
 
58 58
 		add_theme_support(
59 59
 			'post-formats',
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 			)
67 67
 		);
68 68
 
69
-		add_theme_support( 'post-thumbnails' );
70
-		add_theme_support( 'sensei' );
69
+		add_theme_support('post-thumbnails');
70
+		add_theme_support('sensei');
71 71
 
72 72
 		add_theme_support(
73 73
 			'site-logo',
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 			)
81 81
 		);
82 82
 
83
-		add_theme_support( 'title-tag' );
83
+		add_theme_support('title-tag');
84 84
 
85 85
 		/*
86 86
 		 * @TODO - Necessary to test it
87 87
 		 */
88 88
 
89 89
 		// add_theme_support( 'woocommerce' );.
90
-		add_theme_support( 'starter-content', array(
90
+		add_theme_support('starter-content', array(
91 91
 			'widgets'     => array(
92 92
 				'sidebar-home'       => array(
93 93
 					'custom_widget_1' => array(
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 						array(
97 97
 							'title' => '',
98
-							'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>' ),
98
+							'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>'),
99 99
 						),
100 100
 					),
101 101
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 						array(
106 106
 							'title' => '',
107
-							'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>' ),
107
+							'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>'),
108 108
 						),
109 109
 					),
110 110
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 						array(
115 115
 							'title' => '',
116
-							'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>' ),
116
+							'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>'),
117 117
 						),
118 118
 					),
119 119
 				),
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 						'text',
124 124
 
125 125
 						array(
126
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
127
-							'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' ),
126
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
127
+							'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'),
128 128
 						),
129 129
 					),
130 130
 
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 						'text',
133 133
 
134 134
 						array(
135
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
136
-							'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' ),
135
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
136
+							'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'),
137 137
 						),
138 138
 					),
139 139
 
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
 						'text',
142 142
 
143 143
 						array(
144
-							'title' => esc_html__( 'Contact us:', 'lsx' ),
145
-							'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' ),
144
+							'title' => esc_html__('Contact us:', 'lsx'),
145
+							'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'),
146 146
 						),
147 147
 					),
148 148
 				),
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 						'text',
153 153
 
154 154
 						array(
155
-							'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
156
-							'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' ),
155
+							'title' => esc_html__('A Footer Call to Action', 'lsx'),
156
+							'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'),
157 157
 						),
158 158
 					),
159 159
 				),
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 				'home'    => array(
164 164
 					'template'     => 'page-templates/template-front-page.php',
165 165
 					'thumbnail'    => '{{image-banner-example-01}}',
166
-					'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
166
+					'post_title'   => esc_html__('LSX is a free WordPress theme', 'lsx'),
167 167
 					'post_content' => '',
168 168
 				),
169 169
 
@@ -180,17 +180,17 @@  discard block
 block discarded – undo
180 180
 
181 181
 			'attachments' => array(
182 182
 				'image-banner-example-01' => array(
183
-					'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
183
+					'post_title' => esc_html_x('Banner Example 01', 'Theme starter content', 'lsx'),
184 184
 					'file'       => 'assets/images/admin/banner-example-01.jpg',
185 185
 				),
186 186
 
187 187
 				'image-banner-example-02' => array(
188
-					'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
188
+					'post_title' => esc_html_x('Banner Example 02', 'Theme starter content', 'lsx'),
189 189
 					'file'       => 'assets/images/admin/banner-example-02.jpg',
190 190
 				),
191 191
 
192 192
 				'image-banner-example-03' => array(
193
-					'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
193
+					'post_title' => esc_html_x('Banner Example 03', 'Theme starter content', 'lsx'),
194 194
 					'file'       => 'assets/images/admin/banner-example-03.jpg',
195 195
 				),
196 196
 			),
@@ -199,12 +199,12 @@  discard block
 block discarded – undo
199 199
 				'show_on_front'   => 'page',
200 200
 				'page_on_front'   => '{{home}}',
201 201
 				'page_for_posts'  => '{{blog}}',
202
-				'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
202
+				'blogdescription' => esc_html__('LSX starter content example', 'lsx'),
203 203
 			),
204 204
 
205 205
 			'nav_menus'   => array(
206 206
 				'primary'  => array(
207
-					'name'  => esc_html__( 'Primary Menu', 'lsx' ),
207
+					'name'  => esc_html__('Primary Menu', 'lsx'),
208 208
 
209 209
 					'items' => array(
210 210
 						'page_home',
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 				),
216 216
 
217 217
 				'top-menu' => array(
218
-					'name'  => esc_html__( 'Top Menu', 'lsx' ),
218
+					'name'  => esc_html__('Top Menu', 'lsx'),
219 219
 
220 220
 					'items' => array(
221 221
 						'custom_link_1' => array(
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 				),
244 244
 
245 245
 				'social'   => array(
246
-					'name'  => esc_html__( 'Social Menu', 'lsx' ),
246
+					'name'  => esc_html__('Social Menu', 'lsx'),
247 247
 
248 248
 					'items' => array(
249 249
 						'link_facebook',
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 				),
259 259
 
260 260
 				'footer'   => array(
261
-					'name'  => esc_html__( 'Footer Menu', 'lsx' ),
261
+					'name'  => esc_html__('Footer Menu', 'lsx'),
262 262
 
263 263
 					'items' => array(
264 264
 						'page_about',
@@ -272,14 +272,14 @@  discard block
 block discarded – undo
272 272
 				'lsx_header_search' => false,
273 273
 				'lsx_layout'        => '1c',
274 274
 			),
275
-		) );
275
+		));
276 276
 	}
277 277
 
278 278
 endif;
279 279
 
280
-add_action( 'after_setup_theme', 'lsx_setup' );
280
+add_action('after_setup_theme', 'lsx_setup');
281 281
 
282
-if ( ! function_exists( 'lsx_init' ) ) :
282
+if ( ! function_exists('lsx_init')) :
283 283
 
284 284
 	/**
285 285
 	 * Theme init action.
@@ -288,20 +288,20 @@  discard block
 block discarded – undo
288 288
 	 * @subpackage config
289 289
 	 */
290 290
 	function lsx_init() {
291
-		add_post_type_support( 'page', 'excerpt' );
291
+		add_post_type_support('page', 'excerpt');
292 292
 
293
-		if ( class_exists( 'WooCommerce' ) ) {
294
-			remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
293
+		if (class_exists('WooCommerce')) {
294
+			remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20);
295 295
 		}
296 296
 
297
-		remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
297
+		remove_action('comment_form', 'wp_comment_form_unfiltered_html_nonce', 10);
298 298
 	}
299 299
 
300 300
 endif;
301 301
 
302
-add_action( 'init', 'lsx_init', 100 );
302
+add_action('init', 'lsx_init', 100);
303 303
 
304
-if ( ! function_exists( 'lsx_process_content_width' ) ) :
304
+if ( ! function_exists('lsx_process_content_width')) :
305 305
 
306 306
 	/**
307 307
 	 * Overwrite the $content_width var, based on the layout of the page.
@@ -312,16 +312,16 @@  discard block
 block discarded – undo
312 312
 	function lsx_process_content_width() {
313 313
 		global $content_width;
314 314
 
315
-		if ( is_page_template( 'page-templates/template-front-page.php' ) ) {
315
+		if (is_page_template('page-templates/template-front-page.php')) {
316 316
 			$content_width = 1140;
317 317
 		}
318 318
 	}
319 319
 
320 320
 endif;
321 321
 
322
-add_action( 'wp_head', 'lsx_process_content_width' );
322
+add_action('wp_head', 'lsx_process_content_width');
323 323
 
324
-if ( ! function_exists( 'lsx_file_get_contents' ) ) :
324
+if ( ! function_exists('lsx_file_get_contents')) :
325 325
 
326 326
 	/**
327 327
 	 * Get file contents.
@@ -329,19 +329,19 @@  discard block
 block discarded – undo
329 329
 	 * @package    lsx
330 330
 	 * @subpackage config
331 331
 	 */
332
-	function lsx_file_get_contents( $file ) {
333
-		if ( file_exists( $file ) ) {
332
+	function lsx_file_get_contents($file) {
333
+		if (file_exists($file)) {
334 334
 			global $wp_filesystem;
335 335
 
336
-			if ( empty( $wp_filesystem ) ) {
336
+			if (empty($wp_filesystem)) {
337 337
 				require_once ABSPATH . 'wp-admin/includes/file.php';
338 338
 				WP_Filesystem();
339 339
 			}
340 340
 
341
-			if ( $wp_filesystem ) {
342
-				$contents = $wp_filesystem->get_contents( $file );
341
+			if ($wp_filesystem) {
342
+				$contents = $wp_filesystem->get_contents($file);
343 343
 
344
-				if ( ! empty( $contents ) ) {
344
+				if ( ! empty($contents)) {
345 345
 					return $contents;
346 346
 				}
347 347
 			}
Please login to merge, or discard this patch.