Completed
Branch master (c7ddc0)
by
unknown
02:02
created
template/theme-support/oceanwp/content-alnp.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,60 +8,60 @@
 block discarded – undo
8 8
  * @version 1.5.8
9 9
  */
10 10
 
11
-if ( have_posts() ) :
11
+if (have_posts()) :
12 12
 
13 13
 	// Load content before the loop.
14
-	do_action( 'alnp_load_before_loop' );
14
+	do_action('alnp_load_before_loop');
15 15
 
16 16
 	// Check that there are posts to load.
17
-	while ( have_posts() ) : the_post();
17
+	while (have_posts()) : the_post();
18 18
 
19 19
 		$post_format = get_post_format(); // Post Format e.g. video
20 20
 
21 21
 		$post_type = alnp_get_post_type(); // Post Type e.g. single
22 22
 
23 23
 		// Load content before the post content.
24
-		do_action( 'alnp_load_before_content' );
24
+		do_action('alnp_load_before_content');
25 25
 
26 26
 		// Load content before the post content for a specific post format.
27
-		do_action( 'alnp_load_before_content_post_format_' . $post_format );
27
+		do_action('alnp_load_before_content_post_format_'.$post_format);
28 28
 
29 29
 		// Load content before the post content for a specific post type.
30
-		do_action( 'alnp_load_before_content_post_type_' . $post_type );
30
+		do_action('alnp_load_before_content_post_type_'.$post_type);
31 31
 
32
-		if ( false === $post_format ) {
32
+		if (false === $post_format) {
33 33
 			/*
34 34
 			 * Include the Post-Type-specific template for the content.
35 35
 			 * layout-___.php (where ___ is the Post Type name).
36 36
 			 */
37
-			if ( locate_template( alnp_template_location() . 'layout-' . $post_type . '.php') != '' ) {
38
-				get_template_part( alnp_template_location() . 'layout', $post_type );
37
+			if (locate_template(alnp_template_location().'layout-'.$post_type.'.php') != '') {
38
+				get_template_part(alnp_template_location().'layout', $post_type);
39 39
 			} else {
40 40
 				// If no specific post type found then fallback to standard layout.php file.
41
-				get_template_part( alnp_template_location() . 'layout' );
41
+				get_template_part(alnp_template_location().'layout');
42 42
 			}
43 43
 		} else {
44
-			get_template_part( alnp_template_location() . 'layout', $post_format );
44
+			get_template_part(alnp_template_location().'layout', $post_format);
45 45
 		}
46 46
 
47 47
 		// Load content after the post content for a specific post type.
48
-		do_action( 'alnp_load_after_content_post_type_' . $post_type );
48
+		do_action('alnp_load_after_content_post_type_'.$post_type);
49 49
 
50 50
 		// Load content after the post content for a specific post format.
51
-		do_action( 'alnp_load_after_content_post_format_' . $post_format );
51
+		do_action('alnp_load_after_content_post_format_'.$post_format);
52 52
 
53 53
 		// Load content after the post content.
54
-		do_action( 'alnp_load_after_content' );
54
+		do_action('alnp_load_after_content');
55 55
 
56 56
 	// End the loop.
57 57
 	endwhile;
58 58
 
59 59
 	// Load content after the loop.
60
-	do_action( 'alnp_load_after_loop' );
60
+	do_action('alnp_load_after_loop');
61 61
 
62 62
 else :
63 63
 
64 64
 	// Load content if there are no more posts.
65
-	do_action( 'alnp_no_more_posts' );
65
+	do_action('alnp_no_more_posts');
66 66
 
67 67
 endif; // END if have_posts()
Please login to merge, or discard this patch.
includes/admin/views/html-notice-theme-ready.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  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
 
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 <div class="notice notice-success auto-load-next-post-notice is-dismissible">
21 21
 	<div class="auto-load-next-post-notice-inner">
22 22
 		<div class="auto-load-next-post-notice-icon">
23
-			<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' ); ?>" />
23
+			<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'); ?>" />
24 24
 		</div>
25 25
 
26 26
 		<div class="auto-load-next-post-notice-content">
27
-			<h3><?php echo sprintf( esc_html__( 'Thank you for installing %1$s!', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></h3>
28
-			<p><?php echo sprintf( __( 'We detected your theme <strong>%1$s</strong> already supports %2$s. Everything is already setup for you and is ready to increase your pageviews.', 'auto-load-next-post' ), $active_theme->name, esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
27
+			<h3><?php echo sprintf(esc_html__('Thank you for installing %1$s!', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></h3>
28
+			<p><?php echo sprintf(__('We detected your theme <strong>%1$s</strong> already supports %2$s. Everything is already setup for you and is ready to increase your pageviews.', 'auto-load-next-post'), $active_theme->name, esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
29 29
 		</div>
30 30
 	</div>
31 31
 </div>
Please login to merge, or discard this patch.
includes/theme-support/class-alnp-oceanwp.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  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
 
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public static function init() {
31 31
 		// Add theme support and preset the theme selectors.
32
-		add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) );
32
+		add_action('after_setup_theme', array(__CLASS__, 'add_theme_support'));
33 33
 
34 34
 		// Filters the location of the repeater template.
35
-		add_filter( 'alnp_template_redirect', array( __CLASS__, 'template_redirect' ) );
35
+		add_filter('alnp_template_redirect', array(__CLASS__, 'template_redirect'));
36 36
 
37 37
 		// Filters the repeater template location.
38
-		add_filter( 'alnp_template_location', array( __CLASS__, 'alnp_oceanwp_template_location' ) );
38
+		add_filter('alnp_template_location', array(__CLASS__, 'alnp_oceanwp_template_location'));
39 39
 
40 40
 		// Remove Auto Load Next Post compatible post navigation.
41
-		remove_action( 'alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10 );
41
+		remove_action('alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10);
42 42
 	} // END init()
43 43
 
44 44
 	/**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @return string
49 49
 	 */
50 50
 	public static function template_redirect() {
51
-		return AUTO_LOAD_NEXT_POST_FILE_PATH . '/template/theme-support/oceanwp/content-alnp.php';
51
+		return AUTO_LOAD_NEXT_POST_FILE_PATH.'/template/theme-support/oceanwp/content-alnp.php';
52 52
 	} // END template_redirect()
53 53
 
54 54
 	/**
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
 	 * @static
70 70
 	 */
71 71
 	public static function add_theme_support() {
72
-		add_theme_support( 'auto-load-next-post', array(
72
+		add_theme_support('auto-load-next-post', array(
73 73
 			'content_container'    => 'div.site-content',
74 74
 			'title_selector'       => '.entry-title',
75 75
 			'navigation_container' => 'nav.post-navigation',
76 76
 			'comments_container'   => 'section#comments',
77 77
 			'load_js_in_footer'    => 'no',
78 78
 			'lock_js_in_footer'    => 'no',
79
-		) );
79
+		));
80 80
 	} // END add_theme_support()
81 81
 
82 82
 } // END class
Please login to merge, or discard this patch.
uninstall.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,18 +9,18 @@  discard block
 block discarded – undo
9 9
  * @package  Auto Load Next Post
10 10
  * @license  GPL-2.0+
11 11
  */
12
-if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
12
+if ( ! defined('ABSPATH') || ! defined('WP_UNINSTALL_PLUGIN')) {
13 13
 	exit(); // Exit if accessed directly.
14 14
 }
15 15
 
16 16
 global $wpdb;
17 17
 
18
-$uninstall = get_option( 'auto_load_next_post_uninstall_data' );
18
+$uninstall = get_option('auto_load_next_post_uninstall_data');
19 19
 
20
-if ( ! empty( $uninstall ) ) {
20
+if ( ! empty($uninstall)) {
21 21
 
22 22
 	// Make sure it is only a single site we are uninstalling from.
23
-	if ( ! is_multisite() ) {
23
+	if ( ! is_multisite()) {
24 24
 		// Delete options
25 25
 		$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'auto_load_next_post_%'");
26 26
 
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
 		$wpdb->query("DELETE FROM $wpdb->usermeta WHERE meta_key LIKE 'auto_load_next_post_%'");
29 29
 
30 30
 		// Delete Uninstall Data - Just to double check it has been removed.
31
-		delete_option( 'auto_load_next_post_uninstall_data' );
31
+		delete_option('auto_load_next_post_uninstall_data');
32 32
 
33 33
 		// Delete Install Date
34
-		delete_option( 'auto_load_next_post_install_date' );
34
+		delete_option('auto_load_next_post_install_date');
35 35
 	}
36 36
 	else {
37 37
 		// Delete Uninstall Data
38
-		delete_site_option( 'auto_load_next_post_uninstall_data' );
38
+		delete_site_option('auto_load_next_post_uninstall_data');
39 39
 
40 40
 		// Delete Install Date
41
-		delete_site_option( 'auto_load_next_post_install_date' );
41
+		delete_site_option('auto_load_next_post_install_date');
42 42
 	}
43 43
 }
44 44
 
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-notices.php 1 patch
Spacing   +40 added lines, -40 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_Notices' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Admin_Notices')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_Admin_Notices {
21 21
 
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 		 * @version 1.5.0
38 38
 		 */
39 39
 		public function __construct() {
40
-			self::$install_date = get_site_option( 'auto_load_next_post_install_date', time() );
40
+			self::$install_date = get_site_option('auto_load_next_post_install_date', time());
41 41
 
42 42
 			// Check WordPress enviroment.
43
-			add_action( 'admin_init', array( $this, 'check_wp' ), 12 );
43
+			add_action('admin_init', array($this, 'check_wp'), 12);
44 44
 
45 45
 			// Don't bug the user if they don't want to see any notices.
46
-			add_action( 'admin_init', array( $this, 'dont_bug_me' ), 15 );
46
+			add_action('admin_init', array($this, 'dont_bug_me'), 15);
47 47
 
48 48
 			// Display other admin notices when required. All are dismissable.
49
-			add_action( 'admin_notices', array( $this, 'add_notices' ), 0 );
49
+			add_action('admin_notices', array($this, 'add_notices'), 0);
50 50
 		} // END __construct()
51 51
 
52 52
 		/**
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 		public function check_wp() {
61 61
 			global $wp_version;
62 62
 
63
-			if ( ! version_compare( $wp_version, AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE, '>=' ) ) {
64
-				add_action( 'admin_notices', array( $this, 'requirement_wp_notice' ) );
63
+			if ( ! version_compare($wp_version, AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE, '>=')) {
64
+				add_action('admin_notices', array($this, 'requirement_wp_notice'));
65 65
 				return false;
66 66
 			}
67 67
 
@@ -81,25 +81,25 @@  discard block
 block discarded – undo
81 81
 			$user_hidden_notice = false;
82 82
 
83 83
 			// If the user is allowed to install plugins and requested to hide the review notice then hide it for that user.
84
-			if ( ! empty( $_GET['hide_auto_load_next_post_review_notice'] ) && current_user_can( 'install_plugins' ) ) {
85
-				add_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', '1', true );
84
+			if ( ! empty($_GET['hide_auto_load_next_post_review_notice']) && current_user_can('install_plugins')) {
85
+				add_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', '1', true);
86 86
 				$user_hidden_notice = true;
87 87
 			}
88 88
 
89 89
 			// If the user is allowed to install plugins and requested to hide the welcome notice then hide it for that user.
90
-			if ( ! empty( $_GET['hide_auto_load_next_post_welcome_notice'] ) && current_user_can( 'install_plugins' ) ) {
91
-				add_user_meta( $current_user->ID, 'auto_load_next_post_hide_welcome_notice', '1', true );
90
+			if ( ! empty($_GET['hide_auto_load_next_post_welcome_notice']) && current_user_can('install_plugins')) {
91
+				add_user_meta($current_user->ID, 'auto_load_next_post_hide_welcome_notice', '1', true);
92 92
 				$user_hidden_notice = true;
93 93
 			}
94 94
 
95
-			if ( ! empty( $_GET['hide_auto_load_next_post_beta_notice'] ) && current_user_can( 'install_plugins' ) ) {
96
-				set_transient( 'alnp_beta_notice_hidden', 'hidden', WEEK_IN_SECONDS );
95
+			if ( ! empty($_GET['hide_auto_load_next_post_beta_notice']) && current_user_can('install_plugins')) {
96
+				set_transient('alnp_beta_notice_hidden', 'hidden', WEEK_IN_SECONDS);
97 97
 				$user_hidden_notice = true;
98 98
 			}
99 99
 
100
-			if ( $user_hidden_notice ) {
100
+			if ($user_hidden_notice) {
101 101
 				// Redirect to the plugins page.
102
-				wp_safe_redirect( admin_url( 'plugins.php' ) ); exit;
102
+				wp_safe_redirect(admin_url('plugins.php')); exit;
103 103
 			}
104 104
 		} // END dont_bug_me()
105 105
 
@@ -115,54 +115,54 @@  discard block
 block discarded – undo
115 115
 		public function add_notices() {
116 116
 			global $current_user;
117 117
 
118
-			$template = get_option( 'template' );
118
+			$template = get_option('template');
119 119
 
120 120
 			// Checks if the theme supports Auto Load Next Post and not provided via a plugin.
121
-			if ( is_alnp_supported() ) {
122
-				$plugin_supported = alnp_get_theme_support( 'plugin_support' );
121
+			if (is_alnp_supported()) {
122
+				$plugin_supported = alnp_get_theme_support('plugin_support');
123 123
 
124 124
 				// Return if theme is supported via plugin.
125
-				if ( ! empty( $plugin_supported ) && $plugin_supported == 'yes' ) {
126
-					update_option( 'auto_load_next_post_theme_supported', $template );
125
+				if ( ! empty($plugin_supported) && $plugin_supported == 'yes') {
126
+					update_option('auto_load_next_post_theme_supported', $template);
127 127
 					return false;
128 128
 				}
129 129
 
130 130
 				// If supported theme does not match active theme then show notice.
131
-				if ( get_option( 'auto_load_next_post_theme_supported' ) !== $template ) {
132
-					add_action( 'admin_notices', array( $this, 'theme_ready_notice' ) );
133
-					update_option( 'auto_load_next_post_theme_supported', $template );
131
+				if (get_option('auto_load_next_post_theme_supported') !== $template) {
132
+					add_action('admin_notices', array($this, 'theme_ready_notice'));
133
+					update_option('auto_load_next_post_theme_supported', $template);
134 134
 				}
135 135
 			}
136 136
 			else {
137 137
 				// If theme not supported then delete option.
138
-				delete_option( 'auto_load_next_post_theme_supported' );
138
+				delete_option('auto_load_next_post_theme_supported');
139 139
 			}
140 140
 
141 141
 			// Is admin review notice hidden?
142
-			$hide_review_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', true );
142
+			$hide_review_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', true);
143 143
 
144 144
 			// Check if we need to display the review plugin notice.
145
-			if ( current_user_can( 'install_plugins' ) && empty( $hide_review_notice ) ) {
145
+			if (current_user_can('install_plugins') && empty($hide_review_notice)) {
146 146
 				// If it has been a week or more since activating the plugin then display the review notice.
147
-				if ( ( intval( time() - self::$install_date ) ) > WEEK_IN_SECONDS ) {
148
-					add_action( 'admin_notices', array( $this, 'plugin_review_notice' ) );
147
+				if ((intval(time() - self::$install_date)) > WEEK_IN_SECONDS) {
148
+					add_action('admin_notices', array($this, 'plugin_review_notice'));
149 149
 				}
150 150
 			}
151 151
 
152 152
 			// Is admin welcome notice hidden?
153
-			$hide_welcome_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_welcome_notice', true );
153
+			$hide_welcome_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_welcome_notice', true);
154 154
 
155 155
 			// Check if we need to display the welcome notice.
156
-			if ( current_user_can( 'install_plugins' ) && empty( $hide_welcome_notice ) ) {
156
+			if (current_user_can('install_plugins') && empty($hide_welcome_notice)) {
157 157
 				// If the user has just installed the plugin for the first time then welcome the user.
158
-				if ( ( intval( time() - strtotime( self::$install_date ) ) / WEEK_IN_SECONDS ) % 52 <= 2 ) {
159
-					add_action( 'admin_notices', array( $this, 'welcome_notice' ) );
158
+				if ((intval(time() - strtotime(self::$install_date)) / WEEK_IN_SECONDS) % 52 <= 2) {
159
+					add_action('admin_notices', array($this, 'welcome_notice'));
160 160
 				}
161 161
 			}
162 162
 
163 163
 			// Is this version of Auto Load Next Post a beta release?
164
-			if ( is_alnp_beta() && empty( get_transient( 'alnp_beta_notice_hidden' ) ) ) {
165
-				add_action( 'admin_notices', array( $this, 'beta_notice' ) );
164
+			if (is_alnp_beta() && empty(get_transient('alnp_beta_notice_hidden'))) {
165
+				add_action('admin_notices', array($this, 'beta_notice'));
166 166
 			}
167 167
 		} // END add_notices()
168 168
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 		 * @since  1.4.3
174 174
 		 */
175 175
 		public function requirement_wp_notice() {
176
-			include( dirname( __FILE__ ) . '/views/html-notice-requirement-wp.php' );
176
+			include(dirname(__FILE__).'/views/html-notice-requirement-wp.php');
177 177
 		} // END requirement_wp_notice()
178 178
 
179 179
 		/**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		 * @since  1.5.0
184 184
 		 */
185 185
 		public function theme_ready_notice() {
186
-			include( dirname( __FILE__ ) . '/views/html-notice-theme-ready.php' );
186
+			include(dirname(__FILE__).'/views/html-notice-theme-ready.php');
187 187
 		} // END theme_ready_notice()
188 188
 
189 189
 		/**
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		 * @since  1.5.0
194 194
 		 */
195 195
 		public function welcome_notice() {
196
-			include( dirname( __FILE__ ) . '/views/html-notice-welcome.php' );
196
+			include(dirname(__FILE__).'/views/html-notice-welcome.php');
197 197
 		} // END welcome_notice()
198 198
 
199 199
 		/**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		 * @since  1.5.0
204 204
 		 */
205 205
 		public function beta_notice() {
206
-			include( dirname( __FILE__ ) . '/views/html-notice-trying-beta.php' );
206
+			include(dirname(__FILE__).'/views/html-notice-trying-beta.php');
207 207
 		} // END beta_notice()
208 208
 
209 209
 		/**
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 		public function plugin_review_notice() {
217 217
 			$install_date = self::$install_date;
218 218
 
219
-			include( dirname( __FILE__ ) . '/views/html-notice-please-review.php' );
219
+			include(dirname(__FILE__).'/views/html-notice-please-review.php');
220 220
 		} // END plugin_review_notice()
221 221
 
222 222
 	} // END class.
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-theme-selectors.php 1 patch
Spacing   +31 added lines, -31 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_Settings_Theme_Selectors_Tab' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Settings_Theme_Selectors_Tab')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_Settings_Theme_Selectors_Tab extends Auto_Load_Next_Post_Settings_Page {
21 21
 
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 		 */
29 29
 		public function __construct() {
30 30
 			$this->id    = 'theme-selectors';
31
-			$this->label = esc_html__( 'Theme Selectors', 'auto-load-next-post' );
31
+			$this->label = esc_html__('Theme Selectors', 'auto-load-next-post');
32 32
 
33 33
 			parent::__construct();
34 34
 
35
-			add_action( 'auto_load_next_post_sections_theme-selectors', array( __CLASS__, 'is_theme_supported' ), 10 );
36
-			add_action( 'auto_load_next_post_sections_theme-selectors', array( __CLASS__, 'no_theme_selectors_set' ), 10 );
35
+			add_action('auto_load_next_post_sections_theme-selectors', array(__CLASS__, 'is_theme_supported'), 10);
36
+			add_action('auto_load_next_post_sections_theme-selectors', array(__CLASS__, 'no_theme_selectors_set'), 10);
37 37
 		} // END __construct()
38 38
 
39 39
 		/**
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 		 * @since  1.5.10
45 45
 		 */
46 46
 		public static function is_theme_supported() {
47
-			if ( is_alnp_supported() ) {
48
-				$plugin_supported = alnp_get_theme_support( 'plugin_support' );
47
+			if (is_alnp_supported()) {
48
+				$plugin_supported = alnp_get_theme_support('plugin_support');
49 49
 
50 50
 				// Is the theme supported by theme or plugin?
51
-				if ( ! empty( $plugin_supported ) && $plugin_supported == 'yes' ) {
52
-					include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-plugin-supported.php' );
51
+				if ( ! empty($plugin_supported) && $plugin_supported == 'yes') {
52
+					include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-plugin-supported.php');
53 53
 				} else {
54
-					include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-is-supported.php' );
54
+					include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-is-supported.php');
55 55
 				}
56 56
 			}
57 57
 		} // END is_theme_supported()
@@ -66,24 +66,24 @@  discard block
 block discarded – undo
66 66
 		public static function no_theme_selectors_set() {
67 67
 			$set_selectors = array();
68 68
 
69
-			$content_container    = get_option( 'auto_load_next_post_content_container' );
70
-			$title_selector       = get_option( 'auto_load_next_post_title_selector' );
71
-			$navigation_container = get_option( 'auto_load_next_post_navigation_container' );
69
+			$content_container    = get_option('auto_load_next_post_content_container');
70
+			$title_selector       = get_option('auto_load_next_post_title_selector');
71
+			$navigation_container = get_option('auto_load_next_post_navigation_container');
72 72
 
73
-			if ( ! empty( $content_container ) ) {
73
+			if ( ! empty($content_container)) {
74 74
 				$set_selectors[] = $content_container;
75 75
 			}
76 76
 
77
-			if ( ! empty( $title_selector ) ) {
77
+			if ( ! empty($title_selector)) {
78 78
 				$set_selectors[] = $title_selector;
79 79
 			}
80 80
 
81
-			if ( ! empty( $navigation_container ) ) {
81
+			if ( ! empty($navigation_container)) {
82 82
 				$set_selectors[] = $navigation_container;
83 83
 			}
84 84
 
85
-			if ( empty( $set_selectors ) || is_array( $set_selectors ) && count( $set_selectors ) < 3 ) {
86
-				include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-no-theme-selectors.php' );
85
+			if (empty($set_selectors) || is_array($set_selectors) && count($set_selectors) < 3) {
86
+				include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-no-theme-selectors.php');
87 87
 			}
88 88
 		} // END no_theme_selectors_set()
89 89
 
@@ -102,26 +102,26 @@  discard block
 block discarded – undo
102 102
 				'auto_load_next_post_theme_selectors_settings', array(
103 103
 
104 104
 					array(
105
-						'title' => esc_html__( 'Theme Selectors', 'auto-load-next-post' ),
105
+						'title' => esc_html__('Theme Selectors', 'auto-load-next-post'),
106 106
 						'type'  => 'title',
107
-						'desc'  => sprintf( esc_html__( 'Here you set the theme selectors below according to your active theme. All are required for %s to work.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
107
+						'desc'  => sprintf(esc_html__('Here you set the theme selectors below according to your active theme. All are required for %s to work.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')),
108 108
 						'id'    => 'theme_selectors_options'
109 109
 					),
110 110
 
111 111
 					array(
112
-						'title'       => esc_html__( 'Content Container', 'auto-load-next-post' ),
113
-						'desc'        => sprintf( __( 'The primary container where the post content is loaded in. Default: %s', 'auto-load-next-post' ), '<code>main.site-main</code>' ),
112
+						'title'       => esc_html__('Content Container', 'auto-load-next-post'),
113
+						'desc'        => sprintf(__('The primary container where the post content is loaded in. Default: %s', 'auto-load-next-post'), '<code>main.site-main</code>'),
114 114
 						'id'          => 'auto_load_next_post_content_container',
115 115
 						'default'     => 'main.site-main',
116
-						'placeholder' => esc_html__( 'Required', 'auto-load-next-post' ),
116
+						'placeholder' => esc_html__('Required', 'auto-load-next-post'),
117 117
 						'type'        => 'text',
118 118
 						'css'         => 'min-width:300px;',
119 119
 						'autoload'    => false
120 120
 					),
121 121
 
122 122
 					array(
123
-						'title'    => esc_html__( 'Post Title', 'auto-load-next-post' ),
124
-						'desc'     => sprintf( __( 'Used to identify which article the user is reading and track should Google Analytics or other analytics be enabled. Default: %s', 'auto-load-next-post' ), '<code>h1.entry-title</code>' ),
123
+						'title'    => esc_html__('Post Title', 'auto-load-next-post'),
124
+						'desc'     => sprintf(__('Used to identify which article the user is reading and track should Google Analytics or other analytics be enabled. Default: %s', 'auto-load-next-post'), '<code>h1.entry-title</code>'),
125 125
 						'id'       => 'auto_load_next_post_title_selector',
126 126
 						'default'  => 'h1.entry-title',
127 127
 						'type'     => 'text',
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 					),
131 131
 
132 132
 					array(
133
-						'title'    => esc_html__( 'Post Navigation', 'auto-load-next-post' ),
134
-						'desc'     => sprintf( __( 'Used to identify which post to load next if any. Default: %s', 'auto-load-next-post' ), '<code>nav.post-navigation</code>' ),
133
+						'title'    => esc_html__('Post Navigation', 'auto-load-next-post'),
134
+						'desc'     => sprintf(__('Used to identify which post to load next if any. Default: %s', 'auto-load-next-post'), '<code>nav.post-navigation</code>'),
135 135
 						'id'       => 'auto_load_next_post_navigation_container',
136 136
 						'default'  => 'nav.post-navigation',
137 137
 						'type'     => 'text',
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 					),
141 141
 
142 142
 					array(
143
-						'title'    => esc_html__( 'Comments Container', 'auto-load-next-post' ),
144
-						'desc'     => sprintf( __( 'Used to remove comments if enabled under %1$sMisc%2$s settings. Default: %3$s', 'auto-load-next-post' ), '<strong><a href="' . get_admin_url( $blog_id, 'options-general.php?page=auto-load-next-post-settings&tab=misc' ) . '">', '</a></strong>', '<code>div#comments</code>' ),
143
+						'title'    => esc_html__('Comments Container', 'auto-load-next-post'),
144
+						'desc'     => sprintf(__('Used to remove comments if enabled under %1$sMisc%2$s settings. Default: %3$s', 'auto-load-next-post'), '<strong><a href="'.get_admin_url($blog_id, 'options-general.php?page=auto-load-next-post-settings&tab=misc').'">', '</a></strong>', '<code>div#comments</code>'),
145 145
 						'id'       => 'auto_load_next_post_comments_container',
146 146
 						'default'  => 'div#comments',
147 147
 						'type'     => 'text',
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		public function output() {
166 166
 			$settings = $this->get_settings();
167 167
 
168
-			Auto_Load_Next_Post_Admin_Settings::output_fields( $settings );
168
+			Auto_Load_Next_Post_Admin_Settings::output_fields($settings);
169 169
 		} // END output()
170 170
 
171 171
 		/**
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 		public function save() {
179 179
 			$settings = $this->get_settings();
180 180
 
181
-			Auto_Load_Next_Post_Admin_Settings::save_fields( $settings );
181
+			Auto_Load_Next_Post_Admin_Settings::save_fields($settings);
182 182
 		} // END save()
183 183
 
184 184
 	} // END class
Please login to merge, or discard this patch.
includes/admin/views/html-notice-plugin-supported.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@
 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
 
17 17
 $active_theme = wp_get_theme();
18 18
 ?>
19 19
 <div class="notice notice-info">
20
-	<p><?php echo sprintf( __( '%s theme is supported via a plugin. Do <strong>NOT</strong> change the theme selectors.', 'auto-load-next-post' ), $active_theme->name ); ?></p>
20
+	<p><?php echo sprintf(__('%s theme is supported via a plugin. Do <strong>NOT</strong> change the theme selectors.', 'auto-load-next-post'), $active_theme->name); ?></p>
21 21
 </div>
Please login to merge, or discard this patch.
includes/3rd-party/3rd-party.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2
-defined( 'ABSPATH' ) || die( 'Cheatin&#8217; uh?' );
2
+defined('ABSPATH') || die('Cheatin&#8217; uh?');
3 3
 
4
-require AUTO_LOAD_NEXT_POST_3RD_PARTY . 'plugins/wp-rocket.php';
5 4
\ No newline at end of file
5
+require AUTO_LOAD_NEXT_POST_3RD_PARTY.'plugins/wp-rocket.php';
6 6
\ No newline at end of file
Please login to merge, or discard this patch.
includes/3rd-party/plugins/wp-rocket.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-defined( 'ABSPATH' ) || die( 'Cheatin&#8217; uh?' );
2
+defined('ABSPATH') || die('Cheatin&#8217; uh?');
3 3
 
4
-if ( defined( 'WP_ROCKET_VERSION' ) ) :
4
+if (defined('WP_ROCKET_VERSION')) :
5 5
 	/**
6 6
 	 * Excludes Auto Load Next Post scripts from JS minification.
7 7
 	 *
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
 	 * @param  Array $excluded_js An array of JS handles enqueued in WordPress.
10 10
 	 * @return Array the updated array of handles.
11 11
 	 */
12
-	function rocket_exclude_js_alnp( $excluded_js ) {
13
-		$excluded_js[] = str_replace( home_url(), '', plugins_url( '/auto-load-next-post/assets/js/frontend/auto-load-next-post.js' ) );
14
-		$excluded_js[] = str_replace( home_url(), '', plugins_url( '/auto-load-next-post/assets/js/frontend/auto-load-next-post.min.js' ) );
15
-		$excluded_js[] = str_replace( home_url(), '', plugins_url( '/auto-load-next-post/assets/js/frontend/auto-load-next-post.dev.js' ) );
16
-		$excluded_js[] = str_replace( home_url(), '', plugins_url( '/auto-load-next-post/assets/js/libs/jquery.history.js' ) );
17
-		$excluded_js[] = str_replace( home_url(), '', plugins_url( '/auto-load-next-post/assets/js/libs/scrollspy.min.js' ) );
12
+	function rocket_exclude_js_alnp($excluded_js) {
13
+		$excluded_js[] = str_replace(home_url(), '', plugins_url('/auto-load-next-post/assets/js/frontend/auto-load-next-post.js'));
14
+		$excluded_js[] = str_replace(home_url(), '', plugins_url('/auto-load-next-post/assets/js/frontend/auto-load-next-post.min.js'));
15
+		$excluded_js[] = str_replace(home_url(), '', plugins_url('/auto-load-next-post/assets/js/frontend/auto-load-next-post.dev.js'));
16
+		$excluded_js[] = str_replace(home_url(), '', plugins_url('/auto-load-next-post/assets/js/libs/jquery.history.js'));
17
+		$excluded_js[] = str_replace(home_url(), '', plugins_url('/auto-load-next-post/assets/js/libs/scrollspy.min.js'));
18 18
 
19 19
 		return $excluded_js;
20 20
 	}
21
-	add_filter( 'rocket_exclude_js', 'rocket_exclude_js_disqus' );
21
+	add_filter('rocket_exclude_js', 'rocket_exclude_js_disqus');
22 22
 endif;
Please login to merge, or discard this patch.