Completed
Push — master ( f96565...5f0c73 )
by Warwick
03:00
created
functions.php 2 patches
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  * @package lsx
6 6
  */
7
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
7
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
8 8
 
9 9
 define('LSX_VERSION', '1.8.6');
10 10
 
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
 require get_template_directory() . '/inc/comment-walker.php';
20 20
 require get_template_directory() . '/inc/jetpack.php';
21 21
 require get_template_directory() . '/inc/lazyload.php';
22
-if(class_exists('BuddyPress')){
22
+if (class_exists('BuddyPress')) {
23 23
 	require get_template_directory() . '/inc/buddypress.php';
24 24
 }
25
-if(class_exists('WooCommerce')){
25
+if (class_exists('WooCommerce')) {
26 26
 	require get_template_directory() . '/inc/woocommerce.php';
27 27
 }
28
-if(class_exists('WP_Job_Manager')){
28
+if (class_exists('WP_Job_Manager')) {
29 29
 	require get_template_directory() . '/inc/wp-job-manager.php';
30 30
 }
31
-if(class_exists('Tribe__Events__Main')){
31
+if (class_exists('Tribe__Events__Main')) {
32 32
 	require get_template_directory() . '/inc/the-events-calendar.php';
33 33
 }
34 34
 require get_template_directory() . '/inc/template-tags.php';
35 35
 require get_template_directory() . '/inc/extras.php';
36 36
 require get_template_directory() . '/inc/wp-bootstrap-navwalker.php';
37
-if(class_exists('Sensei_WC')){
37
+if (class_exists('Sensei_WC')) {
38 38
 	require get_template_directory() . '/inc/sensei.php';
39 39
 }
40 40
 require get_template_directory() . '/inc/welcome.php';
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
  * @category	customizer
48 48
  * @return		$lsx_controls array()
49 49
  */
50
-function lsx_customizer_core_controls( $lsx_controls ) {
50
+function lsx_customizer_core_controls($lsx_controls) {
51 51
 	$lsx_controls['sections']['lsx-core'] = array(
52
-		'title'       =>  esc_html__( 'Core Settings', 'lsx' ),
53
-		'description' => esc_html__( 'Change the core settings.', 'lsx' ),
52
+		'title'       =>  esc_html__('Core Settings', 'lsx'),
53
+		'description' => esc_html__('Change the core settings.', 'lsx'),
54 54
 		'priority'    => 21
55 55
 	);
56 56
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	);
62 62
 
63 63
 	$lsx_controls['fields']['lsx_lazyload_status'] = array(
64
-		'label'         =>  esc_html__( 'Lazy Loading Images', 'lsx' ),
64
+		'label'         =>  esc_html__('Lazy Loading Images', 'lsx'),
65 65
 		'section'       =>  'lsx-core',
66 66
 		'type'          =>  'checkbox',
67 67
 	);
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
 	);
74 74
 
75 75
 	$lsx_controls['fields']['lsx_preloader_content_status'] = array(
76
-		'label'         =>  esc_html__( 'Preloader Content', 'lsx' ),
76
+		'label'         =>  esc_html__('Preloader Content', 'lsx'),
77 77
 		'section'       =>  'lsx-core',
78 78
 		'type'          =>  'checkbox',
79 79
 	);
80 80
 
81 81
 	return $lsx_controls;
82 82
 }
83
-add_filter( 'lsx_customizer_controls', 'lsx_customizer_core_controls' );
83
+add_filter('lsx_customizer_controls', 'lsx_customizer_core_controls');
84 84
 
85 85
 /**
86 86
  * Returns an array of the layout panel.
@@ -91,56 +91,56 @@  discard block
 block discarded – undo
91 91
  * @return		$lsx_controls array()
92 92
  */
93 93
 function lsx_customizer_layout_controls($lsx_controls) {
94
-	$lsx_controls['settings']['lsx_header_layout']  = array(
94
+	$lsx_controls['settings']['lsx_header_layout'] = array(
95 95
 			'default'       =>  'inline', //Default setting/value to save
96 96
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
97 97
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
98 98
 	);
99 99
 	$lsx_controls['fields']['lsx_header_layout'] = array(
100
-			'label'         =>  esc_html__('Header','lsx'),
100
+			'label'         =>  esc_html__('Header', 'lsx'),
101 101
 			'section'       =>  'lsx-layout',
102 102
 			'control'   =>  'LSX_Customize_Header_Layout_Control',
103
-			'choices'		=>	array('central','expanded','inline')
103
+			'choices'		=>	array('central', 'expanded', 'inline')
104 104
 	);	
105 105
 	$lsx_controls['sections']['lsx-layout'] = array(
106
-			'title'       =>  esc_html__( 'Layout', 'lsx' ),
107
-			'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' ),
106
+			'title'       =>  esc_html__('Layout', 'lsx'),
107
+			'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'),
108 108
 			'priority' => 22
109 109
 	);
110
-	$lsx_controls['settings']['lsx_layout']  = array(
110
+	$lsx_controls['settings']['lsx_layout'] = array(
111 111
 			'default'       =>  '2cr', //Default setting/value to save
112 112
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
113 113
 			'transport'     =>  'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
114 114
 	);
115
-	$lsx_controls['settings']['lsx_header_fixed']  = array(
115
+	$lsx_controls['settings']['lsx_header_fixed'] = array(
116 116
 			'default'       =>  false, //Default setting/value to save
117 117
 			'sanitize_callback' => 'lsx_sanitize_checkbox',
118 118
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
119 119
 	);
120 120
 	$lsx_controls['fields']['lsx_header_fixed'] = array(
121
-			'label'         =>  esc_html__('Fixed Header','lsx'),
121
+			'label'         =>  esc_html__('Fixed Header', 'lsx'),
122 122
 			'section'       =>  'lsx-layout',
123 123
 			'type'       =>  'checkbox',
124 124
 	);
125
-	$lsx_controls['settings']['lsx_header_search']  = array(
125
+	$lsx_controls['settings']['lsx_header_search'] = array(
126 126
 			'default'       =>  false, //Default setting/value to save
127 127
 			'sanitize_callback' => 'lsx_sanitize_checkbox',
128 128
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
129 129
 	);
130 130
 	$lsx_controls['fields']['lsx_header_search'] = array(
131
-			'label'         =>  esc_html__('Search Box in Header','lsx'),
131
+			'label'         =>  esc_html__('Search Box in Header', 'lsx'),
132 132
 			'section'       =>  'lsx-layout',
133 133
 			'type'       =>  'checkbox',
134 134
 	);	
135 135
 	$lsx_controls['fields']['lsx_layout'] = array(
136
-			'label'         =>  esc_html__('Body','lsx'),
136
+			'label'         =>  esc_html__('Body', 'lsx'),
137 137
 			'section'       =>  'lsx-layout',
138 138
 			'control'   =>  'LSX_Customize_Layout_Control',
139
-			'choices'		=>	array('1c','2cr','2cl')
139
+			'choices'		=>	array('1c', '2cr', '2cl')
140 140
 	);	
141 141
 	return $lsx_controls;
142 142
 }
143
-add_filter('lsx_customizer_controls','lsx_customizer_layout_controls');
143
+add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls');
144 144
 
145 145
 /**
146 146
  * Returns an array of the font controls.
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
  */
153 153
 function lsx_customizer_font_controls($lsx_controls) {
154 154
 	$lsx_controls['sections']['lsx-font'] = array(
155
-			'title'       =>  esc_html__( 'Font', 'lsx' ),
155
+			'title'       =>  esc_html__('Font', 'lsx'),
156 156
 			'description' => 'Change the fonts sitewide.',
157 157
 			'priority' => 41
158 158
 	);
159
-	$lsx_controls['settings']['lsx_font']  = array(
159
+	$lsx_controls['settings']['lsx_font'] = array(
160 160
 			'default'       =>  'raleway_open_sans', //Default setting/value to save
161 161
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
162 162
 			'transport'     =>  'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
 			'choices'   =>  array(
171 171
 					'raleway_open_sans' => array(
172 172
 							'header'  => array(
173
-									"title" => esc_html__( 'Raleway', 'lsx' ),
173
+									"title" => esc_html__('Raleway', 'lsx'),
174 174
 									"location" => "Raleway",
175 175
 									"cssDeclaration" => "'Raleway', sans-serif",
176 176
 									"cssClass" => "raleway",
177 177
 							),
178 178
 							'body'  => array(
179
-									"title" => esc_html__( 'Open Sans', 'lsx' ),
179
+									"title" => esc_html__('Open Sans', 'lsx'),
180 180
 									"location" => "Open+Sans",
181 181
 									"cssDeclaration" => "'Open Sans', sans-serif",
182 182
 									"cssClass" => "openSans"
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
 					),
185 185
 					'noto_serif_noto_sans' => array(
186 186
 							'header'  => array(
187
-									"title" => esc_html__( 'Noto Serif', 'lsx' ),
187
+									"title" => esc_html__('Noto Serif', 'lsx'),
188 188
 									"location" => "Noto+Serif",
189 189
 									"cssDeclaration" => "'Noto Serif', serif",
190 190
 									"cssClass" => "notoSerif",
191 191
 							),
192 192
 							'body'  => array(
193
-									"title" => esc_html__( 'Noto Sans', 'lsx' ),
193
+									"title" => esc_html__('Noto Sans', 'lsx'),
194 194
 									"location" => "Noto+Sans",
195 195
 									"cssDeclaration" => "'Noto Sans', sans-serif",
196 196
 									"cssClass" => "notoSans",
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
 					),
199 199
 					'noto_sans_noto_sans' => array(
200 200
 					'header'  => array(
201
-					"title" => esc_html__( 'Noto Sans', 'lsx' ),
201
+					"title" => esc_html__('Noto Sans', 'lsx'),
202 202
 					"location" => "Noto+Sans",
203 203
 					"cssDeclaration" => "'Noto Sans', sans-serif",
204 204
 					"cssClass" => "notoSans",
205 205
 					),
206 206
 					'body'  => array(
207
-					"title" => esc_html__( 'Noto Sans', 'lsx' ),
207
+					"title" => esc_html__('Noto Sans', 'lsx'),
208 208
 					"location" => "Noto+Sans",
209 209
 					"cssDeclaration" => "'Noto Sans', sans-serif",
210 210
 					"cssClass" => "notoSans",
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
 					),
213 213
 					'alegreya_open_sans' => array(
214 214
 					'header'  => array(
215
-					"title" => esc_html__( 'Alegreya', 'lsx' ),
215
+					"title" => esc_html__('Alegreya', 'lsx'),
216 216
 					"location" => "Alegreya",
217 217
 					"cssDeclaration" => "'Alegreya', serif",
218 218
 					"cssClass" => "alegreya",
219 219
 					),
220 220
 					'body'  => array(
221
-					"title" => esc_html__( 'Open Sans', 'lsx' ),
221
+					"title" => esc_html__('Open Sans', 'lsx'),
222 222
 					"location" => "Open+Sans",
223 223
 					"cssDeclaration" => "'Open Sans', sans-serif",
224 224
 					"cssClass" => "openSans"
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	);	
230 230
 	return $lsx_controls;
231 231
 }
232
-add_filter('lsx_customizer_controls','lsx_customizer_font_controls');
232
+add_filter('lsx_customizer_controls', 'lsx_customizer_font_controls');
233 233
 
234 234
 /**
235 235
  * Returns an array of $controls for the customizer class to generate.
@@ -239,12 +239,12 @@  discard block
 block discarded – undo
239 239
  * @category	customizer
240 240
  * @return		$lsx_controls array()
241 241
  */
242
-function lsx_get_customizer_controls(){
242
+function lsx_get_customizer_controls() {
243 243
 	$lsx_controls = array();
244 244
 	$lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls);
245 245
 	return $lsx_controls;
246 246
 }
247
-$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() );
247
+$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls());
248 248
 
249
-add_image_size( 'lsx-thumbnail-wide', 350, 230, true );
250
-add_image_size( 'lsx-thumbnail-single', 750, 350, true );
251 249
\ No newline at end of file
250
+add_image_size('lsx-thumbnail-wide', 350, 230, true);
251
+add_image_size('lsx-thumbnail-single', 750, 350, true);
252 252
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,10 @@
 block discarded – undo
4 4
  *
5 5
  * @package lsx
6 6
  */
7
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
7
+if ( ! defined( 'ABSPATH' ) ) {
8
+	return;
9
+}
10
+// Exit if accessed directly
8 11
 
9 12
 define('LSX_VERSION', '1.8.6');
10 13
 
Please login to merge, or discard this patch.
content-single.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -12,20 +12,20 @@  discard block
 block discarded – undo
12 12
 
13 13
 	<?php
14 14
 	$format = get_post_format();
15
-	if ( false === $format ) {
15
+	if (false === $format) {
16 16
 		$format = 'standard';
17 17
 	}
18 18
 	$format_link = get_post_format_link($format);
19 19
 	$format = lsx_translate_format_to_fontawesome($format);
20 20
 	?>
21 21
 
22
-	<?php if ( ! is_single() ) { ?>
22
+	<?php if ( ! is_single()) { ?>
23 23
 		<header class="entry-header">
24 24
 			<h1 class="entry-title">
25
-				<?php if ( has_post_thumbnail() ) { ?>
26
-					<a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a>
25
+				<?php if (has_post_thumbnail()) { ?>
26
+					<a href="<?php echo esc_url($format_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a>
27 27
 				<?php } else { ?>
28
-					<a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a>
28
+					<a href="<?php echo esc_url($format_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a>
29 29
 				<?php } ?>
30 30
 
31 31
 				<span><?php the_title(); ?></span>
@@ -39,33 +39,33 @@  discard block
 block discarded – undo
39 39
 
40 40
 	<div class="entry-content">
41 41
 		<?php
42
-		if ( ! is_singular() ) {
42
+		if ( ! is_singular()) {
43 43
 			the_excerpt();
44 44
 		} else {
45 45
 			the_content();
46 46
 
47
-			wp_link_pages( array(
47
+			wp_link_pages(array(
48 48
 				'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
49 49
 				'after' => '</div></div>',
50 50
 				'link_before' => '<span>',
51 51
 				'link_after' => '</span>'
52
-			) );
52
+			));
53 53
 		} ?>
54 54
 	</div><!-- .entry-content -->
55 55
 
56 56
 	<footer class="footer-meta">
57
-		<?php if ( has_tag() || class_exists('LSX_Sharing') || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?>
57
+		<?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?>
58 58
 			<div class="post-tags-wrapper">
59 59
 				<?php lsx_content_post_tags(); ?>
60 60
 
61 61
 				<?php
62
-					if ( function_exists( 'sharing_display' ) ) {
63
-						sharing_display( '', true );
62
+					if (function_exists('sharing_display')) {
63
+						sharing_display('', true);
64 64
 					}
65 65
 
66
-					if ( class_exists( 'Jetpack_Likes' ) ) {
66
+					if (class_exists('Jetpack_Likes')) {
67 67
 						$custom_likes = new Jetpack_Likes;
68
-						echo wp_kses_post( $custom_likes->post_likes( '' ) );
68
+						echo wp_kses_post($custom_likes->post_likes(''));
69 69
 					}
70 70
 				?>
71 71
 			</div>
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 
74 74
 		<?php
75 75
 			// If comments are open or we have at least one comment, load up the comment template
76
-			if ( comments_open() || '0' != get_comments_number() ) : ?>
77
-				<a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html( get_comments_number() ) ?></strong> <?php esc_html_e('Comments','lsx'); ?> <span class="fa fa-chevron-down"></span></a>
76
+			if (comments_open() || '0' != get_comments_number()) : ?>
77
+				<a class="comments-link post-meta-link" data-toggle="collapse" href="#comments-collapse"><strong><?php echo esc_html(get_comments_number()) ?></strong> <?php esc_html_e('Comments', 'lsx'); ?> <span class="fa fa-chevron-down"></span></a>
78 78
 
79 79
 				<div class="collapse" id="comments-collapse">
80 80
 					<?php 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		<?php endif; ?>
85 85
 	</footer><!-- .footer-meta -->
86 86
 	
87
-	<?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
87
+	<?php edit_post_link(esc_html__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?>
88 88
 
89 89
 	<?php lsx_entry_bottom(); ?>
90 90
 
Please login to merge, or discard this patch.