Completed
Branch master (86af2e)
by
unknown
01:53
created
auto-load-next-post.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * The main instance of the plugin.
27 27
  */
28
-if ( ! class_exists( 'Auto_Load_Next_Post' ) ) {
28
+if ( ! class_exists('Auto_Load_Next_Post')) {
29 29
 
30 30
 	class Auto_Load_Next_Post {
31 31
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		 * @return Auto_Load_Next_Post Single instance.
60 60
 		 */
61 61
 		public static function instance() {
62
-			if ( is_null( self::$_instance ) ) {
62
+			if (is_null(self::$_instance)) {
63 63
 				self::$_instance = new self();
64 64
 			}
65 65
 			return self::$_instance;
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		 */
75 75
 		public function __clone() {
76 76
 			// Cloning instances of the class is forbidden
77
-			_doing_it_wrong( __FUNCTION__, __( 'Cloning this object is forbidden.', 'auto-load-next-post' ), self::$version );
77
+			_doing_it_wrong(__FUNCTION__, __('Cloning this object is forbidden.', 'auto-load-next-post'), self::$version);
78 78
 		} // END __clone()
79 79
 
80 80
 		/**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		 * @return void
86 86
 		 */
87 87
 		public function __wakeup() {
88
-			_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'auto-load-next-post' ), self::$version );
88
+			_doing_it_wrong(__FUNCTION__, __('Unserializing instances of this class is forbidden.', 'auto-load-next-post'), self::$version);
89 89
 		} // END __wakeup()
90 90
 
91 91
 		/**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			/**
105 105
 			 * Auto Load Next Post is fully loaded.
106 106
 			 */
107
-			do_action( 'auto_load_next_post_loaded' );
107
+			do_action('auto_load_next_post_loaded');
108 108
 		} // END __construct()
109 109
 
110 110
 		/**
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
 		 */
116 116
 		public function init_hooks() {
117 117
 			// Load translation files.
118
-			add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
118
+			add_action('init', array($this, 'load_plugin_textdomain'));
119 119
 
120 120
 			// Load Auto Load Next Post scripts on the frontend.
121
-			add_action( 'wp_enqueue_scripts', array( $this, 'alnp_enqueue_scripts' ) );
121
+			add_action('wp_enqueue_scripts', array($this, 'alnp_enqueue_scripts'));
122 122
 		} // END init_hooks()
123 123
 
124 124
 		/**
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 			$this->define('AUTO_LOAD_NEXT_POST_FILE', __FILE__);
134 134
 			$this->define('AUTO_LOAD_NEXT_POST_SLUG', 'auto-load-next-post');
135 135
 
136
-			$this->define('AUTO_LOAD_NEXT_POST_URL_PATH', untrailingslashit( plugins_url('/', __FILE__) ) );
137
-			$this->define('AUTO_LOAD_NEXT_POST_FILE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
136
+			$this->define('AUTO_LOAD_NEXT_POST_URL_PATH', untrailingslashit(plugins_url('/', __FILE__)));
137
+			$this->define('AUTO_LOAD_NEXT_POST_FILE_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
138 138
 			$this->define('AUTO_LOAD_NEXT_POST_TEMPLATE_PATH', 'auto-load-next-post/');
139 139
 
140 140
 			$this->define('AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE', '4.4');
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 		 * @access private
159 159
 		 * @since  1.4.3
160 160
 		 */
161
-		private function define( $name, $value ) {
162
-			if ( ! defined( $name ) ) {
163
-				define( $name, $value );
161
+		private function define($name, $value) {
162
+			if ( ! defined($name)) {
163
+				define($name, $value);
164 164
 			}
165 165
 		} // END define()
166 166
 
@@ -173,26 +173,26 @@  discard block
 block discarded – undo
173 173
 		 * @return  void
174 174
 		 */
175 175
 		public function includes() {
176
-			include_once( dirname( __FILE__ ) . '/includes/class-alnp-autoloader.php' ); // Autoloader.
177
-			include_once( dirname( __FILE__ ) . '/includes/auto-load-next-post-conditional-functions.php' ); // Conditional functions.
178
-			include_once( dirname( __FILE__ ) . '/includes/auto-load-next-post-formatting-functions.php' ); // Formatting functions.
179
-			include_once( dirname( __FILE__ ) . '/includes/auto-load-next-post-themes-supported.php' ); // Handles all supported themes out of the box.
180
-			include_once( dirname( __FILE__ ) . '/includes/auto-load-next-post-core-functions.php' ); // Contains core functions for the front/back end.
176
+			include_once(dirname(__FILE__).'/includes/class-alnp-autoloader.php'); // Autoloader.
177
+			include_once(dirname(__FILE__).'/includes/auto-load-next-post-conditional-functions.php'); // Conditional functions.
178
+			include_once(dirname(__FILE__).'/includes/auto-load-next-post-formatting-functions.php'); // Formatting functions.
179
+			include_once(dirname(__FILE__).'/includes/auto-load-next-post-themes-supported.php'); // Handles all supported themes out of the box.
180
+			include_once(dirname(__FILE__).'/includes/auto-load-next-post-core-functions.php'); // Contains core functions for the front/back end.
181 181
 
182 182
 			// Include theme support.
183 183
 			alnp_include_theme_support();
184 184
 
185 185
 			// Customizer.
186
-			include_once( dirname( __FILE__ ) . '/includes/customizer/class-alnp-customizer.php' );
187
-			include_once( dirname( __FILE__ ) . '/includes/customizer/class-alnp-customizer-scripts.php' );
186
+			include_once(dirname(__FILE__).'/includes/customizer/class-alnp-customizer.php');
187
+			include_once(dirname(__FILE__).'/includes/customizer/class-alnp-customizer-scripts.php');
188 188
 
189 189
 			// Include admin class to handle all back-end functions.
190
-			if ( is_admin() ) {
191
-				include_once( dirname( __FILE__ ) . '/includes/admin/class-alnp-admin.php' ); // Admin section.
190
+			if (is_admin()) {
191
+				include_once(dirname(__FILE__).'/includes/admin/class-alnp-admin.php'); // Admin section.
192 192
 			}
193 193
 
194 194
 			// Install.
195
-			require_once( dirname( __FILE__ ) . '/includes/class-alnp-install.php' );
195
+			require_once(dirname(__FILE__).'/includes/class-alnp-install.php');
196 196
 		} // END includes()
197 197
 
198 198
 		/**
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		 * @return  void
208 208
 		 */
209 209
 		public function load_plugin_textdomain() {
210
-			load_plugin_textdomain( 'auto-load-next-post', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
210
+			load_plugin_textdomain('auto-load-next-post', false, dirname(plugin_basename(__FILE__)).'/languages/');
211 211
 		} // END load_plugin_textdomain()
212 212
 
213 213
 		/**
@@ -219,32 +219,32 @@  discard block
 block discarded – undo
219 219
 		 */
220 220
 		public function alnp_enqueue_scripts() {
221 221
 			// Load the Javascript if found as a singluar post and the user is not a bot.
222
-			if ( !alnp_is_bot() && is_singular() && get_post_type() == 'post' ) {
222
+			if ( ! alnp_is_bot() && is_singular() && get_post_type() == 'post') {
223 223
 				// This helps the plugin decide to load the JavaScript in the footer or not.
224
-				$load_in_footer = get_option( 'auto_load_next_post_js_footer' );
224
+				$load_in_footer = get_option('auto_load_next_post_js_footer');
225 225
 
226
-				$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 );
226
+				$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);
227 227
 
228 228
 				// Only load History.js when not in the customizer.
229
-				if ( ! is_customize_preview() ) {
230
-					$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 );
229
+				if ( ! is_customize_preview()) {
230
+					$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);
231 231
 				}
232 232
 
233
-				$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 );
233
+				$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);
234 234
 
235 235
 				// Variables for the JavaScript
236
-				wp_localize_script( 'auto-load-next-post-script', 'auto_load_next_post_params', array(
236
+				wp_localize_script('auto-load-next-post-script', 'auto_load_next_post_params', array(
237 237
 					'alnp_version'              => AUTO_LOAD_NEXT_POST_VERSION,
238
-					'alnp_content_container'    => get_option( 'auto_load_next_post_content_container' ),
239
-					'alnp_title_selector'       => get_option( 'auto_load_next_post_title_selector' ),
240
-					'alnp_navigation_container' => get_option( 'auto_load_next_post_navigation_container' ),
241
-					'alnp_comments_container'   => get_option( 'auto_load_next_post_comments_container' ),
242
-					'alnp_remove_comments'      => get_option( 'auto_load_next_post_remove_comments' ),
243
-					'alnp_google_analytics'     => get_option( 'auto_load_next_post_google_analytics' ),
244
-					'alnp_event_on_load'        => get_option( 'auto_load_next_post_on_load_event' ),
245
-					'alnp_event_on_entering'    => get_option( 'auto_load_next_post_on_entering_event' ),
238
+					'alnp_content_container'    => get_option('auto_load_next_post_content_container'),
239
+					'alnp_title_selector'       => get_option('auto_load_next_post_title_selector'),
240
+					'alnp_navigation_container' => get_option('auto_load_next_post_navigation_container'),
241
+					'alnp_comments_container'   => get_option('auto_load_next_post_comments_container'),
242
+					'alnp_remove_comments'      => get_option('auto_load_next_post_remove_comments'),
243
+					'alnp_google_analytics'     => get_option('auto_load_next_post_google_analytics'),
244
+					'alnp_event_on_load'        => get_option('auto_load_next_post_on_load_event'),
245
+					'alnp_event_on_entering'    => get_option('auto_load_next_post_on_entering_event'),
246 246
 					'alnp_is_customizer'        => $this->is_alnp_using_customizer(),
247
-				) );
247
+				));
248 248
 			} // END if is_singular() && get_post_type()
249 249
 		} // END alnp_enqueue_scripts()
250 250
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 		 * @return string|boolean
258 258
 		 */
259 259
 		public static function is_alnp_using_customizer() {
260
-			if ( is_customize_preview() ) {
260
+			if (is_customize_preview()) {
261 261
 				return "yes";
262 262
 			}
263 263
 
@@ -279,21 +279,21 @@  discard block
 block discarded – undo
279 279
 		 * @param   bool    $footer Optional, can set the JavaScript to load in the footer instead.
280 280
 		 * @global  string  $wp_version
281 281
 		 */
282
-		public static function load_file( $name, $file_path, $is_script = false, $support = array(), $version = '', $footer = false ) {
282
+		public static function load_file($name, $file_path, $is_script = false, $support = array(), $version = '', $footer = false) {
283 283
 			global $wp_version;
284 284
 
285
-			$url = AUTO_LOAD_NEXT_POST_URL_PATH . $file_path; // URL to the file.
285
+			$url = AUTO_LOAD_NEXT_POST_URL_PATH.$file_path; // URL to the file.
286 286
 
287
-			if ( file_exists( AUTO_LOAD_NEXT_POST_FILE_PATH . $file_path ) ) {
288
-				if ( $is_script ) {
289
-					if ( !wp_script_is( $name, 'registered' ) ) {
290
-						wp_register_script( $name, $url, $support, $version, $footer );
291
-						wp_enqueue_script( $name );
287
+			if (file_exists(AUTO_LOAD_NEXT_POST_FILE_PATH.$file_path)) {
288
+				if ($is_script) {
289
+					if ( ! wp_script_is($name, 'registered')) {
290
+						wp_register_script($name, $url, $support, $version, $footer);
291
+						wp_enqueue_script($name);
292 292
 					}
293 293
 				} else {
294
-					if ( !wp_style_is( $name, 'registered' ) ) {
295
-						wp_register_style( $name, $url );
296
-						wp_enqueue_style( $name );
294
+					if ( ! wp_style_is($name, 'registered')) {
295
+						wp_register_style($name, $url);
296
+						wp_enqueue_style($name);
297 297
 					}
298 298
 				} // end if
299 299
 			} // end if
Please login to merge, or discard this patch.
includes/auto-load-next-post-themes-supported.php 1 patch
Spacing   +6 added lines, -6 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
 
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 function alnp_include_theme_support() {
44 44
 	$themes_supported = alnp_themes_supported();
45 45
 
46
-	if ( is_alnp_active_theme( $themes_supported ) ) {
47
-		foreach( $themes_supported as $theme ) {
48
-			if ( get_template() == $theme ) {
49
-				include_once( dirname( __FILE__ ) . '/theme-support/class-alnp-' . $theme . '.php' );
46
+	if (is_alnp_active_theme($themes_supported)) {
47
+		foreach ($themes_supported as $theme) {
48
+			if (get_template() == $theme) {
49
+				include_once(dirname(__FILE__).'/theme-support/class-alnp-'.$theme.'.php');
50 50
 			}
51 51
 		}
52 52
 	}
53 53
 
54
-	include_once( dirname( __FILE__ ) . '/theme-support/class-alnp-theme-support.php' );
54
+	include_once(dirname(__FILE__).'/theme-support/class-alnp-theme-support.php');
55 55
 } // END alnp_include_theme_support()
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-misc.php 1 patch
Spacing   +33 added lines, -33 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_Misc_Tab' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Settings_Misc_Tab')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_Settings_Misc_Tab extends Auto_Load_Next_Post_Settings_Page {
21 21
 
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 		 */
31 31
 		public function __construct() {
32 32
 			$this->id    = 'misc';
33
-			$this->label = esc_html__( 'Misc', 'auto-load-next-post' );
33
+			$this->label = esc_html__('Misc', 'auto-load-next-post');
34 34
 
35 35
 			parent::__construct();
36 36
 
37
-			add_filter( 'auto_load_next_post_mist_settings', array( __CLASS__, 'lock_js_in_footer' ), 0, 1 );
38
-			add_action( 'auto_load_next_post_sections_misc', array( __CLASS__, 'no_comment_selector_set' ), 10 );
37
+			add_filter('auto_load_next_post_mist_settings', array(__CLASS__, 'lock_js_in_footer'), 0, 1);
38
+			add_action('auto_load_next_post_sections_misc', array(__CLASS__, 'no_comment_selector_set'), 10);
39 39
 		} // END __construct()
40 40
 
41 41
 		/**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 		 * @since  1.5.0
47 47
 		 */
48 48
 		public static function no_comment_selector_set() {
49
-			$comments_container = get_option( 'auto_load_next_post_comments_container' );
50
-			$remove_comments    = get_option( 'auto_load_next_post_remove_comments' );
49
+			$comments_container = get_option('auto_load_next_post_comments_container');
50
+			$remove_comments    = get_option('auto_load_next_post_remove_comments');
51 51
 
52
-			if ( empty( $comments_container ) && ! empty( $remove_comments ) ) {
53
-				include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-no-comment-selector.php' );
52
+			if (empty($comments_container) && ! empty($remove_comments)) {
53
+				include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-no-comment-selector.php');
54 54
 			}
55 55
 		} // END no_comment_selector_set()
56 56
 
@@ -66,19 +66,19 @@  discard block
 block discarded – undo
66 66
 		 * @param   array $settings
67 67
 		 * @return  array $settings
68 68
 		 */
69
-		public static function lock_js_in_footer( $settings ) {
70
-			$js_locked_in_footer = get_option( 'auto_load_next_post_lock_js_in_footer' );
69
+		public static function lock_js_in_footer($settings) {
70
+			$js_locked_in_footer = get_option('auto_load_next_post_lock_js_in_footer');
71 71
 
72
-			if ( !empty( $js_locked_in_footer ) && $js_locked_in_footer == 'yes' ) {
72
+			if ( ! empty($js_locked_in_footer) && $js_locked_in_footer == 'yes') {
73 73
 				// Setting key to look for.
74 74
 				$key = 'load_js_in_footer';
75 75
 
76 76
 				// Find the setting.
77
-				$find_setting = array_search( $key, $settings );
77
+				$find_setting = array_search($key, $settings);
78 78
 
79 79
 				// Does the setting exist?
80
-				if ( is_bool( $find_setting ) === true ) {
81
-					unset( $settings[$key] );
80
+				if (is_bool($find_setting) === true) {
81
+					unset($settings[$key]);
82 82
 				}
83 83
 			}
84 84
 
@@ -99,45 +99,45 @@  discard block
 block discarded – undo
99 99
 					'title' => array(
100 100
 						'title' => $this->label,
101 101
 						'type'  => 'title',
102
-						'desc'  => sprintf( esc_html__( 'Here you set if you want to track pageviews, remove comments and load %s javascript in the footer.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
102
+						'desc'  => sprintf(esc_html__('Here you set if you want to track pageviews, remove comments and load %s javascript in the footer.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')),
103 103
 						'id'    => 'misc_options'
104 104
 					),
105 105
 
106 106
 					'remove_comments' => array(
107
-						'title'   => esc_html__( 'Remove Comments', 'auto-load-next-post' ),
108
-						'desc'    => esc_html__( 'Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post' ),
107
+						'title'   => esc_html__('Remove Comments', 'auto-load-next-post'),
108
+						'desc'    => esc_html__('Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post'),
109 109
 						'id'      => 'auto_load_next_post_remove_comments',
110 110
 						'default' => 'yes',
111 111
 						'type'    => 'checkbox'
112 112
 					),
113 113
 
114 114
 					'google_analytics' => array(
115
-						'title'   => esc_html__( 'Update Google Analytics', 'auto-load-next-post' ),
116
-						'desc'    => esc_html__( 'Enable to track each post the visitor is reading. This will count as a pageview. You must already have Google Analytics setup.', 'auto-load-next-post' ),
115
+						'title'   => esc_html__('Update Google Analytics', 'auto-load-next-post'),
116
+						'desc'    => esc_html__('Enable to track each post the visitor is reading. This will count as a pageview. You must already have Google Analytics setup.', 'auto-load-next-post'),
117 117
 						'id'      => 'auto_load_next_post_google_analytics',
118 118
 						'default' => 'no',
119 119
 						'type'    => 'checkbox'
120 120
 					),
121 121
 
122 122
 					'load_js_in_footer' => array(
123
-						'title'   => esc_html__( 'JavaScript in Footer?', 'auto-load-next-post' ),
124
-						'desc'    => esc_html__( 'Enable to load Auto Load Next Post in the footer instead of the header. Can be useful to optimize your site or if the current theme requires it.', 'auto-load-next-post' ),
123
+						'title'   => esc_html__('JavaScript in Footer?', 'auto-load-next-post'),
124
+						'desc'    => esc_html__('Enable to load Auto Load Next Post in the footer instead of the header. Can be useful to optimize your site or if the current theme requires it.', 'auto-load-next-post'),
125 125
 						'id'      => 'auto_load_next_post_load_js_in_footer',
126 126
 						'default' => 'no',
127 127
 						'type'    => 'checkbox'
128 128
 					),
129 129
 
130 130
 					'reset_data' => array(
131
-						'title'   => esc_html__( 'Reset all data?', 'auto-load-next-post' ),
132
-						'desc'    => esc_html__( 'Press the reset button to clear all settings for this plugin and re-install the default settings.', 'auto-load-next-post' ),
131
+						'title'   => esc_html__('Reset all data?', 'auto-load-next-post'),
132
+						'desc'    => esc_html__('Press the reset button to clear all settings for this plugin and re-install the default settings.', 'auto-load-next-post'),
133 133
 						'id'      => 'auto_load_next_post_reset_data',
134 134
 						'default' => 'no',
135 135
 						'type'    => 'reset_data'
136 136
 					),
137 137
 
138 138
 					'uninstall' => array(
139
-						'title'   => esc_html__( 'Remove all data on uninstall?', 'auto-load-next-post' ),
140
-						'desc'    => esc_html__( 'If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post' ),
139
+						'title'   => esc_html__('Remove all data on uninstall?', 'auto-load-next-post'),
140
+						'desc'    => esc_html__('If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post'),
141 141
 						'id'      => 'auto_load_next_post_uninstall_data',
142 142
 						'default' => 'no',
143 143
 						'type'    => 'checkbox'
@@ -157,15 +157,15 @@  discard block
 block discarded – undo
157 157
 		 * @since 1.5.0
158 158
 		 * @param mixed $settings
159 159
 		 */
160
-		public function customize_button( $settings ) {
160
+		public function customize_button($settings) {
161 161
 			?>
162 162
 			<tr valign="top">
163
-				<th scope="row" class="titledesc"><?php echo $settings['title'];?></th>
164
-				<td class="forminp forminp-<?php echo sanitize_title( $settings['type'] ) ?>">
165
-					<a href="<?php echo $settings['link']; ?>" class="button-secondary <?php echo esc_attr( $settings['class'] ); ?>">
163
+				<th scope="row" class="titledesc"><?php echo $settings['title']; ?></th>
164
+				<td class="forminp forminp-<?php echo sanitize_title($settings['type']) ?>">
165
+					<a href="<?php echo $settings['link']; ?>" class="button-secondary <?php echo esc_attr($settings['class']); ?>">
166 166
 						<?php echo $settings['button_text']; ?>
167 167
 					</a>
168
-					<span class="description"><?php echo $settings['desc'];?></span>
168
+					<span class="description"><?php echo $settings['desc']; ?></span>
169 169
 				</td>
170 170
 			</tr>
171 171
 			<?php
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		public function output() {
183 183
 			$settings = $this->get_settings();
184 184
 
185
-			Auto_Load_Next_Post_Admin_Settings::output_fields( $settings );
185
+			Auto_Load_Next_Post_Admin_Settings::output_fields($settings);
186 186
 		} // END output()
187 187
 
188 188
 		/**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		public function save() {
195 195
 			$settings = $this->get_settings();
196 196
 
197
-			Auto_Load_Next_Post_Admin_Settings::save_fields( $settings );
197
+			Auto_Load_Next_Post_Admin_Settings::save_fields($settings);
198 198
 		} // END save()
199 199
 
200 200
 	} // END class
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-events.php 1 patch
Spacing   +14 added lines, -14 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_Events_Tab' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Settings_Events_Tab')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_Settings_Events_Tab extends Auto_Load_Next_Post_Settings_Page {
21 21
 
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 		 */
27 27
 		public function __construct() {
28 28
 			$this->id    = 'events';
29
-			$this->label = esc_html__( 'Events', 'auto-load-next-post' );
29
+			$this->label = esc_html__('Events', 'auto-load-next-post');
30 30
 
31 31
 			parent::__construct();
32 32
 
33
-			add_action( 'auto_load_next_post_settings_events', array( __CLASS__, 'is_jetpack_lazy_images_active' ), 10 );
33
+			add_action('auto_load_next_post_settings_events', array(__CLASS__, 'is_jetpack_lazy_images_active'), 10);
34 34
 		} // END __construct()
35 35
 
36 36
 		/**
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 		 * @static
42 42
 		 */
43 43
 		public static function is_jetpack_lazy_images_active() {
44
-			if ( alnp_check_jetpack() == 'yes' ) {
45
-				if ( Jetpack::is_module_active( 'lazy-images' ) ) {
46
-					include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-jetpack-lazy-images-module.php' );
44
+			if (alnp_check_jetpack() == 'yes') {
45
+				if (Jetpack::is_module_active('lazy-images')) {
46
+					include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-jetpack-lazy-images-module.php');
47 47
 				}
48 48
 			}
49 49
 		} // END is_jetpack_lazy_images_active()
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 					array(
62 62
 						'title' => $this->label,
63 63
 						'type'  => 'title',
64
-						'desc'  => sprintf( __( 'Below you can enter external JavaScript events to be triggered alongside %1$s native events. Separate each event like so: %2$s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<code>event1, event2,</code>' ),
64
+						'desc'  => sprintf(__('Below you can enter external JavaScript events to be triggered alongside %1$s native events. Separate each event like so: %2$s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<code>event1, event2,</code>'),
65 65
 						'id'    => 'events_options'
66 66
 					),
67 67
 
68 68
 					array(
69
-						'title'    => esc_html__( 'Post loaded', 'auto-load-next-post' ),
70
-						'desc'     => esc_html__( 'Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post' ),
69
+						'title'    => esc_html__('Post loaded', 'auto-load-next-post'),
70
+						'desc'     => esc_html__('Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post'),
71 71
 						'id'       => 'auto_load_next_post_on_load_event',
72 72
 						'default'  => '',
73 73
 						'type'     => 'textarea',
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 					),
77 77
 
78 78
 					array(
79
-						'title'    => esc_html__( 'Entering a Post', 'auto-load-next-post' ),
80
-						'desc'     => esc_html__( 'Events listed here will be triggered when entering a post.', 'auto-load-next-post' ),
79
+						'title'    => esc_html__('Entering a Post', 'auto-load-next-post'),
80
+						'desc'     => esc_html__('Events listed here will be triggered when entering a post.', 'auto-load-next-post'),
81 81
 						'id'       => 'auto_load_next_post_on_entering_event',
82 82
 						'default'  => '',
83 83
 						'type'     => 'textarea',
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		public function output() {
101 101
 			$settings = $this->get_settings();
102 102
 
103
-			Auto_Load_Next_Post_Admin_Settings::output_fields( $settings );
103
+			Auto_Load_Next_Post_Admin_Settings::output_fields($settings);
104 104
 		} // END output()
105 105
 
106 106
 		/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		public function save() {
112 112
 			$settings = $this->get_settings();
113 113
 
114
-			Auto_Load_Next_Post_Admin_Settings::save_fields( $settings );
114
+			Auto_Load_Next_Post_Admin_Settings::save_fields($settings);
115 115
 		} // END save()
116 116
 
117 117
 	} // END class
Please login to merge, or discard this patch.
includes/theme-support/class-alnp-sydney.php 1 patch
Spacing   +4 added lines, -4 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,7 +29,7 @@  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
 	} // END init()
34 34
 
35 35
 	/**
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
 	 * @static
41 41
 	 */
42 42
 	public static function add_theme_support() {
43
-		add_theme_support( 'auto-load-next-post', array(
43
+		add_theme_support('auto-load-next-post', array(
44 44
 			'content_container'    => 'main.post-wrap',
45 45
 			'title_selector'       => 'h1.entry-title',
46 46
 			'navigation_container' => 'nav.post-navigation',
47 47
 			'comments_container'   => 'div#comments',
48 48
 			'load_js_in_footer'    => 'no',
49 49
 			'lock_js_in_footer'    => 'no',
50
-		) );
50
+		));
51 51
 	} // END add_theme_support()
52 52
 
53 53
 } // END class
Please login to merge, or discard this patch.