Completed
Branch master (16c0f9)
by
unknown
02:07
created
includes/admin/views/html-notice-please-review.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
18 18
 $current_user = wp_get_current_user();
19 19
 
20
-$time = auto_load_next_post_seconds_to_words( time() - $install_date );
20
+$time = auto_load_next_post_seconds_to_words(time() - $install_date);
21 21
 ?>
22 22
 <style type="text/css">
23 23
 .notice.auto-load-next-post-notice {
@@ -103,17 +103,17 @@  discard block
 block discarded – undo
103 103
 <div class="notice notice-info auto-load-next-post-notice">
104 104
 	<div class="auto-load-next-post-notice-inner">
105 105
 		<div class="auto-load-next-post-notice-icon">
106
-			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
106
+			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
107 107
 		</div>
108 108
 
109 109
 		<div class="auto-load-next-post-notice-content">
110
-			<h3><?php echo esc_html__( 'Are you enjoying Auto Load Next Post?', 'auto-load-next-post' ); ?></h3>
111
-			<p><?php printf( esc_html__( 'You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), esc_html( $time ) ); ?></p>
110
+			<h3><?php echo esc_html__('Are you enjoying Auto Load Next Post?', 'auto-load-next-post'); ?></h3>
111
+			<p><?php printf(esc_html__('You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), esc_html($time)); ?></p>
112 112
 		</div>
113 113
 
114 114
 		<div class="auto-load-next-post-review-now">
115
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url( 'https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post' ), esc_html__( 'Leave a Review', 'auto-load-next-post' ) ); ?>
116
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_review_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'No thank you / I already have', 'auto-load-next-post' ); ?></a>
115
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url('https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post'), esc_html__('Leave a Review', 'auto-load-next-post')); ?>
116
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_review_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('No thank you / I already have', 'auto-load-next-post'); ?></a>
117 117
 		</div>
118 118
 	</div>
119 119
 </div>
Please login to merge, or discard this patch.
includes/admin/class-auto-load-next-post-admin-help.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
18
-if ( ! class_exists( 'Auto_Load_Next_Post_Admin_Help' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Admin_Help')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_Admin_Help {
21 21
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		 * @since  1.0.0
27 27
 		 */
28 28
 		public function __construct() {
29
-			add_action( 'current_screen', array( $this, 'add_help_tabs' ), 50 );
29
+			add_action('current_screen', array($this, 'add_help_tabs'), 50);
30 30
 		} // END __construct()
31 31
 
32 32
 		/**
@@ -38,62 +38,62 @@  discard block
 block discarded – undo
38 38
 		public function add_help_tabs() {
39 39
 			$screen = get_current_screen();
40 40
 
41
-			if (	$screen->id != 'settings_page_auto-load-next-post-settings') {
41
+			if ($screen->id != 'settings_page_auto-load-next-post-settings') {
42 42
 				return;
43 43
 			}
44 44
 
45
-			$screen->add_help_tab( array(
45
+			$screen->add_help_tab(array(
46 46
 				'id'      => 'auto_load_next_post_docs_tab',
47
-				'title'   => __( 'General Settings', 'auto-load-next-post' ),
47
+				'title'   => __('General Settings', 'auto-load-next-post'),
48 48
 				'content' =>
49
-					'<h2>' . __( 'General Settings', 'auto-load-next-post' ) . '</h2>' .
50
-					'<p>' . sprintf( __( '%s requires theme selectors to match the active theme in order to detect the elements and let the magic happen.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
51
-					'<p>' . __( 'When the plugin was activated, the theme selectors are set to WordPress theme standard. If you are experiencing any problems, it is most likely that at least one of these selectors need to be changed however it could also be related with the theme template structure.', 'auto-load-next-post' ) . '</p>' .
52
-					'<p>' . __( 'These are the default theme selectors when Auto Load Next Post is installed.', 'auto-load-next-post' ) . '</p>' .
53
-					'<h5>' . __( 'Default Theme Selectors', 'auto-load-next-post' ) . '</h5>' .
54
-					'<ul>' .
55
-					'<li><strong>' . __( 'Content Container', 'auto-load-next-post' ) . '</strong>' . '<br>main.site-main</li>' .
56
-					'<li><strong>' . __( 'Post Title', 'auto-load-next-post' ) . '</strong>' . '<br>h1.entry-title</li>' .
57
-					'<li><strong>' . __( 'Post Navigation', 'auto-load-next-post' ) . '</strong>' . '<br>nav.post-navigation</li>' .
58
-					'<li><strong>' . __( 'Comments Container', 'auto-load-next-post' ) . '</strong>' . '<br>div#comments</li>' .
49
+					'<h2>'.__('General Settings', 'auto-load-next-post').'</h2>'.
50
+					'<p>'.sprintf(__('%s requires theme selectors to match the active theme in order to detect the elements and let the magic happen.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
51
+					'<p>'.__('When the plugin was activated, the theme selectors are set to WordPress theme standard. If you are experiencing any problems, it is most likely that at least one of these selectors need to be changed however it could also be related with the theme template structure.', 'auto-load-next-post').'</p>'.
52
+					'<p>'.__('These are the default theme selectors when Auto Load Next Post is installed.', 'auto-load-next-post').'</p>'.
53
+					'<h5>'.__('Default Theme Selectors', 'auto-load-next-post').'</h5>'.
54
+					'<ul>'.
55
+					'<li><strong>'.__('Content Container', 'auto-load-next-post').'</strong>'.'<br>main.site-main</li>'.
56
+					'<li><strong>'.__('Post Title', 'auto-load-next-post').'</strong>'.'<br>h1.entry-title</li>'.
57
+					'<li><strong>'.__('Post Navigation', 'auto-load-next-post').'</strong>'.'<br>nav.post-navigation</li>'.
58
+					'<li><strong>'.__('Comments Container', 'auto-load-next-post').'</strong>'.'<br>div#comments</li>'.
59 59
 					'</ul>'
60
-			) );
60
+			));
61 61
 
62
-			$screen->add_help_tab( array(
62
+			$screen->add_help_tab(array(
63 63
 				'id'      => 'auto_load_next_post_support_tab',
64
-				'title'   => __( 'Help & Support', 'auto-load-next-post' ),
64
+				'title'   => __('Help & Support', 'auto-load-next-post'),
65 65
 				'content' =>
66
-					'<h2>' . __( 'Help & Support', 'auto-load-next-post' ) . '</h2>' .
67
-					'<p>' . sprintf( __( 'Should you need help understanding, using, or extending Auto Load Next Post, please <a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">read the documentation</a>. You will find snippets, tutorials and much more.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
68
-					'<p>' . sprintf( __( 'For further assistance with %s you can use the <a href="%s" target="_blank">community forum</a>.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), 'https://wordpress.org/support/plugin/auto-load-next-post' ) . '</p> ' .
69
-					'<p>' . sprintf( __( '%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">Translate %1$s</a>.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
70
-					'<p><a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-primary" target="_blank">' . __( 'Documentation', 'auto-load-next-post' ) . '</a> <a href="https://wordpress.org/support/plugin/auto-load-next-post" class="button button-secondary" target="_blank">' . __( 'Community Forum', 'auto-load-next-post' ) . '</a> <a href="https://autoloadnextpost.com/f-a-q/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button" target="_blank">' . __( 'Frequently Asked Questions', 'auto-load-next-post' ) . '</a></p>'
71
-			) );
66
+					'<h2>'.__('Help & Support', 'auto-load-next-post').'</h2>'.
67
+					'<p>'.sprintf(__('Should you need help understanding, using, or extending Auto Load Next Post, please <a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">read the documentation</a>. You will find snippets, tutorials and much more.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
68
+					'<p>'.sprintf(__('For further assistance with %s you can use the <a href="%s" target="_blank">community forum</a>.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), 'https://wordpress.org/support/plugin/auto-load-next-post').'</p> '.
69
+					'<p>'.sprintf(__('%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">Translate %1$s</a>.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
70
+					'<p><a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-primary" target="_blank">'.__('Documentation', 'auto-load-next-post').'</a> <a href="https://wordpress.org/support/plugin/auto-load-next-post" class="button button-secondary" target="_blank">'.__('Community Forum', 'auto-load-next-post').'</a> <a href="https://autoloadnextpost.com/f-a-q/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button" target="_blank">'.__('Frequently Asked Questions', 'auto-load-next-post').'</a></p>'
71
+			));
72 72
 
73
-			$screen->add_help_tab( array(
73
+			$screen->add_help_tab(array(
74 74
 				'id'      => 'auto_load_next_post_bugs_tab',
75
-				'title'   => __( 'Found a bug?', 'auto-load-next-post' ),
75
+				'title'   => __('Found a bug?', 'auto-load-next-post'),
76 76
 				'content' =>
77
-					'<h2>' . __( 'Found a bug?', 'auto-load-next-post' ) . '</h2>' .
78
-					'<p>' . sprintf( __( 'If you find a bug within %s, please <a href="%s" target="_blank">report the issue</a> by creating a ticket on the GitHub repository where I can deal with it more appropriately. Please ensure that you have read the <a href="%s" target="_blank">guidelines to contributing</a> prior to submitting your report. To help me solve the issue, please be as descriptive as possible.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), 'https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open', 'https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/blob/master/CONTRIBUTING.md') . '</p>' .
79
-					'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" class="button button-primary" target="_blank">' . __( 'Report an Issue', 'auto-load-next-post' ) . '</a></p>'
80
-			) );
77
+					'<h2>'.__('Found a bug?', 'auto-load-next-post').'</h2>'.
78
+					'<p>'.sprintf(__('If you find a bug within %s, please <a href="%s" target="_blank">report the issue</a> by creating a ticket on the GitHub repository where I can deal with it more appropriately. Please ensure that you have read the <a href="%s" target="_blank">guidelines to contributing</a> prior to submitting your report. To help me solve the issue, please be as descriptive as possible.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), 'https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open', 'https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/blob/master/CONTRIBUTING.md').'</p>'.
79
+					'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" class="button button-primary" target="_blank">'.__('Report an Issue', 'auto-load-next-post').'</a></p>'
80
+			));
81 81
 
82 82
 			$screen->add_help_tab(array(
83 83
 				'id'      => 'auto_load_next_post_feedback_tab',
84
-				'title'   => __( 'Feedback', 'auto-load-next-post' ),
84
+				'title'   => __('Feedback', 'auto-load-next-post'),
85 85
 				'content' =>
86
-					'<h2>' . __( 'Feedback', 'auto-load-next-post' ) . '</h2>' .
87
-					'<p>' . __( 'Your feedback is very important to me. Please consider leaving a review on WordPress.org or complete a simple survey.', 'auto-load-next-post' ) . '</p>' .
88
-					'<p>' . sprintf( __( 'If %1$s has worked out for you well and you like it, please consider <a href="%2$s" target="_blank">making a donation</a>.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), 'https://autoloadnextpost.com/donate/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab').'</p>'.
89
-					'<p><a href="https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?filter=5#postform" class="button button-primary" target="_blank">' . __( 'Submit a Review', 'auto-load-next-post' ) . '</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdzxlvnXRBIw8gqI7Z2O-HzYtncpGjDkLjlaeZLVsfrR61FNA/viewform?usp=sf_link" class="button button-secondary" target="_blank">' . __( 'Complete a Simple Survey', 'auto-load-next-post' ) . '</a> <a href="https://autoloadnextpost.com/donate/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-secondary" target="_blank">' . __( 'Make a Donation', 'auto-load-next-post' ) . '</a></p>'
90
-			) );
86
+					'<h2>'.__('Feedback', 'auto-load-next-post').'</h2>'.
87
+					'<p>'.__('Your feedback is very important to me. Please consider leaving a review on WordPress.org or complete a simple survey.', 'auto-load-next-post').'</p>'.
88
+					'<p>'.sprintf(__('If %1$s has worked out for you well and you like it, please consider <a href="%2$s" target="_blank">making a donation</a>.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), 'https://autoloadnextpost.com/donate/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab').'</p>'.
89
+					'<p><a href="https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?filter=5#postform" class="button button-primary" target="_blank">'.__('Submit a Review', 'auto-load-next-post').'</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdzxlvnXRBIw8gqI7Z2O-HzYtncpGjDkLjlaeZLVsfrR61FNA/viewform?usp=sf_link" class="button button-secondary" target="_blank">'.__('Complete a Simple Survey', 'auto-load-next-post').'</a> <a href="https://autoloadnextpost.com/donate/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-secondary" target="_blank">'.__('Make a Donation', 'auto-load-next-post').'</a></p>'
90
+			));
91 91
 
92 92
 			$screen->set_help_sidebar(
93
-				'<p><strong>' . __( 'For more information:', 'auto-load-next-post' ) . '</strong></p>' .
94
-				'<p><a href="https://autoloadnextpost.com/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">' . sprintf( __( 'About %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>' .
95
-				'<p><a href="https://wordpress.org/plugins/auto-load-next-post" target="_blank">' . __( 'WordPress.org Project', 'auto-load-next-post' ) . '</a></p>' .
96
-				'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/" target="_blank">' . __( 'Github Project', 'auto-load-next-post' ) . '</a></p>'
93
+				'<p><strong>'.__('For more information:', 'auto-load-next-post').'</strong></p>'.
94
+				'<p><a href="https://autoloadnextpost.com/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">'.sprintf(__('About %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>'.
95
+				'<p><a href="https://wordpress.org/plugins/auto-load-next-post" target="_blank">'.__('WordPress.org Project', 'auto-load-next-post').'</a></p>'.
96
+				'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/" target="_blank">'.__('Github Project', 'auto-load-next-post').'</a></p>'
97 97
 			);
98 98
 
99 99
 		} // END add_help_tabs()
Please login to merge, or discard this patch.
includes/auto-load-next-post-conditional-functions.php 1 patch
Spacing   +7 added lines, -7 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( 'auto_load_next_post_is_ajax' ) ) {
20
+if ( ! function_exists('auto_load_next_post_is_ajax')) {
21 21
 	/**
22 22
 	 * Returns true when the page is loaded via ajax.
23 23
 	 *
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
 	 * @return bool
27 27
 	 */
28 28
 	function auto_load_next_post_is_ajax() {
29
-		if ( defined( 'DOING_AJAX' ) ) {
29
+		if (defined('DOING_AJAX')) {
30 30
 			return true;
31 31
 		}
32 32
 
33
-		return( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) == 'xmlhttprequest' ) ? true : false;
33
+		return(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') ? true : false;
34 34
 	} // END auto_load_next_post_is_ajax
35 35
 }
36 36
 
37
-if ( ! function_exists( 'supports_alnp' ) ) {
37
+if ( ! function_exists('supports_alnp')) {
38 38
 	/**
39 39
 	 * Returns true or false if Auto Load Next Post supports the theme.
40 40
 	 *
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	} // END supports_alnp()
60 60
 }
61 61
 
62
-if ( ! function_exists( 'alnp_template_location' ) ) {
62
+if ( ! function_exists('alnp_template_location')) {
63 63
 	/**
64 64
 	 * Filters the template location for get_template_part().
65 65
 	 *
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	function alnp_template_location() {
72 72
 		$current_theme = get_option('template');
73 73
 
74
-		switch( $current_theme ) {
74
+		switch ($current_theme) {
75 75
 			case 'twentyseventeen':
76 76
 				$path = 'template-parts/post/';
77 77
 				break;
Please login to merge, or discard this patch.
includes/class-auto-load-next-post-install.php 1 patch
Spacing   +23 added lines, -23 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 ( ! class_exists( 'Auto_Load_Next_Post_Install' ) ) {
19
+if ( ! class_exists('Auto_Load_Next_Post_Install')) {
20 20
 
21 21
 	class Auto_Load_Next_Post_Install {
22 22
 
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
 		 * @access public
38 38
 		 */
39 39
 		public function __construct() {
40
-			add_action( 'init', array( __CLASS__, 'add_rewrite_endpoint' ), 0 );
41
-			add_action( 'init', array( __CLASS__, 'check_version' ), 5 );
40
+			add_action('init', array(__CLASS__, 'add_rewrite_endpoint'), 0);
41
+			add_action('init', array(__CLASS__, 'check_version'), 5);
42 42
 
43 43
 			// Get plugin version.
44
-			self::$current_version = get_option( 'auto_load_next_post_version', null );
44
+			self::$current_version = get_option('auto_load_next_post_version', null);
45 45
 		} // END __construct()
46 46
 
47 47
 		/**
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 		 * @since  1.4.10
55 55
 		 */
56 56
 		public static function check_version() {
57
-			if ( ! defined( 'IFRAME_REQUEST' ) && version_compare( self::$current_version, AUTO_LOAD_NEXT_POST_VERSION, '<' ) ) {
57
+			if ( ! defined('IFRAME_REQUEST') && version_compare(self::$current_version, AUTO_LOAD_NEXT_POST_VERSION, '<')) {
58 58
 				self::install();
59
-				do_action( 'auto_load_next_post_updated' );
59
+				do_action('auto_load_next_post_updated');
60 60
 			}
61 61
 		} // END check_version()
62 62
 
@@ -69,19 +69,19 @@  discard block
 block discarded – undo
69 69
 		 * @version 1.4.10
70 70
 		 */
71 71
 		public static function install() {
72
-			if ( ! is_blog_installed() ) {
72
+			if ( ! is_blog_installed()) {
73 73
 				return;
74 74
 			}
75 75
 
76 76
 			// Check if we are not already running this routine.
77
-			if ( 'yes' === get_transient( 'alnp_installing' ) ) {
77
+			if ('yes' === get_transient('alnp_installing')) {
78 78
 				return;
79 79
 			}
80 80
 
81 81
 			// If we made it till here nothing is running yet, lets set the transient now for five minutes.
82
-			set_transient( 'alnp_installing', 'yes', MINUTE_IN_SECONDS * 5 );
83
-			if ( ! defined( 'AUTO_LOAD_NEXT_POST_INSTALLING' ) ) {
84
-				define( 'AUTO_LOAD_NEXT_POST_INSTALLING', true );
82
+			set_transient('alnp_installing', 'yes', MINUTE_IN_SECONDS * 5);
83
+			if ( ! defined('AUTO_LOAD_NEXT_POST_INSTALLING')) {
84
+				define('AUTO_LOAD_NEXT_POST_INSTALLING', true);
85 85
 			}
86 86
 
87 87
 			// Add default options.
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
 			// Set activation date.
94 94
 			self::set_install_date();
95 95
 
96
-			delete_transient( 'alnp_installing' );
96
+			delete_transient('alnp_installing');
97 97
 
98
-			do_action( 'alnp_installed' );
98
+			do_action('alnp_installed');
99 99
 		} // END install()
100 100
 
101 101
 		/**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		 * @static
106 106
 		 */
107 107
 		private static function update_version() {
108
-			update_option( 'auto_load_next_post_version', AUTO_LOAD_NEXT_POST_VERSION );
108
+			update_option('auto_load_next_post_version', AUTO_LOAD_NEXT_POST_VERSION);
109 109
 		} // END update_version()
110 110
 
111 111
 		/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		 * @version 1.4.10
118 118
 		 */
119 119
 		public static function set_install_date() {
120
-			add_site_option( 'auto_load_next_post_install_date', time() );
120
+			add_site_option('auto_load_next_post_install_date', time());
121 121
 		} // END set_install_date()
122 122
 
123 123
 		/**
@@ -131,15 +131,15 @@  discard block
 block discarded – undo
131 131
 		 */
132 132
 		public static function create_options() {
133 133
 			// Include settings so that we can run through defaults
134
-			include_once( dirname( __FILE__ ) . '/admin/class-auto-load-next-post-admin-settings.php' );
134
+			include_once(dirname(__FILE__).'/admin/class-auto-load-next-post-admin-settings.php');
135 135
 
136 136
 			$settings = Auto_Load_Next_Post_Admin_Settings::get_settings_pages();
137 137
 
138
-			foreach ( $settings as $section ) {
139
-				foreach ( $section->get_settings() as $value ) {
140
-					if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
141
-						$autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true;
142
-						add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) );
138
+			foreach ($settings as $section) {
139
+				foreach ($section->get_settings() as $value) {
140
+					if (isset($value['default']) && isset($value['id'])) {
141
+						$autoload = isset($value['autoload']) ? (bool) $value['autoload'] : true;
142
+						add_option($value['id'], $value['default'], '', ($autoload ? 'yes' : 'no'));
143 143
 					}
144 144
 				}
145 145
 			}
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		 * @since  1.0.0
153 153
 		 */
154 154
 		public static function add_rewrite_endpoint() {
155
-			add_rewrite_endpoint( 'partial', EP_PERMALINK );
155
+			add_rewrite_endpoint('partial', EP_PERMALINK);
156 156
 
157 157
 			// Refresh permalinks
158 158
 			flush_rewrite_rules();
Please login to merge, or discard this patch.
includes/auto-load-next-post-formatting-functions.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -33,58 +33,58 @@  discard block
 block discarded – undo
33 33
  *
34 34
  * @param string $seconds Seconds in time.
35 35
  */
36
-function auto_load_next_post_seconds_to_words( $seconds ) {
36
+function auto_load_next_post_seconds_to_words($seconds) {
37 37
 	// Get the years.
38
-	$years = ( intval( $seconds ) / YEAR_IN_SECONDS ) % 100;
39
-	if ( $years > 1 ) {
38
+	$years = (intval($seconds) / YEAR_IN_SECONDS) % 100;
39
+	if ($years > 1) {
40 40
 		/* translators: Number of years */
41
-		return sprintf( __( '%s years', 'auto-load-next-post' ), $years );
42
-	} elseif ( $years > 0 ) {
43
-		return __( 'a year', 'auto-load-next-post' );
41
+		return sprintf(__('%s years', 'auto-load-next-post'), $years);
42
+	} elseif ($years > 0) {
43
+		return __('a year', 'auto-load-next-post');
44 44
 	}
45 45
 
46 46
 	// Get the weeks.
47
-	$weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) % 52;
48
-	if ( $weeks > 1 ) {
47
+	$weeks = (intval($seconds) / WEEK_IN_SECONDS) % 52;
48
+	if ($weeks > 1) {
49 49
 		/* translators: Number of weeks */
50
-		return sprintf( __( '%s weeks', 'auto-load-next-post' ), $weeks );
51
-	} elseif ( $weeks > 0 ) {
52
-		return __( 'a week', 'auto-load-next-post' );
50
+		return sprintf(__('%s weeks', 'auto-load-next-post'), $weeks);
51
+	} elseif ($weeks > 0) {
52
+		return __('a week', 'auto-load-next-post');
53 53
 	}
54 54
 
55 55
 	// Get the days.
56
-	$days = ( intval( $seconds ) / DAY_IN_SECONDS ) % 7;
57
-	if ( $days > 1 ) {
56
+	$days = (intval($seconds) / DAY_IN_SECONDS) % 7;
57
+	if ($days > 1) {
58 58
 		/* translators: Number of days */
59
-		return sprintf( __( '%s days', 'auto-load-next-post' ), $days );
60
-	} elseif ( $days > 0 ) {
61
-		return __( 'a day', 'auto-load-next-post' );
59
+		return sprintf(__('%s days', 'auto-load-next-post'), $days);
60
+	} elseif ($days > 0) {
61
+		return __('a day', 'auto-load-next-post');
62 62
 	}
63 63
 
64 64
 	// Get the hours.
65
-	$hours = ( intval( $seconds ) / HOUR_IN_SECONDS ) % 24;
66
-	if ( $hours > 1 ) {
65
+	$hours = (intval($seconds) / HOUR_IN_SECONDS) % 24;
66
+	if ($hours > 1) {
67 67
 		/* translators: Number of hours */
68
-		return sprintf( __( '%s hours', 'auto-load-next-post' ), $hours );
69
-	} elseif ( $hours > 0 ) {
70
-		return __( 'an hour', 'auto-load-next-post' );
68
+		return sprintf(__('%s hours', 'auto-load-next-post'), $hours);
69
+	} elseif ($hours > 0) {
70
+		return __('an hour', 'auto-load-next-post');
71 71
 	}
72 72
 
73 73
 	// Get the minutes.
74
-	$minutes = ( intval( $seconds ) / MINUTE_IN_SECONDS ) % 60;
75
-	if ( $minutes > 1 ) {
74
+	$minutes = (intval($seconds) / MINUTE_IN_SECONDS) % 60;
75
+	if ($minutes > 1) {
76 76
 		/* translators: Number of minutes */
77
-		return sprintf( __( '%s minutes', 'auto-load-next-post' ), $minutes );
78
-	} elseif ( $minutes > 0 ) {
79
-		return __( 'a minute', 'auto-load-next-post' );
77
+		return sprintf(__('%s minutes', 'auto-load-next-post'), $minutes);
78
+	} elseif ($minutes > 0) {
79
+		return __('a minute', 'auto-load-next-post');
80 80
 	}
81 81
 
82 82
 	// Get the seconds.
83
-	$seconds = intval( $seconds ) % 60;
84
-	if ( $seconds > 1 ) {
83
+	$seconds = intval($seconds) % 60;
84
+	if ($seconds > 1) {
85 85
 		/* translators: Number of seconds */
86
-		return sprintf( __( '%s seconds', 'auto-load-next-post' ), $seconds );
87
-	} elseif ( $seconds > 0 ) {
88
-		return __( 'a second', 'auto-load-next-post' );
86
+		return sprintf(__('%s seconds', 'auto-load-next-post'), $seconds);
87
+	} elseif ($seconds > 0) {
88
+		return __('a second', 'auto-load-next-post');
89 89
 	}
90 90
 }
Please login to merge, or discard this patch.
includes/auto-load-next-post-core-functions.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@  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 20
 // Include core functions
21
-include( dirname( __FILE__ ) . '/auto-load-next-post-conditional-functions.php');
22
-include( dirname( __FILE__ ) . '/auto-load-next-post-formatting-functions.php');
21
+include(dirname(__FILE__).'/auto-load-next-post-conditional-functions.php');
22
+include(dirname(__FILE__).'/auto-load-next-post-formatting-functions.php');
23 23
 
24 24
 /**
25 25
  * When the 'partial' endpoint is used on a post, retrieve only the post content.
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	global $wp_query;
33 33
 
34 34
 	// If this is not a request for partial or a singular object then bail
35
-	if ( ! isset( $wp_query->query_vars['partial'] ) || ! is_singular() ) {
35
+	if ( ! isset($wp_query->query_vars['partial']) || ! is_singular()) {
36 36
 		return;
37 37
 	}
38 38
 
@@ -41,23 +41,23 @@  discard block
 block discarded – undo
41 41
 	 * If theme does not have a template file for Auto Load Next Post,
42 42
 	 * the plugin will load a default template.
43 43
 	 */
44
-	$child_path    = get_stylesheet_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
45
-	$template_path = get_template_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
44
+	$child_path    = get_stylesheet_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
45
+	$template_path = get_template_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH;
46 46
 	$default_path  = AUTO_LOAD_NEXT_POST_FILE_PATH;
47 47
 
48
-	if ( file_exists( $child_path . 'content-partial.php' ) ) {
49
-		include( $child_path . 'content-partial.php' );
48
+	if (file_exists($child_path.'content-partial.php')) {
49
+		include($child_path.'content-partial.php');
50 50
 	}
51
-	else if( file_exists( $template_path . 'content-partial.php') ) {
52
-		include( $template_path . 'content-partial.php' );
51
+	else if (file_exists($template_path.'content-partial.php')) {
52
+		include($template_path.'content-partial.php');
53 53
 	}
54
-	else if( file_exists( $default_path . '/template/content-partial.php' ) ) {
55
-		include( $default_path . '/template/content-partial.php' );
54
+	else if (file_exists($default_path.'/template/content-partial.php')) {
55
+		include($default_path.'/template/content-partial.php');
56 56
 	}
57 57
 
58 58
 	exit;
59 59
 }
60
-add_action( 'template_redirect', 'auto_load_next_post_template_redirect' );
60
+add_action('template_redirect', 'auto_load_next_post_template_redirect');
61 61
 
62 62
 /**
63 63
  * Adds the comments template after the post content.
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
  */
68 68
 function auto_load_next_post_comments() {
69 69
 	// If comments are open or we have at least one comment, load up the comment template.
70
-	if ( comments_open() || get_comments_number() ) :
70
+	if (comments_open() || get_comments_number()) :
71 71
 		comments_template();
72 72
 	endif;
73 73
 }
74
-add_action( 'alnp_load_after_content', 'auto_load_next_post_comments', 1, 5 );
74
+add_action('alnp_load_after_content', 'auto_load_next_post_comments', 1, 5);
75 75
 
76 76
 /**
77 77
  * Adds the post navigation for the previous link only after the post content.
@@ -86,4 +86,4 @@  discard block
 block discarded – undo
86 86
 	</nav>
87 87
 	<?php
88 88
 }
89
-add_action( 'alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10 );
89
+add_action('alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10);
Please login to merge, or discard this patch.