Completed
Pull Request — master (#131)
by
unknown
01:52
created
includes/class-alnp-install.php 1 patch
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_Install' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Install')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_Install {
21 21
 
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 		 * @access public
37 37
 		 */
38 38
 		public function __construct() {
39
-			add_action( 'init', array( __CLASS__, 'add_rewrite_endpoint' ), 0 );
40
-			add_action( 'init', array( __CLASS__, 'check_version' ), 5 );
39
+			add_action('init', array(__CLASS__, 'add_rewrite_endpoint'), 0);
40
+			add_action('init', array(__CLASS__, 'check_version'), 5);
41 41
 
42 42
 			// Get plugin version.
43
-			self::$current_version = get_option( 'auto_load_next_post_version', null );
43
+			self::$current_version = get_option('auto_load_next_post_version', null);
44 44
 		} // END __construct()
45 45
 
46 46
 		/**
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 		 * @since  1.4.10
54 54
 		 */
55 55
 		public static function check_version() {
56
-			if ( ! defined( 'IFRAME_REQUEST' ) && version_compare( self::$current_version, AUTO_LOAD_NEXT_POST_VERSION, '<' ) ) {
56
+			if ( ! defined('IFRAME_REQUEST') && version_compare(self::$current_version, AUTO_LOAD_NEXT_POST_VERSION, '<')) {
57 57
 				self::install();
58
-				do_action( 'auto_load_next_post_updated' );
58
+				do_action('auto_load_next_post_updated');
59 59
 			}
60 60
 		} // END check_version()
61 61
 
@@ -68,19 +68,19 @@  discard block
 block discarded – undo
68 68
 		 * @version 1.5.0
69 69
 		 */
70 70
 		public static function install() {
71
-			if ( ! is_blog_installed() ) {
71
+			if ( ! is_blog_installed()) {
72 72
 				return;
73 73
 			}
74 74
 
75 75
 			// Check if we are not already running this routine.
76
-			if ( 'yes' === get_transient( 'alnp_installing' ) ) {
76
+			if ('yes' === get_transient('alnp_installing')) {
77 77
 				return;
78 78
 			}
79 79
 
80 80
 			// If we made it till here nothing is running yet, lets set the transient now for five minutes.
81
-			set_transient( 'alnp_installing', 'yes', MINUTE_IN_SECONDS * 5 );
82
-			if ( ! defined( 'AUTO_LOAD_NEXT_POST_INSTALLING' ) ) {
83
-				define( 'AUTO_LOAD_NEXT_POST_INSTALLING', true );
81
+			set_transient('alnp_installing', 'yes', MINUTE_IN_SECONDS * 5);
82
+			if ( ! defined('AUTO_LOAD_NEXT_POST_INSTALLING')) {
83
+				define('AUTO_LOAD_NEXT_POST_INSTALLING', true);
84 84
 			}
85 85
 
86 86
 			// Add default options.
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 			// Refresh rewrite rules.
99 99
 			self::flush_rewrite_rules();
100 100
 
101
-			delete_transient( 'alnp_installing' );
101
+			delete_transient('alnp_installing');
102 102
 
103
-			do_action( 'alnp_installed' );
103
+			do_action('alnp_installed');
104 104
 		} // END install()
105 105
 
106 106
 		/**
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
 		 * @since  1.5.0
113 113
 		 */
114 114
 		private static function set_theme_selectors() {
115
-			if ( is_alnp_supported() ) {
116
-				$content_container    = alnp_get_theme_support( 'content_container' );
117
-				$title_selector       = alnp_get_theme_support( 'title_selector' );
118
-				$navigation_container = alnp_get_theme_support( 'navigation_container' );
119
-				$comments_container   = alnp_get_theme_support( 'comments_container' );
120
-
121
-				if ( ! empty( $content_container ) ) update_option( 'auto_load_next_post_content_container', $content_container );
122
-				if ( ! empty( $title_selector ) ) update_option( 'auto_load_next_post_title_selector', $title_selector );
123
-				if ( ! empty( $navigation_container ) ) update_option( 'auto_load_next_post_navigation_container', $navigation_container );
124
-				if ( ! empty( $comments_container ) ) update_option( 'auto_load_next_post_comments_container', $comments_container );
115
+			if (is_alnp_supported()) {
116
+				$content_container    = alnp_get_theme_support('content_container');
117
+				$title_selector       = alnp_get_theme_support('title_selector');
118
+				$navigation_container = alnp_get_theme_support('navigation_container');
119
+				$comments_container   = alnp_get_theme_support('comments_container');
120
+
121
+				if ( ! empty($content_container)) update_option('auto_load_next_post_content_container', $content_container);
122
+				if ( ! empty($title_selector)) update_option('auto_load_next_post_title_selector', $title_selector);
123
+				if ( ! empty($navigation_container)) update_option('auto_load_next_post_navigation_container', $navigation_container);
124
+				if ( ! empty($comments_container)) update_option('auto_load_next_post_comments_container', $comments_container);
125 125
 			}
126 126
 		} // END set_theme_selectors()
127 127
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		 * @static
133 133
 		 */
134 134
 		private static function update_version() {
135
-			update_option( 'auto_load_next_post_version', AUTO_LOAD_NEXT_POST_VERSION );
135
+			update_option('auto_load_next_post_version', AUTO_LOAD_NEXT_POST_VERSION);
136 136
 		} // END update_version()
137 137
 
138 138
 		/**
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 		 * @version 1.5.0
145 145
 		 */
146 146
 		public static function set_install_date() {
147
-			$install_date = get_site_option( 'auto_load_next_post_install_date' );
147
+			$install_date = get_site_option('auto_load_next_post_install_date');
148 148
 
149 149
 			// If ALNP was installed before but the install date was not converted to time then convert it.
150
-			if ( ! empty( $install_date ) && !intval( $install_date ) ) {
151
-				update_site_option( 'auto_load_next_post_install_date', strtotime( $install_date ) );
150
+			if ( ! empty($install_date) && ! intval($install_date)) {
151
+				update_site_option('auto_load_next_post_install_date', strtotime($install_date));
152 152
 			} else {
153
-				add_site_option( 'auto_load_next_post_install_date', time() );
153
+				add_site_option('auto_load_next_post_install_date', time());
154 154
 			}
155 155
 		} // END set_install_date()
156 156
 
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
 		 */
166 166
 		public static function create_options() {
167 167
 			// Include settings so that we can run through defaults
168
-			include_once( dirname( __FILE__ ) . '/admin/class-auto-load-next-post-admin-settings.php' );
168
+			include_once(dirname(__FILE__).'/admin/class-auto-load-next-post-admin-settings.php');
169 169
 
170 170
 			$settings = Auto_Load_Next_Post_Admin_Settings::get_settings_pages();
171 171
 
172
-			foreach ( $settings as $section ) {
173
-				foreach ( $section->get_settings() as $value ) {
174
-					if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
175
-						$autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true;
176
-						add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) );
172
+			foreach ($settings as $section) {
173
+				foreach ($section->get_settings() as $value) {
174
+					if (isset($value['default']) && isset($value['id'])) {
175
+						$autoload = isset($value['autoload']) ? (bool) $value['autoload'] : true;
176
+						add_option($value['id'], $value['default'], '', ($autoload ? 'yes' : 'no'));
177 177
 					}
178 178
 				}
179 179
 			}
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		 * @version 1.5.0
189 189
 		 */
190 190
 		public static function add_rewrite_endpoint() {
191
-			add_rewrite_endpoint( 'alnp', EP_PERMALINK );
191
+			add_rewrite_endpoint('alnp', EP_PERMALINK);
192 192
 		} // END add_rewrite_endpoint()
193 193
 
194 194
 		/**
Please login to merge, or discard this patch.
includes/customizer/class-alnp-customizer.php 1 patch
Spacing   +89 added lines, -89 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'       => __( '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'       => __('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'       => __( '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'       => __('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,7 +245,7 @@  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'],
@@ -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' => __( 'The primary container where the post content is loaded in. Default: <code>main.site-main</code>', 'auto-load-next-post' ),
327
-					'label'       => esc_html__( 'Content Container', 'auto-load-next-post' ),
326
+					'description' => __('The primary container where the post content is loaded in. Default: <code>main.site-main</code>', 'auto-load-next-post'),
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' => __( 'Used to identify which article the user is reading and track should Google Analytics or other analytics be enabled. Default: <code>h1.entry-title</code>', 'auto-load-next-post' ),
335
-					'label'       => esc_html__( 'Post Title Selector', 'auto-load-next-post' ),
334
+					'description' => __('Used to identify which article the user is reading and track should Google Analytics or other analytics be enabled. Default: <code>h1.entry-title</code>', 'auto-load-next-post'),
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' => __( 'Used to identify which post to load next if any. Default: <code>nav.post-navigation</code>', 'auto-load-next-post' ),
343
-					'label'       => esc_html__( 'Post Navigation Container', 'auto-load-next-post' ),
342
+					'description' => __('Used to identify which post to load next if any. Default: <code>nav.post-navigation</code>', 'auto-load-next-post'),
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: <code>div#comments</code>', 'auto-load-next-post' ), '<a href="javascript:wp.customize.section( \'auto_load_next_post_misc\' ).focus();">', '</a>' ),
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: <code>div#comments</code>', 'auto-load-next-post'), '<a href="javascript:wp.customize.section( \'auto_load_next_post_misc\' ).focus();">', '</a>'),
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-no-theme-selectors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 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-error auto-load-next-post-message">
18
-	<p><?php echo sprintf( __( 'It seems that not all of the required theme selectors have been set. These theme selectors are required in order for %1$s to work. %2$sHow to find my 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/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>' ); ?></p>
18
+	<p><?php echo sprintf(__('It seems that not all of the required theme selectors have been set. These theme selectors are required in order for %1$s to work. %2$sHow to find my 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/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>'); ?></p>
19 19
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-is-supported.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 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-info auto-load-next-post-message">
18
-	<p><?php echo sprintf( __( 'This theme supports %s. No need to change the theme selectors as they have already been set by the theme.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
18
+	<p><?php echo sprintf(__('This theme supports %s. No need to change the theme selectors as they have already been set by the theme.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
19 19
 </div>
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-no-comment-selector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 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-error auto-load-next-post-message">
18
-	<p><?php echo sprintf( __( 'In order to remove comments we need to know what the comments container is. Please identify the comments container under <strong>Theme Selectors</strong>. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>' ); ?></p>
18
+	<p><?php echo sprintf(__('In order to remove comments we need to know what the comments container is. Please identify the comments container under <strong>Theme Selectors</strong>. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>'); ?></p>
19 19
 </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.