Completed
Push — master ( 64626f...80e66d )
by Virginia
03:32
created
includes/config.php 1 patch
Spacing   +68 added lines, -68 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,59 +22,59 @@  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
-		register_nav_menus( array(
34
-			'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
35
-			'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
36
-			'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
37
-			'social'        => esc_html__( 'Social Menu', 'lsx' ),
38
-			'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
39
-		) );
33
+		register_nav_menus(array(
34
+			'primary'       => esc_html__('Primary Menu', 'lsx'),
35
+			'top-menu'      => esc_html__('Top Menu (right)', 'lsx'),
36
+			'top-menu-left' => esc_html__('Top Menu (left)', 'lsx'),
37
+			'social'        => esc_html__('Social Menu', 'lsx'),
38
+			'footer'        => esc_html__('Footer Menu', 'lsx'),
39
+		));
40 40
 
41
-		add_theme_support( 'automatic-feed-links' );
42
-		add_theme_support( 'custom-background' );
41
+		add_theme_support('automatic-feed-links');
42
+		add_theme_support('custom-background');
43 43
 
44
-		add_theme_support( 'custom-logo', array(
44
+		add_theme_support('custom-logo', array(
45 45
 			'height'      => 50,
46 46
 			'width'       => 160,
47 47
 			'flex-width'  => true,
48 48
 			'flex-height' => true,
49
-		) );
49
+		));
50 50
 
51
-		add_theme_support( 'html5', array( 'caption' ) );
51
+		add_theme_support('html5', array('caption'));
52 52
 
53
-		add_theme_support( 'post-formats', array(
53
+		add_theme_support('post-formats', array(
54 54
 			'image',
55 55
 			'video',
56 56
 			'gallery',
57 57
 			'audio',
58 58
 			'quote',
59
-		) );
59
+		));
60 60
 
61
-		add_theme_support( 'post-thumbnails' );
62
-		add_theme_support( 'sensei' );
61
+		add_theme_support('post-thumbnails');
62
+		add_theme_support('sensei');
63 63
 
64
-		add_theme_support( 'site-logo', array(
64
+		add_theme_support('site-logo', array(
65 65
 			'header-text' => array(
66 66
 				'site-title',
67 67
 				'site-description',
68 68
 			),
69 69
 			'size'        => 'medium',
70
-		) );
70
+		));
71 71
 
72
-		add_theme_support( 'title-tag' );
72
+		add_theme_support('title-tag');
73 73
 
74 74
 		/* @TODO - Necessary to test it */
75 75
 		// add_theme_support( 'woocommerce' );
76 76
 
77
-		add_theme_support( 'starter-content', array(
77
+		add_theme_support('starter-content', array(
78 78
 			'widgets' => array(
79 79
 				'sidebar-home' => array(
80 80
 					'custom_widget_1' => array(
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 						array(
84 84
 							'title' => '',
85
-							'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>' ),
85
+							'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>'),
86 86
 						),
87 87
 					),
88 88
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 						array(
93 93
 							'title' => '',
94
-							'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>' ),
94
+							'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>'),
95 95
 						),
96 96
 					),
97 97
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 						array(
102 102
 							'title' => '',
103
-							'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>' ),
103
+							'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>'),
104 104
 						),
105 105
 					),
106 106
 				),
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 						'text',
111 111
 
112 112
 						array(
113
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
114
-							'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' ),
113
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
114
+							'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'),
115 115
 						),
116 116
 					),
117 117
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 						'text',
120 120
 
121 121
 						array(
122
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
123
-							'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' ),
122
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
123
+							'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'),
124 124
 						),
125 125
 					),
126 126
 
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 						'text',
129 129
 
130 130
 						array(
131
-							'title' => esc_html__( 'Contact us:', 'lsx' ),
132
-							'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' ),
131
+							'title' => esc_html__('Contact us:', 'lsx'),
132
+							'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'),
133 133
 						),
134 134
 					),
135 135
 				),
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 						'text',
140 140
 
141 141
 						array(
142
-							'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
143
-							'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' ),
142
+							'title' => esc_html__('A Footer Call to Action', 'lsx'),
143
+							'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'),
144 144
 						),
145 145
 					),
146 146
 				),
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 				'home' => array(
151 151
 					'template' => 'page-templates/template-front-page.php',
152 152
 					'thumbnail' => '{{image-banner-example-01}}',
153
-					'post_title' => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
153
+					'post_title' => esc_html__('LSX is a free WordPress theme', 'lsx'),
154 154
 					'post_content' => '',
155 155
 				),
156 156
 
@@ -167,17 +167,17 @@  discard block
 block discarded – undo
167 167
 
168 168
 			'attachments' => array(
169 169
 				'image-banner-example-01' => array(
170
-					'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
170
+					'post_title' => esc_html_x('Banner Example 01', 'Theme starter content', 'lsx'),
171 171
 					'file' => 'assets/images/admin/banner-example-01.jpg',
172 172
 				),
173 173
 
174 174
 				'image-banner-example-02' => array(
175
-					'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
175
+					'post_title' => esc_html_x('Banner Example 02', 'Theme starter content', 'lsx'),
176 176
 					'file' => 'assets/images/admin/banner-example-02.jpg',
177 177
 				),
178 178
 
179 179
 				'image-banner-example-03' => array(
180
-					'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
180
+					'post_title' => esc_html_x('Banner Example 03', 'Theme starter content', 'lsx'),
181 181
 					'file' => 'assets/images/admin/banner-example-03.jpg',
182 182
 				),
183 183
 			),
@@ -186,12 +186,12 @@  discard block
 block discarded – undo
186 186
 				'show_on_front' => 'page',
187 187
 				'page_on_front' => '{{home}}',
188 188
 				'page_for_posts' => '{{blog}}',
189
-				'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
189
+				'blogdescription' => esc_html__('LSX starter content example', 'lsx'),
190 190
 			),
191 191
 
192 192
 			'nav_menus' => array(
193 193
 				'primary' => array(
194
-					'name' => esc_html__( 'Primary Menu', 'lsx' ),
194
+					'name' => esc_html__('Primary Menu', 'lsx'),
195 195
 
196 196
 					'items' => array(
197 197
 						'page_home',
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 				),
203 203
 
204 204
 				'top-menu' => array(
205
-					'name' => esc_html__( 'Top Menu', 'lsx' ),
205
+					'name' => esc_html__('Top Menu', 'lsx'),
206 206
 
207 207
 					'items' => array(
208 208
 						'custom_link_1' => array(
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 				),
231 231
 
232 232
 				'social' => array(
233
-					'name' => esc_html__( 'Social Menu', 'lsx' ),
233
+					'name' => esc_html__('Social Menu', 'lsx'),
234 234
 
235 235
 					'items' => array(
236 236
 						'link_facebook',
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 				),
246 246
 
247 247
 				'footer' => array(
248
-					'name' => esc_html__( 'Footer Menu', 'lsx' ),
248
+					'name' => esc_html__('Footer Menu', 'lsx'),
249 249
 
250 250
 					'items' => array(
251 251
 						'page_about',
@@ -259,14 +259,14 @@  discard block
 block discarded – undo
259 259
 				'lsx_header_search' => false,
260 260
 				'lsx_layout' => '1c',
261 261
 			),
262
-		) );
262
+		));
263 263
 	}
264 264
 
265 265
 endif;
266 266
 
267
-add_action( 'after_setup_theme', 'lsx_setup' );
267
+add_action('after_setup_theme', 'lsx_setup');
268 268
 
269
-if ( ! function_exists( 'lsx_init' ) ) :
269
+if ( ! function_exists('lsx_init')) :
270 270
 
271 271
 	/**
272 272
 	 * Theme init action.
@@ -275,20 +275,20 @@  discard block
 block discarded – undo
275 275
 	 * @subpackage config
276 276
 	 */
277 277
 	function lsx_init() {
278
-		add_post_type_support( 'page', 'excerpt' );
278
+		add_post_type_support('page', 'excerpt');
279 279
 
280
-		if ( class_exists( 'WooCommerce' ) ) {
281
-			remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
280
+		if (class_exists('WooCommerce')) {
281
+			remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20);
282 282
 		}
283 283
 
284
-		remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce',10 );
284
+		remove_action('comment_form', 'wp_comment_form_unfiltered_html_nonce', 10);
285 285
 	}
286 286
 
287 287
 endif;
288 288
 
289
-add_action( 'init', 'lsx_init', 100 );
289
+add_action('init', 'lsx_init', 100);
290 290
 
291
-if ( ! function_exists( 'lsx_process_content_width' ) ) :
291
+if ( ! function_exists('lsx_process_content_width')) :
292 292
 
293 293
 	/**
294 294
 	 * Overwrite the $content_width var, based on the layout of the page.
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
 		global $content_width;
301 301
 
302 302
 		if (
303
-			is_page_template( 'page-templates/template-front-page.php' ) ||
304
-			is_page_template( 'page-templates/template-full-width.php' )
303
+			is_page_template('page-templates/template-front-page.php') ||
304
+			is_page_template('page-templates/template-full-width.php')
305 305
 		) {
306 306
 			$content_width = 1140;
307 307
 		}
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
 
310 310
 endif;
311 311
 
312
-add_action( 'wp_head', 'lsx_process_content_width' );
312
+add_action('wp_head', 'lsx_process_content_width');
313 313
 
314
-if ( ! function_exists( 'lsx_file_get_contents' ) ) :
314
+if ( ! function_exists('lsx_file_get_contents')) :
315 315
 
316 316
 	/**
317 317
 	 * Get file contents.
@@ -319,19 +319,19 @@  discard block
 block discarded – undo
319 319
 	 * @package    lsx
320 320
 	 * @subpackage config
321 321
 	 */
322
-	function lsx_file_get_contents( $file ) {
323
-		if ( file_exists( $file ) ) {
322
+	function lsx_file_get_contents($file) {
323
+		if (file_exists($file)) {
324 324
 			global $wp_filesystem;
325 325
 
326
-			if ( empty( $wp_filesystem ) ) {
327
-				require_once( ABSPATH . 'wp-admin/includes/file.php' );
326
+			if (empty($wp_filesystem)) {
327
+				require_once(ABSPATH . 'wp-admin/includes/file.php');
328 328
 				WP_Filesystem();
329 329
 			}
330 330
 
331
-			if ( $wp_filesystem ) {
332
-				$contents = $wp_filesystem->get_contents( $file );
331
+			if ($wp_filesystem) {
332
+				$contents = $wp_filesystem->get_contents($file);
333 333
 
334
-				if ( ! empty( $contents ) ) {
334
+				if ( ! empty($contents)) {
335 335
 					return $contents;
336 336
 				}
337 337
 			}
Please login to merge, or discard this patch.