Completed
Branch wp-theme-support (04709b)
by Sébastien
02:04
created
uninstall.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,27 +9,27 @@
 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 18
 // Make sure it is only a single site we are uninstalling from.
19
-if ( ! is_multisite() ) {
20
-	$uninstall = get_option( 'auto_load_next_post_uninstall_data' );
19
+if ( ! is_multisite()) {
20
+	$uninstall = get_option('auto_load_next_post_uninstall_data');
21 21
 
22
-	if ( ! empty( $uninstall ) ) {
22
+	if ( ! empty($uninstall)) {
23 23
 		// Delete options
24 24
 		$wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'auto_load_next_post_%'");
25 25
 	}
26 26
 }
27 27
 
28 28
 // Delete Install Date
29
-delete_site_option( 'auto_load_next_post_install_date' );
29
+delete_site_option('auto_load_next_post_install_date');
30 30
 
31 31
 // Delete Uninstall Data - Just to double check it has been removed.
32
-delete_option( 'auto_load_next_post_uninstall_data' );
32
+delete_option('auto_load_next_post_uninstall_data');
33 33
 
34 34
 // Clear any cached data that has been removed.
35 35
 wp_cache_flush();
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-page.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	exit; // Exit if accessed directly.
15 15
 }
16 16
 
17
-if ( ! class_exists( 'Auto_Load_Next_Post_Settings_Page' ) ) {
17
+if ( ! class_exists('Auto_Load_Next_Post_Settings_Page')) {
18 18
 
19 19
 	abstract class Auto_Load_Next_Post_Settings_Page {
20 20
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		 * @access protected
25 25
 		 * @var    string $id
26 26
 		 */
27
-		protected $id    = '';
27
+		protected $id = '';
28 28
 
29 29
 		/**
30 30
 		 * Setting page label.
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 		 * @since  1.4.10
42 42
 		 */
43 43
 		public function __construct() {
44
-			add_filter( 'auto_load_next_post_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
45
-			add_action( 'auto_load_next_post_settings_' . $this->id, array( $this, 'output' ) );
46
-			add_action( 'auto_load_next_post_settings_save_' . $this->id, array( $this, 'save' ) );
44
+			add_filter('auto_load_next_post_settings_tabs_array', array($this, 'add_settings_page'), 20);
45
+			add_action('auto_load_next_post_settings_'.$this->id, array($this, 'output'));
46
+			add_action('auto_load_next_post_settings_save_'.$this->id, array($this, 'save'));
47 47
 		}
48 48
 
49 49
 		/**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		 * @param  array $pages
77 77
 		 * @return array $pages
78 78
 		 */
79
-		public function add_settings_page( $pages ) {
79
+		public function add_settings_page($pages) {
80 80
 			$pages[$this->id] = $this->label;
81 81
 
82 82
 			return $pages;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		 * @param  array $pages
91 91
 		 * @return array $pages
92 92
 		 */
93
-		public function add_menu_page( $pages ) {
93
+		public function add_menu_page($pages) {
94 94
 			$pages[$this->id] = $this->label;
95 95
 
96 96
 			return $pages;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		public function output() {
117 117
 			$settings = $this->get_settings();
118 118
 
119
-			Auto_Load_Next_Post_Admin_Settings::output_fields( $settings );
119
+			Auto_Load_Next_Post_Admin_Settings::output_fields($settings);
120 120
 		} // END output()
121 121
 
122 122
 		/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
 			$settings = $this->get_settings();
133 133
 
134
-			Auto_Load_Next_Post_Admin_Settings::save_fields( $settings, $current_tab );
134
+			Auto_Load_Next_Post_Admin_Settings::save_fields($settings, $current_tab);
135 135
 		} // END save()
136 136
 
137 137
 	} // END class
Please login to merge, or discard this patch.
includes/admin/views/html-notice-requirement-wp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 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
 <div class="notice notice-error auto-load-next-post-message">
19
-	<p><?php echo sprintf( __( 'Sorry, <strong>%s</strong> requires WordPress %s or higher. Please upgrade your WordPress setup.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE ); ?></p>
19
+	<p><?php echo sprintf(__('Sorry, <strong>%s</strong> requires WordPress %s or higher. Please upgrade your WordPress setup.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE); ?></p>
20 20
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-admin-settings.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@  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
-$tab_exists        = isset( $tabs[ $current_tab ] ) || has_action( 'auto_load_next_post_sections_' . $current_tab ) || has_action( 'auto_load_next_post_settings_' . $current_tab ) || has_action( 'auto_load_next_post_settings_tabs_' . $current_tab );
19
-$current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : '';
18
+$tab_exists        = isset($tabs[$current_tab]) || has_action('auto_load_next_post_sections_'.$current_tab) || has_action('auto_load_next_post_settings_'.$current_tab) || has_action('auto_load_next_post_settings_tabs_'.$current_tab);
19
+$current_tab_label = isset($tabs[$current_tab]) ? $tabs[$current_tab] : '';
20 20
 
21
-if ( ! $tab_exists ) {
22
-	wp_safe_redirect( admin_url( 'options-general.php?page=auto-load-next-post-settings' ) );
21
+if ( ! $tab_exists) {
22
+	wp_safe_redirect(admin_url('options-general.php?page=auto-load-next-post-settings'));
23 23
 	exit;
24 24
 }
25 25
 ?>
@@ -28,23 +28,23 @@  discard block
 block discarded – undo
28 28
 		<h2 class="nav-tab-wrapper">
29 29
 			<span>Auto Load Next Post v<?php echo AUTO_LOAD_NEXT_POST_VERSION; ?></span>
30 30
 			<?php
31
-				foreach ( $tabs as $slug => $label ) {
32
-					echo '<a href="' . esc_html( admin_url( 'options-general.php?page=auto-load-next-post-settings&tab=' . esc_attr( $slug ) ) ) . '" class="nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
31
+				foreach ($tabs as $slug => $label) {
32
+					echo '<a href="'.esc_html(admin_url('options-general.php?page=auto-load-next-post-settings&tab='.esc_attr($slug))).'" class="nav-tab '.($current_tab === $slug ? 'nav-tab-active' : '').'">'.esc_html($label).'</a>';
33 33
 				}
34 34
 
35
-				do_action( 'auto_load_next_post_settings_tabs' );
35
+				do_action('auto_load_next_post_settings_tabs');
36 36
 			?>
37 37
 		</h2>
38 38
 		<?php
39
-		do_action( 'auto_load_next_post_sections_' . $current_tab );
39
+		do_action('auto_load_next_post_sections_'.$current_tab);
40 40
 
41 41
 		self::show_messages();
42 42
 
43
-		do_action( 'auto_load_next_post_settings_' . $current_tab );
43
+		do_action('auto_load_next_post_settings_'.$current_tab);
44 44
 		?>
45 45
 		<p class="submit">
46
-			<input name="save" class="button-primary" type="submit" value="<?php esc_attr_e( 'Save Changes', 'auto-load-next-post' ); ?>" />
47
-			<?php wp_nonce_field( 'auto-load-next-post-settings' ); ?>
46
+			<input name="save" class="button-primary" type="submit" value="<?php esc_attr_e('Save Changes', 'auto-load-next-post'); ?>" />
47
+			<?php wp_nonce_field('auto-load-next-post-settings'); ?>
48 48
 		</p>
49 49
 	</form>
50 50
 </div>
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.
auto-load-next-post.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 		 * @access public
312 312
 		 * @since  1.5.0
313 313
 		 * @static
314
-		 * @return string|boolean
314
+		 * @return string|false
315 315
 		 */
316 316
 		public static function is_alnp_using_customizer() {
317 317
 			if ( is_customize_preview() ) {
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 		 * @param   string  $name      The ID to register with WordPress.
332 332
 		 * @param   string  $file_path The path to the actual file.
333 333
 		 * @param   bool    $is_script Optional, argument for if the incoming file_path is a JavaScript source file.
334
-		 * @param   array   $support   Optional, for requiring other javascripts for the source file you are calling.
334
+		 * @param   string[]   $support   Optional, for requiring other javascripts for the source file you are calling.
335 335
 		 * @param   string  $version   Optional, can match the version of the plugin or version of the source file.
336 336
 		 * @param   bool    $footer Optional, can set the JavaScript to load in the footer instead.
337 337
 		 * @global  string  $wp_version
Please login to merge, or discard this patch.
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  *
28 28
  * @version 1.5.0
29 29
  */
30
-if ( ! class_exists( 'Auto_Load_Next_Post' ) ) {
30
+if ( ! class_exists('Auto_Load_Next_Post')) {
31 31
 
32 32
 	class Auto_Load_Next_Post {
33 33
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		 * @return Auto_Load_Next_Post Single instance.
62 62
 		 */
63 63
 		public static function instance() {
64
-			if ( is_null( self::$_instance ) ) {
64
+			if (is_null(self::$_instance)) {
65 65
 				self::$_instance = new self();
66 66
 			}
67 67
 			return self::$_instance;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		 */
77 77
 		public function __clone() {
78 78
 			// Cloning instances of the class is forbidden
79
-			_doing_it_wrong( __FUNCTION__, __( 'Cloning this object is forbidden.', 'auto-load-next-post' ), AUTO_LOAD_NEXT_POST_VERSION );
79
+			_doing_it_wrong(__FUNCTION__, __('Cloning this object is forbidden.', 'auto-load-next-post'), AUTO_LOAD_NEXT_POST_VERSION);
80 80
 		} // END __clone()
81 81
 
82 82
 		/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 		 * @return void
88 88
 		 */
89 89
 		public function __wakeup() {
90
-			_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'auto-load-next-post' ), AUTO_LOAD_NEXT_POST_VERSION );
90
+			_doing_it_wrong(__FUNCTION__, __('Unserializing instances of this class is forbidden.', 'auto-load-next-post'), AUTO_LOAD_NEXT_POST_VERSION);
91 91
 		} // END __wakeup()
92 92
 
93 93
 		/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			/**
107 107
 			 * Auto Load Next Post is fully loaded.
108 108
 			 */
109
-			do_action( 'auto_load_next_post_loaded' );
109
+			do_action('auto_load_next_post_loaded');
110 110
 		} // END __construct()
111 111
 
112 112
 		/**
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
 		 */
118 118
 		public function init_hooks() {
119 119
 			// Load translation files.
120
-			add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
120
+			add_action('init', array($this, 'load_plugin_textdomain'));
121 121
 
122 122
 			// Load Auto Load Next Post scripts on the frontend.
123
-			add_action( 'wp_enqueue_scripts', array( $this, 'alnp_enqueue_scripts' ) );
123
+			add_action('wp_enqueue_scripts', array($this, 'alnp_enqueue_scripts'));
124 124
 		} // END init_hooks()
125 125
 
126 126
 		/**
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 			$this->define('AUTO_LOAD_NEXT_POST_FILE', __FILE__);
136 136
 			$this->define('AUTO_LOAD_NEXT_POST_SLUG', 'auto-load-next-post');
137 137
 
138
-			$this->define('AUTO_LOAD_NEXT_POST_URL_PATH', untrailingslashit( plugins_url('/', __FILE__) ) );
139
-			$this->define('AUTO_LOAD_NEXT_POST_FILE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
138
+			$this->define('AUTO_LOAD_NEXT_POST_URL_PATH', untrailingslashit(plugins_url('/', __FILE__)));
139
+			$this->define('AUTO_LOAD_NEXT_POST_FILE_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
140 140
 			$this->define('AUTO_LOAD_NEXT_POST_TEMPLATE_PATH', 'auto-load-next-post/');
141 141
 
142 142
 			$this->define('AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE', '4.4');
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
 		 * @access private
157 157
 		 * @since  1.4.3
158 158
 		 */
159
-		private function define( $name, $value ) {
160
-			if ( ! defined( $name ) ) {
161
-				define( $name, $value );
159
+		private function define($name, $value) {
160
+			if ( ! defined($name)) {
161
+				define($name, $value);
162 162
 			}
163 163
 		} // END define()
164 164
 
@@ -175,25 +175,25 @@  discard block
 block discarded – undo
175 175
 		 * @return  void
176 176
 		 */
177 177
 		public function includes() {
178
-			include_once( dirname( __FILE__ ) . '/includes/class-alnp-autoloader.php' ); // Autoloader.
179
-			include_once( dirname( __FILE__ ) . '/includes/auto-load-next-post-conditional-functions.php' ); // Conditional functions.
180
-			include_once( dirname( __FILE__ ) . '/includes/auto-load-next-post-formatting-functions.php' ); // Formatting functions.
181
-			include_once( dirname( __FILE__ ) . '/includes/auto-load-next-post-core-functions.php' ); // Contains core functions for the front/back end.
178
+			include_once(dirname(__FILE__).'/includes/class-alnp-autoloader.php'); // Autoloader.
179
+			include_once(dirname(__FILE__).'/includes/auto-load-next-post-conditional-functions.php'); // Conditional functions.
180
+			include_once(dirname(__FILE__).'/includes/auto-load-next-post-formatting-functions.php'); // Formatting functions.
181
+			include_once(dirname(__FILE__).'/includes/auto-load-next-post-core-functions.php'); // Contains core functions for the front/back end.
182 182
 
183 183
 			// Include theme support.
184 184
 			$this->alnp_include_theme_support();
185 185
 
186 186
 			// Customizer.
187
-			include_once( dirname( __FILE__ ) . '/includes/customizer/class-alnp-customizer.php' );
188
-			include_once( dirname( __FILE__ ) . '/includes/customizer/class-alnp-customizer-scripts.php' );
187
+			include_once(dirname(__FILE__).'/includes/customizer/class-alnp-customizer.php');
188
+			include_once(dirname(__FILE__).'/includes/customizer/class-alnp-customizer-scripts.php');
189 189
 
190 190
 			// Include admin class to handle all back-end functions.
191
-			if ( is_admin() ) {
192
-				include_once( dirname( __FILE__ ) . '/includes/admin/class-alnp-admin.php' ); // Admin section.
191
+			if (is_admin()) {
192
+				include_once(dirname(__FILE__).'/includes/admin/class-alnp-admin.php'); // Admin section.
193 193
 			}
194 194
 
195 195
 			// Install.
196
-			require_once( dirname( __FILE__ ) . '/includes/class-alnp-install.php' );
196
+			require_once(dirname(__FILE__).'/includes/class-alnp-install.php');
197 197
 		} // END includes()
198 198
 
199 199
 		/**
@@ -203,45 +203,45 @@  discard block
 block discarded – undo
203 203
 		 * @since  1.5.0
204 204
 		 */
205 205
 		public function alnp_include_theme_support() {
206
-			if ( is_alnp_active_theme( array( 'make', 'understrap', 'storefront', 'twentyseventeen', 'twentysixteen', 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentytwelve', 'twentyeleven', 'twentyten' ) ) ) {
206
+			if (is_alnp_active_theme(array('make', 'understrap', 'storefront', 'twentyseventeen', 'twentysixteen', 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentytwelve', 'twentyeleven', 'twentyten'))) {
207 207
 
208
-				switch ( get_template() ) {
208
+				switch (get_template()) {
209 209
 					case 'twentyten':
210
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-ten.php' );
210
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-ten.php');
211 211
 						break;
212 212
 					case 'twentyeleven':
213
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-eleven.php' );
213
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-eleven.php');
214 214
 						break;
215 215
 					case 'twentytwelve':
216
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-twelve.php' );
216
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-twelve.php');
217 217
 						break;
218 218
 					case 'twentythirteen':
219
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-thirteen.php' );
219
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-thirteen.php');
220 220
 						break;
221 221
 					case 'twentyfourteen':
222
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-fourteen.php' );
222
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-fourteen.php');
223 223
 						break;
224 224
 					case 'twentyfifteen':
225
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-fifteen.php' );
225
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-fifteen.php');
226 226
 						break;
227 227
 					case 'twentysixteen':
228
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-sixteen.php' );
228
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-sixteen.php');
229 229
 						break;
230 230
 					case 'twentyseventeen':
231
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-twenty-seventeen.php' );
231
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-twenty-seventeen.php');
232 232
 						break;
233 233
 					case 'storefront':
234
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-storefront.php' );
234
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-storefront.php');
235 235
 						break;
236 236
 					case 'understrap':
237
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-understrap.php' );
237
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-understrap.php');
238 238
 						break;
239 239
 					case 'make':
240
-						include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-make.php' );
240
+						include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-make.php');
241 241
 						break;
242 242
 				} // END switch()
243 243
 
244
-				include_once( dirname( __FILE__ ) . '/includes/theme-support/class-alnp-theme-support.php' );
244
+				include_once(dirname(__FILE__).'/includes/theme-support/class-alnp-theme-support.php');
245 245
 
246 246
 			}
247 247
 		} // END alnp_include_theme_support()
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 		 * @return  void
263 263
 		 */
264 264
 		public function load_plugin_textdomain() {
265
-			load_plugin_textdomain( 'auto-load-next-post', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
265
+			load_plugin_textdomain('auto-load-next-post', false, dirname(plugin_basename(__FILE__)).'/languages/');
266 266
 		} // END load_plugin_textdomain()
267 267
 
268 268
 		/**
@@ -274,30 +274,30 @@  discard block
 block discarded – undo
274 274
 		 */
275 275
 		public function alnp_enqueue_scripts() {
276 276
 			// Load the Javascript if found as a singluar post and the user is not a bot.
277
-			if ( !alnp_is_bot() && is_singular() && get_post_type() == 'post' ) {
277
+			if ( ! alnp_is_bot() && is_singular() && get_post_type() == 'post') {
278 278
 				// This helps the plugin decide to load the JavaScript in the footer or not.
279
-				$load_in_footer = get_option( 'auto_load_next_post_js_footer' );
279
+				$load_in_footer = get_option('auto_load_next_post_js_footer');
280 280
 
281
-				$this->load_file( 'auto-load-next-post-scrollspy', '/assets/js/libs/scrollspy.min.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION, $load_in_footer );
281
+				$this->load_file('auto-load-next-post-scrollspy', '/assets/js/libs/scrollspy.min.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION, $load_in_footer);
282 282
 
283 283
 				// Only load History.js when not in the customizer.
284
-				if ( ! is_customize_preview() ) {
285
-					$this->load_file( 'auto-load-next-post-history', '/assets/js/libs/jquery.history.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION, $load_in_footer );
284
+				if ( ! is_customize_preview()) {
285
+					$this->load_file('auto-load-next-post-history', '/assets/js/libs/jquery.history.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION, $load_in_footer);
286 286
 				}
287 287
 
288
-				$this->load_file( 'auto-load-next-post-script', '/assets/js/frontend/auto-load-next-post' . AUTO_LOAD_NEXT_POST_DEBUG_MODE.AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array('auto-load-next-post-scrollspy'), AUTO_LOAD_NEXT_POST_VERSION, $load_in_footer );
288
+				$this->load_file('auto-load-next-post-script', '/assets/js/frontend/auto-load-next-post'.AUTO_LOAD_NEXT_POST_DEBUG_MODE.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('auto-load-next-post-scrollspy'), AUTO_LOAD_NEXT_POST_VERSION, $load_in_footer);
289 289
 
290 290
 				// Variables for the JavaScript
291
-				wp_localize_script( 'auto-load-next-post-script', 'auto_load_next_post_params', array(
291
+				wp_localize_script('auto-load-next-post-script', 'auto_load_next_post_params', array(
292 292
 					'alnp_version'              => AUTO_LOAD_NEXT_POST_VERSION,
293
-					'alnp_content_container'    => get_option( 'auto_load_next_post_content_container' ),
294
-					'alnp_title_selector'       => get_option( 'auto_load_next_post_title_selector' ),
295
-					'alnp_navigation_container' => get_option( 'auto_load_next_post_navigation_container' ),
296
-					'alnp_comments_container'   => get_option( 'auto_load_next_post_comments_container' ),
297
-					'alnp_remove_comments'      => get_option( 'auto_load_next_post_remove_comments' ),
298
-					'alnp_google_analytics'     => get_option( 'auto_load_next_post_google_analytics' ),
293
+					'alnp_content_container'    => get_option('auto_load_next_post_content_container'),
294
+					'alnp_title_selector'       => get_option('auto_load_next_post_title_selector'),
295
+					'alnp_navigation_container' => get_option('auto_load_next_post_navigation_container'),
296
+					'alnp_comments_container'   => get_option('auto_load_next_post_comments_container'),
297
+					'alnp_remove_comments'      => get_option('auto_load_next_post_remove_comments'),
298
+					'alnp_google_analytics'     => get_option('auto_load_next_post_google_analytics'),
299 299
 					'alnp_is_customizer'        => $this->is_alnp_using_customizer(),
300
-				) );
300
+				));
301 301
 			} // END if is_singular() && get_post_type()
302 302
 		} // END alnp_enqueue_scripts()
303 303
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		 * @return string|boolean
315 315
 		 */
316 316
 		public static function is_alnp_using_customizer() {
317
-			if ( is_customize_preview() ) {
317
+			if (is_customize_preview()) {
318 318
 				return "yes";
319 319
 			}
320 320
 
@@ -336,21 +336,21 @@  discard block
 block discarded – undo
336 336
 		 * @param   bool    $footer Optional, can set the JavaScript to load in the footer instead.
337 337
 		 * @global  string  $wp_version
338 338
 		 */
339
-		public static function load_file( $name, $file_path, $is_script = false, $support = array(), $version = '', $footer = false ) {
339
+		public static function load_file($name, $file_path, $is_script = false, $support = array(), $version = '', $footer = false) {
340 340
 			global $wp_version;
341 341
 
342
-			$url = AUTO_LOAD_NEXT_POST_URL_PATH . $file_path; // URL to the file.
342
+			$url = AUTO_LOAD_NEXT_POST_URL_PATH.$file_path; // URL to the file.
343 343
 
344
-			if ( file_exists( AUTO_LOAD_NEXT_POST_FILE_PATH . $file_path ) ) {
345
-				if ( $is_script ) {
346
-					if ( !wp_script_is( $name, 'registered' ) ) {
347
-						wp_register_script( $name, $url, $support, $version, $footer );
348
-						wp_enqueue_script( $name );
344
+			if (file_exists(AUTO_LOAD_NEXT_POST_FILE_PATH.$file_path)) {
345
+				if ($is_script) {
346
+					if ( ! wp_script_is($name, 'registered')) {
347
+						wp_register_script($name, $url, $support, $version, $footer);
348
+						wp_enqueue_script($name);
349 349
 					}
350 350
 				} else {
351
-					if ( !wp_style_is( $name, 'registered' ) ) {
352
-						wp_register_style( $name, $url );
353
-						wp_enqueue_style( $name );
351
+					if ( ! wp_style_is($name, 'registered')) {
352
+						wp_register_style($name, $url);
353
+						wp_enqueue_style($name);
354 354
 					}
355 355
 				} // end if
356 356
 			} // end if
Please login to merge, or discard this patch.
template/theme-support/understrap/content-alnp.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,32 +8,32 @@
 block discarded – undo
8 8
  * @version 1.5.0
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
 		// Load content before the post content.
20
-		do_action( 'alnp_load_before_content' );
20
+		do_action('alnp_load_before_content');
21 21
 
22 22
 		// Load 'loop-templates/content-single.php'
23
-		get_template_part( alnp_template_location() . 'content', 'single' );
23
+		get_template_part(alnp_template_location().'content', 'single');
24 24
 
25 25
 		// Load content after the post content.
26
-		do_action( 'alnp_load_after_content' );
26
+		do_action('alnp_load_after_content');
27 27
 
28 28
 	// End the loop.
29 29
 	endwhile;
30 30
 
31 31
 	// Load content after the loop.
32
-	do_action( 'alnp_load_after_loop' );
32
+	do_action('alnp_load_after_loop');
33 33
 
34 34
 else :
35 35
 
36 36
 	// Load content if there are no more posts.
37
-	do_action( 'alnp_no_more_posts' );
37
+	do_action('alnp_no_more_posts');
38 38
 
39 39
 endif; // END if have_posts()
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,9 +31,11 @@
 block discarded – undo
31 31
 	// Load content after the loop.
32 32
 	do_action( 'alnp_load_after_loop' );
33 33
 
34
-else :
34
+else {
35
+	:
35 36
 
36 37
 	// Load content if there are no more posts.
37 38
 	do_action( 'alnp_no_more_posts' );
39
+}
38 40
 
39 41
 endif; // END if have_posts()
Please login to merge, or discard this patch.
template/theme-support/twenty-eleven/content-alnp.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -8,22 +8,22 @@  discard block
 block discarded – undo
8 8
  * @version 1.5.0
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
 		// Load content before the post content.
20
-		do_action( 'alnp_load_before_content' );
20
+		do_action('alnp_load_before_content');
21 21
 		?>
22 22
 		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
23 23
 			<header class="entry-header">
24 24
 				<h1 class="entry-title"><?php the_title(); ?></h1>
25 25
 
26
-				<?php if ( 'post' == get_post_type() ) : ?>
26
+				<?php if ('post' == get_post_type()) : ?>
27 27
 				<div class="entry-meta">
28 28
 					<?php twentyeleven_posted_on(); ?>
29 29
 				</div><!-- .entry-meta -->
@@ -32,49 +32,49 @@  discard block
 block discarded – undo
32 32
 
33 33
 			<div class="entry-content">
34 34
 				<?php the_content(); ?>
35
-				<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'auto-load-next-post' ), 'after' => '</div>' ) ); ?>
35
+				<?php wp_link_pages(array('before' => '<div class="page-link">'.__('Pages:', 'auto-load-next-post'), 'after' => '</div>')); ?>
36 36
 			</div><!-- .entry-content -->
37 37
 
38 38
 			<footer class="entry-meta">
39 39
 				<?php
40 40
 					/* translators: used between list items, there is a space after the comma */
41
-					$categories_list = get_the_category_list( __( ', ', 'auto-load-next-post' ) );
41
+					$categories_list = get_the_category_list(__(', ', 'auto-load-next-post'));
42 42
 
43 43
 					/* translators: used between list items, there is a space after the comma */
44
-					$tag_list = get_the_tag_list( '', __( ', ', 'auto-load-next-post' ) );
45
-				if ( '' != $tag_list ) {
46
-					$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'auto-load-next-post' );
47
-				} elseif ( '' != $categories_list ) {
48
-					$utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'auto-load-next-post' );
44
+					$tag_list = get_the_tag_list('', __(', ', 'auto-load-next-post'));
45
+				if ('' != $tag_list) {
46
+					$utility_text = __('This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'auto-load-next-post');
47
+				} elseif ('' != $categories_list) {
48
+					$utility_text = __('This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'auto-load-next-post');
49 49
 				} else {
50
-					$utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'auto-load-next-post' );
50
+					$utility_text = __('This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'auto-load-next-post');
51 51
 				}
52 52
 
53 53
 					printf(
54 54
 						$utility_text,
55 55
 						$categories_list,
56 56
 						$tag_list,
57
-						esc_url( get_permalink() ),
58
-						the_title_attribute( 'echo=0' ),
57
+						esc_url(get_permalink()),
58
+						the_title_attribute('echo=0'),
59 59
 						get_the_author(),
60
-						esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
60
+						esc_url(get_author_posts_url(get_the_author_meta('ID')))
61 61
 					);
62 62
 				?>
63 63
 
64
-				<?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
64
+				<?php if (get_the_author_meta('description') && ( ! function_exists('is_multi_author') || is_multi_author())) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
65 65
 				<div id="author-info">
66 66
 					<div id="author-avatar">
67 67
 						<?php
68 68
 						/** This filter is documented in author.php */
69
-						echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) );
69
+						echo get_avatar(get_the_author_meta('user_email'), apply_filters('twentyeleven_author_bio_avatar_size', 68));
70 70
 						?>
71 71
 					</div><!-- #author-avatar -->
72 72
 					<div id="author-description">
73
-						<h2><?php printf( __( 'About %s', 'auto-load-next-post' ), get_the_author() ); ?></h2>
74
-						<?php the_author_meta( 'description' ); ?>
73
+						<h2><?php printf(__('About %s', 'auto-load-next-post'), get_the_author()); ?></h2>
74
+						<?php the_author_meta('description'); ?>
75 75
 						<div id="author-link">
76
-							<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
77
-								<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'auto-load-next-post' ), get_the_author() ); ?>
76
+							<a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" rel="author">
77
+								<?php printf(__('View all posts by %s <span class="meta-nav">&rarr;</span>', 'auto-load-next-post'), get_the_author()); ?>
78 78
 							</a>
79 79
 						</div><!-- #author-link	-->
80 80
 					</div><!-- #author-description -->
@@ -84,17 +84,17 @@  discard block
 block discarded – undo
84 84
 		</article><!-- #post-<?php the_ID(); ?> -->
85 85
 		<?php
86 86
 		// Load content after the post content.
87
-		do_action( 'alnp_load_after_content' );
87
+		do_action('alnp_load_after_content');
88 88
 
89 89
 	// End the loop.
90 90
 	endwhile;
91 91
 
92 92
 	// Load content after the loop.
93
-	do_action( 'alnp_load_after_loop' );
93
+	do_action('alnp_load_after_loop');
94 94
 
95 95
 else :
96 96
 
97 97
 	// Load content if there are no more posts.
98
-	do_action( 'alnp_no_more_posts' );
98
+	do_action('alnp_no_more_posts');
99 99
 
100 100
 endif; // END if have_posts()
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,9 +92,11 @@
 block discarded – undo
92 92
 	// Load content after the loop.
93 93
 	do_action( 'alnp_load_after_loop' );
94 94
 
95
-else :
95
+else {
96
+	:
96 97
 
97 98
 	// Load content if there are no more posts.
98 99
 	do_action( 'alnp_no_more_posts' );
100
+}
99 101
 
100 102
 endif; // END if have_posts()
Please login to merge, or discard this patch.
template/theme-support/make/content-alnp.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,40 +8,40 @@
 block discarded – undo
8 8
  * @version 1.5.0
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 more posts to load.
17
-	while ( have_posts() ) : the_post();
17
+	while (have_posts()) : the_post();
18 18
 
19 19
 		$post_type = alnp_get_post_type(); // Post Type e.g. single
20 20
 
21 21
 		// Load content before the post content.
22
-		do_action( 'alnp_load_before_content' );
22
+		do_action('alnp_load_before_content');
23 23
 
24 24
 		// Load content before the post content for a specific post type.
25
-		do_action( 'alnp_load_before_content_post_type_' . $post_type );
25
+		do_action('alnp_load_before_content_post_type_'.$post_type);
26 26
 
27 27
 		// Load Make partial template for the correct post type.
28
-		get_template_part( 'partials/content', $post_type );
28
+		get_template_part('partials/content', $post_type);
29 29
 
30 30
 		// Load content after the post content for a specific post type.
31
-		do_action( 'alnp_load_after_content_post_type_' . $post_type );
31
+		do_action('alnp_load_after_content_post_type_'.$post_type);
32 32
 
33 33
 		// Load content before the post content.
34
-		do_action( 'alnp_load_after_content' );
34
+		do_action('alnp_load_after_content');
35 35
 
36 36
 	// End the loop.
37 37
 	endwhile;
38 38
 
39 39
 	// Load content after the loop.
40
-	do_action( 'alnp_load_after_loop' );
40
+	do_action('alnp_load_after_loop');
41 41
 
42 42
 	else :
43 43
 
44 44
 		// Load content if there are no more posts.
45
-		do_action( 'alnp_no_more_posts' );
45
+		do_action('alnp_no_more_posts');
46 46
 
47 47
 	endif; // END if have_posts()
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,9 +39,11 @@
 block discarded – undo
39 39
 	// Load content after the loop.
40 40
 	do_action( 'alnp_load_after_loop' );
41 41
 
42
-	else :
42
+	else {
43
+		:
43 44
 
44 45
 		// Load content if there are no more posts.
45 46
 		do_action( 'alnp_no_more_posts' );
47
+	}
46 48
 
47 49
 	endif; // END if have_posts()
Please login to merge, or discard this patch.