Completed
Branch v1.6.0 (7bff6e)
by Sébastien
01:27
created
includes/auto-load-next-post-template-functions.php 1 patch
Spacing   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly.
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
19
-if ( ! function_exists( 'alnp_template_redirect' ) ) {
19
+if ( ! function_exists('alnp_template_redirect')) {
20 20
 	/**
21 21
 	 * When the 'alnp' endpoint is used on a singular post it forces
22 22
 	 * the template redirect to retrieve only the post content.
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		global $wp_query;
30 30
 
31 31
 		// If this is not a request for alnp or a singular object then bail.
32
-		if ( ! isset( $wp_query->query_vars['alnp'] ) || ! is_singular() ) {
32
+		if ( ! isset($wp_query->query_vars['alnp']) || ! is_singular()) {
33 33
 			return;
34 34
 		}
35 35
 
@@ -38,28 +38,28 @@  discard block
 block discarded – undo
38 38
 		 * If theme does not have a template file for Auto Load Next Post,
39 39
 		 * the plugin will load a default template.
40 40
 		 */
41
-		$child_path        = get_stylesheet_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
42
-		$template_path     = get_template_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
41
+		$child_path        = get_stylesheet_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
42
+		$template_path     = get_template_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
43 43
 		$default_path      = AUTO_LOAD_NEXT_POST_FILE_PATH;
44 44
 		$template_redirect = '';
45 45
 
46
-		if ( file_exists( $child_path . 'content-alnp.php' ) ) {
47
-			$template_redirect = $child_path . 'content-alnp.php';
48
-		} else if ( file_exists( $template_path . 'content-alnp.php' ) ) {
49
-			$template_redirect = $template_path . 'content-alnp.php';
50
-		} else if ( file_exists( $default_path . '/templates/content-alnp.php' ) ) {
51
-			$template_redirect = $default_path . '/templates/content-alnp.php';
46
+		if (file_exists($child_path.'content-alnp.php')) {
47
+			$template_redirect = $child_path.'content-alnp.php';
48
+		} else if (file_exists($template_path.'content-alnp.php')) {
49
+			$template_redirect = $template_path.'content-alnp.php';
50
+		} else if (file_exists($default_path.'/templates/content-alnp.php')) {
51
+			$template_redirect = $default_path.'/templates/content-alnp.php';
52 52
 		}
53 53
 
54
-		$template_redirect = apply_filters( 'alnp_template_redirect', $template_redirect );
54
+		$template_redirect = apply_filters('alnp_template_redirect', $template_redirect);
55 55
 
56
-		include( $template_redirect );
56
+		include($template_redirect);
57 57
 
58 58
 		exit;
59 59
 	} // END alnp_template_redirect()
60 60
 }
61 61
 
62
-if ( ! function_exists( 'auto_load_next_post_comments' ) ) {
62
+if ( ! function_exists('auto_load_next_post_comments')) {
63 63
 	/**
64 64
 	 * Adds the comments template after the post content.
65 65
 	 *
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	function auto_load_next_post_comments() {
70 70
 		// If comments are open or we have at least one comment, load up the comment template.
71
-		if ( comments_open() || get_comments_number() ) :
71
+		if (comments_open() || get_comments_number()) :
72 72
 			comments_template();
73 73
 		endif;
74 74
 	} // END auto_load_next_post_comments()
75 75
 }
76 76
 
77
-if ( ! function_exists( 'auto_load_next_post_navigation' ) ) {
77
+if ( ! function_exists('auto_load_next_post_navigation')) {
78 78
 	/**
79 79
 	 * Adds the post navigation for the previous link only after the post content.
80 80
 	 *
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
 	function auto_load_next_post_navigation() {
85 85
 	?>
86 86
 	<nav class="navigation post-navigation" role="navigation">
87
-		<span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'auto-load-next-post' ) . '</span> %title' ); ?></span>
87
+		<span class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav">'._x('&larr;', 'Previous post link', 'auto-load-next-post').'</span> %title'); ?></span>
88 88
 	</nav>
89 89
 	<?php
90 90
 	} // END auto_load_next_post_navigation()
91 91
 }
92 92
 
93
-if ( ! function_exists( 'alnp_get_locations' ) ) {
93
+if ( ! function_exists('alnp_get_locations')) {
94 94
 	/**
95 95
 	 * Get list of locations as to where the content for the theme is located.
96 96
 	 * The list is in the order to look for the templates that store the content.
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	} // END alnp_get_locations()
116 116
 }
117 117
 
118
-if ( ! function_exists( 'alnp_get_templates' ) ) {
118
+if ( ! function_exists('alnp_get_templates')) {
119 119
 	/**
120 120
 	 * Get list of templates to look for.
121 121
 	 *
@@ -124,28 +124,28 @@  discard block
 block discarded – undo
124 124
 	 * @param  string $post_format
125 125
 	 * @return array
126 126
 	 */
127
-	function alnp_get_templates( $post_type = 'post', $post_format = '' ) {
127
+	function alnp_get_templates($post_type = 'post', $post_format = '') {
128 128
 		$get_standard = array(
129 129
 			'content-single.php',
130 130
 			'content-post.php',
131
-			'content-' . $post_type . '.php',
131
+			'content-'.$post_type.'.php',
132 132
 			'content.php'
133 133
 		);
134 134
 
135
-		if ( ! empty( $post_format ) ) {
135
+		if ( ! empty($post_format)) {
136 136
 			$get_formats = array(
137
-				'format-' . $post_format . '.php',
138
-				'content' . $post_format . '.php'
137
+				'format-'.$post_format.'.php',
138
+				'content'.$post_format.'.php'
139 139
 			);
140 140
 
141
-			return array_merge( $get_standard, $get_formats );
141
+			return array_merge($get_standard, $get_formats);
142 142
 		}
143 143
 
144 144
 		return $get_standard;
145 145
 	} // END alnp_get_templates()
146 146
 }
147 147
 
148
-if ( ! function_exists( 'alnp_scan_directories' ) ) {
148
+if ( ! function_exists('alnp_scan_directories')) {
149 149
 	/**
150 150
 	 * Scans for the theme template directory depending on the post type requested and saves it.
151 151
 	 *
@@ -153,31 +153,31 @@  discard block
 block discarded – undo
153 153
 	 * @param string $post_type
154 154
 	 * @param string $post_format
155 155
 	 */
156
-	function alnp_scan_directories( $post_type = 'post', $post_format = '' ) {
156
+	function alnp_scan_directories($post_type = 'post', $post_format = '') {
157 157
 		// Possible locations where the content files are found.
158 158
 		$locations = alnp_get_locations();
159 159
 
160 160
 		// Templates to look for based on the post that is loaded.
161
-		$templates = alnp_get_templates( $post_type, $post_format );
161
+		$templates = alnp_get_templates($post_type, $post_format);
162 162
 
163 163
 		$content_found = false;
164 164
 
165 165
 		// Scanning all possible locations.
166
-		foreach( $locations as $location ) {
166
+		foreach ($locations as $location) {
167 167
 			// Scanning all possible templates within the locations.
168
-			foreach( $templates as $template ) {
168
+			foreach ($templates as $template) {
169 169
 				// Remove forwardslash if location is the parent theme folder.
170
-				if ( empty( $location ) ) {
170
+				if (empty($location)) {
171 171
 					$location = str_replace('/', '', $location);
172 172
 				}
173 173
 
174 174
 				// If a template has been found then save it.
175
-				if ( locate_template( $location . $template ) != '' && $content_found !== true ) {
175
+				if (locate_template($location.$template) != '' && $content_found !== true) {
176 176
 					// Save template found.
177
-					if ( ! empty( $post_format ) ) {
178
-						update_option( 'auto_load_next_post_directory_post_' . $post_format, $location );
177
+					if ( ! empty($post_format)) {
178
+						update_option('auto_load_next_post_directory_post_'.$post_format, $location);
179 179
 					} else {
180
-						update_option( 'auto_load_next_post_directory_' . $post_type, $location );
180
+						update_option('auto_load_next_post_directory_'.$post_type, $location);
181 181
 					}
182 182
 
183 183
 					$content_found = true;
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	} // END alnp_scan_directories()
188 188
 }
189 189
 
190
-if ( ! function_exists( 'alnp_get_template_directory' ) ) {
190
+if ( ! function_exists('alnp_get_template_directory')) {
191 191
 	/**
192 192
 	 * Returns the template directory saved.
193 193
 	 *
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
 	 * @param  string $post_format
197 197
 	 * @return string $template
198 198
 	 */
199
-	function alnp_get_template_directory( $post_type = 'post', $post_format = '' ) {
200
-		if ( ! empty( $post_format ) ) {
201
-			$template = get_option( 'auto_load_next_post_directory_post_' . $post_format );
199
+	function alnp_get_template_directory($post_type = 'post', $post_format = '') {
200
+		if ( ! empty($post_format)) {
201
+			$template = get_option('auto_load_next_post_directory_post_'.$post_format);
202 202
 		} else {
203
-			$template = get_option( 'auto_load_next_post_directory_' . $post_type );
203
+			$template = get_option('auto_load_next_post_directory_'.$post_type);
204 204
 		}
205 205
 
206
-		if ( !$template ) {
206
+		if ( ! $template) {
207 207
 			return '';
208 208
 		}
209 209
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	} // END alnp_get_template_directory()
212 212
 }
213 213
 
214
-if ( ! function_exists( 'alnp_get_template' ) ) {
214
+if ( ! function_exists('alnp_get_template')) {
215 215
 	/**
216 216
 	 * Returns the template file saved.
217 217
 	 *
@@ -220,14 +220,14 @@  discard block
 block discarded – undo
220 220
 	 * @param  string $post_format
221 221
 	 * @return string $template
222 222
 	*/
223
-	function alnp_get_template( $post_type = 'post', $post_format = '' ) {
224
-		if ( ! empty( $post_format ) ) {
225
-			$template = get_option( 'auto_load_next_post_template_post_' . strtolower( $post_format ) );
223
+	function alnp_get_template($post_type = 'post', $post_format = '') {
224
+		if ( ! empty($post_format)) {
225
+			$template = get_option('auto_load_next_post_template_post_'.strtolower($post_format));
226 226
 		} else {
227
-			$template = get_option( 'auto_load_next_post_template_' . strtolower( $post_type ) );
227
+			$template = get_option('auto_load_next_post_template_'.strtolower($post_type));
228 228
 		}
229 229
 
230
-		if ( !$template ) {
230
+		if ( ! $template) {
231 231
 			return '';
232 232
 		}
233 233
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	} // END alnp_get_template()
236 236
 }
237 237
 
238
-if ( ! function_exists( 'alnp_find_template' ) ) {
238
+if ( ! function_exists('alnp_find_template')) {
239 239
 	/**
240 240
 	 * Scans through the active theme to look for the content to load.
241 241
 	 * If the content is not found then the fallback will be used.
@@ -246,27 +246,27 @@  discard block
 block discarded – undo
246 246
 	 * @param  string $post_format
247 247
 	 * @return array
248 248
 	*/
249
-	function alnp_find_template( $location = '', $post_type, $post_format ) {
249
+	function alnp_find_template($location = '', $post_type, $post_format) {
250 250
 		// Templates to look for based on the post that is loaded.
251
-		$templates = alnp_get_templates( $post_type, $post_format );
251
+		$templates = alnp_get_templates($post_type, $post_format);
252 252
 
253 253
 		$found = false;
254 254
 
255 255
 		// Scanning all possible templates within the set location.
256
-		foreach( $templates as $template ) {
256
+		foreach ($templates as $template) {
257 257
 			// Remove forwardslash if location is the parent theme folder.
258
-			if ( empty( $location ) ) {
258
+			if (empty($location)) {
259 259
 				$location = str_replace('/', '', $location);
260 260
 			}
261 261
 
262 262
 			// If a template has been found then return it.
263
-			if ( locate_template( $location . $template ) != '' && $found != true ) {
264
-				$file = $location . $template;
263
+			if (locate_template($location.$template) != '' && $found != true) {
264
+				$file = $location.$template;
265 265
 
266
-				if ( ! empty( $post_format ) ) {
267
-					update_option( 'auto_load_next_post_template_post_' . strtolower( $post_format ), $file );
266
+				if ( ! empty($post_format)) {
267
+					update_option('auto_load_next_post_template_post_'.strtolower($post_format), $file);
268 268
 				} else {
269
-					update_option( 'auto_load_next_post_template_' . strtolower( $post_type ), $file );
269
+					update_option('auto_load_next_post_template_'.strtolower($post_type), $file);
270 270
 				}
271 271
 		
272 272
 				$found = true;
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	} // END alnp_find_template()
281 281
 }
282 282
 
283
-if ( ! function_exists( 'alnp_load_content' ) ) {
283
+if ( ! function_exists('alnp_load_content')) {
284 284
 	/**
285 285
 	 * Loads theme template set either by theme support or setup wizard.
286 286
 	 * If the content is not found then a fallback template will be used.
@@ -289,59 +289,59 @@  discard block
 block discarded – undo
289 289
 	 * @param string $post_type
290 290
 	 * @param string $post_format
291 291
 	 */
292
-	function alnp_load_content( $post_type, $post_format ) {
292
+	function alnp_load_content($post_type, $post_format) {
293 293
 		// Returns template location for supported themes.
294 294
 		$template_location = alnp_template_location();
295 295
 
296 296
 		$content_found = false;
297 297
 
298 298
 		// Check and return directory and template if already found.
299
-		if ( empty( $template_location ) ) {
300
-			$directory = alnp_get_template_directory( $post_type, $post_format );
299
+		if (empty($template_location)) {
300
+			$directory = alnp_get_template_directory($post_type, $post_format);
301 301
 		} else {
302 302
 			$directory = $template_location;
303 303
 		}
304 304
 
305
-		$template = alnp_get_template( $post_type, $post_format );
305
+		$template = alnp_get_template($post_type, $post_format);
306 306
 
307
-		if ( ! empty( $directory ) && ! empty( $template ) ) {
308
-			$template      = $directory . $template;
307
+		if ( ! empty($directory) && ! empty($template)) {
308
+			$template      = $directory.$template;
309 309
 			$content_found = true;
310 310
 		} else {
311 311
 			// Possible locations where the content files are found.
312 312
 			$locations = alnp_get_locations();
313 313
 
314 314
 			// Scanning all possible locations.
315
-			foreach( $locations as $location ) {
316
-				$template      = alnp_find_template( $directory, $post_type, $post_format );
315
+			foreach ($locations as $location) {
316
+				$template      = alnp_find_template($directory, $post_type, $post_format);
317 317
 				$content_found = $template['found'];
318 318
 			}
319 319
 		}
320 320
 
321 321
 		// Can be overridden.
322
-		$content_found = apply_filters( 'alnp_content_found', $content_found );
322
+		$content_found = apply_filters('alnp_content_found', $content_found);
323 323
 
324 324
 		// Check if the user has forced the use of the fallback template.
325
-		$use_fallback = get_option( 'auto_load_next_post_use_fallback' );
325
+		$use_fallback = get_option('auto_load_next_post_use_fallback');
326 326
 
327 327
 		// If content is found then load the template part.
328
-		if ( $content_found && empty( $use_fallback ) ) {
329
-			locate_template( $template, true, false );
328
+		if ($content_found && empty($use_fallback)) {
329
+			locate_template($template, true, false);
330 330
 		}
331 331
 		else {
332
-			do_action( 'alnp_load_content', $post_type );
332
+			do_action('alnp_load_content', $post_type);
333 333
 		}
334 334
 	} // END alnp_load_content()
335 335
 }
336 336
 
337
-if ( ! function_exists( 'alnp_load_fallback_content' ) ) {
337
+if ( ! function_exists('alnp_load_fallback_content')) {
338 338
 	/**
339 339
 	 * Load fallback template should no content file be found.
340 340
 	 *
341 341
 	 * @since 1.6.0
342 342
 	 * @param string $post_type
343 343
 	 */
344
-	function alnp_load_fallback_content( $post_type ) {
345
-		get_template_part( AUTO_LOAD_NEXT_POST_FILE_PATH . '/templates/content/content', $post_type );
344
+	function alnp_load_fallback_content($post_type) {
345
+		get_template_part(AUTO_LOAD_NEXT_POST_FILE_PATH.'/templates/content/content', $post_type);
346 346
 	} // END alnp_load_fallback_content()
347 347
 }
Please login to merge, or discard this patch.
includes/auto-load-next-post-core-functions.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
  */
14 14
 
15 15
 // Exit if accessed directly.
16
-if ( ! defined( 'ABSPATH' ) ) {
16
+if ( ! defined('ABSPATH')) {
17 17
 	exit;
18 18
 }
19 19
 
20
-if ( ! function_exists( 'alnp_get_post_type' ) ) {
20
+if ( ! function_exists('alnp_get_post_type')) {
21 21
 	/**
22 22
 	 * Returns the post type.
23 23
 	 *
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		$post_type = get_post_type();
29 29
 
30 30
 		// If the post type is a post then return single instead.
31
-		if ( $post_type == 'post' ) {
31
+		if ($post_type == 'post') {
32 32
 			return 'single';
33 33
 		}
34 34
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 }
38 38
 
39
-if ( ! function_exists( 'alnp_get_post_types' ) ) {
39
+if ( ! function_exists('alnp_get_post_types')) {
40 40
 	/**
41 41
 	 * This returns a list of public registered post types.
42 42
 	 *
@@ -49,35 +49,35 @@  discard block
 block discarded – undo
49 49
 		);
50 50
 
51 51
 		// If Auto Load Next Post Pro is installed then return all public post types.
52
-		if ( is_alnp_pro_version_installed() ) {
53
-			$post_types = get_post_types( array( 'public' => true ), 'names' );
52
+		if (is_alnp_pro_version_installed()) {
53
+			$post_types = get_post_types(array('public' => true), 'names');
54 54
 		}
55 55
 
56 56
 		// Un-supported post types are unset.
57
-		$post_types = alnp_unset_unsupported_post_types( $post_types );
57
+		$post_types = alnp_unset_unsupported_post_types($post_types);
58 58
 
59 59
 		return $post_types;
60 60
 	} // END alnp_get_post_types()
61 61
 }
62 62
 
63
-if ( ! function_exists( 'alnp_unset_unsupported_post_types' ) ) {
63
+if ( ! function_exists('alnp_unset_unsupported_post_types')) {
64 64
 	/**
65 65
 	 * Unsets un-supported post types.
66 66
 	 *
67 67
 	 * @since  1.6.0
68 68
 	 * @return array $post_types
69 69
 	 */
70
-	function alnp_unset_unsupported_post_types( $post_types ) {
71
-		unset( $post_types['elementor_library'] );
72
-		unset( $post_types['tdb_templates'] );
70
+	function alnp_unset_unsupported_post_types($post_types) {
71
+		unset($post_types['elementor_library']);
72
+		unset($post_types['tdb_templates']);
73 73
 
74
-		$post_types = apply_filters( 'alnp_unset_unsupported_post_types', $post_types );
74
+		$post_types = apply_filters('alnp_unset_unsupported_post_types', $post_types);
75 75
 
76 76
 		return $post_types;
77 77
 	} // END alnp_unset_unsupported_post_types()
78 78
 }
79 79
 
80
-if ( ! function_exists( 'alnp_get_random_page_permalink' ) ) {
80
+if ( ! function_exists('alnp_get_random_page_permalink')) {
81 81
 	/**
82 82
 	 * Returns the permalink of a random page
83 83
 	 *
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @param  string $post_type - Default is post.
86 86
 	 * @return int|boolean
87 87
 	 */
88
-	function alnp_get_random_page_permalink( $post_type = 'post' ) {
88
+	function alnp_get_random_page_permalink($post_type = 'post') {
89 89
 		$args = array(
90 90
 			'post_type'      => $post_type,
91 91
 			'post_status'    => 'publish',
@@ -93,13 +93,13 @@  discard block
 block discarded – undo
93 93
 			'posts_per_page' => 1
94 94
 		);
95 95
 
96
-		$query = new WP_Query( $args );
96
+		$query = new WP_Query($args);
97 97
 
98
-		if ( $query->have_posts() ) {
99
-			while ( $query->have_posts() ) : $query->the_post();
98
+		if ($query->have_posts()) {
99
+			while ($query->have_posts()) : $query->the_post();
100 100
 				$id = get_the_ID();
101 101
 
102
-				return get_permalink( $id );
102
+				return get_permalink($id);
103 103
 			endwhile;
104 104
 		} else {
105 105
 			return false;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	} // END alnp_get_random_page_permalink()
108 108
 }
109 109
 
110
-if ( ! function_exists( 'alnp_load_js_in_footer' ) ) {
110
+if ( ! function_exists('alnp_load_js_in_footer')) {
111 111
 	/**
112 112
 	 * This helps the plugin decide to load the JavaScript in the footer or not.
113 113
 	 * 
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
 	 * @return boolean
116 116
 	 */
117 117
 	function alnp_load_js_in_footer() {
118
-		$load_in_footer = get_option( 'auto_load_next_post_load_js_in_footer', false );
118
+		$load_in_footer = get_option('auto_load_next_post_load_js_in_footer', false);
119 119
 
120
-		if ( isset( $load_in_footer ) && $load_in_footer == 'yes' ) {
120
+		if (isset($load_in_footer) && $load_in_footer == 'yes') {
121 121
 			return true;
122 122
 		}
123 123
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	} // END alnp_load_js_in_footer()
126 126
 }
127 127
 
128
-if ( ! function_exists( 'alnp_disable_on_mobile' ) ) {
128
+if ( ! function_exists('alnp_disable_on_mobile')) {
129 129
 	/**
130 130
 	 * This helps the plugin decide to disable Auto Load Next Post 
131 131
 	 * from running on mobile devices.
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
 	 * @return boolean
135 135
 	 */
136 136
 	function alnp_disable_on_mobile() {
137
-		$disable_mobile = get_option( 'auto_load_next_post_disable_on_mobile', false );
137
+		$disable_mobile = get_option('auto_load_next_post_disable_on_mobile', false);
138 138
 
139
-		if ( isset( $disable_mobile ) && $disable_mobile == 'yes' ) {
139
+		if (isset($disable_mobile) && $disable_mobile == 'yes') {
140 140
 			return true;
141 141
 		}
142 142
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	} // END alnp_disable_on_mobile()
145 145
 }
146 146
 
147
-if ( ! function_exists( 'alnp_get_admin_screens' ) ) {
147
+if ( ! function_exists('alnp_get_admin_screens')) {
148 148
 	/**
149 149
 	 * These are the only screens Auto Load Next Post will focus 
150 150
 	 * on displaying notices or equeue scripts/styles.
@@ -163,13 +163,13 @@  discard block
 block discarded – undo
163 163
 	} // END alnp_get_admin_screens()
164 164
 }
165 165
 
166
-if ( ! function_exists( 'alnp_meta_version' ) ) {
166
+if ( ! function_exists('alnp_meta_version')) {
167 167
 	/**
168 168
 	 * Adds the plugin version to the header.
169 169
 	 *
170 170
 	 * @since 1.6.0
171 171
 	 */
172 172
 	function alnp_meta_version() {
173
-		echo '<meta name="generator" content="Auto Load Next Post ' . esc_attr( AUTO_LOAD_NEXT_POST_VERSION ) . '" />' . "\n";
173
+		echo '<meta name="generator" content="Auto Load Next Post '.esc_attr(AUTO_LOAD_NEXT_POST_VERSION).'" />'."\n";
174 174
 	} // END alnp_meta_version()
175 175
 }
176 176
\ No newline at end of file
Please login to merge, or discard this patch.