Passed
Push — master ( fe33a8...8cf01b )
by Warwick
01:56
created
includes/hooks.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage hooks
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 function lsx_body_top() {
20
-	do_action( 'lsx_body_top' );
20
+	do_action('lsx_body_top');
21 21
 }
22 22
 
23 23
 function lsx_body_bottom() {
24
-	do_action( 'lsx_body_bottom' );
24
+	do_action('lsx_body_bottom');
25 25
 }
26 26
 
27 27
 /**
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
  */
32 32
 
33 33
 function lsx_head_top() {
34
-	do_action( 'lsx_head_top' );
34
+	do_action('lsx_head_top');
35 35
 }
36 36
 
37 37
 function lsx_head_bottom() {
38
-	do_action( 'lsx_head_bottom' );
38
+	do_action('lsx_head_bottom');
39 39
 }
40 40
 
41 41
 /**
@@ -45,27 +45,27 @@  discard block
 block discarded – undo
45 45
  */
46 46
 
47 47
 function lsx_header_before() {
48
-	do_action( 'lsx_header_before' );
48
+	do_action('lsx_header_before');
49 49
 }
50 50
 
51 51
 function lsx_header_after() {
52
-	do_action( 'lsx_header_after' );
52
+	do_action('lsx_header_after');
53 53
 }
54 54
 
55 55
 function lsx_header_top() {
56
-	do_action( 'lsx_header_top' );
56
+	do_action('lsx_header_top');
57 57
 }
58 58
 
59 59
 function lsx_header_bottom() {
60
-	do_action( 'lsx_header_bottom' );
60
+	do_action('lsx_header_bottom');
61 61
 }
62 62
 
63 63
 function lsx_nav_before() {
64
-	do_action( 'lsx_nav_before' );
64
+	do_action('lsx_nav_before');
65 65
 }
66 66
 
67 67
 function lsx_nav_after() {
68
-	do_action( 'lsx_nav_after' );
68
+	do_action('lsx_nav_after');
69 69
 }
70 70
 
71 71
 /**
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
  */
76 76
 
77 77
 function lsx_banner_content() {
78
-	do_action( 'lsx_banner_content' );
78
+	do_action('lsx_banner_content');
79 79
 }
80 80
 
81 81
 function lsx_banner_inner_top() {
82
-	do_action( 'lsx_banner_inner_top' );
82
+	do_action('lsx_banner_inner_top');
83 83
 }
84 84
 
85 85
 function lsx_banner_inner_bottom() {
86
-	do_action( 'lsx_banner_inner_bottom' );
86
+	do_action('lsx_banner_inner_bottom');
87 87
 }
88 88
 
89 89
 /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
  */
94 94
 
95 95
 function lsx_global_header_inner_bottom() {
96
-	do_action( 'lsx_global_header_inner_bottom' );
96
+	do_action('lsx_global_header_inner_bottom');
97 97
 }
98 98
 
99 99
 /**
@@ -103,35 +103,35 @@  discard block
 block discarded – undo
103 103
  */
104 104
 
105 105
 function lsx_content_wrap_before() {
106
-	do_action( 'lsx_content_wrap_before' );
106
+	do_action('lsx_content_wrap_before');
107 107
 }
108 108
 
109 109
 function lsx_content_wrap_after() {
110
-	do_action( 'lsx_content_wrap_after' );
110
+	do_action('lsx_content_wrap_after');
111 111
 }
112 112
 
113 113
 function lsx_content_before() {
114
-	do_action( 'lsx_content_before' );
114
+	do_action('lsx_content_before');
115 115
 }
116 116
 
117 117
 function lsx_content_after() {
118
-	do_action( 'lsx_content_after' );
118
+	do_action('lsx_content_after');
119 119
 }
120 120
 
121 121
 function lsx_content_top() {
122
-	do_action( 'lsx_content_top' );
122
+	do_action('lsx_content_top');
123 123
 }
124 124
 
125 125
 function lsx_content_bottom() {
126
-	do_action( 'lsx_content_bottom' );
126
+	do_action('lsx_content_bottom');
127 127
 }
128 128
 
129 129
 function lsx_content_post_tags() {
130
-	do_action( 'lsx_content_post_tags' );
130
+	do_action('lsx_content_post_tags');
131 131
 }
132 132
 
133 133
 function lsx_content_sharing() {
134
-	do_action( 'lsx_content_sharing' );
134
+	do_action('lsx_content_sharing');
135 135
 }
136 136
 
137 137
 /**
@@ -141,19 +141,19 @@  discard block
 block discarded – undo
141 141
  */
142 142
 
143 143
 function lsx_entry_before() {
144
-	do_action( 'lsx_entry_before' );
144
+	do_action('lsx_entry_before');
145 145
 }
146 146
 
147 147
 function lsx_entry_after() {
148
-	do_action( 'lsx_entry_after' );
148
+	do_action('lsx_entry_after');
149 149
 }
150 150
 
151 151
 function lsx_entry_top() {
152
-	do_action( 'lsx_entry_top' );
152
+	do_action('lsx_entry_top');
153 153
 }
154 154
 
155 155
 function lsx_entry_bottom() {
156
-	do_action( 'lsx_entry_bottom' );
156
+	do_action('lsx_entry_bottom');
157 157
 }
158 158
 
159 159
 /**
@@ -163,27 +163,27 @@  discard block
 block discarded – undo
163 163
  */
164 164
 
165 165
 function lsx_widget_entry_before() {
166
-	do_action( 'lsx_widget_entry_before' );
166
+	do_action('lsx_widget_entry_before');
167 167
 }
168 168
 
169 169
 function lsx_widget_entry_after() {
170
-	do_action( 'lsx_widget_entry_after' );
170
+	do_action('lsx_widget_entry_after');
171 171
 }
172 172
 
173 173
 function lsx_widget_entry_top() {
174
-	do_action( 'lsx_widget_entry_top' );
174
+	do_action('lsx_widget_entry_top');
175 175
 }
176 176
 
177 177
 function lsx_widget_entry_bottom() {
178
-	do_action( 'lsx_widget_entry_bottom' );
178
+	do_action('lsx_widget_entry_bottom');
179 179
 }
180 180
 
181 181
 function lsx_widget_entry_content_top() {
182
-	do_action( 'lsx_widget_entry_content_top' );
182
+	do_action('lsx_widget_entry_content_top');
183 183
 }
184 184
 
185 185
 function lsx_widget_entry_content_bottom() {
186
-	do_action( 'lsx_widget_entry_content_bottom' );
186
+	do_action('lsx_widget_entry_content_bottom');
187 187
 }
188 188
 
189 189
 /**
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
  */
194 194
 
195 195
 function lsx_comments_before() {
196
-	do_action( 'lsx_comments_before' );
196
+	do_action('lsx_comments_before');
197 197
 }
198 198
 
199 199
 function lsx_comments_after() {
200
-	do_action( 'lsx_comments_after' );
200
+	do_action('lsx_comments_after');
201 201
 }
202 202
 
203 203
 /**
@@ -207,19 +207,19 @@  discard block
 block discarded – undo
207 207
  */
208 208
 
209 209
 function lsx_sidebars_before() {
210
-	do_action( 'lsx_sidebars_before' );
210
+	do_action('lsx_sidebars_before');
211 211
 }
212 212
 
213 213
 function lsx_sidebars_after() {
214
-	do_action( 'lsx_sidebars_after' );
214
+	do_action('lsx_sidebars_after');
215 215
 }
216 216
 
217 217
 function lsx_sidebar_top() {
218
-	do_action( 'lsx_sidebar_top' );
218
+	do_action('lsx_sidebar_top');
219 219
 }
220 220
 
221 221
 function lsx_sidebar_bottom() {
222
-	do_action( 'lsx_sidebar_bottom' );
222
+	do_action('lsx_sidebar_bottom');
223 223
 }
224 224
 
225 225
 /**
@@ -229,17 +229,17 @@  discard block
 block discarded – undo
229 229
  */
230 230
 
231 231
 function lsx_footer_before() {
232
-	do_action( 'lsx_footer_before' );
232
+	do_action('lsx_footer_before');
233 233
 }
234 234
 
235 235
 function lsx_footer_after() {
236
-	do_action( 'lsx_footer_after' );
236
+	do_action('lsx_footer_after');
237 237
 }
238 238
 
239 239
 function lsx_footer_top() {
240
-	do_action( 'lsx_footer_top' );
240
+	do_action('lsx_footer_top');
241 241
 }
242 242
 
243 243
 function lsx_footer_bottom() {
244
-	do_action( 'lsx_footer_bottom' );
244
+	do_action('lsx_footer_bottom');
245 245
 }
Please login to merge, or discard this patch.
lib/theme-support.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,36 +3,36 @@
 block discarded – undo
3 3
 /**
4 4
  * Enqueue theme CSS and JavaScript .
5 5
  */
6
-if ( ! function_exists( 'theme_support' ) ) :
6
+if ( ! function_exists('theme_support')) :
7 7
 	function theme_support() {
8 8
 		// Add support for full and wide align images.
9
-		add_theme_support( 'align-wide' );
9
+		add_theme_support('align-wide');
10 10
 		// Add support for styling blocks.
11
-		add_theme_support( 'wp-block-styles' );
11
+		add_theme_support('wp-block-styles');
12 12
 		// Add support for custom color scheme.
13
-		add_theme_support( 'editor-color-palette', array(
13
+		add_theme_support('editor-color-palette', array(
14 14
 			array(
15
-				'name'  => __( 'Strong Blue', 'lsx' ),
15
+				'name'  => __('Strong Blue', 'lsx'),
16 16
 				'slug'  => 'strong-blue',
17 17
 				'color' => '#27639e',
18 18
 			),
19 19
 			array(
20
-				'name'  => __( 'Lighter Blue', 'lsx' ),
20
+				'name'  => __('Lighter Blue', 'lsx'),
21 21
 				'slug'  => 'lighter-blue',
22 22
 				'color' => '#428bca',
23 23
 			),
24 24
 			array(
25
-				'name'  => __( 'Yellow', 'lsx' ),
25
+				'name'  => __('Yellow', 'lsx'),
26 26
 				'slug'  => 'light-yellow',
27 27
 				'color' => '#f7ae00',
28 28
 			),
29 29
 			array(
30
-				'name'  => __( 'Dark Yellow', 'lsx' ),
30
+				'name'  => __('Dark Yellow', 'lsx'),
31 31
 				'slug'  => 'dark-yellow',
32 32
 				'color' => '#ab7800',
33 33
 			),
34
-		) );
34
+		));
35 35
 	}
36 36
 endif;
37
-add_action( 'after_setup_theme', 'theme_support' );
37
+add_action('after_setup_theme', 'theme_support');
38 38
 
Please login to merge, or discard this patch.
includes/extras.php 1 patch
Spacing   +155 added lines, -155 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage extras
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  * @package    lsx
17 17
  * @subpackage extras
18 18
  */
19
-add_filter( 'widget_text', 'shortcode_unautop' );
20
-add_filter( 'widget_text', 'do_shortcode' );
19
+add_filter('widget_text', 'shortcode_unautop');
20
+add_filter('widget_text', 'do_shortcode');
21 21
 
22
-if ( ! function_exists( 'lsx_kses_allowed_html' ) ) :
22
+if ( ! function_exists('lsx_kses_allowed_html')) :
23 23
 
24 24
 	/**
25 25
 	 * Enable extra attributes (srcset, sizes) in img tag.
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @package    lsx
28 28
 	 * @subpackage extras
29 29
 	 */
30
-	function lsx_kses_allowed_html( $allowedtags, $context ) {
30
+	function lsx_kses_allowed_html($allowedtags, $context) {
31 31
 		$allowedtags['img']['srcset'] = true;
32 32
 		$allowedtags['img']['sizes']  = true;
33 33
 
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 
43 43
 endif;
44 44
 
45
-add_filter( 'wp_kses_allowed_html', 'lsx_kses_allowed_html', 10, 2 );
45
+add_filter('wp_kses_allowed_html', 'lsx_kses_allowed_html', 10, 2);
46 46
 
47
-if ( ! function_exists( 'lsx_body_class' ) ) :
47
+if ( ! function_exists('lsx_body_class')) :
48 48
 
49 49
 	/**
50 50
 	 * Add and remove body_class() classes.
@@ -52,44 +52,44 @@  discard block
 block discarded – undo
52 52
 	 * @package    lsx
53 53
 	 * @subpackage extras
54 54
 	 */
55
-	function lsx_body_class( $classes ) {
55
+	function lsx_body_class($classes) {
56 56
 		global $post;
57 57
 
58
-		$header_layout = get_theme_mod( 'lsx_header_layout', 'inline' );
58
+		$header_layout = get_theme_mod('lsx_header_layout', 'inline');
59 59
 		$classes[]     = 'header-' . $header_layout;
60 60
 
61
-		if ( isset( $post ) ) {
61
+		if (isset($post)) {
62 62
 			$classes[] = $post->post_name;
63 63
 		}
64 64
 
65
-		if ( ! class_exists( 'LSX_Banners' ) || ! empty( apply_filters( 'lsx_banner_plugin_disable', false ) ) ) {
66
-			$post_types = array( 'page', 'post' );
67
-			$post_types = apply_filters( 'lsx_allowed_post_type_banners', $post_types );
65
+		if ( ! class_exists('LSX_Banners') || ! empty(apply_filters('lsx_banner_plugin_disable', false))) {
66
+			$post_types = array('page', 'post');
67
+			$post_types = apply_filters('lsx_allowed_post_type_banners', $post_types);
68 68
 
69
-			if ( is_singular( $post_types ) && has_post_thumbnail() ) {
69
+			if (is_singular($post_types) && has_post_thumbnail()) {
70 70
 				$classes[] = 'page-has-banner';
71 71
 			}
72 72
 		}
73 73
 
74
-		if ( has_nav_menu( 'top-menu' ) || has_nav_menu( 'top-menu-left' ) ) {
74
+		if (has_nav_menu('top-menu') || has_nav_menu('top-menu-left')) {
75 75
 			$classes[] = 'has-top-menu';
76 76
 		}
77 77
 
78
-		$fixed_header = get_theme_mod( 'lsx_header_fixed', false );
78
+		$fixed_header = get_theme_mod('lsx_header_fixed', false);
79 79
 
80
-		if ( false !== $fixed_header ) {
80
+		if (false !== $fixed_header) {
81 81
 			$classes[] = 'top-menu-fixed';
82 82
 		}
83 83
 
84
-		$search_form  = get_theme_mod( 'lsx_header_search', false );
84
+		$search_form = get_theme_mod('lsx_header_search', false);
85 85
 
86
-		if ( false !== $search_form ) {
86
+		if (false !== $search_form) {
87 87
 			$classes[] = 'has-header-search';
88 88
 		}
89 89
 
90
-		$preloader_content  = get_theme_mod( 'lsx_preloader_content_status', false );
90
+		$preloader_content = get_theme_mod('lsx_preloader_content_status', false);
91 91
 
92
-		if ( false !== $preloader_content ) {
92
+		if (false !== $preloader_content) {
93 93
 			$classes[] = 'preloader-content-enable';
94 94
 		}
95 95
 
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 
99 99
 endif;
100 100
 
101
-add_filter( 'body_class', 'lsx_body_class' );
101
+add_filter('body_class', 'lsx_body_class');
102 102
 
103
-if ( ! function_exists( 'lsx_embed_wrap' ) ) :
103
+if ( ! function_exists('lsx_embed_wrap')) :
104 104
 
105 105
 	/**
106 106
 	 * Wrap embedded media as suggested by Readability.
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 	 * @link https://gist.github.com/965956
112 112
 	 * @link http://www.readability.com/publishers/guidelines#publisher
113 113
 	 */
114
-	function lsx_embed_wrap( $cache, $url, $attr = '', $post_id = '' ) {
115
-		if ( false !== strpos( $cache, '<iframe' ) ) {
114
+	function lsx_embed_wrap($cache, $url, $attr = '', $post_id = '') {
115
+		if (false !== strpos($cache, '<iframe')) {
116 116
 			return '<div class="entry-content-asset">' . $cache . '</div>';
117 117
 		}
118 118
 
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 
122 122
 endif;
123 123
 
124
-add_filter( 'embed_oembed_html', 'lsx_embed_wrap', 10, 4 );
124
+add_filter('embed_oembed_html', 'lsx_embed_wrap', 10, 4);
125 125
 
126
-if ( ! function_exists( 'lsx_remove_self_closing_tags' ) ) :
126
+if ( ! function_exists('lsx_remove_self_closing_tags')) :
127 127
 
128 128
 	/**
129 129
 	 * Remove unnecessary self-closing tags.
@@ -131,17 +131,17 @@  discard block
 block discarded – undo
131 131
 	 * @package    lsx
132 132
 	 * @subpackage extras
133 133
 	 */
134
-	function lsx_remove_self_closing_tags( $input ) {
135
-		return str_replace( ' />', '>', $input );
134
+	function lsx_remove_self_closing_tags($input) {
135
+		return str_replace(' />', '>', $input);
136 136
 	}
137 137
 
138 138
 endif;
139 139
 
140
-add_filter( 'get_avatar',          'lsx_remove_self_closing_tags' ); // <img />
141
-add_filter( 'comment_id_fields',   'lsx_remove_self_closing_tags' ); // <input />
142
-add_filter( 'post_thumbnail_html', 'lsx_remove_self_closing_tags' ); // <img />
140
+add_filter('get_avatar', 'lsx_remove_self_closing_tags'); // <img />
141
+add_filter('comment_id_fields', 'lsx_remove_self_closing_tags'); // <input />
142
+add_filter('post_thumbnail_html', 'lsx_remove_self_closing_tags'); // <img />
143 143
 
144
-if ( ! function_exists( 'lsx_is_element_empty' ) ) :
144
+if ( ! function_exists('lsx_is_element_empty')) :
145 145
 
146 146
 	/**
147 147
 	 * Checks if a Nav $element is empty or not.
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 	 * @package    lsx
150 150
 	 * @subpackage extras
151 151
 	 */
152
-	function lsx_is_element_empty( $element ) {
153
-		$element = trim( $element );
154
-		return empty( $element ) ? false : true;
152
+	function lsx_is_element_empty($element) {
153
+		$element = trim($element);
154
+		return empty($element) ? false : true;
155 155
 	}
156 156
 
157 157
 endif;
158 158
 
159
-if ( ! function_exists( 'lsx_get_thumbnail' ) ) :
159
+if ( ! function_exists('lsx_get_thumbnail')) :
160 160
 
161 161
 	/**
162 162
 	 * return the responsive images.
@@ -164,44 +164,44 @@  discard block
 block discarded – undo
164 164
 	 * @package    lsx
165 165
 	 * @subpackage extras
166 166
 	 */
167
-	function lsx_get_thumbnail( $size, $image_src = false ) {
168
-		if ( false === $image_src ) {
167
+	function lsx_get_thumbnail($size, $image_src = false) {
168
+		if (false === $image_src) {
169 169
 			$post_id           = get_the_ID();
170
-			$post_thumbnail_id = get_post_thumbnail_id( $post_id );
171
-		} elseif ( false !== $image_src ) {
172
-			if ( is_numeric( $image_src ) ) {
170
+			$post_thumbnail_id = get_post_thumbnail_id($post_id);
171
+		} elseif (false !== $image_src) {
172
+			if (is_numeric($image_src)) {
173 173
 				$post_thumbnail_id = $image_src;
174 174
 			} else {
175
-				$post_thumbnail_id = lsx_get_attachment_id_from_src( $image_src );
175
+				$post_thumbnail_id = lsx_get_attachment_id_from_src($image_src);
176 176
 			}
177 177
 		}
178 178
 
179
-		$size = apply_filters( 'lsx_thumbnail_size', $size );
179
+		$size = apply_filters('lsx_thumbnail_size', $size);
180 180
 		$img = false;
181 181
 
182
-		if ( 'lsx-thumbnail-single' === $size || 'lsx-thumbnail-wide' === $size || 'lsx-thumbnail-square' === $size || 'thumbnail' === $size ) {
182
+		if ('lsx-thumbnail-single' === $size || 'lsx-thumbnail-wide' === $size || 'lsx-thumbnail-square' === $size || 'thumbnail' === $size) {
183 183
 			$srcset = false;
184
-			$img    = wp_get_attachment_image_src( $post_thumbnail_id, $size );
184
+			$img    = wp_get_attachment_image_src($post_thumbnail_id, $size);
185 185
 			$img    = $img[0];
186 186
 		} else {
187 187
 			$srcset = true;
188
-			$img = wp_get_attachment_image_srcset( $post_thumbnail_id, $size );
188
+			$img = wp_get_attachment_image_srcset($post_thumbnail_id, $size);
189 189
 
190
-			if ( empty( $img ) ) {
190
+			if (empty($img)) {
191 191
 				$srcset = false;
192
-				$img = wp_get_attachment_image_src( $post_thumbnail_id, $size );
192
+				$img = wp_get_attachment_image_src($post_thumbnail_id, $size);
193 193
 				$img = $img[0];
194 194
 			}
195 195
 		}
196 196
 
197
-		if ( ! empty( $img ) ) {
198
-			if ( $srcset ) {
199
-				$img = '<img alt="' . the_title_attribute( 'echo=0' ) . '" class="attachment-responsive wp-post-image lsx-responsive" srcset="' . esc_attr( $img ) . '" />';
197
+		if ( ! empty($img)) {
198
+			if ($srcset) {
199
+				$img = '<img alt="' . the_title_attribute('echo=0') . '" class="attachment-responsive wp-post-image lsx-responsive" srcset="' . esc_attr($img) . '" />';
200 200
 			} else {
201
-				$img = '<img alt="' . the_title_attribute( 'echo=0' ) . '" class="attachment-responsive wp-post-image lsx-responsive" src="' . esc_url( $img ) . '" />';
201
+				$img = '<img alt="' . the_title_attribute('echo=0') . '" class="attachment-responsive wp-post-image lsx-responsive" src="' . esc_url($img) . '" />';
202 202
 			}
203 203
 
204
-			$img = apply_filters( 'lsx_lazyload_filter_images', $img );
204
+			$img = apply_filters('lsx_lazyload_filter_images', $img);
205 205
 		}
206 206
 
207 207
 		return $img;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
 endif;
211 211
 
212
-if ( ! function_exists( 'lsx_thumbnail' ) ) :
212
+if ( ! function_exists('lsx_thumbnail')) :
213 213
 
214 214
 	/**
215 215
 	 * Output the Resonsive Images.
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
 	 * @package    lsx
218 218
 	 * @subpackage extras
219 219
 	 */
220
-	function lsx_thumbnail( $size = 'thumbnail', $image_src = false ) {
221
-		echo wp_kses_post( lsx_get_thumbnail( $size, $image_src ) );
220
+	function lsx_thumbnail($size = 'thumbnail', $image_src = false) {
221
+		echo wp_kses_post(lsx_get_thumbnail($size, $image_src));
222 222
 	}
223 223
 
224 224
 endif;
225 225
 
226
-if ( ! function_exists( 'lsx_get_attachment_id_from_src' ) ) :
226
+if ( ! function_exists('lsx_get_attachment_id_from_src')) :
227 227
 
228 228
 	/**
229 229
 	 * Gets the attachments ID from the src.
@@ -231,13 +231,13 @@  discard block
 block discarded – undo
231 231
 	 * @package    lsx
232 232
 	 * @subpackage extras
233 233
 	 */
234
-	function lsx_get_attachment_id_from_src( $image_src ) {
235
-		$post_id = wp_cache_get( $image_src, 'lsx_get_attachment_id_from_src' );
234
+	function lsx_get_attachment_id_from_src($image_src) {
235
+		$post_id = wp_cache_get($image_src, 'lsx_get_attachment_id_from_src');
236 236
 
237
-		if ( false === $post_id ) {
237
+		if (false === $post_id) {
238 238
 			global $wpdb;
239
-			$post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE guid='%s' LIMIT 1", $image_src ) );
240
-			wp_cache_set( $image_src, $post_id, 'lsx_get_attachment_id_from_src', 3600 );
239
+			$post_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE guid='%s' LIMIT 1", $image_src));
240
+			wp_cache_set($image_src, $post_id, 'lsx_get_attachment_id_from_src', 3600);
241 241
 		}
242 242
 
243 243
 		return $post_id;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
 endif;
247 247
 
248
-if ( ! function_exists( 'lsx_page_banner' ) ) :
248
+if ( ! function_exists('lsx_page_banner')) :
249 249
 
250 250
 	/**
251 251
 	 * Add Featured Image as Banner on Single Pages.
@@ -254,28 +254,28 @@  discard block
 block discarded – undo
254 254
 	 * @subpackage extras
255 255
 	 */
256 256
 	function lsx_page_banner() {
257
-		if ( true === apply_filters( 'lsx_page_banner_disable', false ) ) {
257
+		if (true === apply_filters('lsx_page_banner_disable', false)) {
258 258
 			return;
259 259
 		}
260 260
 
261
-		$post_types = array( 'page', 'post' );
262
-		$post_types = apply_filters( 'lsx_allowed_post_type_banners', $post_types );
261
+		$post_types = array('page', 'post');
262
+		$post_types = apply_filters('lsx_allowed_post_type_banners', $post_types);
263 263
 
264
-		if ( is_singular( $post_types ) && has_post_thumbnail() ) :
264
+		if (is_singular($post_types) && has_post_thumbnail()) :
265 265
 			$bg_image = '';
266 266
 
267
-			if ( has_post_thumbnail() ) {
268
-				$bg_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
267
+			if (has_post_thumbnail()) {
268
+				$bg_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
269 269
 				$bg_image = $bg_image[0];
270 270
 			}
271 271
 
272
-			if ( ! empty( $bg_image ) ) :
272
+			if ( ! empty($bg_image)) :
273 273
 				?>
274 274
 					<div class="page-banner-wrap">
275 275
 						<div class="page-banner">
276 276
 							<?php lsx_banner_inner_top(); ?>
277 277
 
278
-							<div class="page-banner-image" style="background-image:url(<?php echo esc_attr( $bg_image ); ?>);"></div>
278
+							<div class="page-banner-image" style="background-image:url(<?php echo esc_attr($bg_image); ?>);"></div>
279 279
 
280 280
 							<div class="container">
281 281
 								<header class="page-header">
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
 
295 295
 endif;
296 296
 
297
-add_action( 'lsx_header_after', 'lsx_page_banner' );
297
+add_action('lsx_header_after', 'lsx_page_banner');
298 298
 
299
-if ( ! function_exists( 'lsx_form_submit_button' ) ) :
299
+if ( ! function_exists('lsx_form_submit_button')) :
300 300
 
301 301
 	/**
302 302
 	 * filter the Gravity Forms button type.
@@ -308,15 +308,15 @@  discard block
 block discarded – undo
308 308
 	 * @param  $form   Object
309 309
 	 * @return String
310 310
 	 */
311
-	function lsx_form_submit_button( $button, $form ) {
311
+	function lsx_form_submit_button($button, $form) {
312 312
 		return "<button class='btn btn-primary' id='gform_submit_button_{$form["id"]}'><span>Submit</span></button>";
313 313
 	}
314 314
 
315 315
 endif;
316 316
 
317
-add_filter( 'gform_submit_button', 'lsx_form_submit_button', 10, 2 );
317
+add_filter('gform_submit_button', 'lsx_form_submit_button', 10, 2);
318 318
 
319
-if ( ! function_exists( 'lsx_excerpt_more' ) ) :
319
+if ( ! function_exists('lsx_excerpt_more')) :
320 320
 
321 321
 	/**
322 322
 	 * Replaces the excerpt "more" text by a link.
@@ -324,15 +324,15 @@  discard block
 block discarded – undo
324 324
 	 * @package    lsx
325 325
 	 * @subpackage extras
326 326
 	 */
327
-	function lsx_excerpt_more( $more ) {
327
+	function lsx_excerpt_more($more) {
328 328
 		return '...';
329 329
 	}
330 330
 
331 331
 endif;
332 332
 
333
-add_filter( 'excerpt_more', 'lsx_excerpt_more' );
333
+add_filter('excerpt_more', 'lsx_excerpt_more');
334 334
 
335
-if ( ! function_exists( 'lsx_the_excerpt_filter' ) ) :
335
+if ( ! function_exists('lsx_the_excerpt_filter')) :
336 336
 
337 337
 	/**
338 338
 	 * Add a continue reading link to the excerpt.
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	 * @package    lsx
341 341
 	 * @subpackage extras
342 342
 	 */
343
-	function lsx_the_excerpt_filter( $excerpt ) {
343
+	function lsx_the_excerpt_filter($excerpt) {
344 344
 
345 345
 		$post_formats = array(
346 346
 			'aside' => 'aside',
@@ -353,23 +353,23 @@  discard block
 block discarded – undo
353 353
 			'audio' => 'audio',
354 354
 		);
355 355
 
356
-		$show_full_content = has_post_format( apply_filters( 'lsx_the_excerpt_filter_post_types', $post_formats ) );
356
+		$show_full_content = has_post_format(apply_filters('lsx_the_excerpt_filter_post_types', $post_formats));
357 357
 
358
-		if ( ! $show_full_content ) {
359
-			if ( '' !== $excerpt && ! stristr( $excerpt, 'moretag' ) ) {
360
-				$pagination = wp_link_pages( array(
358
+		if ( ! $show_full_content) {
359
+			if ('' !== $excerpt && ! stristr($excerpt, 'moretag')) {
360
+				$pagination = wp_link_pages(array(
361 361
 					'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
362 362
 					'after'       => '</div></div>',
363 363
 					'link_before' => '<span>',
364 364
 					'link_after'  => '</span>',
365 365
 					'echo'        => 0,
366
-				) );
366
+				));
367 367
 
368
-				if ( ! empty( $pagination ) ) {
368
+				if ( ! empty($pagination)) {
369 369
 					$excerpt .= $pagination;
370 370
 				} else {
371
-					$excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Continue reading', 'lsx' ) . '</a></p>';
372
-					$excerpt .= apply_filters( 'excerpt_more_p', $excerpt_more );
371
+					$excerpt_more = '<p><a class="moretag" href="' . esc_url(get_permalink()) . '">' . esc_html__('Continue reading', 'lsx') . '</a></p>';
372
+					$excerpt .= apply_filters('excerpt_more_p', $excerpt_more);
373 373
 				}
374 374
 			}
375 375
 		}
@@ -379,9 +379,9 @@  discard block
 block discarded – undo
379 379
 
380 380
 endif;
381 381
 
382
-add_filter( 'the_excerpt', 'lsx_the_excerpt_filter' , 1 , 20 );
382
+add_filter('the_excerpt', 'lsx_the_excerpt_filter', 1, 20);
383 383
 
384
-if ( ! function_exists( 'lsx_custom_wp_trim_excerpt' ) ) :
384
+if ( ! function_exists('lsx_custom_wp_trim_excerpt')) :
385 385
 
386 386
 	/**
387 387
 	 * Allow HTML tags in excerpt.
@@ -389,12 +389,12 @@  discard block
 block discarded – undo
389 389
 	 * @package    lsx
390 390
 	 * @subpackage extras
391 391
 	 */
392
-	function lsx_custom_wp_trim_excerpt( $wpse_excerpt ) {
392
+	function lsx_custom_wp_trim_excerpt($wpse_excerpt) {
393 393
 		global $post;
394 394
 		$raw_excerpt = $wpse_excerpt;
395 395
 
396
-		if ( empty( $wpse_excerpt ) ) {
397
-			$wpse_excerpt      = get_the_content( '' );
396
+		if (empty($wpse_excerpt)) {
397
+			$wpse_excerpt = get_the_content('');
398 398
 
399 399
 			$post_formats = array(
400 400
 				'aside' => 'aside',
@@ -407,27 +407,27 @@  discard block
 block discarded – undo
407 407
 				'audio' => 'audio',
408 408
 			);
409 409
 
410
-			$show_full_content = has_post_format( apply_filters( 'lsx_excerpt_read_more_post_formats', $post_formats ) );
410
+			$show_full_content = has_post_format(apply_filters('lsx_excerpt_read_more_post_formats', $post_formats));
411 411
 
412
-			if ( ! $show_full_content ) {
413
-				$wpse_excerpt = strip_shortcodes( $wpse_excerpt );
414
-				$wpse_excerpt = apply_filters( 'the_content', $wpse_excerpt );
415
-				$wpse_excerpt = str_replace( ']]>', ']]>', $wpse_excerpt );
416
-				$wpse_excerpt = strip_tags( $wpse_excerpt, apply_filters( 'excerpt_strip_tags', '<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<a>,<button>,<blockquote>,<p>,<br>,<b>,<strong>,<i>,<u>,<ul>,<ol>,<li>,<span>,<div>' ) );
412
+			if ( ! $show_full_content) {
413
+				$wpse_excerpt = strip_shortcodes($wpse_excerpt);
414
+				$wpse_excerpt = apply_filters('the_content', $wpse_excerpt);
415
+				$wpse_excerpt = str_replace(']]>', ']]>', $wpse_excerpt);
416
+				$wpse_excerpt = strip_tags($wpse_excerpt, apply_filters('excerpt_strip_tags', '<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<a>,<button>,<blockquote>,<p>,<br>,<b>,<strong>,<i>,<u>,<ul>,<ol>,<li>,<span>,<div>'));
417 417
 
418 418
 				$excerpt_word_count = 50;
419
-				$excerpt_word_count = apply_filters( 'excerpt_length', $excerpt_word_count );
419
+				$excerpt_word_count = apply_filters('excerpt_length', $excerpt_word_count);
420 420
 
421 421
 				$tokens         = array();
422 422
 				$excerpt_output = '';
423 423
 				$has_more       = false;
424 424
 				$count          = 0;
425 425
 
426
-				preg_match_all( '/(<[^>]+>|[^<>\s]+)\s*/u', $wpse_excerpt, $tokens );
426
+				preg_match_all('/(<[^>]+>|[^<>\s]+)\s*/u', $wpse_excerpt, $tokens);
427 427
 
428
-				foreach ( $tokens[0] as $token ) {
429
-					if ( $count >= $excerpt_word_count ) {
430
-						$excerpt_output .= trim( $token );
428
+				foreach ($tokens[0] as $token) {
429
+					if ($count >= $excerpt_word_count) {
430
+						$excerpt_output .= trim($token);
431 431
 						$has_more = true;
432 432
 						break;
433 433
 					}
@@ -436,41 +436,41 @@  discard block
 block discarded – undo
436 436
 					$excerpt_output .= $token;
437 437
 				}
438 438
 
439
-				$wpse_excerpt = trim( force_balance_tags( $excerpt_output ) );
439
+				$wpse_excerpt = trim(force_balance_tags($excerpt_output));
440 440
 
441
-				if ( $has_more ) {
442
-					$excerpt_end = '<a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'More', 'lsx' ) . '</a>';
443
-					$excerpt_end = apply_filters( 'excerpt_more', ' ' . $excerpt_end );
441
+				if ($has_more) {
442
+					$excerpt_end = '<a class="moretag" href="' . esc_url(get_permalink()) . '">' . esc_html__('More', 'lsx') . '</a>';
443
+					$excerpt_end = apply_filters('excerpt_more', ' ' . $excerpt_end);
444 444
 
445
-					$pos = strrpos( $wpse_excerpt, '</' );
445
+					$pos = strrpos($wpse_excerpt, '</');
446 446
 
447
-					if ( false !== $pos ) {
447
+					if (false !== $pos) {
448 448
 						// Inside last HTML tag
449
-						$wpse_excerpt = substr_replace( $wpse_excerpt, $excerpt_end, $pos, 0 ); /* Add read more next to last word */
449
+						$wpse_excerpt = substr_replace($wpse_excerpt, $excerpt_end, $pos, 0); /* Add read more next to last word */
450 450
 					} else {
451 451
 						// After the content
452 452
 						$wpse_excerpt .= $excerpt_end; /*Add read more in new paragraph */
453 453
 					}
454 454
 				}
455 455
 			} else {
456
-				$wpse_excerpt = apply_filters( 'the_content', $wpse_excerpt );
457
-				$wpse_excerpt = str_replace( ']]>', ']]>', $wpse_excerpt );
456
+				$wpse_excerpt = apply_filters('the_content', $wpse_excerpt);
457
+				$wpse_excerpt = str_replace(']]>', ']]>', $wpse_excerpt);
458 458
 				//$wpse_excerpt = strip_tags( $wpse_excerpt, '<blockquote>,<p>' );
459
-				$wpse_excerpt = trim( force_balance_tags( $wpse_excerpt ) );
459
+				$wpse_excerpt = trim(force_balance_tags($wpse_excerpt));
460 460
 			}
461 461
 
462 462
 			return $wpse_excerpt;
463 463
 		}
464 464
 
465
-		return apply_filters( 'lsx_custom_wp_trim_excerpt', $wpse_excerpt, $raw_excerpt );
465
+		return apply_filters('lsx_custom_wp_trim_excerpt', $wpse_excerpt, $raw_excerpt);
466 466
 	}
467 467
 
468 468
 endif;
469 469
 
470
-remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
471
-add_filter( 'get_the_excerpt', 'lsx_custom_wp_trim_excerpt' );
470
+remove_filter('get_the_excerpt', 'wp_trim_excerpt');
471
+add_filter('get_the_excerpt', 'lsx_custom_wp_trim_excerpt');
472 472
 
473
-if ( ! function_exists( 'lsx_full_width_widget_classes' ) ) :
473
+if ( ! function_exists('lsx_full_width_widget_classes')) :
474 474
 
475 475
 	/**
476 476
 	 * Filter sidebar widget params, to add the widget_lsx_full_width_alt or widget_lsx_full_width classes to the text widget.
@@ -478,8 +478,8 @@  discard block
 block discarded – undo
478 478
 	 * @package    lsx
479 479
 	 * @subpackage extras
480 480
 	 */
481
-	function lsx_full_width_widget_classes( $params ) {
482
-		if ( is_admin() ) {
481
+	function lsx_full_width_widget_classes($params) {
482
+		if (is_admin()) {
483 483
 			return $params;
484 484
 		}
485 485
 
@@ -488,9 +488,9 @@  discard block
 block discarded – undo
488 488
 		$widget_id   = $params[0]['widget_id'];
489 489
 		$widget_name = $params[0]['widget_name'];
490 490
 
491
-		if ( 'Text' === $widget_name ) {
492
-			$wp_registered_widgets[ $widget_id ]['original_callback'] = $wp_registered_widgets[ $widget_id ]['callback'];
493
-			$wp_registered_widgets[ $widget_id ]['callback'] = 'lsx_full_width_widget_custom_callback';
491
+		if ('Text' === $widget_name) {
492
+			$wp_registered_widgets[$widget_id]['original_callback'] = $wp_registered_widgets[$widget_id]['callback'];
493
+			$wp_registered_widgets[$widget_id]['callback'] = 'lsx_full_width_widget_custom_callback';
494 494
 		}
495 495
 
496 496
 		return $params;
@@ -498,9 +498,9 @@  discard block
 block discarded – undo
498 498
 
499 499
 endif;
500 500
 
501
-add_filter( 'dynamic_sidebar_params', 'lsx_full_width_widget_classes' );
501
+add_filter('dynamic_sidebar_params', 'lsx_full_width_widget_classes');
502 502
 
503
-if ( ! function_exists( 'lsx_full_width_widget_custom_callback' ) ) :
503
+if ( ! function_exists('lsx_full_width_widget_custom_callback')) :
504 504
 
505 505
 	/**
506 506
 	 * Filter sidebar widget params, to add the widget_lsx_full_width_alt or widget_lsx_full_width classes to the text widget.
@@ -514,25 +514,25 @@  discard block
 block discarded – undo
514 514
 		$original_callback_params = func_get_args();
515 515
 		$widget_id = $original_callback_params[0]['widget_id'];
516 516
 
517
-		$original_callback = $wp_registered_widgets[ $widget_id ]['original_callback'];
518
-		$wp_registered_widgets[ $widget_id ]['callback'] = $original_callback;
517
+		$original_callback = $wp_registered_widgets[$widget_id]['original_callback'];
518
+		$wp_registered_widgets[$widget_id]['callback'] = $original_callback;
519 519
 
520
-		$widget_id_base = $wp_registered_widgets[ $widget_id ]['callback'][0]->id_base;
520
+		$widget_id_base = $wp_registered_widgets[$widget_id]['callback'][0]->id_base;
521 521
 
522 522
 		$widget_classname = '';
523 523
 
524
-		if ( is_callable( $original_callback ) ) {
524
+		if (is_callable($original_callback)) {
525 525
 			ob_start();
526
-			call_user_func_array( $original_callback, $original_callback_params );
526
+			call_user_func_array($original_callback, $original_callback_params);
527 527
 			$widget_output = ob_get_clean();
528 528
 
529
-			echo wp_kses_post( apply_filters( 'lsx_widget_output', $widget_output, $widget_id_base, $widget_classname, $widget_id ) );
529
+			echo wp_kses_post(apply_filters('lsx_widget_output', $widget_output, $widget_id_base, $widget_classname, $widget_id));
530 530
 		}
531 531
 	}
532 532
 
533 533
 endif;
534 534
 
535
-if ( ! function_exists( 'lsx_full_width_widget_output' ) ) :
535
+if ( ! function_exists('lsx_full_width_widget_output')) :
536 536
 
537 537
 	/**
538 538
 	 * Filter sidebar widget params, to add the widget_lsx_full_width_alt or widget_lsx_full_width classes to the text widget.
@@ -540,12 +540,12 @@  discard block
 block discarded – undo
540 540
 	 * @package    lsx
541 541
 	 * @subpackage extras
542 542
 	 */
543
-	function lsx_full_width_widget_output( $widget_output, $widget_id_base, $widget_id ) {
544
-		if ( 'text' === $widget_id_base ) {
545
-			if ( false !== strpos( $widget_output, '<div class="lsx-full-width-alt">' ) ) {
546
-				$widget_output = str_replace( 'class="widget widget_text"', 'class="widget widget_text widget_lsx_full_width_alt"', $widget_output );
547
-			} elseif ( false !== strpos( $widget_output, '<div class="lsx-full-width">' ) ) {
548
-				$widget_output = str_replace( 'class="widget widget_text"', 'class="widget widget_text widget_lsx_full_width"', $widget_output );
543
+	function lsx_full_width_widget_output($widget_output, $widget_id_base, $widget_id) {
544
+		if ('text' === $widget_id_base) {
545
+			if (false !== strpos($widget_output, '<div class="lsx-full-width-alt">')) {
546
+				$widget_output = str_replace('class="widget widget_text"', 'class="widget widget_text widget_lsx_full_width_alt"', $widget_output);
547
+			} elseif (false !== strpos($widget_output, '<div class="lsx-full-width">')) {
548
+				$widget_output = str_replace('class="widget widget_text"', 'class="widget widget_text widget_lsx_full_width"', $widget_output);
549 549
 			}
550 550
 		}
551 551
 
@@ -554,13 +554,13 @@  discard block
 block discarded – undo
554 554
 
555 555
 endif;
556 556
 
557
-add_filter( 'lsx_widget_output', 'lsx_full_width_widget_output', 10, 3 );
557
+add_filter('lsx_widget_output', 'lsx_full_width_widget_output', 10, 3);
558 558
 
559 559
 /**
560 560
  * Check if the content has a restricted post format that needs to show a full excerpt.
561 561
  */
562 562
 function lsx_post_format_force_content_on_list() {
563
-	$post_formats = apply_filters( 'lsx_post_format_force_content_on_list',
563
+	$post_formats = apply_filters('lsx_post_format_force_content_on_list',
564 564
 		array(
565 565
 				'video' => 'video',
566 566
 				'audio' => 'audio',
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 			)
570 570
 	);
571 571
 	$return = false;
572
-	if ( ! has_post_format( $post_formats ) ) {
572
+	if ( ! has_post_format($post_formats)) {
573 573
 		$return = true;
574 574
 	}
575 575
 	return $return;
@@ -578,37 +578,37 @@  discard block
 block discarded – undo
578 578
 /**
579 579
  * Remove the Hentry Class Every
580 580
  */
581
-function lsx_remove_hentry( $classes ) {
582
-	if ( 'post' !== get_post_type() ) {
583
-		$classes = array_diff( $classes, array( 'hentry' ) );
581
+function lsx_remove_hentry($classes) {
582
+	if ('post' !== get_post_type()) {
583
+		$classes = array_diff($classes, array('hentry'));
584 584
 	}
585 585
 	return $classes;
586 586
 }
587
-add_filter( 'post_class','lsx_remove_hentry' );
587
+add_filter('post_class', 'lsx_remove_hentry');
588 588
 
589 589
 /**
590 590
  * Strip Excerpts.
591 591
  *
592 592
  */
593
-function lsx_strip_excerpt( $content ) {
594
-	if ( is_search() || is_archive() || ( is_blog_installed() && ! is_single() && ! is_page() ) ) {
595
-		$content = strip_shortcodes( $content );
596
-		$content = str_replace( ']]>', ']]&gt;', $content );
597
-		$content = strip_tags( $content );
593
+function lsx_strip_excerpt($content) {
594
+	if (is_search() || is_archive() || (is_blog_installed() && ! is_single() && ! is_page())) {
595
+		$content = strip_shortcodes($content);
596
+		$content = str_replace(']]>', ']]&gt;', $content);
597
+		$content = strip_tags($content);
598 598
 	}
599 599
 	return $content;
600 600
 }
601
-add_filter( 'the_content', 'lsx_strip_excerpt' );
601
+add_filter('the_content', 'lsx_strip_excerpt');
602 602
 
603 603
 /**
604 604
  * Disable Gutenberg for LSX Custom Post Tpes.
605 605
  *
606 606
  */
607
-function lsx_disable_gutenberg_product_type( $is_enabled, $post_type ) {
608
-	if ( 'testimonial' === $post_type || 'team' === $post_type || 'project' === $post_type ) {
607
+function lsx_disable_gutenberg_product_type($is_enabled, $post_type) {
608
+	if ('testimonial' === $post_type || 'team' === $post_type || 'project' === $post_type) {
609 609
 		return false;
610 610
 	}
611 611
 
612 612
 	return $is_enabled;
613 613
 }
614
-add_filter( 'gutenberg_add_edit_link_for_post_type', 'lsx_disable_gutenberg_product_type', 10, 2 );
614
+add_filter('gutenberg_add_edit_link_for_post_type', 'lsx_disable_gutenberg_product_type', 10, 2);
Please login to merge, or discard this patch.
includes/gutenberg.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,36 +6,36 @@
 block discarded – undo
6 6
  * @subpackage Gutenberg
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13 13
 // Enqueue Admin styles on admin area
14 14
 function load_gutenberg_admin_style() {
15
-	wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0' );
15
+	wp_enqueue_style('admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0');
16 16
 }
17
-add_action( 'admin_enqueue_scripts', 'load_gutenberg_admin_style' );
17
+add_action('admin_enqueue_scripts', 'load_gutenberg_admin_style');
18 18
 
19 19
 // Gutenberg Compatibility
20
-require_once( get_template_directory() . '/lib/theme-support.php' );
20
+require_once(get_template_directory() . '/lib/theme-support.php');
21 21
 
22 22
 /**
23 23
  * Add custom class for Gutenberg Compatible template
24 24
  */
25 25
 
26
-function add_gutenberg_compatible_body_class( $classes ) {
27
-	if ( ! is_home() && ! is_front_page() )
28
-		if ( is_page() || is_page_template() || is_single() )
26
+function add_gutenberg_compatible_body_class($classes) {
27
+	if ( ! is_home() && ! is_front_page())
28
+		if (is_page() || is_page_template() || is_single())
29 29
 			$classes[] = 'gutenberg-compatible-template';
30 30
 		return $classes;
31 31
 
32 32
 }
33 33
 
34
-add_filter( 'body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class' );
34
+add_filter('body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class');
35 35
 
36 36
 // Add custom class for templates that are using the Gutenberg editor
37
-add_action('body_class', function( $classes ) {
38
-	if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) )
37
+add_action('body_class', function($classes) {
38
+	if (function_exists('has_blocks') && has_blocks(get_the_ID()))
39 39
 		$classes[] = 'using-gutenberg';
40 40
 	return $classes;
41 41
 });
Please login to merge, or discard this patch.
functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,25 +5,25 @@
 block discarded – undo
5 5
  * @package lsx
6 6
  */
7 7
 
8
-if ( ! defined( 'ABSPATH' ) ) {
8
+if ( ! defined('ABSPATH')) {
9 9
 	exit;
10 10
 }
11 11
 
12
-define( 'LSX_VERSION', '2.2.1' );
12
+define('LSX_VERSION', '2.2.1');
13 13
 
14
-if ( class_exists( 'WooCommerce' ) ) {
14
+if (class_exists('WooCommerce')) {
15 15
 	require get_template_directory() . '/includes/plugins/woocommerce.php';
16 16
 }
17 17
 
18
-if ( class_exists( 'Tribe__Events__Main' ) ) {
18
+if (class_exists('Tribe__Events__Main')) {
19 19
 	require get_template_directory() . '/includes/plugins/the-events-calendar.php';
20 20
 }
21 21
 
22
-if ( class_exists( 'Sensei_WC' ) ) {
22
+if (class_exists('Sensei_WC')) {
23 23
 	require get_template_directory() . '/includes/plugins/sensei.php';
24 24
 }
25 25
 
26
-if ( class_exists( 'bbPress' ) ) {
26
+if (class_exists('bbPress')) {
27 27
 	require get_template_directory() . '/includes/plugins/bbpress.php';
28 28
 }
29 29
 
Please login to merge, or discard this patch.