Completed
Branch master (8062bc)
by
unknown
03:42 queued 01:52
created
includes/auto-load-next-post-core-functions.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -36,18 +36,18 @@  discard block
 block discarded – undo
36 36
 	 * If theme does not have a template file for Auto Load Next Post,
37 37
 	 * the plugin will load a default template.
38 38
 	 */
39
-	$child_path    = get_stylesheet_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
40
-	$template_path = get_template_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
39
+	$child_path    = get_stylesheet_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
40
+	$template_path = get_template_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
41 41
 	$default_path  = AUTO_LOAD_NEXT_POST_FILE_PATH;
42 42
 
43
-	if ( file_exists( $child_path . 'content-partial.php' ) ) {
44
-		include( $child_path . 'content-partial.php' );
43
+	if (file_exists($child_path.'content-partial.php')) {
44
+		include($child_path.'content-partial.php');
45 45
 	}
46
-	else if( file_exists( $template_path . 'content-partial.php') ) {
47
-		include( $template_path . 'content-partial.php' );
46
+	else if (file_exists($template_path.'content-partial.php')) {
47
+		include($template_path.'content-partial.php');
48 48
 	}
49
-	else if( file_exists( $default_path . '/template/content-partial.php' ) ) {
50
-		include( $default_path . '/template/content-partial.php' );
49
+	else if (file_exists($default_path.'/template/content-partial.php')) {
50
+		include($default_path.'/template/content-partial.php');
51 51
 	}
52 52
 
53 53
 	exit;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  */
62 62
 function auto_load_next_post_comments() {
63 63
 	// If comments are open or we have at least one comment, load up the comment template.
64
-	if ( comments_open() || get_comments_number() ) :
64
+	if (comments_open() || get_comments_number()) :
65 65
 		comments_template();
66 66
 	endif;
67 67
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,11 +42,9 @@
 block discarded – undo
42 42
 
43 43
 	if ( file_exists( $child_path . 'content-partial.php' ) ) {
44 44
 		include( $child_path . 'content-partial.php' );
45
-	}
46
-	else if( file_exists( $template_path . 'content-partial.php') ) {
45
+	} else if( file_exists( $template_path . 'content-partial.php') ) {
47 46
 		include( $template_path . 'content-partial.php' );
48
-	}
49
-	else if( file_exists( $default_path . '/template/content-partial.php' ) ) {
47
+	} else if( file_exists( $default_path . '/template/content-partial.php' ) ) {
50 48
 		include( $default_path . '/template/content-partial.php' );
51 49
 	}
52 50
 
Please login to merge, or discard this patch.
includes/auto-load-next-post-conditional-functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 	function alnp_template_location() {
70 70
 		$current_theme = get_option('template');
71 71
 
72
-		switch( $current_theme ) {
72
+		switch ($current_theme) {
73 73
 			case 'twentyseventeen':
74 74
 				$path = 'template-parts/post/';
75 75
 				break;
Please login to merge, or discard this patch.
template/content-partial.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 $template_location = apply_filters('alnp_template_location', ''); // e.g. "template-parts/post/"
9 9
 
10
-if ( have_posts() ) :
10
+if (have_posts()) :
11 11
 
12 12
 	// Load content before the loop.
13 13
 	do_action('alnp_load_before_loop');
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 
26 26
 		if (false === $post_format) {
27 27
 			// Include the standard content.php file.
28
-			get_template_part($template_location . 'content');
28
+			get_template_part($template_location.'content');
29 29
 		} else {
30 30
 			// Include the post format content.
31
-			if (locate_template($template_location . 'format-'.$post_format.'.php') != '') {
32
-				get_template_part($template_location . 'format', $post_format);
31
+			if (locate_template($template_location.'format-'.$post_format.'.php') != '') {
32
+				get_template_part($template_location.'format', $post_format);
33 33
 			} else {
34 34
 				// If no format-{post-format}.php file found then fallback to content-{post-format}.php
35
-				get_template_part($template_location . 'content', $post_format);
35
+				get_template_part($template_location.'content', $post_format);
36 36
 			}
37 37
 		}
38 38
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,9 +48,11 @@
 block discarded – undo
48 48
 		// Load content after the loop.
49 49
 		do_action('alnp_load_after_loop');
50 50
 
51
-else :
51
+else {
52
+	:
52 53
 
53 54
 	// Load content if there are no more posts.
54 55
 	do_action('alnp_no_more_posts');
56
+}
55 57
 
56 58
 endif; // END if have_posts()
Please login to merge, or discard this patch.
auto-load-next-post.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	exit; // Exit if accessed directly.
32 32
 }
33 33
 
34
-if ( ! class_exists('Auto_Load_Next_Post') ) {
34
+if ( ! class_exists('Auto_Load_Next_Post')) {
35 35
 
36 36
 /**
37 37
  * Main Auto Load Next Post Class
@@ -220,9 +220,9 @@  discard block
 block discarded – undo
220 220
 	 * @version 1.4.8
221 221
 	 */
222 222
 	public function load_plugin_textdomain() {
223
-		$locale = apply_filters( 'plugin_locale', get_locale(), 'auto-load-next-post' );
224
-		load_textdomain( 'auto-load-next-post', WP_LANG_DIR . '/auto-load-next-post/auto-load-next-post-' . $locale . '.mo' );
225
-		load_plugin_textdomain( 'auto-load-next-post', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
223
+		$locale = apply_filters('plugin_locale', get_locale(), 'auto-load-next-post');
224
+		load_textdomain('auto-load-next-post', WP_LANG_DIR.'/auto-load-next-post/auto-load-next-post-'.$locale.'.mo');
225
+		load_plugin_textdomain('auto-load-next-post', false, plugin_basename(dirname(__FILE__)).'/languages');
226 226
 	} // END load_plugin_textdomain()
227 227
 
228 228
 	/**
Please login to merge, or discard this patch.