Completed
Branch master (2d3b00)
by
unknown
01:38
created
includes/customizer/class-alnp-customizer.php 2 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -164,8 +164,12 @@  discard block
 block discarded – undo
164 164
 		public function alnp_remove_widgets_panel( $components ) {
165 165
 			if ( $this->alnp_is_customizer() ) {
166 166
 				foreach( $components as $key => $component ) {
167
-					if ( $component == 'widgets' ) unset( $components[ 'widgets' ] );
168
-					if ( $component == 'nav_menus' ) unset( $components[ 'nav_menus' ] );
167
+					if ( $component == 'widgets' ) {
168
+						unset( $components[ 'widgets' ] );
169
+					}
170
+					if ( $component == 'nav_menus' ) {
171
+						unset( $components[ 'nav_menus' ] );
172
+					}
169 173
 				}
170 174
 			}
171 175
 
@@ -463,8 +467,7 @@  discard block
 block discarded – undo
463 467
 				return false;
464 468
 			} elseif ( is_home() ) {
465 469
 				return true;
466
-			}
467
-			elseif ( is_singular( apply_filters( 'alnp_customizer_posts_ready', array( 'post' ) ) ) ) {
470
+			} elseif ( is_singular( apply_filters( 'alnp_customizer_posts_ready', array( 'post' ) ) ) ) {
468 471
 				return true;
469 472
 			}
470 473
 
@@ -495,8 +498,7 @@  discard block
 block discarded – undo
495 498
 
496 499
 					return get_permalink( $id );
497 500
 				endwhile;
498
-			}
499
-			else {
501
+			} else {
500 502
 				return false;
501 503
 			}
502 504
 		} // END alnp_get_random_page_permalink()
Please login to merge, or discard this patch.
Spacing   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  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
 
17
-if ( !class_exists( 'Auto_Load_Next_Post_Customizer' ) ) {
17
+if ( ! class_exists('Auto_Load_Next_Post_Customizer')) {
18 18
 
19 19
 	class Auto_Load_Next_Post_Customizer {
20 20
 
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 		 * @access public
26 26
 		 */
27 27
 		public function __construct() {
28
-			add_action( 'customize_register', array( $this, 'alnp_init_customizer' ), 50 );
29
-			add_filter( 'customize_loaded_components', array( $this, 'alnp_remove_widgets_panel' ) );
28
+			add_action('customize_register', array($this, 'alnp_init_customizer'), 50);
29
+			add_filter('customize_loaded_components', array($this, 'alnp_remove_widgets_panel'));
30 30
 		}
31 31
 
32 32
 		/**
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
 		 * @since  1.5.0
37 37
 		 * @param  WP_Customize_Manager $wp_customize The Customizer object.
38 38
 		 */
39
-		public function alnp_init_customizer( $wp_customize ) {
39
+		public function alnp_init_customizer($wp_customize) {
40 40
 			/**
41 41
 			 * Dont add settings to the customizer if the user does
42 42
 			 * not have permission to make changes to the theme.
43 43
 			 */
44
-			if ( ! current_user_can( 'edit_theme_options' ) ) {
44
+			if ( ! current_user_can('edit_theme_options')) {
45 45
 				return;
46 46
 			}
47 47
 
48 48
 			// Auto Load Next Post Panel.
49
-			$panel = array( 'panel' => 'alnp' );
49
+			$panel = array('panel' => 'alnp');
50 50
 
51 51
 			/**
52 52
 			 * Add the main panel and sections.
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 			 */
56 56
 			$wp_customize->add_panel(
57 57
 				'alnp', array(
58
-					'title'           => esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ),
58
+					'title'           => esc_html__('Auto Load Next Post', 'auto-load-next-post'),
59 59
 					'capability'      => 'edit_theme_options',
60
-					'description'     => esc_html__( 'Auto Load Next Post increases your pageviews by engaging the site viewers to keep reading your content rather than increasing your bounce rate.', 'auto-load-next-post' ),
60
+					'description'     => esc_html__('Auto Load Next Post increases your pageviews by engaging the site viewers to keep reading your content rather than increasing your bounce rate.', 'auto-load-next-post'),
61 61
 					'priority'        => 160,
62
-					'active_callback' => array( $this, 'is_page_alnp_ready' )
62
+					'active_callback' => array($this, 'is_page_alnp_ready')
63 63
 				)
64 64
 			);
65 65
 
@@ -67,24 +67,24 @@  discard block
 block discarded – undo
67 67
 			$sections = $this->alnp_get_customizer_sections();
68 68
 
69 69
 			// Add each section.
70
-			foreach ( $sections as $section => $args ) {
70
+			foreach ($sections as $section => $args) {
71 71
 				/**
72 72
 				 * If we are not only viewing Auto Load Next Post customizer sections
73 73
 				 * then move them under our own panel.
74 74
 				 */
75
-				if ( ! $this->alnp_is_customizer() ) {
76
-					$args = array_merge( $args, $panel );
75
+				if ( ! $this->alnp_is_customizer()) {
76
+					$args = array_merge($args, $panel);
77 77
 				}
78 78
 
79
-				$wp_customize->add_section( $section, $args );
79
+				$wp_customize->add_section($section, $args);
80 80
 			}
81 81
 
82 82
 			// Get plugin settings.
83 83
 			$settings = $this->alnp_get_customizer_settings();
84 84
 
85 85
 			// Add each setting.
86
-			foreach ( $settings as $setting => $args ) {
87
-				$wp_customize->add_setting( $setting, $args );
86
+			foreach ($settings as $setting => $args) {
87
+				$wp_customize->add_setting($setting, $args);
88 88
 			}
89 89
 
90 90
 			/**
@@ -93,16 +93,16 @@  discard block
 block discarded – undo
93 93
 			 * @since 1.5.0
94 94
 			 * @param WP_Customize_Manager $wp_customize The Customizer object.
95 95
 			 */
96
-			do_action( 'alnp_customizer_register', $wp_customize );
96
+			do_action('alnp_customizer_register', $wp_customize);
97 97
 
98 98
 			$controls = $this->alnp_get_customizer_controls();
99 99
 
100
-			foreach ( $controls as $control => $args ) {
101
-				$wp_customize->add_control( new $args['class']( $wp_customize, $control, $args ) );
100
+			foreach ($controls as $control => $args) {
101
+				$wp_customize->add_control(new $args['class']($wp_customize, $control, $args));
102 102
 			}
103 103
 
104
-			if ( $this->alnp_is_customizer() ) {
105
-				$this->alnp_remove_default_customizer_panels( $wp_customize ); // Remove controls from the customizer.
104
+			if ($this->alnp_is_customizer()) {
105
+				$this->alnp_remove_default_customizer_panels($wp_customize); // Remove controls from the customizer.
106 106
 			}
107 107
 
108 108
 			// Load custom controllers.
@@ -127,30 +127,30 @@  discard block
 block discarded – undo
127 127
 			 * to tell users about the pro version, what comes with it
128 128
 			 * and link to product page.
129 129
 			 */
130
-			if ( ! is_alnp_pro_version_installed() ) {
131
-				include_once( dirname( __FILE__ ) . '/class-alnp-pro-preview-controller.php' );
130
+			if ( ! is_alnp_pro_version_installed()) {
131
+				include_once(dirname(__FILE__).'/class-alnp-pro-preview-controller.php');
132 132
 
133 133
 				$preview_args = array(
134
-					'title'    => esc_html__( 'More?', 'auto-load-next-post' ),
134
+					'title'    => esc_html__('More?', 'auto-load-next-post'),
135 135
 					'priority' => 999,
136 136
 				);
137 137
 
138
-				if ( ! $this->alnp_is_customizer() ) {
139
-					$preview_args = array_merge( $preview_args, $panel );
138
+				if ( ! $this->alnp_is_customizer()) {
139
+					$preview_args = array_merge($preview_args, $panel);
140 140
 				}
141 141
 
142
-				$wp_customize->add_section( 'alnp_pro_preview', $preview_args );
142
+				$wp_customize->add_section('alnp_pro_preview', $preview_args);
143 143
 
144
-				$wp_customize->add_setting( 'alnp_pro_preview', array(
144
+				$wp_customize->add_setting('alnp_pro_preview', array(
145 145
 					'default' => null,
146
-				) );
146
+				));
147 147
 
148
-				$wp_customize->add_control( new Auto_Load_Next_Post_Pro_Preview_Controller( $wp_customize, 'alnp_pro_preview', array(
149
-					'label'    => __( 'Looking for more options?', 'auto-load-next-post' ),
148
+				$wp_customize->add_control(new Auto_Load_Next_Post_Pro_Preview_Controller($wp_customize, 'alnp_pro_preview', array(
149
+					'label'    => __('Looking for more options?', 'auto-load-next-post'),
150 150
 					'section'  => 'alnp_pro_preview',
151 151
 					'settings' => 'alnp_pro_preview',
152 152
 					'priority' => 1,
153
-				) ) );
153
+				)));
154 154
 			}
155 155
 		} // END alnp_init_customizer()
156 156
 
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
 		 * @param  array $components Core Customizer components list.
162 162
 		 * @return array (Maybe) modified components list.
163 163
 		 */
164
-		public function alnp_remove_widgets_panel( $components ) {
165
-			if ( $this->alnp_is_customizer() ) {
166
-				foreach( $components as $key => $component ) {
167
-					if ( $component == 'widgets' ) unset( $components[ 'widgets' ] );
168
-					if ( $component == 'nav_menus' ) unset( $components[ 'nav_menus' ] );
164
+		public function alnp_remove_widgets_panel($components) {
165
+			if ($this->alnp_is_customizer()) {
166
+				foreach ($components as $key => $component) {
167
+					if ($component == 'widgets') unset($components['widgets']);
168
+					if ($component == 'nav_menus') unset($components['nav_menus']);
169 169
 				}
170 170
 			}
171 171
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 		 * @param  object $wp_customize
181 181
 		 * @return boolean
182 182
 		 */
183
-		public function alnp_remove_default_customizer_panels( $wp_customize ) {
183
+		public function alnp_remove_default_customizer_panels($wp_customize) {
184 184
 			global $wp_customize;
185 185
 
186 186
 			$wp_customize->remove_section("themes");
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		 * @return boolean
203 203
 		 */
204 204
 		public function alnp_is_customizer() {
205
-			return isset( $_GET['alnp-customizer'] ) && $_GET['alnp-customizer'] === 'yes';
205
+			return isset($_GET['alnp-customizer']) && $_GET['alnp-customizer'] === 'yes';
206 206
 		} // END alnp_is_customizer()
207 207
 
208 208
 		/**
@@ -217,18 +217,18 @@  discard block
 block discarded – undo
217 217
 			 *
218 218
 			 * @param array $sections Customizer sections to add.
219 219
 			 */
220
-			return apply_filters( 'auto_load_next_post_get_customizer_sections', array(
220
+			return apply_filters('auto_load_next_post_get_customizer_sections', array(
221 221
 				'auto_load_next_post_theme_selectors' => array(
222 222
 					'capability'  => 'edit_theme_options',
223
-					'title'       => esc_html__( 'Theme Selectors', 'auto-load-next-post' ),
224
-					'description' => sprintf( __( 'Set the theme selectors below according to the theme. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post' ), '<a href="' . esc_url( 'https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpcustomizer&utm_campaign=plugin-settings-theme-selectors' ) . '" target="_blank">', '</a>' ),
223
+					'title'       => esc_html__('Theme Selectors', 'auto-load-next-post'),
224
+					'description' => sprintf(__('Set the theme selectors below according to the theme. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post'), '<a href="'.esc_url('https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpcustomizer&utm_campaign=plugin-settings-theme-selectors').'" target="_blank">', '</a>'),
225 225
 				),
226 226
 				'auto_load_next_post_misc' => array(
227 227
 					'capability'  => 'edit_theme_options',
228
-					'title'       => esc_html__( 'Misc Settings', 'auto-load-next-post' ),
229
-					'description' => sprintf( __( 'Here you can 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' ) ),
228
+					'title'       => esc_html__('Misc Settings', 'auto-load-next-post'),
229
+					'description' => sprintf(__('Here you can 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')),
230 230
 				),
231
-			) );
231
+			));
232 232
 		} // END alnp_get_customizer_sections()
233 233
 
234 234
 		/**
@@ -245,12 +245,12 @@  discard block
 block discarded – undo
245 245
 			 *
246 246
 			 * @param array $settings Customizer settings to add.
247 247
 			 */
248
-			return apply_filters( 'auto_load_next_post_get_customizer_settings', array(
248
+			return apply_filters('auto_load_next_post_get_customizer_settings', array(
249 249
 				'auto_load_next_post_content_container' => array(
250 250
 					'capability'        => 'edit_theme_options',
251 251
 					'default'           => $settings['alnp_content_container'],
252 252
 					'sanitize_callback' => 'wp_filter_post_kses',
253
-					'validate_callback' => array( $this, 'alnp_validate_content_container_selector' ),
253
+					'validate_callback' => array($this, 'alnp_validate_content_container_selector'),
254 254
 					'transport'         => 'postMessage',
255 255
 					'type'              => 'option',
256 256
 				),
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 					'capability'        => 'edit_theme_options',
259 259
 					'default'           => $settings['alnp_title_selector'],
260 260
 					'sanitize_callback' => 'wp_filter_post_kses',
261
-					'validate_callback' => array( $this, 'alnp_validate_post_title_selector' ),
261
+					'validate_callback' => array($this, 'alnp_validate_post_title_selector'),
262 262
 					'transport'         => 'postMessage',
263 263
 					'type'              => 'option',
264 264
 				),
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 					'capability'        => 'edit_theme_options',
267 267
 					'default'           => $settings['alnp_navigation_container'],
268 268
 					'sanitize_callback' => 'wp_filter_post_kses',
269
-					'validate_callback' => array( $this, 'alnp_validate_post_navigation_selector' ),
269
+					'validate_callback' => array($this, 'alnp_validate_post_navigation_selector'),
270 270
 					'transport'         => 'postMessage',
271 271
 					'type'              => 'option',
272 272
 				),
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 					'transport'         => 'postMessage',
303 303
 					'type'              => 'option',
304 304
 				),
305
-			) );
305
+			));
306 306
 		} // END alnp_get_customizer_settings()
307 307
 
308 308
 		/**
@@ -320,64 +320,64 @@  discard block
 block discarded – undo
320 320
 			 *
321 321
 			 * @param array $controls Customizer controls to add.
322 322
 			 */
323
-			return apply_filters( 'auto_load_next_post_get_customizer_controls', array(
323
+			return apply_filters('auto_load_next_post_get_customizer_controls', array(
324 324
 				'alnp_content_container' => array(
325 325
 					'class'       => 'WP_Customize_Control',
326
-					'description' => sprintf( __( 'The primary container where the post content is loaded in. Default: %s', 'auto-load-next-post' ), '<code>main.site-main</code>' ),
327
-					'label'       => esc_html__( 'Content Container', 'auto-load-next-post' ),
326
+					'description' => sprintf(__('The primary container where the post content is loaded in. Default: %s', 'auto-load-next-post'), '<code>main.site-main</code>'),
327
+					'label'       => esc_html__('Content Container', 'auto-load-next-post'),
328 328
 					'section'     => 'auto_load_next_post_theme_selectors',
329 329
 					'settings'    => 'auto_load_next_post_content_container',
330 330
 					'type'        => 'text',
331 331
 				),
332 332
 				'alnp_title_selector' => array(
333 333
 					'class'       => 'WP_Customize_Control',
334
-					'description' => 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>' ),
335
-					'label'       => esc_html__( 'Post Title Selector', 'auto-load-next-post' ),
334
+					'description' => 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>'),
335
+					'label'       => esc_html__('Post Title Selector', 'auto-load-next-post'),
336 336
 					'section'     => 'auto_load_next_post_theme_selectors',
337 337
 					'settings'    => 'auto_load_next_post_title_selector',
338 338
 					'type'        => 'text',
339 339
 				),
340 340
 				'alnp_navigation_container' => array(
341 341
 					'class'       => 'WP_Customize_Control',
342
-					'description' => sprintf( __( 'Used to identify which post to load next if any. Default: %s', 'auto-load-next-post' ), '<code>nav.post-navigation</code>' ),
343
-					'label'       => esc_html__( 'Post Navigation Container', 'auto-load-next-post' ),
342
+					'description' => sprintf(__('Used to identify which post to load next if any. Default: %s', 'auto-load-next-post'), '<code>nav.post-navigation</code>'),
343
+					'label'       => esc_html__('Post Navigation Container', 'auto-load-next-post'),
344 344
 					'section'     => 'auto_load_next_post_theme_selectors',
345 345
 					'settings'    => 'auto_load_next_post_navigation_container',
346 346
 					'type'        => 'text',
347 347
 				),
348 348
 				'alnp_comments_container' => array(
349 349
 					'class'       => 'WP_Customize_Control',
350
-					'description' => sprintf( __( 'Used to remove comments if enabled under <strong>%1$sMisc%2$s</strong> settings. Default: %3$s', 'auto-load-next-post' ), '<a href="javascript:wp.customize.section( \'auto_load_next_post_misc\' ).focus();">', '</a>', '<code>div#comments</code>' ),
351
-					'label'       => esc_html__( 'Comments Container', 'auto-load-next-post' ),
350
+					'description' => sprintf(__('Used to remove comments if enabled under <strong>%1$sMisc%2$s</strong> settings. Default: %3$s', 'auto-load-next-post'), '<a href="javascript:wp.customize.section( \'auto_load_next_post_misc\' ).focus();">', '</a>', '<code>div#comments</code>'),
351
+					'label'       => esc_html__('Comments Container', 'auto-load-next-post'),
352 352
 					'section'     => 'auto_load_next_post_theme_selectors',
353 353
 					'settings'    => 'auto_load_next_post_comments_container',
354 354
 					'type'        => 'text',
355 355
 				),
356 356
 				'alnp_remove_comments' => array(
357 357
 					'class'       => 'WP_Customize_Control',
358
-					'description' => esc_html__( 'Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post' ),
359
-					'label'       => esc_html__( 'Remove Comments', 'auto-load-next-post' ),
358
+					'description' => esc_html__('Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post'),
359
+					'label'       => esc_html__('Remove Comments', 'auto-load-next-post'),
360 360
 					'section'     => 'auto_load_next_post_misc',
361 361
 					'settings'    => 'auto_load_next_post_remove_comments',
362 362
 					'type'        => 'checkbox',
363 363
 				),
364 364
 				'alnp_google_analytics' => array(
365 365
 					'class'       => 'WP_Customize_Control',
366
-					'description' => 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' ),
367
-					'label'       => esc_html__( 'Update Google Analytics', 'auto-load-next-post' ),
366
+					'description' => 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'),
367
+					'label'       => esc_html__('Update Google Analytics', 'auto-load-next-post'),
368 368
 					'section'     => 'auto_load_next_post_misc',
369 369
 					'settings'    => 'auto_load_next_post_google_analytics',
370 370
 					'type'        => 'checkbox',
371 371
 				),
372 372
 				'alnp_js_footer' => array(
373 373
 					'class'       => 'WP_Customize_Control',
374
-					'description' => esc_html__( 'Enable to load Auto Load Next Post in the footer instead of the header. Can be useful to optimize your site.', 'auto-load-next-post' ),
375
-					'label'       => esc_html__( 'JavaScript in Footer?', 'auto-load-next-post' ),
374
+					'description' => esc_html__('Enable to load Auto Load Next Post in the footer instead of the header. Can be useful to optimize your site.', 'auto-load-next-post'),
375
+					'label'       => esc_html__('JavaScript in Footer?', 'auto-load-next-post'),
376 376
 					'section'     => 'auto_load_next_post_misc',
377 377
 					'settings'    => 'auto_load_next_post_google_analytics',
378 378
 					'type'        => 'checkbox',
379 379
 				),
380
-			) );
380
+			));
381 381
 		} // END alnp_get_customizer_controls()
382 382
 
383 383
 		/**
@@ -388,9 +388,9 @@  discard block
 block discarded – undo
388 388
 		 * @param  string   $value    Value, normally pre-sanitized.
389 389
 		 * @return WP_Error $validity
390 390
 		 */
391
-		public function alnp_validate_content_container_selector( $validity, $value ) {
392
-			if ( empty( $value ) ) {
393
-				$validity->add( 'required', esc_html__( 'The content container selector is empty. Will not know where to load posts without it.', 'auto-load-next-post' ) );
391
+		public function alnp_validate_content_container_selector($validity, $value) {
392
+			if (empty($value)) {
393
+				$validity->add('required', esc_html__('The content container selector is empty. Will not know where to load posts without it.', 'auto-load-next-post'));
394 394
 			}
395 395
 
396 396
 			return $validity;
@@ -404,9 +404,9 @@  discard block
 block discarded – undo
404 404
 		 * @param  string   $value    Value, normally pre-sanitized.
405 405
 		 * @return WP_Error $validity
406 406
 		 */
407
-		public function alnp_validate_post_title_selector( $validity, $value ) {
408
-			if ( empty( $value ) ) {
409
-				$validity->add( 'required', esc_html__( 'The post title selector is empty. Will not be able to identify which article the user is reading.', 'auto-load-next-post' ) );
407
+		public function alnp_validate_post_title_selector($validity, $value) {
408
+			if (empty($value)) {
409
+				$validity->add('required', esc_html__('The post title selector is empty. Will not be able to identify which article the user is reading.', 'auto-load-next-post'));
410 410
 			}
411 411
 
412 412
 			return $validity;
@@ -420,9 +420,9 @@  discard block
 block discarded – undo
420 420
 		 * @param  string   $value    Value, normally pre-sanitized.
421 421
 		 * @return WP_Error $validity
422 422
 		 */
423
-		public function alnp_validate_post_navigation_selector( $validity, $value ) {
424
-			if ( empty( $value ) ) {
425
-				$validity->add( 'required', esc_html__( 'The post navigation container selector is empty. Required so ALNP can look up the next post to load.', 'auto-load-next-post' ) );
423
+		public function alnp_validate_post_navigation_selector($validity, $value) {
424
+			if (empty($value)) {
425
+				$validity->add('required', esc_html__('The post navigation container selector is empty. Required so ALNP can look up the next post to load.', 'auto-load-next-post'));
426 426
 			}
427 427
 
428 428
 			return $validity;
@@ -436,14 +436,14 @@  discard block
 block discarded – undo
436 436
 		 */
437 437
 		public function alnp_get_settings() {
438 438
 			$args = array(
439
-				'alnp_content_container'      => get_option( 'auto_load_next_post_content_container' ),
440
-				'alnp_title_selector'         => get_option( 'auto_load_next_post_title_selector' ),
441
-				'alnp_navigation_container'   => get_option( 'auto_load_next_post_navigation_container' ),
442
-				'alnp_previous_post_selector' => get_option( 'auto_load_next_post_previous_post_selector' ),
443
-				'alnp_comments_container'     => get_option( 'auto_load_next_post_comments_container' ),
444
-				'alnp_remove_comments'        => get_option( 'auto_load_next_post_remove_comments' ),
445
-				'alnp_google_analytics'       => get_option( 'auto_load_next_post_google_analytics' ),
446
-				'alnp_js_footer'              => get_option( 'auto_load_next_post_js_footer' )
439
+				'alnp_content_container'      => get_option('auto_load_next_post_content_container'),
440
+				'alnp_title_selector'         => get_option('auto_load_next_post_title_selector'),
441
+				'alnp_navigation_container'   => get_option('auto_load_next_post_navigation_container'),
442
+				'alnp_previous_post_selector' => get_option('auto_load_next_post_previous_post_selector'),
443
+				'alnp_comments_container'     => get_option('auto_load_next_post_comments_container'),
444
+				'alnp_remove_comments'        => get_option('auto_load_next_post_remove_comments'),
445
+				'alnp_google_analytics'       => get_option('auto_load_next_post_google_analytics'),
446
+				'alnp_js_footer'              => get_option('auto_load_next_post_js_footer')
447 447
 			);
448 448
 
449 449
 			return $args;
@@ -457,14 +457,14 @@  discard block
 block discarded – undo
457 457
 		 * @return boolean
458 458
 		 */
459 459
 		public function is_page_alnp_ready() {
460
-			if ( is_front_page() && is_home() ) {
460
+			if (is_front_page() && is_home()) {
461 461
 				return false;
462
-			} elseif ( is_front_page() ) {
462
+			} elseif (is_front_page()) {
463 463
 				return false;
464
-			} elseif ( is_home() ) {
464
+			} elseif (is_home()) {
465 465
 				return true;
466 466
 			}
467
-			elseif ( is_singular( apply_filters( 'alnp_customizer_posts_ready', array( 'post' ) ) ) ) {
467
+			elseif (is_singular(apply_filters('alnp_customizer_posts_ready', array('post')))) {
468 468
 				return true;
469 469
 			}
470 470
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 		 * @param  string $post_type - Default is post.
480 480
 		 * @return int|boolean
481 481
 		 */
482
-		public static function alnp_get_random_page_permalink( $post_type = 'post' ) {
482
+		public static function alnp_get_random_page_permalink($post_type = 'post') {
483 483
 			$args = array(
484 484
 				'post_type'      => $post_type,
485 485
 				'post_status'    => 'publish',
@@ -487,13 +487,13 @@  discard block
 block discarded – undo
487 487
 				'posts_per_page' => 1
488 488
 			);
489 489
 
490
-			$query = new WP_Query( $args );
490
+			$query = new WP_Query($args);
491 491
 
492
-			if ( $query->have_posts() ) {
493
-				while ( $query->have_posts() ) : $query->the_post();
492
+			if ($query->have_posts()) {
493
+				while ($query->have_posts()) : $query->the_post();
494 494
 					$id = get_the_ID();
495 495
 
496
-					return get_permalink( $id );
496
+					return get_permalink($id);
497 497
 				endwhile;
498 498
 			}
499 499
 			else {
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
@@ -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
 
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
 <div class="notice notice-success auto-load-next-post-notice is-dismissible">
20 20
 	<div class="auto-load-next-post-notice-inner">
21 21
 		<div class="auto-load-next-post-notice-icon">
22
-			<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' ); ?>" />
22
+			<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 23
 		</div>
24 24
 
25 25
 		<div class="auto-load-next-post-notice-content">
26
-			<h3><?php echo esc_html__( 'Congratulations!', 'auto-load-next-post' ); ?></h3>
27
-			<p><?php echo sprintf( __( 'Your current theme <strong>%1$s</strong> is supported. %2$s is ready to increase your pageviews. There is nothing else to setup so your good to go.', 'auto-load-next-post' ), $active_theme->name, esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
26
+			<h3><?php echo esc_html__('Congratulations!', 'auto-load-next-post'); ?></h3>
27
+			<p><?php echo sprintf(__('Your current theme <strong>%1$s</strong> is supported. %2$s is ready to increase your pageviews. There is nothing else to setup so your good to go.', 'auto-load-next-post'), $active_theme->name, esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
28 28
 		</div>
29 29
 	</div>
30 30
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-trying-beta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,24 +11,24 @@
 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-info auto-load-next-post-notice">
19 19
 	<div class="auto-load-next-post-notice-inner">
20 20
 		<div class="auto-load-next-post-notice-icon">
21
-			<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' ); ?>" />
21
+			<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'); ?>" />
22 22
 		</div>
23 23
 
24 24
 		<div class="auto-load-next-post-notice-content">
25
-			<h3><?php echo esc_html__( 'Thanks for trying out this beta!', 'auto-load-next-post' ); ?></h3>
26
-			<p><?php printf( esc_html__( 'If you have any questions about the beta or if you have any feedback at all, let me know. Any little bit you\'re willing to share helps. You can %1$sjoin the Slack channel%2$s to provide feedback, discuss features to be added and integrations to support. Or you can just give feedback the old fashion way pressing the big button on the side.', 'auto-load-next-post' ), '<a href="' . esc_url( 'https://launchpass.com/autoloadnextpost' ) . '" target="_blank">', '</a>' ); ?></p>
25
+			<h3><?php echo esc_html__('Thanks for trying out this beta!', 'auto-load-next-post'); ?></h3>
26
+			<p><?php printf(esc_html__('If you have any questions about the beta or if you have any feedback at all, let me know. Any little bit you\'re willing to share helps. You can %1$sjoin the Slack channel%2$s to provide feedback, discuss features to be added and integrations to support. Or you can just give feedback the old fashion way pressing the big button on the side.', 'auto-load-next-post'), '<a href="'.esc_url('https://launchpass.com/autoloadnextpost').'" target="_blank">', '</a>'); ?></p>
27 27
 		</div>
28 28
 
29 29
 		<div class="auto-load-next-post-send-feedback">
30
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url( 'https://autoloadnextpost.com/contact/' ), esc_html__( 'Give Feedback', 'auto-load-next-post' ) ); ?>
31
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_beta_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Ask me again in 7 days', 'auto-load-next-post' ); ?></a>
30
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url('https://autoloadnextpost.com/contact/'), esc_html__('Give Feedback', 'auto-load-next-post')); ?>
31
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_beta_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Ask me again in 7 days', 'auto-load-next-post'); ?></a>
32 32
 		</div>
33 33
 	</div>
34 34
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-please-review.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
18 18
 $current_user = wp_get_current_user();
19 19
 
20
-$time = auto_load_next_post_seconds_to_words( time() - $install_date );
20
+$time = auto_load_next_post_seconds_to_words(time() - $install_date);
21 21
 ?>
22 22
 <div class="notice notice-info auto-load-next-post-notice">
23 23
 	<div class="auto-load-next-post-notice-inner">
24 24
 		<div class="auto-load-next-post-notice-icon">
25
-			<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' ); ?>" />
25
+			<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'); ?>" />
26 26
 		</div>
27 27
 
28 28
 		<div class="auto-load-next-post-notice-content">
29
-			<h3><?php echo esc_html__( 'Are you enjoying Auto Load Next Post?', 'auto-load-next-post' ); ?></h3>
30
-			<p><?php printf( esc_html__( 'You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), esc_html( $time ) ); ?></p>
29
+			<h3><?php echo esc_html__('Are you enjoying Auto Load Next Post?', 'auto-load-next-post'); ?></h3>
30
+			<p><?php printf(esc_html__('You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), esc_html($time)); ?></p>
31 31
 		</div>
32 32
 
33 33
 		<div class="auto-load-next-post-review-now">
34
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url( 'https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post' ), esc_html__( 'Leave a Review', 'auto-load-next-post' ) ); ?>
35
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_review_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'No thank you / I already have', 'auto-load-next-post' ); ?></a>
34
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url('https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post'), esc_html__('Leave a Review', 'auto-load-next-post')); ?>
35
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_review_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('No thank you / I already have', 'auto-load-next-post'); ?></a>
36 36
 		</div>
37 37
 	</div>
38 38
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-welcome.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,31 +10,31 @@  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
 ?>
17 17
 <div class="notice notice-success auto-load-next-post-notice">
18 18
 	<div class="auto-load-next-post-notice-inner">
19 19
 		<div class="auto-load-next-post-notice-icon">
20
-			<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' ); ?>" />
20
+			<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'); ?>" />
21 21
 		</div>
22 22
 
23 23
 		<div class="auto-load-next-post-notice-content">
24
-			<h3><?php echo esc_html__( 'Welcome!', 'auto-load-next-post' ); ?></h3>
24
+			<h3><?php echo esc_html__('Welcome!', 'auto-load-next-post'); ?></h3>
25 25
 			<p>
26
-				<?php echo sprintf( __( 'Thank you for activating %1$s! If you\'re a first time user, welcome! You\'re well on your way to increasing your pageviews.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?>
26
+				<?php echo sprintf(__('Thank you for activating %1$s! If you\'re a first time user, welcome! You\'re well on your way to increasing your pageviews.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?>
27 27
 				<?php
28 28
 				// If the theme has not added support then encourage the user to see the documentation.
29
-				if ( !is_alnp_supported() ) {
29
+				if ( ! is_alnp_supported()) {
30 30
 					$query = array(
31 31
 						'autofocus[panel]'   => 'alnp',
32 32
 						'autofocus[section]' => 'auto_load_next_post_theme_selectors',
33 33
 						'url'                => ALNP_Customizer::alnp_get_random_page_permalink(),
34
-						'return'             => admin_url( 'options-general.php?page=auto-load-next-post-settings' ),
34
+						'return'             => admin_url('options-general.php?page=auto-load-next-post-settings'),
35 35
 					);
36
-					$customizer_link = add_query_arg( $query, admin_url( 'customize.php' ) );
37
-					echo sprintf( __( 'I encourage you to check out the plugin documentation and getting started with %1$ssetting up your theme selectors%2$s.', 'auto-load-next-post' ), '<a href="' . esc_url( $customizer_link ) . '">', '</a>' );
36
+					$customizer_link = add_query_arg($query, admin_url('customize.php'));
37
+					echo sprintf(__('I encourage you to check out the plugin documentation and getting started with %1$ssetting up your theme selectors%2$s.', 'auto-load-next-post'), '<a href="'.esc_url($customizer_link).'">', '</a>');
38 38
 				}
39 39
 				?>
40 40
 			</p>
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 		<div class="auto-load-next-post-documentation">
44 44
 			<?php
45 45
 			// If the theme has not added support then display button to documentation.
46
-			if ( !is_alnp_supported() ) {
47
-				printf( '<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url( 'https://autoloadnextpost.com/documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice' ), esc_html__( 'Documentation', 'auto-load-next-post' ) );
46
+			if ( ! is_alnp_supported()) {
47
+				printf('<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url('https://autoloadnextpost.com/documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice'), esc_html__('Documentation', 'auto-load-next-post'));
48 48
 			}
49 49
 			?>
50
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_welcome_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Dismiss Notice', 'auto-load-next-post' ); ?></a>
50
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_welcome_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Dismiss Notice', 'auto-load-next-post'); ?></a>
51 51
 		</div>
52 52
 	</div>
53 53
 </div>
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-notices.php 2 patches
Spacing   +36 added lines, -36 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
 
@@ -118,43 +118,43 @@  discard block
 block discarded – undo
118 118
 			$template = get_option('template');
119 119
 
120 120
 			// Checks if the theme supports Auto Load Next Post.
121
-			if ( is_alnp_supported() ) {
121
+			if (is_alnp_supported()) {
122 122
 				// If supported theme does not match active theme then show notice.
123
-				if ( get_option( 'auto_load_next_post_theme_supported' ) !== $template ) {
124
-					add_action( 'admin_notices', array( $this, 'theme_ready_notice' ) );
125
-					update_option( 'auto_load_next_post_theme_supported', $template );
123
+				if (get_option('auto_load_next_post_theme_supported') !== $template) {
124
+					add_action('admin_notices', array($this, 'theme_ready_notice'));
125
+					update_option('auto_load_next_post_theme_supported', $template);
126 126
 				}
127 127
 			}
128 128
 			else {
129 129
 				// If theme not supported then delete option.
130
-				delete_option( 'auto_load_next_post_theme_supported' );
130
+				delete_option('auto_load_next_post_theme_supported');
131 131
 			}
132 132
 
133 133
 			// Is admin review notice hidden?
134
-			$hide_review_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', true );
134
+			$hide_review_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', true);
135 135
 
136 136
 			// Check if we need to display the review plugin notice.
137
-			if ( current_user_can( 'install_plugins' ) && empty( $hide_review_notice ) ) {
137
+			if (current_user_can('install_plugins') && empty($hide_review_notice)) {
138 138
 				// If it has been a week or more since activating the plugin then display the review notice.
139
-				if ( ( intval( time() - self::$install_date ) ) > WEEK_IN_SECONDS ) {
140
-					add_action( 'admin_notices', array( $this, 'plugin_review_notice' ) );
139
+				if ((intval(time() - self::$install_date)) > WEEK_IN_SECONDS) {
140
+					add_action('admin_notices', array($this, 'plugin_review_notice'));
141 141
 				}
142 142
 			}
143 143
 
144 144
 			// Is admin welcome notice hidden?
145
-			$hide_welcome_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_welcome_notice', true );
145
+			$hide_welcome_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_welcome_notice', true);
146 146
 
147 147
 			// Check if we need to display the welcome notice.
148
-			if ( current_user_can( 'install_plugins' ) && empty( $hide_welcome_notice ) ) {
148
+			if (current_user_can('install_plugins') && empty($hide_welcome_notice)) {
149 149
 				// If the user has just installed the plugin for the first time then welcome the user.
150
-				if ( ( intval( time() - strtotime( self::$install_date ) ) / WEEK_IN_SECONDS ) % 52 <= 2 ) {
151
-					add_action( 'admin_notices', array( $this, 'welcome_notice' ) );
150
+				if ((intval(time() - strtotime(self::$install_date)) / WEEK_IN_SECONDS) % 52 <= 2) {
151
+					add_action('admin_notices', array($this, 'welcome_notice'));
152 152
 				}
153 153
 			}
154 154
 
155 155
 			// Is this version of Auto Load Next Post a beta release?
156
-			if ( is_alnp_beta() && empty( get_transient( 'alnp_beta_notice_hidden' ) ) ) {
157
-				add_action( 'admin_notices', array( $this, 'beta_notice' ) );
156
+			if (is_alnp_beta() && empty(get_transient('alnp_beta_notice_hidden'))) {
157
+				add_action('admin_notices', array($this, 'beta_notice'));
158 158
 			}
159 159
 		} // END add_notices()
160 160
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		 * @since  1.4.3
166 166
 		 */
167 167
 		public function requirement_wp_notice() {
168
-			include( dirname( __FILE__ ) . '/views/html-notice-requirement-wp.php' );
168
+			include(dirname(__FILE__).'/views/html-notice-requirement-wp.php');
169 169
 		} // END requirement_wp_notice()
170 170
 
171 171
 		/**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		 * @since  1.5.0
176 176
 		 */
177 177
 		public function theme_ready_notice() {
178
-			include( dirname( __FILE__ ) . '/views/html-notice-theme-ready.php' );
178
+			include(dirname(__FILE__).'/views/html-notice-theme-ready.php');
179 179
 		} // END theme_ready_notice()
180 180
 
181 181
 		/**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		 * @since  1.5.0
186 186
 		 */
187 187
 		public function welcome_notice() {
188
-			include( dirname( __FILE__ ) . '/views/html-notice-welcome.php' );
188
+			include(dirname(__FILE__).'/views/html-notice-welcome.php');
189 189
 		} // END welcome_notice()
190 190
 
191 191
 		/**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		 * @since  1.5.0
196 196
 		 */
197 197
 		public function beta_notice() {
198
-			include( dirname( __FILE__ ) . '/views/html-notice-trying-beta.php' );
198
+			include(dirname(__FILE__).'/views/html-notice-trying-beta.php');
199 199
 		} // END beta_notice()
200 200
 
201 201
 		/**
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		public function plugin_review_notice() {
209 209
 			$install_date = self::$install_date;
210 210
 
211
-			include( dirname( __FILE__ ) . '/views/html-notice-please-review.php' );
211
+			include(dirname(__FILE__).'/views/html-notice-please-review.php');
212 212
 		} // END plugin_review_notice()
213 213
 
214 214
 	} // END class.
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@
 block discarded – undo
124 124
 					add_action( 'admin_notices', array( $this, 'theme_ready_notice' ) );
125 125
 					update_option( 'auto_load_next_post_theme_supported', $template );
126 126
 				}
127
-			}
128
-			else {
127
+			} else {
129 128
 				// If theme not supported then delete option.
130 129
 				delete_option( 'auto_load_next_post_theme_supported' );
131 130
 			}
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-help.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
  */
15 15
 
16 16
 // Exit if accessed directly.
17
-if ( ! defined( 'ABSPATH' ) ) {
17
+if ( ! defined('ABSPATH')) {
18 18
 	exit;
19 19
 }
20 20
 
21
-if ( ! class_exists( 'Auto_Load_Next_Post_Admin_Help' ) ) {
21
+if ( ! class_exists('Auto_Load_Next_Post_Admin_Help')) {
22 22
 
23 23
 	class Auto_Load_Next_Post_Admin_Help {
24 24
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		 * @since  1.0.0
30 30
 		 */
31 31
 		public function __construct() {
32
-			add_action( 'current_screen', array( $this, 'add_help_tabs' ), 50 );
32
+			add_action('current_screen', array($this, 'add_help_tabs'), 50);
33 33
 		} // END __construct()
34 34
 
35 35
 		/**
@@ -42,62 +42,62 @@  discard block
 block discarded – undo
42 42
 		public function add_help_tabs() {
43 43
 			$screen = get_current_screen();
44 44
 
45
-			if (	$screen->id != 'settings_page_auto-load-next-post-settings') {
45
+			if ($screen->id != 'settings_page_auto-load-next-post-settings') {
46 46
 				return;
47 47
 			}
48 48
 
49
-			$screen->add_help_tab( array(
49
+			$screen->add_help_tab(array(
50 50
 				'id'      => 'auto_load_next_post_theme_selectors_tab',
51
-				'title'   => __( 'Theme Selectors', 'auto-load-next-post' ),
51
+				'title'   => __('Theme Selectors', 'auto-load-next-post'),
52 52
 				'content' =>
53
-					'<h2>' . __( 'Theme Selectors', 'auto-load-next-post' ) . '</h2>' .
54
-					'<p>' . sprintf( __( 'Theme Selectors allows %s look for where to load content in, the post being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
55
-					'<p>' . sprintf( __( 'When the plugin was activated, default theme selectors are set that match the majority of most WordPress themes. If the active theme supports %1$s then it will set its own theme selectors. If the theme has not declared support for %1$s and posts are not loading, dont worry. It is most likely that at least one of these selectors need to be changed. You may find it to be the <em>Content Container</em>. See more information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/">', '</a>' ) . '</p>' .
56
-					'<p>' . sprintf( esc_html__( 'These are the default theme selectors when %s is installed.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
57
-					'<h5>' . esc_html__( 'Default Theme Selectors', 'auto-load-next-post' ) . '</h5>' .
58
-					'<ul>' .
59
-					'<li><strong>' . esc_html__( 'Content Container', 'auto-load-next-post' ) . '</strong>' . '<br>main.site-main</li>' .
60
-					'<li><strong>' . esc_html__( 'Post Title', 'auto-load-next-post' ) . '</strong>' . '<br>h1.entry-title</li>' .
61
-					'<li><strong>' . esc_html__( 'Post Navigation', 'auto-load-next-post' ) . '</strong>' . '<br>nav.post-navigation</li>' .
62
-					'<li><strong>' . esc_html__( 'Comments Container', 'auto-load-next-post' ) . '</strong>' . '<br>div#comments</li>' .
53
+					'<h2>'.__('Theme Selectors', 'auto-load-next-post').'</h2>'.
54
+					'<p>'.sprintf(__('Theme Selectors allows %s look for where to load content in, the post being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
55
+					'<p>'.sprintf(__('When the plugin was activated, default theme selectors are set that match the majority of most WordPress themes. If the active theme supports %1$s then it will set its own theme selectors. If the theme has not declared support for %1$s and posts are not loading, dont worry. It is most likely that at least one of these selectors need to be changed. You may find it to be the <em>Content Container</em>. See more information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/">', '</a>').'</p>'.
56
+					'<p>'.sprintf(esc_html__('These are the default theme selectors when %s is installed.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
57
+					'<h5>'.esc_html__('Default Theme Selectors', 'auto-load-next-post').'</h5>'.
58
+					'<ul>'.
59
+					'<li><strong>'.esc_html__('Content Container', 'auto-load-next-post').'</strong>'.'<br>main.site-main</li>'.
60
+					'<li><strong>'.esc_html__('Post Title', 'auto-load-next-post').'</strong>'.'<br>h1.entry-title</li>'.
61
+					'<li><strong>'.esc_html__('Post Navigation', 'auto-load-next-post').'</strong>'.'<br>nav.post-navigation</li>'.
62
+					'<li><strong>'.esc_html__('Comments Container', 'auto-load-next-post').'</strong>'.'<br>div#comments</li>'.
63 63
 					'</ul>'
64
-			) );
64
+			));
65 65
 
66
-			$screen->add_help_tab( array(
66
+			$screen->add_help_tab(array(
67 67
 				'id'      => 'auto_load_next_post_support_tab',
68
-				'title'   => esc_html__( 'Help & Support', 'auto-load-next-post' ),
68
+				'title'   => esc_html__('Help & Support', 'auto-load-next-post'),
69 69
 				'content' =>
70
-					'<h2>' . esc_html__( 'Help & Support', 'auto-load-next-post' ) . '</h2>' .
71
-					'<p>' . sprintf( __( 'Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">', '</a>' ) . '</p>' .
72
-					'<p>' . sprintf( __( 'For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://wordpress.org/support/plugin/auto-load-next-post" target="_blank">', '</a>' ) . '</p> ' .
73
-					'<p>' . sprintf( __( '%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>' ) . '</p>' .
74
-					'<p><a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-primary" target="_blank">' . esc_html__( 'Documentation', 'auto-load-next-post' ) . '</a> <a href="https://wordpress.org/support/plugin/auto-load-next-post" class="button button-secondary" target="_blank">' . esc_html__( 'Community Forum', 'auto-load-next-post' ) . '</a> <a href="https://autoloadnextpost.com/f-a-q/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-secondary" target="_blank">' . esc_html__( 'Frequently Asked Questions', 'auto-load-next-post' ) . '</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">' . sprintf( esc_html__( 'Translate %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>'
75
-			) );
70
+					'<h2>'.esc_html__('Help & Support', 'auto-load-next-post').'</h2>'.
71
+					'<p>'.sprintf(__('Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">', '</a>').'</p>'.
72
+					'<p>'.sprintf(__('For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://wordpress.org/support/plugin/auto-load-next-post" target="_blank">', '</a>').'</p> '.
73
+					'<p>'.sprintf(__('%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>').'</p>'.
74
+					'<p><a href="https://autoloadnextpost.com/documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-primary" target="_blank">'.esc_html__('Documentation', 'auto-load-next-post').'</a> <a href="https://wordpress.org/support/plugin/auto-load-next-post" class="button button-secondary" target="_blank">'.esc_html__('Community Forum', 'auto-load-next-post').'</a> <a href="https://autoloadnextpost.com/f-a-q/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-secondary" target="_blank">'.esc_html__('Frequently Asked Questions', 'auto-load-next-post').'</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">'.sprintf(esc_html__('Translate %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>'
75
+			));
76 76
 
77
-			$screen->add_help_tab( array(
77
+			$screen->add_help_tab(array(
78 78
 				'id'      => 'auto_load_next_post_bugs_tab',
79
-				'title'   => esc_html__( 'Found a bug?', 'auto-load-next-post' ),
79
+				'title'   => esc_html__('Found a bug?', 'auto-load-next-post'),
80 80
 				'content' =>
81
-					'<h2>' . esc_html__( 'Found a bug?', 'auto-load-next-post' ) . '</h2>' .
82
-					'<p>' . sprintf( __( 'If you find a bug within %1$s, please %2$sreport the issue%4$s by creating a ticket on the GitHub repository where I can deal with it more appropriately. Please ensure that you have read the %3$sguidelines to contributing%4$s prior to submitting your report. To help me solve the issue, please be as descriptive as possible.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" target="_blank">', '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>' ) . '</p>' .
83
-					'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" class="button button-primary" target="_blank">' . esc_html__( 'Report an Issue', 'auto-load-next-post' ) . '</a></p>'
84
-			) );
81
+					'<h2>'.esc_html__('Found a bug?', 'auto-load-next-post').'</h2>'.
82
+					'<p>'.sprintf(__('If you find a bug within %1$s, please %2$sreport the issue%4$s by creating a ticket on the GitHub repository where I can deal with it more appropriately. Please ensure that you have read the %3$sguidelines to contributing%4$s prior to submitting your report. To help me solve the issue, please be as descriptive as possible.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" target="_blank">', '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>').'</p>'.
83
+					'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" class="button button-primary" target="_blank">'.esc_html__('Report an Issue', 'auto-load-next-post').'</a></p>'
84
+			));
85 85
 
86 86
 			$screen->add_help_tab(array(
87 87
 				'id'      => 'auto_load_next_post_feedback_tab',
88
-				'title'   => esc_html__( 'Feedback', 'auto-load-next-post' ),
88
+				'title'   => esc_html__('Feedback', 'auto-load-next-post'),
89 89
 				'content' =>
90
-					'<h2>' . esc_html__( 'Feedback', 'auto-load-next-post' ) . '</h2>' .
91
-					'<p>' . esc_html__( 'Your feedback is very important to me. Please consider leaving a review on WordPress.org or complete a simple survey.', 'auto-load-next-post' ) . '</p>' .
92
-					'<p>' . sprintf( __( 'If %1$s has worked out for you well and you like it, please consider %2$smaking a donation%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://www.buymeacoffee.com/sebastien" target="_blank">', '</a>' ) . '</p>'.
93
-					'<p><a href="https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?filter=5#postform" class="button button-primary" target="_blank">' . esc_html__( 'Submit a Review', 'auto-load-next-post' ) . '</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdzxlvnXRBIw8gqI7Z2O-HzYtncpGjDkLjlaeZLVsfrR61FNA/viewform?usp=sf_link" class="button button-secondary" target="_blank">' . esc_html__( 'Complete a Simple Survey', 'auto-load-next-post' ) . '</a> <a href="https://www.buymeacoffee.com/sebastien" class="button button-secondary" target="_blank">' . esc_html__( 'Make a Donation', 'auto-load-next-post' ) . '</a></p>'
94
-			) );
90
+					'<h2>'.esc_html__('Feedback', 'auto-load-next-post').'</h2>'.
91
+					'<p>'.esc_html__('Your feedback is very important to me. Please consider leaving a review on WordPress.org or complete a simple survey.', 'auto-load-next-post').'</p>'.
92
+					'<p>'.sprintf(__('If %1$s has worked out for you well and you like it, please consider %2$smaking a donation%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://www.buymeacoffee.com/sebastien" target="_blank">', '</a>').'</p>'.
93
+					'<p><a href="https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?filter=5#postform" class="button button-primary" target="_blank">'.esc_html__('Submit a Review', 'auto-load-next-post').'</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdzxlvnXRBIw8gqI7Z2O-HzYtncpGjDkLjlaeZLVsfrR61FNA/viewform?usp=sf_link" class="button button-secondary" target="_blank">'.esc_html__('Complete a Simple Survey', 'auto-load-next-post').'</a> <a href="https://www.buymeacoffee.com/sebastien" class="button button-secondary" target="_blank">'.esc_html__('Make a Donation', 'auto-load-next-post').'</a></p>'
94
+			));
95 95
 
96 96
 			$screen->set_help_sidebar(
97
-				'<p><strong>' . esc_html__( 'For more information:', 'auto-load-next-post' ) . '</strong></p>' .
98
-				'<p><a href="https://autoloadnextpost.com/about/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">' . sprintf( esc_html__( 'About %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>' .
99
-				'<p><a href="https://wordpress.org/plugins/auto-load-next-post/" target="_blank">' . esc_html__( 'WordPress.org Project', 'auto-load-next-post' ) . '</a></p>' .
100
-				'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/" target="_blank">' . esc_html__( 'GitHub Project', 'auto-load-next-post' ) . '</a></p>'
97
+				'<p><strong>'.esc_html__('For more information:', 'auto-load-next-post').'</strong></p>'.
98
+				'<p><a href="https://autoloadnextpost.com/about/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">'.sprintf(esc_html__('About %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>'.
99
+				'<p><a href="https://wordpress.org/plugins/auto-load-next-post/" target="_blank">'.esc_html__('WordPress.org Project', 'auto-load-next-post').'</a></p>'.
100
+				'<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/" target="_blank">'.esc_html__('GitHub Project', 'auto-load-next-post').'</a></p>'
101 101
 			);
102 102
 
103 103
 		} // END add_help_tabs()
Please login to merge, or discard this patch.
includes/theme-support/class-alnp-twenty-seventeen.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,12 +40,12 @@  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.site-main',
45 45
 			'title_selector'       => 'h1.entry-title',
46 46
 			'navigation_container' => 'nav.post-navigation',
47 47
 			'comments_container'   => 'section#comments',
48
-		) );
48
+		));
49 49
 	} // END add_theme_support()
50 50
 
51 51
 } // END class
Please login to merge, or discard this patch.
includes/theme-support/class-alnp-storefront.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,12 +40,12 @@  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.site-main',
45 45
 			'title_selector'       => 'h1.entry-title',
46 46
 			'navigation_container' => 'nav.post-navigation',
47 47
 			'comments_container'   => 'section#comments',
48
-		) );
48
+		));
49 49
 	} // END add_theme_support()
50 50
 
51 51
 } // END class
Please login to merge, or discard this patch.