@@ -10,11 +10,11 @@ discard block |
||
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 |
||
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,21 +36,21 @@ discard block |
||
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 | // Load custom controllers. |
49 | - require_once( dirname( __FILE__ ) . '/class-alnp-arbitrary-controller.php' ); |
|
49 | + require_once(dirname(__FILE__).'/class-alnp-arbitrary-controller.php'); |
|
50 | 50 | //require_once( dirname( __FILE__ ) . '/class-alnp-display-video-controller.php' ); |
51 | 51 | |
52 | 52 | // Auto Load Next Post Panel. |
53 | - $panel = array( 'panel' => 'alnp' ); |
|
53 | + $panel = array('panel' => 'alnp'); |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Add the main panel and sections. |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | */ |
60 | 60 | $wp_customize->add_panel( |
61 | 61 | 'alnp', array( |
62 | - 'title' => esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), |
|
62 | + 'title' => esc_html__('Auto Load Next Post', 'auto-load-next-post'), |
|
63 | 63 | 'capability' => 'edit_theme_options', |
64 | - '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' ), |
|
64 | + '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'), |
|
65 | 65 | 'priority' => 160, |
66 | - 'active_callback' => array( $this, 'is_page_alnp_ready' ) |
|
66 | + 'active_callback' => array($this, 'is_page_alnp_ready') |
|
67 | 67 | ) |
68 | 68 | ); |
69 | 69 | |
@@ -71,24 +71,24 @@ discard block |
||
71 | 71 | $sections = $this->alnp_get_customizer_sections(); |
72 | 72 | |
73 | 73 | // Add each section. |
74 | - foreach ( $sections as $section => $args ) { |
|
74 | + foreach ($sections as $section => $args) { |
|
75 | 75 | /** |
76 | 76 | * If we are not only viewing Auto Load Next Post customizer sections |
77 | 77 | * then move them under our own panel. |
78 | 78 | */ |
79 | - if ( ! $this->alnp_is_customizer() ) { |
|
80 | - $args = array_merge( $args, $panel ); |
|
79 | + if ( ! $this->alnp_is_customizer()) { |
|
80 | + $args = array_merge($args, $panel); |
|
81 | 81 | } |
82 | 82 | |
83 | - $wp_customize->add_section( $section, $args ); |
|
83 | + $wp_customize->add_section($section, $args); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | // Get plugin settings. |
87 | 87 | $settings = $this->alnp_get_customizer_settings(); |
88 | 88 | |
89 | 89 | // Add each setting. |
90 | - foreach ( $settings as $setting => $args ) { |
|
91 | - $wp_customize->add_setting( $setting, $args ); |
|
90 | + foreach ($settings as $setting => $args) { |
|
91 | + $wp_customize->add_setting($setting, $args); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -97,16 +97,16 @@ discard block |
||
97 | 97 | * @since 1.5.0 |
98 | 98 | * @param WP_Customize_Manager $wp_customize The Customizer object. |
99 | 99 | */ |
100 | - do_action( 'alnp_customizer_register', $wp_customize ); |
|
100 | + do_action('alnp_customizer_register', $wp_customize); |
|
101 | 101 | |
102 | 102 | $controls = $this->alnp_get_customizer_controls(); |
103 | 103 | |
104 | - foreach ( $controls as $control => $args ) { |
|
105 | - $wp_customize->add_control( new $args['class']( $wp_customize, $control, $args ) ); |
|
104 | + foreach ($controls as $control => $args) { |
|
105 | + $wp_customize->add_control(new $args['class']($wp_customize, $control, $args)); |
|
106 | 106 | } |
107 | 107 | |
108 | - if ( $this->alnp_is_customizer() ) { |
|
109 | - $this->alnp_remove_default_customizer_panels( $wp_customize ); // Remove controls from the customizer. |
|
108 | + if ($this->alnp_is_customizer()) { |
|
109 | + $this->alnp_remove_default_customizer_panels($wp_customize); // Remove controls from the customizer. |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | // Video Help - Coming Soon |
@@ -128,30 +128,30 @@ discard block |
||
128 | 128 | * to tell users about the pro version, what comes with it |
129 | 129 | * and link to product page. |
130 | 130 | */ |
131 | - if ( ! is_alnp_pro_version_installed() ) { |
|
132 | - include_once( dirname( __FILE__ ) . '/class-alnp-pro-preview-controller.php' ); |
|
131 | + if ( ! is_alnp_pro_version_installed()) { |
|
132 | + include_once(dirname(__FILE__).'/class-alnp-pro-preview-controller.php'); |
|
133 | 133 | |
134 | 134 | $preview_args = array( |
135 | - 'title' => esc_html__( 'More?', 'auto-load-next-post' ), |
|
135 | + 'title' => esc_html__('More?', 'auto-load-next-post'), |
|
136 | 136 | 'priority' => 999, |
137 | 137 | ); |
138 | 138 | |
139 | - if ( ! $this->alnp_is_customizer() ) { |
|
140 | - $preview_args = array_merge( $preview_args, $panel ); |
|
139 | + if ( ! $this->alnp_is_customizer()) { |
|
140 | + $preview_args = array_merge($preview_args, $panel); |
|
141 | 141 | } |
142 | 142 | |
143 | - $wp_customize->add_section( 'alnp_pro_preview', $preview_args ); |
|
143 | + $wp_customize->add_section('alnp_pro_preview', $preview_args); |
|
144 | 144 | |
145 | - $wp_customize->add_setting( 'alnp_pro_preview', array( |
|
145 | + $wp_customize->add_setting('alnp_pro_preview', array( |
|
146 | 146 | 'default' => null, |
147 | - ) ); |
|
147 | + )); |
|
148 | 148 | |
149 | - $wp_customize->add_control( new Auto_Load_Next_Post_Pro_Preview_Controller( $wp_customize, 'alnp_pro_preview', array( |
|
150 | - 'label' => __( 'Looking for more options?', 'auto-load-next-post' ), |
|
149 | + $wp_customize->add_control(new Auto_Load_Next_Post_Pro_Preview_Controller($wp_customize, 'alnp_pro_preview', array( |
|
150 | + 'label' => __('Looking for more options?', 'auto-load-next-post'), |
|
151 | 151 | 'section' => 'alnp_pro_preview', |
152 | 152 | 'settings' => 'alnp_pro_preview', |
153 | 153 | 'priority' => 1, |
154 | - ) ) ); |
|
154 | + ))); |
|
155 | 155 | } |
156 | 156 | } // END alnp_init_customizer() |
157 | 157 | |
@@ -162,14 +162,14 @@ discard block |
||
162 | 162 | * @param array $components Core Customizer components list. |
163 | 163 | * @return array (Maybe) modified components list. |
164 | 164 | */ |
165 | - public function alnp_remove_widgets_panel( $components ) { |
|
166 | - if ( $this->alnp_is_customizer() ) { |
|
167 | - foreach( $components as $key => $component ) { |
|
168 | - if ( $component == 'widgets' ) { |
|
169 | - unset( $components[ 'widgets' ] ); |
|
165 | + public function alnp_remove_widgets_panel($components) { |
|
166 | + if ($this->alnp_is_customizer()) { |
|
167 | + foreach ($components as $key => $component) { |
|
168 | + if ($component == 'widgets') { |
|
169 | + unset($components['widgets']); |
|
170 | 170 | } |
171 | - if ( $component == 'nav_menus' ) { |
|
172 | - unset( $components[ 'nav_menus' ] ); |
|
171 | + if ($component == 'nav_menus') { |
|
172 | + unset($components['nav_menus']); |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * @param object $wp_customize |
186 | 186 | * @return boolean |
187 | 187 | */ |
188 | - public function alnp_remove_default_customizer_panels( $wp_customize ) { |
|
188 | + public function alnp_remove_default_customizer_panels($wp_customize) { |
|
189 | 189 | global $wp_customize; |
190 | 190 | |
191 | 191 | $wp_customize->remove_section("themes"); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | * @return boolean |
209 | 209 | */ |
210 | 210 | public function alnp_is_customizer() { |
211 | - return isset( $_GET['alnp-customizer'] ) && $_GET['alnp-customizer'] === 'yes'; |
|
211 | + return isset($_GET['alnp-customizer']) && $_GET['alnp-customizer'] === 'yes'; |
|
212 | 212 | } // END alnp_is_customizer() |
213 | 213 | |
214 | 214 | /** |
@@ -223,23 +223,23 @@ discard block |
||
223 | 223 | * |
224 | 224 | * @param array $sections Customizer sections to add. |
225 | 225 | */ |
226 | - return apply_filters( 'auto_load_next_post_get_customizer_sections', array( |
|
226 | + return apply_filters('auto_load_next_post_get_customizer_sections', array( |
|
227 | 227 | 'auto_load_next_post_theme_selectors' => array( |
228 | 228 | 'capability' => 'edit_theme_options', |
229 | - 'title' => esc_html__( 'Theme Selectors', 'auto-load-next-post' ), |
|
230 | - '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( AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/find-theme-selectors/?utm_source=wpcustomizer&utm_campaign=plugin-settings-theme-selectors' ) . '" target="_blank">', '</a>' ), |
|
229 | + 'title' => esc_html__('Theme Selectors', 'auto-load-next-post'), |
|
230 | + '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(AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/find-theme-selectors/?utm_source=wpcustomizer&utm_campaign=plugin-settings-theme-selectors').'" target="_blank">', '</a>'), |
|
231 | 231 | ), |
232 | 232 | 'auto_load_next_post_misc' => array( |
233 | 233 | 'capability' => 'edit_theme_options', |
234 | - 'title' => esc_html__( 'Misc Settings', 'auto-load-next-post' ), |
|
235 | - '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' ) ), |
|
234 | + 'title' => esc_html__('Misc Settings', 'auto-load-next-post'), |
|
235 | + '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')), |
|
236 | 236 | ), |
237 | 237 | 'auto_load_next_post_events' => array( |
238 | 238 | 'capability' => 'edit_theme_options', |
239 | - 'title' => esc_html__( 'Events', 'auto-load-next-post' ), |
|
240 | - 'description' => sprintf( __( 'Below you can enter external JavaScript events to be triggered alongside %1$s native events. Separate each event like so: %2$s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<code>event1, event2,</code>' ), |
|
239 | + 'title' => esc_html__('Events', 'auto-load-next-post'), |
|
240 | + 'description' => sprintf(__('Below you can enter external JavaScript events to be triggered alongside %1$s native events. Separate each event like so: %2$s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<code>event1, event2,</code>'), |
|
241 | 241 | ), |
242 | - ) ); |
|
242 | + )); |
|
243 | 243 | } // END alnp_get_customizer_sections() |
244 | 244 | |
245 | 245 | /** |
@@ -256,12 +256,12 @@ discard block |
||
256 | 256 | * |
257 | 257 | * @param array $settings Customizer settings to add. |
258 | 258 | */ |
259 | - return apply_filters( 'auto_load_next_post_get_customizer_settings', array( |
|
259 | + return apply_filters('auto_load_next_post_get_customizer_settings', array( |
|
260 | 260 | 'auto_load_next_post_content_container' => array( |
261 | 261 | 'capability' => 'edit_theme_options', |
262 | 262 | 'default' => $settings['alnp_content_container'], |
263 | 263 | 'sanitize_callback' => 'wp_filter_post_kses', |
264 | - 'validate_callback' => array( $this, 'alnp_validate_content_container_selector' ), |
|
264 | + 'validate_callback' => array($this, 'alnp_validate_content_container_selector'), |
|
265 | 265 | 'transport' => 'postMessage', |
266 | 266 | 'type' => 'option', |
267 | 267 | ), |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | 'capability' => 'edit_theme_options', |
270 | 270 | 'default' => $settings['alnp_title_selector'], |
271 | 271 | 'sanitize_callback' => 'wp_filter_post_kses', |
272 | - 'validate_callback' => array( $this, 'alnp_validate_post_title_selector' ), |
|
272 | + 'validate_callback' => array($this, 'alnp_validate_post_title_selector'), |
|
273 | 273 | 'transport' => 'postMessage', |
274 | 274 | 'type' => 'option', |
275 | 275 | ), |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | 'capability' => 'edit_theme_options', |
278 | 278 | 'default' => $settings['alnp_navigation_container'], |
279 | 279 | 'sanitize_callback' => 'wp_filter_post_kses', |
280 | - 'validate_callback' => array( $this, 'alnp_validate_post_navigation_selector' ), |
|
280 | + 'validate_callback' => array($this, 'alnp_validate_post_navigation_selector'), |
|
281 | 281 | 'transport' => 'postMessage', |
282 | 282 | 'type' => 'option', |
283 | 283 | ), |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | 'transport' => 'postMessage', |
326 | 326 | 'type' => 'option', |
327 | 327 | ), |
328 | - ) ); |
|
328 | + )); |
|
329 | 329 | } // END alnp_get_customizer_settings() |
330 | 330 | |
331 | 331 | /** |
@@ -340,80 +340,80 @@ discard block |
||
340 | 340 | * |
341 | 341 | * @param array $controls Customizer controls to add. |
342 | 342 | */ |
343 | - return apply_filters( 'auto_load_next_post_get_customizer_controls', array( |
|
343 | + return apply_filters('auto_load_next_post_get_customizer_controls', array( |
|
344 | 344 | 'alnp_content_container' => array( |
345 | 345 | 'class' => 'WP_Customize_Control', |
346 | - 'label' => esc_html__( 'Content Container', 'auto-load-next-post' ), |
|
347 | - 'description' => sprintf( __( 'The primary container where the post content is loaded in. Default: %s', 'auto-load-next-post' ), '<code>main.site-main</code>' ), |
|
346 | + 'label' => esc_html__('Content Container', 'auto-load-next-post'), |
|
347 | + 'description' => sprintf(__('The primary container where the post content is loaded in. Default: %s', 'auto-load-next-post'), '<code>main.site-main</code>'), |
|
348 | 348 | 'section' => 'auto_load_next_post_theme_selectors', |
349 | 349 | 'settings' => 'auto_load_next_post_content_container', |
350 | 350 | 'type' => 'text', |
351 | 351 | ), |
352 | 352 | 'alnp_title_selector' => array( |
353 | 353 | 'class' => 'WP_Customize_Control', |
354 | - 'label' => esc_html__( 'Post Title Selector', 'auto-load-next-post' ), |
|
355 | - '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>' ), |
|
354 | + 'label' => esc_html__('Post Title Selector', 'auto-load-next-post'), |
|
355 | + '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>'), |
|
356 | 356 | 'section' => 'auto_load_next_post_theme_selectors', |
357 | 357 | 'settings' => 'auto_load_next_post_title_selector', |
358 | 358 | 'type' => 'text', |
359 | 359 | ), |
360 | 360 | 'alnp_navigation_container' => array( |
361 | 361 | 'class' => 'WP_Customize_Control', |
362 | - 'label' => esc_html__( 'Post Navigation Container', 'auto-load-next-post' ), |
|
363 | - 'description' => sprintf( __( 'Used to identify which post to load next if any. Default: %s', 'auto-load-next-post' ), '<code>nav.post-navigation</code>' ), |
|
362 | + 'label' => esc_html__('Post Navigation Container', 'auto-load-next-post'), |
|
363 | + 'description' => sprintf(__('Used to identify which post to load next if any. Default: %s', 'auto-load-next-post'), '<code>nav.post-navigation</code>'), |
|
364 | 364 | 'section' => 'auto_load_next_post_theme_selectors', |
365 | 365 | 'settings' => 'auto_load_next_post_navigation_container', |
366 | 366 | 'type' => 'text', |
367 | 367 | ), |
368 | 368 | 'alnp_comments_container' => array( |
369 | 369 | 'class' => 'WP_Customize_Control', |
370 | - 'label' => esc_html__( 'Comments Container', 'auto-load-next-post' ), |
|
371 | - '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>' ), |
|
370 | + 'label' => esc_html__('Comments Container', 'auto-load-next-post'), |
|
371 | + '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>'), |
|
372 | 372 | 'section' => 'auto_load_next_post_theme_selectors', |
373 | 373 | 'settings' => 'auto_load_next_post_comments_container', |
374 | 374 | 'type' => 'text', |
375 | 375 | ), |
376 | 376 | 'alnp_remove_comments' => array( |
377 | 377 | 'class' => 'WP_Customize_Control', |
378 | - 'label' => esc_html__( 'Remove Comments', 'auto-load-next-post' ), |
|
379 | - 'description' => esc_html__( 'Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post' ), |
|
378 | + 'label' => esc_html__('Remove Comments', 'auto-load-next-post'), |
|
379 | + 'description' => esc_html__('Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post'), |
|
380 | 380 | 'section' => 'auto_load_next_post_misc', |
381 | 381 | 'settings' => 'auto_load_next_post_remove_comments', |
382 | 382 | 'type' => 'checkbox', |
383 | 383 | ), |
384 | 384 | 'alnp_google_analytics' => array( |
385 | 385 | 'class' => 'WP_Customize_Control', |
386 | - 'label' => esc_html__( 'Update Google Analytics', 'auto-load-next-post' ), |
|
387 | - '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' ), |
|
386 | + 'label' => esc_html__('Update Google Analytics', 'auto-load-next-post'), |
|
387 | + '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'), |
|
388 | 388 | 'section' => 'auto_load_next_post_misc', |
389 | 389 | 'settings' => 'auto_load_next_post_google_analytics', |
390 | 390 | 'type' => 'checkbox', |
391 | 391 | ), |
392 | 392 | 'alnp_js_footer' => array( |
393 | 393 | 'class' => 'WP_Customize_Control', |
394 | - 'label' => esc_html__( 'JavaScript in Footer?', 'auto-load-next-post' ), |
|
395 | - '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' ), |
|
394 | + 'label' => esc_html__('JavaScript in Footer?', 'auto-load-next-post'), |
|
395 | + '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'), |
|
396 | 396 | 'section' => 'auto_load_next_post_misc', |
397 | 397 | 'settings' => 'auto_load_next_post_load_js_in_footer', |
398 | 398 | 'type' => 'checkbox', |
399 | 399 | ), |
400 | 400 | 'alnp_on_load_event' => array( |
401 | 401 | 'class' => 'WP_Customize_Control', |
402 | - 'label' => esc_html__( 'Post loaded', 'auto-load-next-post' ), |
|
403 | - 'description' => esc_html__( 'Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post' ), |
|
402 | + 'label' => esc_html__('Post loaded', 'auto-load-next-post'), |
|
403 | + 'description' => esc_html__('Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post'), |
|
404 | 404 | 'section' => 'auto_load_next_post_events', |
405 | 405 | 'settings' => 'auto_load_next_post_on_load_event', |
406 | 406 | 'type' => 'textarea', |
407 | 407 | ), |
408 | 408 | 'alnp_on_entering_event' => array( |
409 | 409 | 'class' => 'WP_Customize_Control', |
410 | - 'label' => esc_html__( 'Entering a Post', 'auto-load-next-post' ), |
|
411 | - 'description' => esc_html__( 'Events listed here will be triggered when entering a post.', 'auto-load-next-post' ), |
|
410 | + 'label' => esc_html__('Entering a Post', 'auto-load-next-post'), |
|
411 | + 'description' => esc_html__('Events listed here will be triggered when entering a post.', 'auto-load-next-post'), |
|
412 | 412 | 'section' => 'auto_load_next_post_events', |
413 | 413 | 'settings' => 'auto_load_next_post_on_entering_event', |
414 | 414 | 'type' => 'textarea', |
415 | 415 | ), |
416 | - ) ); |
|
416 | + )); |
|
417 | 417 | } // END alnp_get_customizer_controls() |
418 | 418 | |
419 | 419 | /** |
@@ -424,9 +424,9 @@ discard block |
||
424 | 424 | * @param string $value Value, normally pre-sanitized. |
425 | 425 | * @return WP_Error $validity |
426 | 426 | */ |
427 | - public function alnp_validate_content_container_selector( $validity, $value ) { |
|
428 | - if ( empty( $value ) ) { |
|
429 | - $validity->add( 'required', esc_html__( 'The content container selector is empty. Will not know where to load posts without it.', 'auto-load-next-post' ) ); |
|
427 | + public function alnp_validate_content_container_selector($validity, $value) { |
|
428 | + if (empty($value)) { |
|
429 | + $validity->add('required', esc_html__('The content container selector is empty. Will not know where to load posts without it.', 'auto-load-next-post')); |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | return $validity; |
@@ -440,9 +440,9 @@ discard block |
||
440 | 440 | * @param string $value Value, normally pre-sanitized. |
441 | 441 | * @return WP_Error $validity |
442 | 442 | */ |
443 | - public function alnp_validate_post_title_selector( $validity, $value ) { |
|
444 | - if ( empty( $value ) ) { |
|
445 | - $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' ) ); |
|
443 | + public function alnp_validate_post_title_selector($validity, $value) { |
|
444 | + if (empty($value)) { |
|
445 | + $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')); |
|
446 | 446 | } |
447 | 447 | |
448 | 448 | return $validity; |
@@ -456,9 +456,9 @@ discard block |
||
456 | 456 | * @param string $value Value, normally pre-sanitized. |
457 | 457 | * @return WP_Error $validity |
458 | 458 | */ |
459 | - public function alnp_validate_post_navigation_selector( $validity, $value ) { |
|
460 | - if ( empty( $value ) ) { |
|
461 | - $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' ) ); |
|
459 | + public function alnp_validate_post_navigation_selector($validity, $value) { |
|
460 | + if (empty($value)) { |
|
461 | + $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')); |
|
462 | 462 | } |
463 | 463 | |
464 | 464 | return $validity; |
@@ -472,16 +472,16 @@ discard block |
||
472 | 472 | */ |
473 | 473 | public function alnp_get_settings() { |
474 | 474 | $args = array( |
475 | - 'alnp_content_container' => get_option( 'auto_load_next_post_content_container' ), |
|
476 | - 'alnp_title_selector' => get_option( 'auto_load_next_post_title_selector' ), |
|
477 | - 'alnp_navigation_container' => get_option( 'auto_load_next_post_navigation_container' ), |
|
478 | - 'alnp_previous_post_selector' => get_option( 'auto_load_next_post_previous_post_selector' ), |
|
479 | - 'alnp_comments_container' => get_option( 'auto_load_next_post_comments_container' ), |
|
480 | - 'alnp_remove_comments' => get_option( 'auto_load_next_post_remove_comments' ), |
|
481 | - 'alnp_google_analytics' => get_option( 'auto_load_next_post_google_analytics' ), |
|
482 | - 'alnp_js_footer' => get_option( 'auto_load_next_post_load_js_in_footer' ), |
|
483 | - 'alnp_on_load_event' => get_option( 'auto_load_next_post_on_load_event' ), |
|
484 | - 'alnp_on_entering_event' => get_option( 'auto_load_next_post_on_entering_event' ), |
|
475 | + 'alnp_content_container' => get_option('auto_load_next_post_content_container'), |
|
476 | + 'alnp_title_selector' => get_option('auto_load_next_post_title_selector'), |
|
477 | + 'alnp_navigation_container' => get_option('auto_load_next_post_navigation_container'), |
|
478 | + 'alnp_previous_post_selector' => get_option('auto_load_next_post_previous_post_selector'), |
|
479 | + 'alnp_comments_container' => get_option('auto_load_next_post_comments_container'), |
|
480 | + 'alnp_remove_comments' => get_option('auto_load_next_post_remove_comments'), |
|
481 | + 'alnp_google_analytics' => get_option('auto_load_next_post_google_analytics'), |
|
482 | + 'alnp_js_footer' => get_option('auto_load_next_post_load_js_in_footer'), |
|
483 | + 'alnp_on_load_event' => get_option('auto_load_next_post_on_load_event'), |
|
484 | + 'alnp_on_entering_event' => get_option('auto_load_next_post_on_entering_event'), |
|
485 | 485 | ); |
486 | 486 | |
487 | 487 | return $args; |
@@ -495,13 +495,13 @@ discard block |
||
495 | 495 | * @return boolean |
496 | 496 | */ |
497 | 497 | public function is_page_alnp_ready() { |
498 | - if ( is_front_page() && is_home() ) { |
|
498 | + if (is_front_page() && is_home()) { |
|
499 | 499 | return false; |
500 | - } elseif ( is_front_page() ) { |
|
500 | + } elseif (is_front_page()) { |
|
501 | 501 | return false; |
502 | - } elseif ( is_home() ) { |
|
502 | + } elseif (is_home()) { |
|
503 | 503 | return true; |
504 | - } elseif ( is_singular( apply_filters( 'alnp_customizer_posts_ready', array( 'post' ) ) ) ) { |
|
504 | + } elseif (is_singular(apply_filters('alnp_customizer_posts_ready', array('post')))) { |
|
505 | 505 | return true; |
506 | 506 | } |
507 | 507 |
@@ -12,7 +12,7 @@ discard block |
||
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 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function __construct() { |
30 | 30 | // Update theme selectors if the theme was switched and it has theme support. |
31 | - add_action( 'after_switch_theme', array( $this, 'update_alnp_theme_selectors' ), 15, 2 ); |
|
31 | + add_action('after_switch_theme', array($this, 'update_alnp_theme_selectors'), 15, 2); |
|
32 | 32 | } // END __construct() |
33 | 33 | |
34 | 34 | /** |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @access public |
39 | 39 | */ |
40 | - public function update_alnp_theme_selectors( $stylesheet = '', $old_theme = false ) { |
|
40 | + public function update_alnp_theme_selectors($stylesheet = '', $old_theme = false) { |
|
41 | 41 | // Check if Auto Load Next Post is supported before updating the theme selectors. |
42 | - if ( is_alnp_supported() ) { |
|
43 | - $theme_support = get_theme_support( 'auto-load-next-post' ); |
|
42 | + if (is_alnp_supported()) { |
|
43 | + $theme_support = get_theme_support('auto-load-next-post'); |
|
44 | 44 | |
45 | - if ( is_array( $theme_support ) ) { |
|
45 | + if (is_array($theme_support)) { |
|
46 | 46 | // Preferred implementation, where theme provides an array of options |
47 | - if ( isset( $theme_support[0] ) && is_array( $theme_support[0] ) ) { |
|
48 | - foreach( $theme_support[0] as $key => $value ) { |
|
49 | - if ( ! empty( $value ) ) { |
|
50 | - update_option( 'auto_load_next_post_' . $key, $value ); |
|
47 | + if (isset($theme_support[0]) && is_array($theme_support[0])) { |
|
48 | + foreach ($theme_support[0] as $key => $value) { |
|
49 | + if ( ! empty($value)) { |
|
50 | + update_option('auto_load_next_post_'.$key, $value); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | |
15 | 15 | // Exit if accessed directly. |
16 | -if ( ! defined( 'ABSPATH' ) ) { |
|
16 | +if ( ! defined('ABSPATH')) { |
|
17 | 17 | exit; |
18 | 18 | } |
19 | 19 | |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | * @version 1.5.4 |
27 | 27 | * @global WP_Query $wp_query - The object information defining the current request and determines what type of query it's dealing with. See https://codex.wordpress.org/Class_Reference/WP_Query |
28 | 28 | */ |
29 | -if ( ! function_exists( 'auto_load_next_post_template_redirect' ) ) { |
|
29 | +if ( ! function_exists('auto_load_next_post_template_redirect')) { |
|
30 | 30 | function auto_load_next_post_template_redirect() { |
31 | 31 | global $wp_query; |
32 | 32 | |
33 | 33 | // If this is not a request for alnp or a singular object then bail |
34 | - if ( ! isset( $wp_query->query_vars['alnp'] ) || ! is_singular() ) { |
|
34 | + if ( ! isset($wp_query->query_vars['alnp']) || ! is_singular()) { |
|
35 | 35 | return; |
36 | 36 | } |
37 | 37 | |
@@ -40,27 +40,27 @@ discard block |
||
40 | 40 | * If theme does not have a template file for Auto Load Next Post, |
41 | 41 | * the plugin will load a default template. |
42 | 42 | */ |
43 | - $child_path = get_stylesheet_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH; |
|
44 | - $template_path = get_template_directory() . '/' . AUTO_LOAD_NEXT_POST_TEMPLATE_PATH; |
|
43 | + $child_path = get_stylesheet_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH; |
|
44 | + $template_path = get_template_directory().'/'.AUTO_LOAD_NEXT_POST_TEMPLATE_PATH; |
|
45 | 45 | $default_path = AUTO_LOAD_NEXT_POST_FILE_PATH; |
46 | 46 | $template_redirect = ''; |
47 | 47 | |
48 | - if ( file_exists( $child_path . 'content-alnp.php' ) ) { |
|
49 | - $template_redirect = $child_path . 'content-alnp.php'; |
|
50 | - } else if ( file_exists( $template_path . 'content-alnp.php' ) ) { |
|
51 | - $template_redirect = $template_path . 'content-alnp.php'; |
|
52 | - } else if ( file_exists( $default_path . '/template/content-alnp.php' ) ) { |
|
53 | - $template_redirect = $default_path . '/template/content-alnp.php'; |
|
48 | + if (file_exists($child_path.'content-alnp.php')) { |
|
49 | + $template_redirect = $child_path.'content-alnp.php'; |
|
50 | + } else if (file_exists($template_path.'content-alnp.php')) { |
|
51 | + $template_redirect = $template_path.'content-alnp.php'; |
|
52 | + } else if (file_exists($default_path.'/template/content-alnp.php')) { |
|
53 | + $template_redirect = $default_path.'/template/content-alnp.php'; |
|
54 | 54 | } |
55 | 55 | |
56 | - $template_redirect = apply_filters( 'alnp_template_redirect', $template_redirect ); |
|
56 | + $template_redirect = apply_filters('alnp_template_redirect', $template_redirect); |
|
57 | 57 | |
58 | - include( $template_redirect ); |
|
58 | + include($template_redirect); |
|
59 | 59 | |
60 | 60 | exit; |
61 | 61 | } // END auto_load_next_post_template_redirect() |
62 | 62 | } |
63 | -add_action( 'template_redirect', 'auto_load_next_post_template_redirect' ); |
|
63 | +add_action('template_redirect', 'auto_load_next_post_template_redirect'); |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Adds the comments template after the post content. |
@@ -69,15 +69,15 @@ discard block |
||
69 | 69 | * @since 1.4.8 |
70 | 70 | * @version 1.5.4 |
71 | 71 | */ |
72 | -if ( ! function_exists( 'auto_load_next_post_comments' ) ) { |
|
72 | +if ( ! function_exists('auto_load_next_post_comments')) { |
|
73 | 73 | function auto_load_next_post_comments() { |
74 | 74 | // If comments are open or we have at least one comment, load up the comment template. |
75 | - if ( comments_open() || get_comments_number() ) : |
|
75 | + if (comments_open() || get_comments_number()) : |
|
76 | 76 | comments_template(); |
77 | 77 | endif; |
78 | 78 | } // END auto_load_next_post_comments() |
79 | 79 | } |
80 | -add_action( 'alnp_load_after_content', 'auto_load_next_post_comments', 1, 5 ); |
|
80 | +add_action('alnp_load_after_content', 'auto_load_next_post_comments', 1, 5); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * Adds the post navigation for the previous link only after the post content. |
@@ -86,16 +86,16 @@ discard block |
||
86 | 86 | * @since 1.4.8 |
87 | 87 | * @version 1.5.4 |
88 | 88 | */ |
89 | -if ( ! function_exists( 'auto_load_next_post_navigation' ) ) { |
|
89 | +if ( ! function_exists('auto_load_next_post_navigation')) { |
|
90 | 90 | function auto_load_next_post_navigation() { |
91 | 91 | ?> |
92 | 92 | <nav class="navigation post-navigation" role="navigation"> |
93 | - <span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'auto-load-next-post' ) . '</span> %title' ); ?></span> |
|
93 | + <span class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav">'._x('←', 'Previous post link', 'auto-load-next-post').'</span> %title'); ?></span> |
|
94 | 94 | </nav> |
95 | 95 | <?php |
96 | 96 | } // END auto_load_next_post_navigation() |
97 | 97 | } |
98 | -add_action( 'alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10 ); |
|
98 | +add_action('alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10); |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * Returns the permalink of a random page |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | * @param string $post_type - Default is post. |
105 | 105 | * @return int|boolean |
106 | 106 | */ |
107 | -if ( ! function_exists( 'alnp_get_random_page_permalink' ) ) { |
|
108 | - function alnp_get_random_page_permalink( $post_type = 'post' ) { |
|
107 | +if ( ! function_exists('alnp_get_random_page_permalink')) { |
|
108 | + function alnp_get_random_page_permalink($post_type = 'post') { |
|
109 | 109 | $args = array( |
110 | 110 | 'post_type' => $post_type, |
111 | 111 | 'post_status' => 'publish', |
@@ -113,13 +113,13 @@ discard block |
||
113 | 113 | 'posts_per_page' => 1 |
114 | 114 | ); |
115 | 115 | |
116 | - $query = new WP_Query( $args ); |
|
116 | + $query = new WP_Query($args); |
|
117 | 117 | |
118 | - if ( $query->have_posts() ) { |
|
119 | - while ( $query->have_posts() ) : $query->the_post(); |
|
118 | + if ($query->have_posts()) { |
|
119 | + while ($query->have_posts()) : $query->the_post(); |
|
120 | 120 | $id = get_the_ID(); |
121 | 121 | |
122 | - return get_permalink( $id ); |
|
122 | + return get_permalink($id); |
|
123 | 123 | endwhile; |
124 | 124 | } else { |
125 | 125 | return false; |
@@ -133,11 +133,11 @@ discard block |
||
133 | 133 | * @since 1.5.7 |
134 | 134 | * @return boolean |
135 | 135 | */ |
136 | -if ( ! function_exists( 'alnp_load_js_in_footer' ) ) { |
|
136 | +if ( ! function_exists('alnp_load_js_in_footer')) { |
|
137 | 137 | function alnp_load_js_in_footer() { |
138 | - $load_in_footer = get_option( 'auto_load_next_post_load_js_in_footer', false ); |
|
138 | + $load_in_footer = get_option('auto_load_next_post_load_js_in_footer', false); |
|
139 | 139 | |
140 | - if ( isset( $load_in_footer ) && $load_in_footer == 'yes' ) { |
|
140 | + if (isset($load_in_footer) && $load_in_footer == 'yes') { |
|
141 | 141 | return true; |
142 | 142 | } |
143 | 143 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | * @since 1.5.11 |
153 | 153 | * @return array |
154 | 154 | */ |
155 | -if ( ! function_exists( 'alnp_get_admin_screens' ) ) { |
|
155 | +if ( ! function_exists('alnp_get_admin_screens')) { |
|
156 | 156 | function alnp_get_admin_screens() { |
157 | 157 | return array( |
158 | 158 | 'dashboard', |
@@ -14,11 +14,11 @@ discard block |
||
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 |
||
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 | /** |
@@ -43,97 +43,97 @@ discard block |
||
43 | 43 | $screen = get_current_screen(); |
44 | 44 | $screen_id = $screen ? $screen->id : ''; |
45 | 45 | |
46 | - if ( $screen_id != 'settings_page_auto-load-next-post-settings' ) { |
|
46 | + if ($screen_id != 'settings_page_auto-load-next-post-settings') { |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | - $screen->add_help_tab( array( |
|
50 | + $screen->add_help_tab(array( |
|
51 | 51 | 'id' => 'auto_load_next_post_support_tab', |
52 | - 'title' => esc_html__( 'Help & Support', 'auto-load-next-post' ), |
|
52 | + 'title' => esc_html__('Help & Support', 'auto-load-next-post'), |
|
53 | 53 | 'content' => |
54 | - '<h2>' . esc_html__( 'Help & Support', 'auto-load-next-post' ) . '</h2>' . |
|
54 | + '<h2>'.esc_html__('Help & Support', 'auto-load-next-post').'</h2>'. |
|
55 | 55 | |
56 | - '<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="' . esc_url( AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL ) . '" aria-label="' . esc_attr__( 'View Auto Load Next Post documentation', 'auto-load-next-post' ) . '" target="_blank">', '</a>' ) . '</p>' . |
|
56 | + '<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="'.esc_url(AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL).'" aria-label="'.esc_attr__('View Auto Load Next Post documentation', 'auto-load-next-post').'" target="_blank">', '</a>').'</p>'. |
|
57 | 57 | |
58 | - '<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="'. esc_url( AUTO_LOAD_NEXT_POST_SUPPORT_URL ) . '"aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">', '</a>' ) . '</p> ' . |
|
58 | + '<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="'.esc_url(AUTO_LOAD_NEXT_POST_SUPPORT_URL).'"aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">', '</a>').'</p> '. |
|
59 | 59 | |
60 | - '<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>' . |
|
60 | + '<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>'. |
|
61 | 61 | |
62 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL ) . '" class="button button-primary" aria-label="' . esc_attr__( 'View Auto Load Next Post documentation', 'auto-load-next-post' ) . '" target="_blank">' . esc_html__( 'Documentation', 'auto-load-next-post' ) . '</a> <a href="'. esc_url( AUTO_LOAD_NEXT_POST_SUPPORT_URL ) . '" class="button button-secondary" aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">' . esc_html__( 'Community Forum', 'auto-load-next-post' ) . '</a> <a href="' . esc_url( AUTO_LOAD_NEXT_POST_PLUGIN_URL . '#faq' ) . '" 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>' |
|
63 | - ) ); |
|
62 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL).'" class="button button-primary" aria-label="'.esc_attr__('View Auto Load Next Post documentation', 'auto-load-next-post').'" target="_blank">'.esc_html__('Documentation', 'auto-load-next-post').'</a> <a href="'.esc_url(AUTO_LOAD_NEXT_POST_SUPPORT_URL).'" class="button button-secondary" aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">'.esc_html__('Community Forum', 'auto-load-next-post').'</a> <a href="'.esc_url(AUTO_LOAD_NEXT_POST_PLUGIN_URL.'#faq').'" 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>' |
|
63 | + )); |
|
64 | 64 | |
65 | - $screen->add_help_tab( array( |
|
65 | + $screen->add_help_tab(array( |
|
66 | 66 | 'id' => 'auto_load_next_post_theme_selectors_tab', |
67 | - 'title' => __( 'Theme Selectors', 'auto-load-next-post' ), |
|
67 | + 'title' => __('Theme Selectors', 'auto-load-next-post'), |
|
68 | 68 | 'content' => |
69 | - '<h2>' . __( 'Theme Selectors', 'auto-load-next-post' ) . '</h2>' . |
|
70 | - |
|
71 | - '<p>' . sprintf( |
|
72 | - __( 'Theme Selectors allows %s know where to load the content in, which post is being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post' ), |
|
73 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) |
|
74 | - ) . '</p>' . |
|
75 | - |
|
76 | - '<p>' . sprintf( |
|
77 | - __( 'Each theme is different so in order for %1$s to work, the theme selectors must be set according to the theme you currently have active for each section.', 'auto-load-next-post' ), |
|
78 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) |
|
79 | - ) . '</p>' . |
|
80 | - |
|
81 | - '<p>' . sprintf( |
|
82 | - __( 'When %1$s is activated, default theme selectors are set for you. These theme selectors are the most commonly used in any WordPress theme. If they don’t work for your theme then you need to find the matching theme selectors. More information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post' ), |
|
83 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), |
|
84 | - '<a href="' . esc_url( 'https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors' ) . '">', |
|
69 | + '<h2>'.__('Theme Selectors', 'auto-load-next-post').'</h2>'. |
|
70 | + |
|
71 | + '<p>'.sprintf( |
|
72 | + __('Theme Selectors allows %s know where to load the content in, which post is being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post'), |
|
73 | + esc_html__('Auto Load Next Post', 'auto-load-next-post') |
|
74 | + ).'</p>'. |
|
75 | + |
|
76 | + '<p>'.sprintf( |
|
77 | + __('Each theme is different so in order for %1$s to work, the theme selectors must be set according to the theme you currently have active for each section.', 'auto-load-next-post'), |
|
78 | + esc_html__('Auto Load Next Post', 'auto-load-next-post') |
|
79 | + ).'</p>'. |
|
80 | + |
|
81 | + '<p>'.sprintf( |
|
82 | + __('When %1$s is activated, default theme selectors are set for you. These theme selectors are the most commonly used in any WordPress theme. If they don’t work for your theme then you need to find the matching theme selectors. More information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post'), |
|
83 | + esc_html__('Auto Load Next Post', 'auto-load-next-post'), |
|
84 | + '<a href="'.esc_url('https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors').'">', |
|
85 | 85 | '</a>' |
86 | - ) . '</p>' . |
|
86 | + ).'</p>'. |
|
87 | 87 | |
88 | - '<p>' . sprintf( |
|
89 | - __( 'If the theme you have active supports %s then it will set the theme selectors for you and display a notice on the theme selectors page.', 'auto-load-next-post' ), |
|
90 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) |
|
91 | - ) . '</p>' . |
|
88 | + '<p>'.sprintf( |
|
89 | + __('If the theme you have active supports %s then it will set the theme selectors for you and display a notice on the theme selectors page.', 'auto-load-next-post'), |
|
90 | + esc_html__('Auto Load Next Post', 'auto-load-next-post') |
|
91 | + ).'</p>'. |
|
92 | 92 | |
93 | - '<h3 class="alnp-default-theme-selectors">' . esc_html__( 'Default Theme Selectors', 'auto-load-next-post' ) . '</h3>' . |
|
93 | + '<h3 class="alnp-default-theme-selectors">'.esc_html__('Default Theme Selectors', 'auto-load-next-post').'</h3>'. |
|
94 | 94 | |
95 | - '<ul class="alnp-default-theme-selectors">' . |
|
96 | - '<li><strong>' . esc_html__( 'Content Container', 'auto-load-next-post' ) . '</strong>' . ' <code>main.site-main</code></li>' . |
|
97 | - '<li><strong>' . esc_html__( 'Post Title', 'auto-load-next-post' ) . '</strong>' . ' <code>h1.entry-title</code></li>' . |
|
98 | - '<li><strong>' . esc_html__( 'Post Navigation', 'auto-load-next-post' ) . '</strong>' . ' <code>nav.post-navigation</code></li>' . |
|
99 | - '<li><strong>' . esc_html__( 'Comments Container', 'auto-load-next-post' ) . '</strong>' . ' <code>div#comments</code></li>' . |
|
95 | + '<ul class="alnp-default-theme-selectors">'. |
|
96 | + '<li><strong>'.esc_html__('Content Container', 'auto-load-next-post').'</strong>'.' <code>main.site-main</code></li>'. |
|
97 | + '<li><strong>'.esc_html__('Post Title', 'auto-load-next-post').'</strong>'.' <code>h1.entry-title</code></li>'. |
|
98 | + '<li><strong>'.esc_html__('Post Navigation', 'auto-load-next-post').'</strong>'.' <code>nav.post-navigation</code></li>'. |
|
99 | + '<li><strong>'.esc_html__('Comments Container', 'auto-load-next-post').'</strong>'.' <code>div#comments</code></li>'. |
|
100 | 100 | '</ul>' |
101 | - ) ); |
|
101 | + )); |
|
102 | 102 | |
103 | - $screen->add_help_tab( array( |
|
103 | + $screen->add_help_tab(array( |
|
104 | 104 | 'id' => 'auto_load_next_post_bugs_tab', |
105 | - 'title' => esc_html__( 'Found a bug?', 'auto-load-next-post' ), |
|
105 | + 'title' => esc_html__('Found a bug?', 'auto-load-next-post'), |
|
106 | 106 | 'content' => |
107 | - '<h2>' . esc_html__( 'Found a bug?', 'auto-load-next-post' ) . '</h2>' . |
|
107 | + '<h2>'.esc_html__('Found a bug?', 'auto-load-next-post').'</h2>'. |
|
108 | 108 | |
109 | - '<p>' . sprintf( __( 'If you find a bug within %1$s core you can create a ticket via %2$sGithub issues%4$s. Ensure you read the %3$scontribution guide%4$s prior to submitting your report. To help me solve your 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>' . |
|
109 | + '<p>'.sprintf(__('If you find a bug within %1$s core you can create a ticket via %2$sGithub issues%4$s. Ensure you read the %3$scontribution guide%4$s prior to submitting your report. To help me solve your 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>'. |
|
110 | 110 | |
111 | - '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" class="button button-primary" target="_blank">' . esc_html__( 'Report a bug', 'auto-load-next-post' ) . '</a></p>' |
|
112 | - ) ); |
|
111 | + '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" class="button button-primary" target="_blank">'.esc_html__('Report a bug', 'auto-load-next-post').'</a></p>' |
|
112 | + )); |
|
113 | 113 | |
114 | - $screen->add_help_tab( array( |
|
114 | + $screen->add_help_tab(array( |
|
115 | 115 | 'id' => 'auto_load_next_post_feedback_tab', |
116 | - 'title' => esc_html__( 'Contribute', 'auto-load-next-post' ), |
|
116 | + 'title' => esc_html__('Contribute', 'auto-load-next-post'), |
|
117 | 117 | 'content' => |
118 | - '<h2>' . esc_html__( 'Contribute', 'auto-load-next-post' ) . '</h2>' . |
|
118 | + '<h2>'.esc_html__('Contribute', 'auto-load-next-post').'</h2>'. |
|
119 | 119 | |
120 | - '<p>' . sprintf( __( 'If you or your company use %1$s, please consider supporting me directly so I can continue maintaining it and keep evolving the project.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' . |
|
120 | + '<p>'.sprintf(__('If you or your company use %1$s, please consider supporting me directly so I can continue maintaining it and keep evolving the project.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'. |
|
121 | 121 | |
122 | - '<p>' . esc_html__( 'You\'ll be helping to ensure I can spend the time not just fixing bugs, adding features or releasing new versions but also keeping the project afloat. Any contribution you make is a big help and is greatly appreciated.', 'auto-load-next-post' ) . '</p>' . |
|
122 | + '<p>'.esc_html__('You\'ll be helping to ensure I can spend the time not just fixing bugs, adding features or releasing new versions but also keeping the project afloat. Any contribution you make is a big help and is greatly appreciated.', 'auto-load-next-post').'</p>'. |
|
123 | 123 | |
124 | - '<p>' . sprintf( __( 'Your review of the plugin is also important as it will help others decide to use %s so please consider leaving a review on WordPress.org', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' . |
|
124 | + '<p>'.sprintf(__('Your review of the plugin is also important as it will help others decide to use %s so please consider leaving a review on WordPress.org', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'. |
|
125 | 125 | |
126 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_REVIEW_URL ) . '" class="button button-primary" target="_blank" aria-label="' . esc_attr( __( 'Review Auto Load Next Post on WordPress.org', 'auto-load-next-post' ) ) . '">' . esc_html__( 'Leave a Review', 'auto-load-next-post' ) . '</a> <a href="https://sebdumont.xyz/donate/" class="button button-secondary" target="_blank">' . esc_html__( 'Support the Developer', 'auto-load-next-post' ) . '</a></p>' |
|
127 | - ) ); |
|
126 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_REVIEW_URL).'" class="button button-primary" target="_blank" aria-label="'.esc_attr(__('Review Auto Load Next Post on WordPress.org', 'auto-load-next-post')).'">'.esc_html__('Leave a Review', 'auto-load-next-post').'</a> <a href="https://sebdumont.xyz/donate/" class="button button-secondary" target="_blank">'.esc_html__('Support the Developer', 'auto-load-next-post').'</a></p>' |
|
127 | + )); |
|
128 | 128 | |
129 | 129 | $screen->set_help_sidebar( |
130 | - '<p><strong>' . esc_html__( 'For more information:', 'auto-load-next-post' ) . '</strong></p>' . |
|
130 | + '<p><strong>'.esc_html__('For more information:', 'auto-load-next-post').'</strong></p>'. |
|
131 | 131 | |
132 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL ) . '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>' . |
|
132 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL).'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>'. |
|
133 | 133 | |
134 | - '<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_PLUGIN_URL ) . '" target="_blank">' . esc_html__( 'WordPress.org Project', 'auto-load-next-post' ) . '</a></p>' . |
|
134 | + '<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_PLUGIN_URL).'" target="_blank">'.esc_html__('WordPress.org Project', 'auto-load-next-post').'</a></p>'. |
|
135 | 135 | |
136 | - '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/" target="_blank">' . esc_html__( 'GitHub Project', 'auto-load-next-post' ) . '</a></p>' |
|
136 | + '<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/" target="_blank">'.esc_html__('GitHub Project', 'auto-load-next-post').'</a></p>' |
|
137 | 137 | ); |
138 | 138 | |
139 | 139 | } // END add_help_tabs() |
@@ -11,31 +11,31 @@ discard block |
||
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-success 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="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" /> |
|
21 | + <img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/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__( 'Welcome!', 'auto-load-next-post' ); ?></h3> |
|
25 | + <h3><?php echo esc_html__('Welcome!', 'auto-load-next-post'); ?></h3> |
|
26 | 26 | <p> |
27 | - <?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 | + <?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')); ?> |
|
28 | 28 | <?php |
29 | 29 | // If the theme has not added support then encourage the user to see the documentation. |
30 | - if ( ! is_alnp_supported() ) { |
|
30 | + if ( ! is_alnp_supported()) { |
|
31 | 31 | $query = array( |
32 | 32 | 'autofocus[panel]' => 'alnp', |
33 | 33 | 'autofocus[section]' => 'auto_load_next_post_theme_selectors', |
34 | 34 | 'url' => alnp_get_random_page_permalink(), |
35 | - 'return' => admin_url( 'options-general.php?page=auto-load-next-post-settings' ), |
|
35 | + 'return' => admin_url('options-general.php?page=auto-load-next-post-settings'), |
|
36 | 36 | ); |
37 | - $customizer_link = add_query_arg( $query, admin_url( 'customize.php' ) ); |
|
38 | - 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>' ); |
|
37 | + $customizer_link = add_query_arg($query, admin_url('customize.php')); |
|
38 | + 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>'); |
|
39 | 39 | } |
40 | 40 | ?> |
41 | 41 | </p> |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | <div class="auto-load-next-post-documentation"> |
45 | 45 | <?php |
46 | 46 | // If the theme has not added support then display button to documentation. |
47 | - if ( ! is_alnp_supported() ) { |
|
48 | - printf( '<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice' ), esc_html__( 'Documentation', 'auto-load-next-post' ) ); |
|
47 | + if ( ! is_alnp_supported()) { |
|
48 | + printf('<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice'), esc_html__('Documentation', 'auto-load-next-post')); |
|
49 | 49 | } |
50 | 50 | ?> |
51 | - <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 | + <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> |
|
52 | 52 | </div> |
53 | 53 | </div> |
54 | 54 | </div> |
@@ -11,24 +11,24 @@ |
||
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="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" /> |
|
21 | + <img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/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 echo esc_html__( 'If you have any questions about the beta or if you have any feedback at all including features to be added or integrations to support, please let me know. Any little bit you\'re willing to share helps.', 'auto-load-next-post' ); ?></p> |
|
25 | + <h3><?php echo esc_html__('Thanks for trying out this beta!', 'auto-load-next-post'); ?></h3> |
|
26 | + <p><?php echo esc_html__('If you have any questions about the beta or if you have any feedback at all including features to be added or integrations to support, please let me know. Any little bit you\'re willing to share helps.', 'auto-load-next-post'); ?></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( AUTO_LOAD_NEXT_POST_STORE_URL . '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(AUTO_LOAD_NEXT_POST_STORE_URL.'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> |
@@ -11,24 +11,24 @@ |
||
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-warning 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="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" /> |
|
21 | + <img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/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 esc_html_e( 'Update Coming!', 'auto-load-next-post' ); ?></h3> |
|
26 | - <p><?php printf( __( 'Version %1$s1.6.0%2$s of %3$s is coming with new features and improvements. Before it is released I require your help to test with the themes you like to use and provide feedback. I do recommend you do so on a staging site. You will be helping me move the project forward. Thank you!', 'auto-load-next-post' ), '<strong>', '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p> |
|
25 | + <h3><?php esc_html_e('Update Coming!', 'auto-load-next-post'); ?></h3> |
|
26 | + <p><?php printf(__('Version %1$s1.6.0%2$s of %3$s is coming with new features and improvements. Before it is released I require your help to test with the themes you like to use and provide feedback. I do recommend you do so on a staging site. You will be helping me move the project forward. Thank you!', 'auto-load-next-post'), '<strong>', '</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></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/2019/09/auto-load-next-post-v1-6-0-beta-1/' ), esc_html__( 'Learn More', 'auto-load-next-post' ) ); ?> |
|
31 | - <a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_upgrade_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Not interested / Already doing so?', '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/2019/09/auto-load-next-post-v1-6-0-beta-1/'), esc_html__('Learn More', 'auto-load-next-post')); ?> |
|
31 | + <a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_upgrade_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Not interested / Already doing so?', 'auto-load-next-post'); ?></a> |
|
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | </div> |
@@ -11,28 +11,28 @@ |
||
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="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" /> |
|
25 | + <img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/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( AUTO_LOAD_NEXT_POST_REVIEW_URL . '?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(AUTO_LOAD_NEXT_POST_REVIEW_URL.'?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> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // Exit if accessed directly. |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; |
16 | 16 | } |
17 | 17 | ?> |
@@ -20,25 +20,25 @@ discard block |
||
20 | 20 | <a class="alnp-banner" href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>?utm_source=plugin&utm_medium=alnp-banner&utm_campaign=alnp-settings-page"></a> |
21 | 21 | |
22 | 22 | <div class="alnp-upgrade-details"> |
23 | - <h1><?php esc_html_e( 'Pro Coming Soon', 'auto-load-next-post' ); ?></h1> |
|
23 | + <h1><?php esc_html_e('Pro Coming Soon', 'auto-load-next-post'); ?></h1> |
|
24 | 24 | |
25 | 25 | <ul> |
26 | - <li><?php echo wptexturize( esc_html__( 'Load the Next Post or Next Post with same Category or New Posts or Related Posts or by Custom Query', 'auto-load-next-post' ) ); ?></li> |
|
27 | - <li><?php echo wptexturize( esc_html__( 'Page and Media Attachment Support', 'auto-load-next-post' ) ); ?></li> |
|
28 | - <li><?php echo wptexturize( esc_html__( 'Custom Post Type Support', 'auto-load-next-post' ) ); ?></li> |
|
29 | - <li><?php echo wptexturize( esc_html__( 'Paginated Posts Supported', 'auto-load-next-post' ) ); ?></li> |
|
30 | - <li><?php echo wptexturize( esc_html__( 'Exclude Post Formats', 'auto-load-next-post' ) ); ?></li> |
|
31 | - <li><?php echo wptexturize( esc_html__( 'Limit Posts per Session', 'auto-load-next-post' ) ); ?></li> |
|
32 | - <li><?php echo wptexturize( esc_html__( 'Query Posts by Category and Tag', 'auto-load-next-post' ) ); ?></li> |
|
33 | - <li><?php echo wptexturize( esc_html__( 'Exclude User Roles and Specific Users', 'auto-load-next-post' ) ); ?></li> |
|
34 | - <li><?php echo wptexturize( esc_html__( 'Pre-Query Posts Ready to Load', 'auto-load-next-post' ) ); ?></li> |
|
35 | - <li><?php echo wptexturize( esc_html__( 'Hide Comments and Show by Toggle Button', 'auto-load-next-post' ) ); ?></li> |
|
36 | - <li><?php echo wptexturize( sprintf( esc_html__( 'Multilingual Support for %1$s and %2$s', 'auto-load-next-post' ), 'WPML', 'Polylang' ) ); ?></li> |
|
37 | - <li><?php echo wptexturize( esc_html__( 'Email Support', 'auto-load-next-post' ) ); ?></li> |
|
26 | + <li><?php echo wptexturize(esc_html__('Load the Next Post or Next Post with same Category or New Posts or Related Posts or by Custom Query', 'auto-load-next-post')); ?></li> |
|
27 | + <li><?php echo wptexturize(esc_html__('Page and Media Attachment Support', 'auto-load-next-post')); ?></li> |
|
28 | + <li><?php echo wptexturize(esc_html__('Custom Post Type Support', 'auto-load-next-post')); ?></li> |
|
29 | + <li><?php echo wptexturize(esc_html__('Paginated Posts Supported', 'auto-load-next-post')); ?></li> |
|
30 | + <li><?php echo wptexturize(esc_html__('Exclude Post Formats', 'auto-load-next-post')); ?></li> |
|
31 | + <li><?php echo wptexturize(esc_html__('Limit Posts per Session', 'auto-load-next-post')); ?></li> |
|
32 | + <li><?php echo wptexturize(esc_html__('Query Posts by Category and Tag', 'auto-load-next-post')); ?></li> |
|
33 | + <li><?php echo wptexturize(esc_html__('Exclude User Roles and Specific Users', 'auto-load-next-post')); ?></li> |
|
34 | + <li><?php echo wptexturize(esc_html__('Pre-Query Posts Ready to Load', 'auto-load-next-post')); ?></li> |
|
35 | + <li><?php echo wptexturize(esc_html__('Hide Comments and Show by Toggle Button', 'auto-load-next-post')); ?></li> |
|
36 | + <li><?php echo wptexturize(sprintf(esc_html__('Multilingual Support for %1$s and %2$s', 'auto-load-next-post'), 'WPML', 'Polylang')); ?></li> |
|
37 | + <li><?php echo wptexturize(esc_html__('Email Support', 'auto-load-next-post')); ?></li> |
|
38 | 38 | </ul> |
39 | 39 | |
40 | 40 | <p> |
41 | - <a href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>pro/?utm_source=plugin&utm_medium=link&utm_campaign=alnp-settings-page"><?php esc_html_e( 'Visit autoloadnextpost.com →', 'auto-load-next-post' ); ?></a> |
|
41 | + <a href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>pro/?utm_source=plugin&utm_medium=link&utm_campaign=alnp-settings-page"><?php esc_html_e('Visit autoloadnextpost.com →', 'auto-load-next-post'); ?></a> |
|
42 | 42 | </p> |
43 | 43 | |
44 | 44 | </div> |
@@ -46,33 +46,33 @@ discard block |
||
46 | 46 | <div class="block"> |
47 | 47 | <div class="inner-block"> |
48 | 48 | <form method="post" action="https://sebastiendumont.us1.list-manage.com/subscribe/post?u=48ead612ad85b23fe2239c6e3&id=79e97b5275" name="mc-embedded-subscribe-form" target="_blank" class="subscribe block"> |
49 | - <h2><?php esc_html_e( 'Sign up to pre-order first', 'auto-load-next-post' ); ?></h2> |
|
49 | + <h2><?php esc_html_e('Sign up to pre-order first', 'auto-load-next-post'); ?></h2> |
|
50 | 50 | |
51 | 51 | <p class="intro"> |
52 | - <?php echo wptexturize( esc_html__( 'Submit your name and email and be the first to know when you can pre-order Auto Load Next Post Pro and keep up to date with my developments plus a 20% discount.', 'auto-load-next-post' ) ); ?> |
|
52 | + <?php echo wptexturize(esc_html__('Submit your name and email and be the first to know when you can pre-order Auto Load Next Post Pro and keep up to date with my developments plus a 20% discount.', 'auto-load-next-post')); ?> |
|
53 | 53 | </p> |
54 | 54 | |
55 | 55 | <div class="field"> |
56 | - <input type="email" name="EMAIL" value="" placeholder="<?php esc_html_e( 'Your Email Address', 'auto-load-next-post' ); ?>"/> |
|
56 | + <input type="email" name="EMAIL" value="" placeholder="<?php esc_html_e('Your Email Address', 'auto-load-next-post'); ?>"/> |
|
57 | 57 | </div> |
58 | 58 | |
59 | 59 | <div class="field"> |
60 | - <input type="text" name="FNAME" value="" placeholder="<?php esc_html_e( 'First Name', 'auto-load-next-post' ); ?>"/> |
|
60 | + <input type="text" name="FNAME" value="" placeholder="<?php esc_html_e('First Name', 'auto-load-next-post'); ?>"/> |
|
61 | 61 | </div> |
62 | 62 | |
63 | 63 | <div class="field"> |
64 | - <input type="text" name="LNAME" value="" placeholder="<?php esc_html_e( 'Last Name', 'auto-load-next-post' ); ?>"/> |
|
64 | + <input type="text" name="LNAME" value="" placeholder="<?php esc_html_e('Last Name', 'auto-load-next-post'); ?>"/> |
|
65 | 65 | </div> |
66 | 66 | |
67 | 67 | <input type="hidden" name="group[35169][1]" value="1"> |
68 | 68 | |
69 | 69 | <div class="field submit-button"> |
70 | 70 | <div style="position: absolute; left: -9999px;" aria-hidden="true"><input type="text" name="b_48ead612ad85b23fe2239c6e3_79e97b5275" tabindex="-1" value=""></div> |
71 | - <input type="submit" name="subscribe" id="mc-embedded-subscribe" class="button" value="<?php esc_html_e( 'Sign me up', 'auto-load-next-post' ); ?>"/> |
|
71 | + <input type="submit" name="subscribe" id="mc-embedded-subscribe" class="button" value="<?php esc_html_e('Sign me up', 'auto-load-next-post'); ?>"/> |
|
72 | 72 | </div> |
73 | 73 | |
74 | 74 | <p class="promise"> |
75 | - <?php esc_html_e( 'I promise I will not use your email for anything else and you can unsubscribe with 1-click anytime.', 'auto-load-next-post' ); ?> |
|
75 | + <?php esc_html_e('I promise I will not use your email for anything else and you can unsubscribe with 1-click anytime.', 'auto-load-next-post'); ?> |
|
76 | 76 | </p> |
77 | 77 | |
78 | 78 | </form> |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | </div> |
81 | 81 | |
82 | 82 | <div class="block credits"> |
83 | - <h3><?php esc_html_e( 'Created & maintained by', 'auto-load-next-post' ); ?></h3> |
|
83 | + <h3><?php esc_html_e('Created & maintained by', 'auto-load-next-post'); ?></h3> |
|
84 | 84 | <div class="inner-block"> |
85 | 85 | <ul> |
86 | 86 | <li> |