@@ -3,25 +3,25 @@ discard block |
||
3 | 3 | <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> |
4 | 4 | |
5 | 5 | <div class="alnp-upgrade-details"> |
6 | - <h1><?php esc_html_e( 'Pro Coming Soon', 'auto-load-next-post' ); ?></h1> |
|
6 | + <h1><?php esc_html_e('Pro Coming Soon', 'auto-load-next-post'); ?></h1> |
|
7 | 7 | |
8 | 8 | <ul> |
9 | - <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> |
|
10 | - <li><?php echo wptexturize( esc_html__( 'Page and Media Attachment Support', 'auto-load-next-post' ) ); ?></li> |
|
11 | - <li><?php echo wptexturize( esc_html__( 'Custom Post Type Support', 'auto-load-next-post' ) ); ?></li> |
|
12 | - <li><?php echo wptexturize( esc_html__( 'Paginated Posts Supported', 'auto-load-next-post' ) ); ?></li> |
|
13 | - <li><?php echo wptexturize( esc_html__( 'Exclude Post Formats', 'auto-load-next-post' ) ); ?></li> |
|
14 | - <li><?php echo wptexturize( esc_html__( 'Limit Posts per Session', 'auto-load-next-post' ) ); ?></li> |
|
15 | - <li><?php echo wptexturize( esc_html__( 'Query Posts by Category and Tag', 'auto-load-next-post' ) ); ?></li> |
|
16 | - <li><?php echo wptexturize( esc_html__( 'Exclude User Roles and Specific Users', 'auto-load-next-post' ) ); ?></li> |
|
17 | - <li><?php echo wptexturize( esc_html__( 'Pre-Query Posts Ready to Load', 'auto-load-next-post' ) ); ?></li> |
|
18 | - <li><?php echo wptexturize( esc_html__( 'Hide Comments and Show by Toggle Button', 'auto-load-next-post' ) ); ?></li> |
|
19 | - <li><?php echo wptexturize( sprintf( esc_html__( 'Multilingual Support for %1$s and %2$s', 'auto-load-next-post' ), 'WPML', 'Polylang' ) ); ?></li> |
|
20 | - <li><?php echo wptexturize( esc_html__( 'Email Support', 'auto-load-next-post' ) ); ?></li> |
|
9 | + <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> |
|
10 | + <li><?php echo wptexturize(esc_html__('Page and Media Attachment Support', 'auto-load-next-post')); ?></li> |
|
11 | + <li><?php echo wptexturize(esc_html__('Custom Post Type Support', 'auto-load-next-post')); ?></li> |
|
12 | + <li><?php echo wptexturize(esc_html__('Paginated Posts Supported', 'auto-load-next-post')); ?></li> |
|
13 | + <li><?php echo wptexturize(esc_html__('Exclude Post Formats', 'auto-load-next-post')); ?></li> |
|
14 | + <li><?php echo wptexturize(esc_html__('Limit Posts per Session', 'auto-load-next-post')); ?></li> |
|
15 | + <li><?php echo wptexturize(esc_html__('Query Posts by Category and Tag', 'auto-load-next-post')); ?></li> |
|
16 | + <li><?php echo wptexturize(esc_html__('Exclude User Roles and Specific Users', 'auto-load-next-post')); ?></li> |
|
17 | + <li><?php echo wptexturize(esc_html__('Pre-Query Posts Ready to Load', 'auto-load-next-post')); ?></li> |
|
18 | + <li><?php echo wptexturize(esc_html__('Hide Comments and Show by Toggle Button', 'auto-load-next-post')); ?></li> |
|
19 | + <li><?php echo wptexturize(sprintf(esc_html__('Multilingual Support for %1$s and %2$s', 'auto-load-next-post'), 'WPML', 'Polylang')); ?></li> |
|
20 | + <li><?php echo wptexturize(esc_html__('Email Support', 'auto-load-next-post')); ?></li> |
|
21 | 21 | </ul> |
22 | 22 | |
23 | 23 | <p> |
24 | - <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> |
|
24 | + <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> |
|
25 | 25 | </p> |
26 | 26 | |
27 | 27 | </div> |
@@ -29,33 +29,33 @@ discard block |
||
29 | 29 | <div class="block"> |
30 | 30 | <div class="inner-block"> |
31 | 31 | <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"> |
32 | - <h2><?php esc_html_e( 'Sign up to pre-order first', 'auto-load-next-post' ); ?></h2> |
|
32 | + <h2><?php esc_html_e('Sign up to pre-order first', 'auto-load-next-post'); ?></h2> |
|
33 | 33 | |
34 | 34 | <p class="intro"> |
35 | - <?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 10% discount.', 'auto-load-next-post' ) ); ?> |
|
35 | + <?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 10% discount.', 'auto-load-next-post')); ?> |
|
36 | 36 | </p> |
37 | 37 | |
38 | 38 | <div class="field"> |
39 | - <input type="email" name="EMAIL" value="" placeholder="<?php esc_html_e( 'Your Email Address', 'auto-load-next-post' ); ?>"/> |
|
39 | + <input type="email" name="EMAIL" value="" placeholder="<?php esc_html_e('Your Email Address', 'auto-load-next-post'); ?>"/> |
|
40 | 40 | </div> |
41 | 41 | |
42 | 42 | <div class="field"> |
43 | - <input type="text" name="FNAME" value="" placeholder="<?php esc_html_e( 'First Name', 'auto-load-next-post' ); ?>"/> |
|
43 | + <input type="text" name="FNAME" value="" placeholder="<?php esc_html_e('First Name', 'auto-load-next-post'); ?>"/> |
|
44 | 44 | </div> |
45 | 45 | |
46 | 46 | <div class="field"> |
47 | - <input type="text" name="LNAME" value="" placeholder="<?php esc_html_e( 'Last Name', 'auto-load-next-post' ); ?>"/> |
|
47 | + <input type="text" name="LNAME" value="" placeholder="<?php esc_html_e('Last Name', 'auto-load-next-post'); ?>"/> |
|
48 | 48 | </div> |
49 | 49 | |
50 | 50 | <input type="hidden" name="group[35169][1]" value="1"> |
51 | 51 | |
52 | 52 | <div class="field submit-button"> |
53 | 53 | <div style="position: absolute; left: -9999px;" aria-hidden="true"><input type="text" name="b_48ead612ad85b23fe2239c6e3_79e97b5275" tabindex="-1" value=""></div> |
54 | - <input type="submit" name="subscribe" id="mc-embedded-subscribe" class="button" value="<?php esc_html_e( 'Sign me up', 'auto-load-next-post' ); ?>"/> |
|
54 | + <input type="submit" name="subscribe" id="mc-embedded-subscribe" class="button" value="<?php esc_html_e('Sign me up', 'auto-load-next-post'); ?>"/> |
|
55 | 55 | </div> |
56 | 56 | |
57 | 57 | <p class="promise"> |
58 | - <?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' ); ?> |
|
58 | + <?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'); ?> |
|
59 | 59 | </p> |
60 | 60 | |
61 | 61 | </form> |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | </div> |
64 | 64 | |
65 | 65 | <div class="block credits"> |
66 | - <h3><?php esc_html_e( 'Created & maintained by', 'auto-load-next-post' ); ?></h3> |
|
66 | + <h3><?php esc_html_e('Created & maintained by', 'auto-load-next-post'); ?></h3> |
|
67 | 67 | <div class="inner-block"> |
68 | 68 | <ul> |
69 | 69 | <li> |
@@ -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="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( 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,10 +11,10 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // Exit if accessed directly. |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; |
16 | 16 | } |
17 | 17 | ?> |
18 | 18 | <div class="notice notice-error"> |
19 | - <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="' . AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>' ); ?></p> |
|
19 | + <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="'.AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>'); ?></p> |
|
20 | 20 | </div> |
@@ -10,11 +10,11 @@ discard block |
||
10 | 10 | * @license GPL-2.0+ |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! defined('ABSPATH') ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; // Exit if accessed directly. |
15 | 15 | } |
16 | 16 | |
17 | -if ( ! class_exists( 'Auto_Load_Next_Post_Settings_Page' ) ) { |
|
17 | +if ( ! class_exists('Auto_Load_Next_Post_Settings_Page')) { |
|
18 | 18 | |
19 | 19 | abstract class Auto_Load_Next_Post_Settings_Page { |
20 | 20 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @access protected |
25 | 25 | * @var string $id |
26 | 26 | */ |
27 | - protected $id = ''; |
|
27 | + protected $id = ''; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Setting page label. |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | * @since 1.4.10 |
42 | 42 | */ |
43 | 43 | public function __construct() { |
44 | - add_filter( 'auto_load_next_post_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); |
|
45 | - add_action( 'auto_load_next_post_settings_' . $this->id, array( $this, 'output' ) ); |
|
46 | - add_action( 'auto_load_next_post_settings_save_' . $this->id, array( $this, 'save' ) ); |
|
44 | + add_filter('auto_load_next_post_settings_tabs_array', array($this, 'add_settings_page'), 20); |
|
45 | + add_action('auto_load_next_post_settings_'.$this->id, array($this, 'output')); |
|
46 | + add_action('auto_load_next_post_settings_save_'.$this->id, array($this, 'save')); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @param array $pages |
77 | 77 | * @return array $pages |
78 | 78 | */ |
79 | - public function add_settings_page( $pages ) { |
|
79 | + public function add_settings_page($pages) { |
|
80 | 80 | $pages[$this->id] = $this->label; |
81 | 81 | |
82 | 82 | return $pages; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @param array $pages |
91 | 91 | * @return array $pages |
92 | 92 | */ |
93 | - public function add_menu_page( $pages ) { |
|
93 | + public function add_menu_page($pages) { |
|
94 | 94 | $pages[$this->id] = $this->label; |
95 | 95 | |
96 | 96 | return $pages; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | public function output() { |
117 | 117 | $settings = $this->get_settings(); |
118 | 118 | |
119 | - Auto_Load_Next_Post_Admin_Settings::output_fields( $settings ); |
|
119 | + Auto_Load_Next_Post_Admin_Settings::output_fields($settings); |
|
120 | 120 | } // END output() |
121 | 121 | |
122 | 122 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | $settings = $this->get_settings(); |
133 | 133 | |
134 | - Auto_Load_Next_Post_Admin_Settings::save_fields( $settings, $current_tab ); |
|
134 | + Auto_Load_Next_Post_Admin_Settings::save_fields($settings, $current_tab); |
|
135 | 135 | } // END save() |
136 | 136 | |
137 | 137 | } // END class |
@@ -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 | /** |
@@ -42,62 +42,62 @@ discard block |
||
42 | 42 | public function add_help_tabs() { |
43 | 43 | $screen = get_current_screen(); |
44 | 44 | |
45 | - if ( $screen->id != 'settings_page_auto-load-next-post-settings') { |
|
45 | + if ($screen->id != 'settings_page_auto-load-next-post-settings') { |
|
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
49 | - $screen->add_help_tab( array( |
|
49 | + $screen->add_help_tab(array( |
|
50 | 50 | 'id' => 'auto_load_next_post_theme_selectors_tab', |
51 | - 'title' => __( 'Theme Selectors', 'auto-load-next-post' ), |
|
51 | + 'title' => __('Theme Selectors', 'auto-load-next-post'), |
|
52 | 52 | 'content' => |
53 | - '<h2>' . __( 'Theme Selectors', 'auto-load-next-post' ) . '</h2>' . |
|
54 | - '<p>' . sprintf( __( 'Theme Selectors allows %s look for where to load content in, the post being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' . |
|
55 | - '<p>' . sprintf( __( 'When the plugin was activated, default theme selectors are set that match the majority of most WordPress themes. If the active theme supports %1$s then it will set its own theme selectors. If the theme has not declared support for %1$s and posts are not loading, dont worry. It is most likely that at least one of these selectors need to be changed. You may find it to be the <em>Content Container</em>. See more information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="' . AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/find-theme-selectors/">', '</a>' ) . '</p>' . |
|
56 | - '<p>' . sprintf( esc_html__( 'These are the default theme selectors when %s is installed.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' . |
|
57 | - '<h5>' . esc_html__( 'Default Theme Selectors', 'auto-load-next-post' ) . '</h5>' . |
|
58 | - '<ul>' . |
|
59 | - '<li><strong>' . esc_html__( 'Content Container', 'auto-load-next-post' ) . '</strong>' . '<br>main.site-main</li>' . |
|
60 | - '<li><strong>' . esc_html__( 'Post Title', 'auto-load-next-post' ) . '</strong>' . '<br>h1.entry-title</li>' . |
|
61 | - '<li><strong>' . esc_html__( 'Post Navigation', 'auto-load-next-post' ) . '</strong>' . '<br>nav.post-navigation</li>' . |
|
62 | - '<li><strong>' . esc_html__( 'Comments Container', 'auto-load-next-post' ) . '</strong>' . '<br>div#comments</li>' . |
|
53 | + '<h2>'.__('Theme Selectors', 'auto-load-next-post').'</h2>'. |
|
54 | + '<p>'.sprintf(__('Theme Selectors allows %s look for where to load content in, the post being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'. |
|
55 | + '<p>'.sprintf(__('When the plugin was activated, default theme selectors are set that match the majority of most WordPress themes. If the active theme supports %1$s then it will set its own theme selectors. If the theme has not declared support for %1$s and posts are not loading, dont worry. It is most likely that at least one of these selectors need to be changed. You may find it to be the <em>Content Container</em>. See more information on %2$show to find your theme selectors%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/find-theme-selectors/">', '</a>').'</p>'. |
|
56 | + '<p>'.sprintf(esc_html__('These are the default theme selectors when %s is installed.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'. |
|
57 | + '<h5>'.esc_html__('Default Theme Selectors', 'auto-load-next-post').'</h5>'. |
|
58 | + '<ul>'. |
|
59 | + '<li><strong>'.esc_html__('Content Container', 'auto-load-next-post').'</strong>'.'<br>main.site-main</li>'. |
|
60 | + '<li><strong>'.esc_html__('Post Title', 'auto-load-next-post').'</strong>'.'<br>h1.entry-title</li>'. |
|
61 | + '<li><strong>'.esc_html__('Post Navigation', 'auto-load-next-post').'</strong>'.'<br>nav.post-navigation</li>'. |
|
62 | + '<li><strong>'.esc_html__('Comments Container', 'auto-load-next-post').'</strong>'.'<br>div#comments</li>'. |
|
63 | 63 | '</ul>' |
64 | - ) ); |
|
64 | + )); |
|
65 | 65 | |
66 | - $screen->add_help_tab( array( |
|
66 | + $screen->add_help_tab(array( |
|
67 | 67 | 'id' => 'auto_load_next_post_support_tab', |
68 | - 'title' => esc_html__( 'Help & Support', 'auto-load-next-post' ), |
|
68 | + 'title' => esc_html__('Help & Support', 'auto-load-next-post'), |
|
69 | 69 | 'content' => |
70 | - '<h2>' . esc_html__( 'Help & Support', 'auto-load-next-post' ) . '</h2>' . |
|
71 | - '<p>' . sprintf( __( 'Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="' . AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">', '</a>' ) . '</p>' . |
|
72 | - '<p>' . sprintf( __( 'For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="'. AUTO_LOAD_NEXT_POST_SUPPORT_URL . '" target="_blank">', '</a>' ) . '</p> ' . |
|
73 | - '<p>' . sprintf( __( '%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>' ) . '</p>' . |
|
74 | - '<p><a href="' . AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-primary" target="_blank">' . esc_html__( 'Documentation', 'auto-load-next-post' ) . '</a> <a href="'. AUTO_LOAD_NEXT_POST_SUPPORT_URL . '" class="button button-secondary" target="_blank">' . esc_html__( 'Community Forum', 'auto-load-next-post' ) . '</a> <a href="' . AUTO_LOAD_NEXT_POST_STORE_URL . 'f-a-q/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-secondary" target="_blank">' . esc_html__( 'Frequently Asked Questions', 'auto-load-next-post' ) . '</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">' . sprintf( esc_html__( 'Translate %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>' |
|
75 | - ) ); |
|
70 | + '<h2>'.esc_html__('Help & Support', 'auto-load-next-post').'</h2>'. |
|
71 | + '<p>'.sprintf(__('Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">', '</a>').'</p>'. |
|
72 | + '<p>'.sprintf(__('For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.AUTO_LOAD_NEXT_POST_SUPPORT_URL.'" target="_blank">', '</a>').'</p> '. |
|
73 | + '<p>'.sprintf(__('%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>').'</p>'. |
|
74 | + '<p><a href="'.AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-primary" target="_blank">'.esc_html__('Documentation', 'auto-load-next-post').'</a> <a href="'.AUTO_LOAD_NEXT_POST_SUPPORT_URL.'" class="button button-secondary" target="_blank">'.esc_html__('Community Forum', 'auto-load-next-post').'</a> <a href="'.AUTO_LOAD_NEXT_POST_STORE_URL.'f-a-q/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" class="button button-secondary" target="_blank">'.esc_html__('Frequently Asked Questions', 'auto-load-next-post').'</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">'.sprintf(esc_html__('Translate %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>' |
|
75 | + )); |
|
76 | 76 | |
77 | - $screen->add_help_tab( array( |
|
77 | + $screen->add_help_tab(array( |
|
78 | 78 | 'id' => 'auto_load_next_post_bugs_tab', |
79 | - 'title' => esc_html__( 'Found a bug?', 'auto-load-next-post' ), |
|
79 | + 'title' => esc_html__('Found a bug?', 'auto-load-next-post'), |
|
80 | 80 | 'content' => |
81 | - '<h2>' . esc_html__( 'Found a bug?', 'auto-load-next-post' ) . '</h2>' . |
|
82 | - '<p>' . sprintf( __( 'If you find a bug within %1$s, please %2$sreport the issue%4$s by creating a ticket on the GitHub repository where I can deal with it more appropriately. Please ensure that you have read the %3$sguidelines to contributing%4$s prior to submitting your report. To help me solve the issue, please be as descriptive as possible.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" target="_blank">', '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>' ) . '</p>' . |
|
83 | - '<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" class="button button-primary" target="_blank">' . esc_html__( 'Report an Issue', 'auto-load-next-post' ) . '</a></p>' |
|
84 | - ) ); |
|
81 | + '<h2>'.esc_html__('Found a bug?', 'auto-load-next-post').'</h2>'. |
|
82 | + '<p>'.sprintf(__('If you find a bug within %1$s, please %2$sreport the issue%4$s by creating a ticket on the GitHub repository where I can deal with it more appropriately. Please ensure that you have read the %3$sguidelines to contributing%4$s prior to submitting your report. To help me solve the issue, please be as descriptive as possible.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" target="_blank">', '<a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>').'</p>'. |
|
83 | + '<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/issues?state=open" class="button button-primary" target="_blank">'.esc_html__('Report an Issue', 'auto-load-next-post').'</a></p>' |
|
84 | + )); |
|
85 | 85 | |
86 | 86 | $screen->add_help_tab(array( |
87 | 87 | 'id' => 'auto_load_next_post_feedback_tab', |
88 | - 'title' => esc_html__( 'Feedback', 'auto-load-next-post' ), |
|
88 | + 'title' => esc_html__('Feedback', 'auto-load-next-post'), |
|
89 | 89 | 'content' => |
90 | - '<h2>' . esc_html__( 'Feedback', 'auto-load-next-post' ) . '</h2>' . |
|
91 | - '<p>' . esc_html__( 'Your feedback is very important to me. Please consider leaving a review on WordPress.org or complete a simple survey.', 'auto-load-next-post' ) . '</p>' . |
|
92 | - '<p>' . sprintf( __( 'If %1$s has worked out for you well and you like it, please consider %2$smaking a donation%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://www.buymeacoffee.com/sebastien" target="_blank">', '</a>' ) . '</p>'. |
|
93 | - '<p><a href="' . AUTO_LOAD_NEXT_POST_REVIEW_URL . '?filter=5#postform" class="button button-primary" target="_blank">' . esc_html__( 'Submit a Review', 'auto-load-next-post' ) . '</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdzxlvnXRBIw8gqI7Z2O-HzYtncpGjDkLjlaeZLVsfrR61FNA/viewform?usp=sf_link" class="button button-secondary" target="_blank">' . esc_html__( 'Complete a Simple Survey', 'auto-load-next-post' ) . '</a> <a href="https://www.buymeacoffee.com/sebastien" class="button button-secondary" target="_blank">' . esc_html__( 'Make a Donation', 'auto-load-next-post' ) . '</a></p>' |
|
94 | - ) ); |
|
90 | + '<h2>'.esc_html__('Feedback', 'auto-load-next-post').'</h2>'. |
|
91 | + '<p>'.esc_html__('Your feedback is very important to me. Please consider leaving a review on WordPress.org or complete a simple survey.', 'auto-load-next-post').'</p>'. |
|
92 | + '<p>'.sprintf(__('If %1$s has worked out for you well and you like it, please consider %2$smaking a donation%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://www.buymeacoffee.com/sebastien" target="_blank">', '</a>').'</p>'. |
|
93 | + '<p><a href="'.AUTO_LOAD_NEXT_POST_REVIEW_URL.'?filter=5#postform" class="button button-primary" target="_blank">'.esc_html__('Submit a Review', 'auto-load-next-post').'</a> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdzxlvnXRBIw8gqI7Z2O-HzYtncpGjDkLjlaeZLVsfrR61FNA/viewform?usp=sf_link" class="button button-secondary" target="_blank">'.esc_html__('Complete a Simple Survey', 'auto-load-next-post').'</a> <a href="https://www.buymeacoffee.com/sebastien" class="button button-secondary" target="_blank">'.esc_html__('Make a Donation', 'auto-load-next-post').'</a></p>' |
|
94 | + )); |
|
95 | 95 | |
96 | 96 | $screen->set_help_sidebar( |
97 | - '<p><strong>' . esc_html__( 'For more information:', 'auto-load-next-post' ) . '</strong></p>' . |
|
98 | - '<p><a href="' . 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>' . |
|
99 | - '<p><a href="https://wordpress.org/plugins/auto-load-next-post/" target="_blank">' . esc_html__( 'WordPress.org Project', 'auto-load-next-post' ) . '</a></p>' . |
|
100 | - '<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/" target="_blank">' . esc_html__( 'GitHub Project', 'auto-load-next-post' ) . '</a></p>' |
|
97 | + '<p><strong>'.esc_html__('For more information:', 'auto-load-next-post').'</strong></p>'. |
|
98 | + '<p><a href="'.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>'. |
|
99 | + '<p><a href="https://wordpress.org/plugins/auto-load-next-post/" target="_blank">'.esc_html__('WordPress.org Project', 'auto-load-next-post').'</a></p>'. |
|
100 | + '<p><a href="https://github.com/AutoLoadNextPost/Auto-Load-Next-Post/" target="_blank">'.esc_html__('GitHub Project', 'auto-load-next-post').'</a></p>' |
|
101 | 101 | ); |
102 | 102 | |
103 | 103 | } // END add_help_tabs() |
@@ -12,16 +12,16 @@ 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 | |
19 | 19 | // Exit if WP_Customize_Control does not exsist. |
20 | -if ( ! class_exists( 'WP_Customize_Control' ) ) { |
|
20 | +if ( ! class_exists('WP_Customize_Control')) { |
|
21 | 21 | return null; |
22 | 22 | } |
23 | 23 | |
24 | -if ( !class_exists( 'Auto_Load_Next_Post_Pro_Preview_Controller' ) ) { |
|
24 | +if ( ! class_exists('Auto_Load_Next_Post_Pro_Preview_Controller')) { |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * The 'alnp_pro_preview' for Auto Load Next Post Pro control class. |
@@ -45,39 +45,39 @@ discard block |
||
45 | 45 | <span class="customize-control-title"><?php echo $this->label; ?></span> |
46 | 46 | |
47 | 47 | <p> |
48 | - <?php printf( esc_html__( '%1$s is coming soon and will come with more powerful features. Here are just a few of them you can look forward to.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ) ); ?> |
|
48 | + <?php printf(esc_html__('%1$s is coming soon and will come with more powerful features. Here are just a few of them you can look forward to.', 'auto-load-next-post'), esc_html__('Auto Load Next Post Pro', 'auto-load-next-post')); ?> |
|
49 | 49 | </p> |
50 | 50 | |
51 | 51 | <ul style="list-style: disc; margin-left: 1em;"> |
52 | - <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> |
|
53 | - <li><?php echo wptexturize( esc_html__( 'Page and Media Attachment Support', 'auto-load-next-post' ) ); ?></li> |
|
54 | - <li><?php echo wptexturize( esc_html__( 'Custom Post Type Support', 'auto-load-next-post' ) ); ?></li> |
|
55 | - <li><?php echo wptexturize( esc_html__( 'Paginated Posts Supported', 'auto-load-next-post' ) ); ?></li> |
|
56 | - <li><?php echo wptexturize( esc_html__( 'Exclude Post Formats', 'auto-load-next-post' ) ); ?></li> |
|
57 | - <li><?php echo wptexturize( esc_html__( 'Limit Posts per Session', 'auto-load-next-post' ) ); ?></li> |
|
58 | - <li><?php echo wptexturize( esc_html__( 'Query Posts by Category and Tag', 'auto-load-next-post' ) ); ?></li> |
|
59 | - <li><?php echo wptexturize( esc_html__( 'Exclude User Roles and Specific Users', 'auto-load-next-post' ) ); ?></li> |
|
60 | - <li><?php echo wptexturize( esc_html__( 'Pre-Query Posts Ready to Load', 'auto-load-next-post' ) ); ?></li> |
|
61 | - <li><?php echo wptexturize( esc_html__( 'Hide Comments and Show by Toggle Button', 'auto-load-next-post' ) ); ?></li> |
|
62 | - <li><?php echo wptexturize( sprintf( esc_html__( 'Multilingual Support for %1$s and %2$s', 'auto-load-next-post' ), 'WPML', 'Polylang' ) ); ?></li> |
|
63 | - <li><?php echo wptexturize( esc_html__( 'Email Support', 'auto-load-next-post' ) ); ?></li> |
|
52 | + <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> |
|
53 | + <li><?php echo wptexturize(esc_html__('Page and Media Attachment Support', 'auto-load-next-post')); ?></li> |
|
54 | + <li><?php echo wptexturize(esc_html__('Custom Post Type Support', 'auto-load-next-post')); ?></li> |
|
55 | + <li><?php echo wptexturize(esc_html__('Paginated Posts Supported', 'auto-load-next-post')); ?></li> |
|
56 | + <li><?php echo wptexturize(esc_html__('Exclude Post Formats', 'auto-load-next-post')); ?></li> |
|
57 | + <li><?php echo wptexturize(esc_html__('Limit Posts per Session', 'auto-load-next-post')); ?></li> |
|
58 | + <li><?php echo wptexturize(esc_html__('Query Posts by Category and Tag', 'auto-load-next-post')); ?></li> |
|
59 | + <li><?php echo wptexturize(esc_html__('Exclude User Roles and Specific Users', 'auto-load-next-post')); ?></li> |
|
60 | + <li><?php echo wptexturize(esc_html__('Pre-Query Posts Ready to Load', 'auto-load-next-post')); ?></li> |
|
61 | + <li><?php echo wptexturize(esc_html__('Hide Comments and Show by Toggle Button', 'auto-load-next-post')); ?></li> |
|
62 | + <li><?php echo wptexturize(sprintf(esc_html__('Multilingual Support for %1$s and %2$s', 'auto-load-next-post'), 'WPML', 'Polylang')); ?></li> |
|
63 | + <li><?php echo wptexturize(esc_html__('Email Support', 'auto-load-next-post')); ?></li> |
|
64 | 64 | </ul> |
65 | 65 | |
66 | 66 | <p> |
67 | - <?php printf( esc_html__( 'Find out more about %1$s%2$s%3$s.', 'auto-load-next-post'), '<a target="_blank" href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'pro/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ), '</a>' ); ?> |
|
67 | + <?php printf(esc_html__('Find out more about %1$s%2$s%3$s.', 'auto-load-next-post'), '<a target="_blank" href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'pro/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview').'">', esc_html__('Auto Load Next Post Pro', 'auto-load-next-post'), '</a>'); ?> |
|
68 | 68 | </p> |
69 | 69 | |
70 | - <span class="customize-control-title"><?php printf( esc_html__( 'Add-ons for %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></span> |
|
70 | + <span class="customize-control-title"><?php printf(esc_html__('Add-ons for %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></span> |
|
71 | 71 | |
72 | 72 | <p> |
73 | - <?php printf( esc_html__( 'Add-ons available provide additional support or options for %1$s. %2$sCheck out the add-ons%3$s to see what is available.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a target="_blank" href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'add-ons/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', '</a>' ); ?> |
|
73 | + <?php printf(esc_html__('Add-ons available provide additional support or options for %1$s. %2$sCheck out the add-ons%3$s to see what is available.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a target="_blank" href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'add-ons/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview').'">', '</a>'); ?> |
|
74 | 74 | </p> |
75 | 75 | |
76 | - <span class="customize-control-title"><?php printf( esc_html__( 'Enjoying %s?', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></span> |
|
76 | + <span class="customize-control-title"><?php printf(esc_html__('Enjoying %s?', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></span> |
|
77 | 77 | |
78 | 78 | <div class="notice inline notice-info"> |
79 | 79 | <p> |
80 | - <?php printf( esc_html__( 'Why not leave me a review on %1$sWordPress.org%2$s? I\'d really appreciate it!', 'auto-load-next-post' ), '<a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?filter=5#postform">', '</a>' ); ?> |
|
80 | + <?php printf(esc_html__('Why not leave me a review on %1$sWordPress.org%2$s? I\'d really appreciate it!', 'auto-load-next-post'), '<a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?filter=5#postform">', '</a>'); ?> |
|
81 | 81 | </p> |
82 | 82 | </div> |
83 | 83 | <?php |
@@ -11,11 +11,11 @@ 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 | -if ( ! class_exists( 'Auto_Load_Next_Post_Admin' ) ) { |
|
18 | +if ( ! class_exists('Auto_Load_Next_Post_Admin')) { |
|
19 | 19 | |
20 | 20 | class Auto_Load_Next_Post_Admin { |
21 | 21 | |
@@ -28,23 +28,23 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function __construct() { |
30 | 30 | // Include classes. |
31 | - add_action( 'admin_init', array( $this, 'includes' ), 10 ); |
|
31 | + add_action('admin_init', array($this, 'includes'), 10); |
|
32 | 32 | |
33 | 33 | // Register scripts and styles for settings page. |
34 | - add_action( 'admin_enqueue_scripts', array( $this, 'admin_styles' ), 10 ); |
|
35 | - add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 10 ); |
|
34 | + add_action('admin_enqueue_scripts', array($this, 'admin_styles'), 10); |
|
35 | + add_action('admin_enqueue_scripts', array($this, 'admin_scripts'), 10); |
|
36 | 36 | |
37 | 37 | // Add a message in the WP Privacy Policy Guide page. |
38 | - add_action( 'admin_init', array( $this, 'add_privacy_policy_guide_content' ) ); |
|
38 | + add_action('admin_init', array($this, 'add_privacy_policy_guide_content')); |
|
39 | 39 | |
40 | 40 | // Add settings page. |
41 | - add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 ); |
|
41 | + add_action('admin_menu', array($this, 'admin_menu'), 9); |
|
42 | 42 | |
43 | 43 | // Filters |
44 | - add_filter( 'plugin_action_links_' . plugin_basename( AUTO_LOAD_NEXT_POST_FILE ), array( $this, 'plugin_action_links' ) ); |
|
45 | - add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta'), 10, 3 ); |
|
46 | - add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ) ); |
|
47 | - add_filter( 'update_footer', array( $this, 'update_footer'), 15 ); |
|
44 | + add_filter('plugin_action_links_'.plugin_basename(AUTO_LOAD_NEXT_POST_FILE), array($this, 'plugin_action_links')); |
|
45 | + add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 3); |
|
46 | + add_filter('admin_footer_text', array($this, 'admin_footer_text')); |
|
47 | + add_filter('update_footer', array($this, 'update_footer'), 15); |
|
48 | 48 | } // END __construct() |
49 | 49 | |
50 | 50 | /** |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function includes() { |
57 | 57 | // Classes we only need if the ajax is not-ajax |
58 | - if ( ! auto_load_next_post_is_ajax() ) { |
|
59 | - include( dirname( __FILE__ ) . '/class-alnp-admin-notices.php' ); // Plugin Notices |
|
60 | - include( dirname( __FILE__ ) . '/class-alnp-admin-help.php' ); // Plugin Help Tab |
|
58 | + if ( ! auto_load_next_post_is_ajax()) { |
|
59 | + include(dirname(__FILE__).'/class-alnp-admin-notices.php'); // Plugin Notices |
|
60 | + include(dirname(__FILE__).'/class-alnp-admin-help.php'); // Plugin Help Tab |
|
61 | 61 | } |
62 | 62 | } // END includes() |
63 | 63 | |
@@ -74,16 +74,16 @@ discard block |
||
74 | 74 | $screen = get_current_screen(); |
75 | 75 | $screen_id = $screen ? $screen->id : ''; |
76 | 76 | |
77 | - Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_admin', '/assets/css/admin/auto-load-next-post' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.css' ); |
|
77 | + Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_admin', '/assets/css/admin/auto-load-next-post'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.css'); |
|
78 | 78 | |
79 | - if ( $screen->id == 'settings_page_auto-load-next-post-settings' ) { |
|
79 | + if ($screen->id == 'settings_page_auto-load-next-post-settings') { |
|
80 | 80 | // Select2 - Make sure that we remove other registered Select2 to prevent styling issues. |
81 | - if ( wp_script_is( 'select2', 'registered' ) ) { |
|
82 | - wp_dequeue_style( 'select2' ); |
|
83 | - wp_deregister_style( 'select2' ); |
|
81 | + if (wp_script_is('select2', 'registered')) { |
|
82 | + wp_dequeue_style('select2'); |
|
83 | + wp_deregister_style('select2'); |
|
84 | 84 | } |
85 | 85 | |
86 | - Auto_Load_Next_Post::load_file( 'select2', '/assets/css/libs/select2' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.css' ); |
|
86 | + Auto_Load_Next_Post::load_file('select2', '/assets/css/libs/select2'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.css'); |
|
87 | 87 | } |
88 | 88 | } // END admin_styles() |
89 | 89 | |
@@ -98,24 +98,24 @@ discard block |
||
98 | 98 | $screen = get_current_screen(); |
99 | 99 | $screen_id = $screen ? $screen->id : ''; |
100 | 100 | |
101 | - if ( $screen->id == 'settings_page_auto-load-next-post-settings' ) { |
|
101 | + if ($screen->id == 'settings_page_auto-load-next-post-settings') { |
|
102 | 102 | // Select2 - Make sure that we remove other registered Select2 to prevent plugin conflict issues. |
103 | - if ( wp_script_is( 'select2', 'registered' ) ) { |
|
104 | - wp_dequeue_script( 'select2' ); |
|
105 | - wp_deregister_script( 'select2' ); |
|
103 | + if (wp_script_is('select2', 'registered')) { |
|
104 | + wp_dequeue_script('select2'); |
|
105 | + wp_deregister_script('select2'); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | // Load Select2 |
109 | - Auto_Load_Next_Post::load_file( 'select2', '/assets/js/libs/select2' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array( 'jquery' ), '4.0.5', true ); |
|
109 | + Auto_Load_Next_Post::load_file('select2', '/assets/js/libs/select2'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), '4.0.5', true); |
|
110 | 110 | |
111 | 111 | // Load plugin settings. |
112 | - Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_admin', '/assets/js/admin/settings' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array( 'jquery' ), AUTO_LOAD_NEXT_POST_VERSION, true ); |
|
112 | + Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_admin', '/assets/js/admin/settings'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION, true); |
|
113 | 113 | |
114 | 114 | // Variables for Admin JavaScripts |
115 | - wp_localize_script( AUTO_LOAD_NEXT_POST_SLUG . '_admin', 'alnp_settings_params', array( |
|
115 | + wp_localize_script(AUTO_LOAD_NEXT_POST_SLUG.'_admin', 'alnp_settings_params', array( |
|
116 | 116 | 'is_rtl' => is_rtl() ? 'rtl' : 'ltr', |
117 | - 'i18n_nav_warning' => esc_html__( 'The changes you made will be lost if you navigate away from this page.', 'auto-load-next-post' ), |
|
118 | - ) ); |
|
117 | + 'i18n_nav_warning' => esc_html__('The changes you made will be lost if you navigate away from this page.', 'auto-load-next-post'), |
|
118 | + )); |
|
119 | 119 | } |
120 | 120 | } // END admin_scripts() |
121 | 121 | |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | * @static |
128 | 128 | */ |
129 | 129 | public static function add_privacy_policy_guide_content() { |
130 | - if ( function_exists( 'wp_add_privacy_policy_content' ) ) { |
|
131 | - wp_add_privacy_policy_content( esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), self::get_privacy_policy_guide_message() ); |
|
130 | + if (function_exists('wp_add_privacy_policy_content')) { |
|
131 | + wp_add_privacy_policy_content(esc_html__('Auto Load Next Post', 'auto-load-next-post'), self::get_privacy_policy_guide_message()); |
|
132 | 132 | } |
133 | 133 | } // END add_privacy_policy_guide_content() |
134 | 134 | |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | protected static function get_privacy_policy_guide_message() { |
144 | 144 | $content = ' |
145 | 145 | <div contenteditable="false">' . |
146 | - '<p class="wp-policy-help">' . |
|
147 | - sprintf( __( '%s does not collect, store or share any personal data.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . |
|
148 | - '</p>' . |
|
146 | + '<p class="wp-policy-help">'. |
|
147 | + sprintf(__('%s does not collect, store or share any personal data.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')). |
|
148 | + '</p>'. |
|
149 | 149 | '</div>'; |
150 | 150 | |
151 | 151 | return $content; |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function admin_menu() { |
162 | 162 | $settings_page = add_options_page( |
163 | - sprintf( __( '%s Settings', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ), |
|
164 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), |
|
163 | + sprintf(__('%s Settings', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')), |
|
164 | + esc_html__('Auto Load Next Post', 'auto-load-next-post'), |
|
165 | 165 | 'manage_options', |
166 | 166 | 'auto-load-next-post-settings', |
167 | - array( $this, 'settings_page' ) |
|
167 | + array($this, 'settings_page') |
|
168 | 168 | ); |
169 | 169 | |
170 | - add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) ); |
|
170 | + add_action('load-'.$settings_page, array($this, 'settings_page_init')); |
|
171 | 171 | } // END admin_menu() |
172 | 172 | |
173 | 173 | /** |
@@ -182,29 +182,29 @@ discard block |
||
182 | 182 | global $current_tab, $current_section; |
183 | 183 | |
184 | 184 | // Include settings pages. |
185 | - include_once( dirname( __FILE__ ) . '/class-alnp-admin-settings.php' ); |
|
185 | + include_once(dirname(__FILE__).'/class-alnp-admin-settings.php'); |
|
186 | 186 | |
187 | 187 | Auto_Load_Next_Post_Admin_Settings::get_settings_pages(); |
188 | 188 | |
189 | 189 | // Get current tab/section. |
190 | - $current_tab = empty( $_GET['tab'] ) ? 'theme-selectors' : sanitize_title( wp_unslash( $_GET['tab'] ) ); |
|
191 | - $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( wp_unslash( $_REQUEST['section'] ) ); |
|
190 | + $current_tab = empty($_GET['tab']) ? 'theme-selectors' : sanitize_title(wp_unslash($_GET['tab'])); |
|
191 | + $current_section = empty($_REQUEST['section']) ? '' : sanitize_title(wp_unslash($_REQUEST['section'])); |
|
192 | 192 | |
193 | 193 | // Save settings if data has been posted. |
194 | - if ( apply_filters( '' !== $current_section ? "auto_load_next_post_save_settings_{$current_tab}_{$current_section}" : "auto_load_next_post_save_settings_{$current_tab}", ! empty( $_POST ) ) ) { |
|
194 | + if (apply_filters('' !== $current_section ? "auto_load_next_post_save_settings_{$current_tab}_{$current_section}" : "auto_load_next_post_save_settings_{$current_tab}", ! empty($_POST))) { |
|
195 | 195 | Auto_Load_Next_Post_Admin_Settings::save(); |
196 | 196 | } |
197 | 197 | |
198 | 198 | // Add any posted messages. |
199 | - if ( ! empty( $_GET['auto_load_next_post_error'] ) ) { |
|
200 | - Auto_Load_Next_Post_Admin_Settings::add_error( wp_kses_post( wp_unslash( $_GET['auto_load_next_post_error'] ) ) ); |
|
199 | + if ( ! empty($_GET['auto_load_next_post_error'])) { |
|
200 | + Auto_Load_Next_Post_Admin_Settings::add_error(wp_kses_post(wp_unslash($_GET['auto_load_next_post_error']))); |
|
201 | 201 | } |
202 | 202 | |
203 | - if ( ! empty( $_GET['auto_load_next_post_message'] ) ) { |
|
204 | - Auto_Load_Next_Post_Admin_Settings::add_message( wp_kses_post( wp_unslash( $_GET['auto_load_next_post_message'] ) ) ); |
|
203 | + if ( ! empty($_GET['auto_load_next_post_message'])) { |
|
204 | + Auto_Load_Next_Post_Admin_Settings::add_message(wp_kses_post(wp_unslash($_GET['auto_load_next_post_message']))); |
|
205 | 205 | } |
206 | 206 | |
207 | - do_action( 'auto_load_next_post_settings_page_init' ); |
|
207 | + do_action('auto_load_next_post_settings_page_init'); |
|
208 | 208 | } // END settings_page_init() |
209 | 209 | |
210 | 210 | /** |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * @since 1.0.0 |
215 | 215 | */ |
216 | 216 | public function settings_page() { |
217 | - include_once( dirname( __FILE__ ) . '/class-alnp-admin-settings.php' ); |
|
217 | + include_once(dirname(__FILE__).'/class-alnp-admin-settings.php'); |
|
218 | 218 | |
219 | 219 | Auto_Load_Next_Post_Admin_Settings::output(); |
220 | 220 | } // END settings_page() |
@@ -228,18 +228,18 @@ discard block |
||
228 | 228 | * @param array $links |
229 | 229 | * @return array $links |
230 | 230 | */ |
231 | - public function plugin_action_links( $links ) { |
|
231 | + public function plugin_action_links($links) { |
|
232 | 232 | $plugin_action_links = array(); |
233 | 233 | |
234 | - if ( current_user_can( 'manage_options' ) ) { |
|
234 | + if (current_user_can('manage_options')) { |
|
235 | 235 | // Checks if Auto Load Next Post Pro has been installed. |
236 | - if ( ! is_alnp_pro_version_installed() ) { |
|
237 | - $plugin_action_links['go-pro'] = '<a href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'pro/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page' ) . '" aria-label="' . esc_attr__( 'Sign up for Auto Load Next Post Pro', 'auto-load-next-post' ) . '" target="_blank" style="color:green; font-weight:bold;">' . __( 'Sign up for Pro', 'auto-load-next-post' ) . '</a>'; |
|
236 | + if ( ! is_alnp_pro_version_installed()) { |
|
237 | + $plugin_action_links['go-pro'] = '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'pro/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page').'" aria-label="'.esc_attr__('Sign up for Auto Load Next Post Pro', 'auto-load-next-post').'" target="_blank" style="color:green; font-weight:bold;">'.__('Sign up for Pro', 'auto-load-next-post').'</a>'; |
|
238 | 238 | } |
239 | 239 | |
240 | - $plugin_action_links['settings'] = '<a href="' . admin_url( 'options-general.php?page=auto-load-next-post-settings' ) . '" aria-label="' . esc_attr__( 'View Auto Load Next Post settings', 'auto-load-next-post' ) . '">' . __( 'Settings', 'auto-load-next-post' ) . '</a>'; |
|
240 | + $plugin_action_links['settings'] = '<a href="'.admin_url('options-general.php?page=auto-load-next-post-settings').'" aria-label="'.esc_attr__('View Auto Load Next Post settings', 'auto-load-next-post').'">'.__('Settings', 'auto-load-next-post').'</a>'; |
|
241 | 241 | |
242 | - return array_merge( $plugin_action_links, $links ); |
|
242 | + return array_merge($plugin_action_links, $links); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | return $links; |
@@ -256,17 +256,17 @@ discard block |
||
256 | 256 | * @param array $data Plugin Information |
257 | 257 | * @return array $links |
258 | 258 | */ |
259 | - public function plugin_row_meta( $links, $file, $data ) { |
|
260 | - if ( $file == plugin_basename( AUTO_LOAD_NEXT_POST_FILE ) ) { |
|
261 | - $links[ 1 ] = sprintf( __( 'Developed By %s', 'auto-load-next-post' ), '<a href="' . $data[ 'AuthorURI' ] . '" aria-label="' . esc_attr__( 'View the developers site', 'auto-load-next-post' ) . '">' . $data[ 'Author' ] . '</a>' ); |
|
259 | + public function plugin_row_meta($links, $file, $data) { |
|
260 | + if ($file == plugin_basename(AUTO_LOAD_NEXT_POST_FILE)) { |
|
261 | + $links[1] = sprintf(__('Developed By %s', 'auto-load-next-post'), '<a href="'.$data['AuthorURI'].'" aria-label="'.esc_attr__('View the developers site', 'auto-load-next-post').'">'.$data['Author'].'</a>'); |
|
262 | 262 | |
263 | 263 | $row_meta = array( |
264 | - 'docs' => '<a href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page' ) . '" aria-label="' . esc_attr__( 'View Auto Load Next Post documentation', 'auto-load-next-post' ) . '" target="_blank">' . esc_attr__( 'Documentation', 'auto-load-next-post' ) . '</a>', |
|
265 | - 'community' => '<a href="' . esc_url( 'https://wordpress.org/support/plugin/auto-load-next-post' ) . '" aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">' . esc_attr__( 'Community Support', 'auto-load-next-post' ) . '</a>', |
|
266 | - 'theme-support' => '<a href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'product/theme-support/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page' ) . '" attr-label="' . esc_attr__( 'Get theme support', 'auto-load-next-post' ) . '" target="_blank">' . esc_attr__( 'Theme Support', 'auto-load-next-post' ) . '</a>', |
|
264 | + 'docs' => '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page').'" aria-label="'.esc_attr__('View Auto Load Next Post documentation', 'auto-load-next-post').'" target="_blank">'.esc_attr__('Documentation', 'auto-load-next-post').'</a>', |
|
265 | + 'community' => '<a href="'.esc_url('https://wordpress.org/support/plugin/auto-load-next-post').'" aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">'.esc_attr__('Community Support', 'auto-load-next-post').'</a>', |
|
266 | + 'theme-support' => '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'product/theme-support/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page').'" attr-label="'.esc_attr__('Get theme support', 'auto-load-next-post').'" target="_blank">'.esc_attr__('Theme Support', 'auto-load-next-post').'</a>', |
|
267 | 267 | ); |
268 | 268 | |
269 | - $links = array_merge( $links, $row_meta ); |
|
269 | + $links = array_merge($links, $row_meta); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | return $links; |
@@ -282,16 +282,16 @@ discard block |
||
282 | 282 | * @param string $text |
283 | 283 | * @return string $text |
284 | 284 | */ |
285 | - public function admin_footer_text( $text ) { |
|
285 | + public function admin_footer_text($text) { |
|
286 | 286 | $current_screen = get_current_screen(); |
287 | 287 | |
288 | - if ( isset( $current_screen->id ) && $current_screen->id == 'settings_page_auto-load-next-post-settings' ) { |
|
288 | + if (isset($current_screen->id) && $current_screen->id == 'settings_page_auto-load-next-post-settings') { |
|
289 | 289 | // Rating and Review |
290 | 290 | return sprintf( |
291 | 291 | /* translators: 1: Auto Load Next Post 2:: five stars */ |
292 | - __( 'If you like %1$s, please leave a %2$s rating. A huge thank you in advance!', 'auto-load-next-post' ), |
|
293 | - sprintf( '<strong>%1$s</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ), |
|
294 | - '<a href="' . AUTO_LOAD_NEXT_POST_REVIEW_URL . '?rate=5#new-post" target="_blank" data-rated="' . esc_attr__( 'Thanks :)', 'auto-load-next-post' ) . '">★★★★★</a>' |
|
292 | + __('If you like %1$s, please leave a %2$s rating. A huge thank you in advance!', 'auto-load-next-post'), |
|
293 | + sprintf('<strong>%1$s</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')), |
|
294 | + '<a href="'.AUTO_LOAD_NEXT_POST_REVIEW_URL.'?rate=5#new-post" target="_blank" data-rated="'.esc_attr__('Thanks :)', 'auto-load-next-post').'">★★★★★</a>' |
|
295 | 295 | ); |
296 | 296 | } |
297 | 297 | |
@@ -308,11 +308,11 @@ discard block |
||
308 | 308 | * @param string $text |
309 | 309 | * @return string $text |
310 | 310 | */ |
311 | - public function update_footer( $text ) { |
|
311 | + public function update_footer($text) { |
|
312 | 312 | $screen = get_current_screen(); |
313 | 313 | |
314 | - if ( $screen->id == 'settings_page_auto-load-next-post-settings' ) { |
|
315 | - return '<p class="alignright">' . sprintf( __( '%s Version', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . ' ' . esc_attr( AUTO_LOAD_NEXT_POST_VERSION ) . '</p>'; |
|
314 | + if ($screen->id == 'settings_page_auto-load-next-post-settings') { |
|
315 | + return '<p class="alignright">'.sprintf(__('%s Version', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).' '.esc_attr(AUTO_LOAD_NEXT_POST_VERSION).'</p>'; |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | return $text; |
@@ -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 | |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | function alnp_include_theme_support() { |
44 | 44 | $themes_supported = alnp_themes_supported(); |
45 | 45 | |
46 | - if ( is_alnp_active_theme( $themes_supported ) ) { |
|
47 | - foreach( $themes_supported as $theme ) { |
|
48 | - if ( get_template() == $theme ) { |
|
49 | - include_once( dirname( __FILE__ ) . '/theme-support/class-alnp-' . $theme . '.php' ); |
|
46 | + if (is_alnp_active_theme($themes_supported)) { |
|
47 | + foreach ($themes_supported as $theme) { |
|
48 | + if (get_template() == $theme) { |
|
49 | + include_once(dirname(__FILE__).'/theme-support/class-alnp-'.$theme.'.php'); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | - include_once( dirname( __FILE__ ) . '/theme-support/class-alnp-theme-support.php' ); |
|
54 | + include_once(dirname(__FILE__).'/theme-support/class-alnp-theme-support.php'); |
|
55 | 55 | } // END alnp_include_theme_support() |
@@ -11,11 +11,11 @@ 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 | -if ( ! class_exists( 'Auto_Load_Next_Post_Settings_Misc_Tab' ) ) { |
|
18 | +if ( ! class_exists('Auto_Load_Next_Post_Settings_Misc_Tab')) { |
|
19 | 19 | |
20 | 20 | class Auto_Load_Next_Post_Settings_Misc_Tab extends Auto_Load_Next_Post_Settings_Page { |
21 | 21 | |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function __construct() { |
32 | 32 | $this->id = 'misc'; |
33 | - $this->label = esc_html__( 'Misc', 'auto-load-next-post' ); |
|
33 | + $this->label = esc_html__('Misc', 'auto-load-next-post'); |
|
34 | 34 | |
35 | 35 | parent::__construct(); |
36 | 36 | |
37 | - add_filter( 'auto_load_next_post_mist_settings', array( __CLASS__, 'lock_js_in_footer' ), 0, 1 ); |
|
38 | - add_action( 'auto_load_next_post_sections_misc', array( __CLASS__, 'no_comment_selector_set' ), 10 ); |
|
37 | + add_filter('auto_load_next_post_mist_settings', array(__CLASS__, 'lock_js_in_footer'), 0, 1); |
|
38 | + add_action('auto_load_next_post_sections_misc', array(__CLASS__, 'no_comment_selector_set'), 10); |
|
39 | 39 | } // END __construct() |
40 | 40 | |
41 | 41 | /** |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | * @since 1.5.0 |
47 | 47 | */ |
48 | 48 | public static function no_comment_selector_set() { |
49 | - $comments_container = get_option( 'auto_load_next_post_comments_container' ); |
|
50 | - $remove_comments = get_option( 'auto_load_next_post_remove_comments' ); |
|
49 | + $comments_container = get_option('auto_load_next_post_comments_container'); |
|
50 | + $remove_comments = get_option('auto_load_next_post_remove_comments'); |
|
51 | 51 | |
52 | - if ( empty( $comments_container ) && ! empty( $remove_comments ) ) { |
|
53 | - include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-no-comment-selector.php' ); |
|
52 | + if (empty($comments_container) && ! empty($remove_comments)) { |
|
53 | + include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-no-comment-selector.php'); |
|
54 | 54 | } |
55 | 55 | } // END no_comment_selector_set() |
56 | 56 | |
@@ -66,19 +66,19 @@ discard block |
||
66 | 66 | * @param array $settings |
67 | 67 | * @return array $settings |
68 | 68 | */ |
69 | - public static function lock_js_in_footer( $settings ) { |
|
70 | - $js_locked_in_footer = get_option( 'auto_load_next_post_lock_js_in_footer' ); |
|
69 | + public static function lock_js_in_footer($settings) { |
|
70 | + $js_locked_in_footer = get_option('auto_load_next_post_lock_js_in_footer'); |
|
71 | 71 | |
72 | - if ( !empty( $js_locked_in_footer ) && $js_locked_in_footer == 'yes' ) { |
|
72 | + if ( ! empty($js_locked_in_footer) && $js_locked_in_footer == 'yes') { |
|
73 | 73 | // Setting key to look for. |
74 | 74 | $key = 'load_js_in_footer'; |
75 | 75 | |
76 | 76 | // Find the setting. |
77 | - $find_setting = array_search( $key, $settings ); |
|
77 | + $find_setting = array_search($key, $settings); |
|
78 | 78 | |
79 | 79 | // Does the setting exist? |
80 | - if ( is_bool( $find_setting ) === true ) { |
|
81 | - unset( $settings[$key] ); |
|
80 | + if (is_bool($find_setting) === true) { |
|
81 | + unset($settings[$key]); |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
@@ -99,45 +99,45 @@ discard block |
||
99 | 99 | 'title' => array( |
100 | 100 | 'title' => $this->label, |
101 | 101 | 'type' => 'title', |
102 | - 'desc' => sprintf( esc_html__( 'Here you set if you want to track pageviews, remove comments and load %s javascript in the footer.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ), |
|
102 | + 'desc' => sprintf(esc_html__('Here you set if you want to track pageviews, remove comments and load %s javascript in the footer.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')), |
|
103 | 103 | 'id' => 'misc_options' |
104 | 104 | ), |
105 | 105 | |
106 | 106 | 'remove_comments' => array( |
107 | - 'title' => esc_html__( 'Remove Comments', 'auto-load-next-post' ), |
|
108 | - 'desc' => esc_html__( 'Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post' ), |
|
107 | + 'title' => esc_html__('Remove Comments', 'auto-load-next-post'), |
|
108 | + 'desc' => esc_html__('Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post'), |
|
109 | 109 | 'id' => 'auto_load_next_post_remove_comments', |
110 | 110 | 'default' => 'yes', |
111 | 111 | 'type' => 'checkbox' |
112 | 112 | ), |
113 | 113 | |
114 | 114 | 'google_analytics' => array( |
115 | - 'title' => esc_html__( 'Update Google Analytics', 'auto-load-next-post' ), |
|
116 | - 'desc' => esc_html__( 'Enable to track each post the visitor is reading. This will count as a pageview. You must already have Google Analytics setup.', 'auto-load-next-post' ), |
|
115 | + 'title' => esc_html__('Update Google Analytics', 'auto-load-next-post'), |
|
116 | + 'desc' => esc_html__('Enable to track each post the visitor is reading. This will count as a pageview. You must already have Google Analytics setup.', 'auto-load-next-post'), |
|
117 | 117 | 'id' => 'auto_load_next_post_google_analytics', |
118 | 118 | 'default' => 'no', |
119 | 119 | 'type' => 'checkbox' |
120 | 120 | ), |
121 | 121 | |
122 | 122 | 'load_js_in_footer' => array( |
123 | - 'title' => esc_html__( 'JavaScript in Footer?', 'auto-load-next-post' ), |
|
124 | - 'desc' => esc_html__( 'Enable to load Auto Load Next Post in the footer instead of the header. Can be useful to optimize your site or if the current theme requires it.', 'auto-load-next-post' ), |
|
123 | + 'title' => esc_html__('JavaScript in Footer?', 'auto-load-next-post'), |
|
124 | + 'desc' => esc_html__('Enable to load Auto Load Next Post in the footer instead of the header. Can be useful to optimize your site or if the current theme requires it.', 'auto-load-next-post'), |
|
125 | 125 | 'id' => 'auto_load_next_post_load_js_in_footer', |
126 | 126 | 'default' => 'no', |
127 | 127 | 'type' => 'checkbox' |
128 | 128 | ), |
129 | 129 | |
130 | 130 | 'reset_data' => array( |
131 | - 'title' => esc_html__( 'Reset all data?', 'auto-load-next-post' ), |
|
132 | - 'desc' => esc_html__( 'Press the reset button to clear all settings for this plugin and re-install the default settings.', 'auto-load-next-post' ), |
|
131 | + 'title' => esc_html__('Reset all data?', 'auto-load-next-post'), |
|
132 | + 'desc' => esc_html__('Press the reset button to clear all settings for this plugin and re-install the default settings.', 'auto-load-next-post'), |
|
133 | 133 | 'id' => 'auto_load_next_post_reset_data', |
134 | 134 | 'default' => 'no', |
135 | 135 | 'type' => 'reset_data' |
136 | 136 | ), |
137 | 137 | |
138 | 138 | 'uninstall' => array( |
139 | - 'title' => esc_html__( 'Remove all data on uninstall?', 'auto-load-next-post' ), |
|
140 | - 'desc' => esc_html__( 'If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post' ), |
|
139 | + 'title' => esc_html__('Remove all data on uninstall?', 'auto-load-next-post'), |
|
140 | + 'desc' => esc_html__('If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post'), |
|
141 | 141 | 'id' => 'auto_load_next_post_uninstall_data', |
142 | 142 | 'default' => 'no', |
143 | 143 | 'type' => 'checkbox' |
@@ -157,15 +157,15 @@ discard block |
||
157 | 157 | * @since 1.5.0 |
158 | 158 | * @param mixed $settings |
159 | 159 | */ |
160 | - public function customize_button( $settings ) { |
|
160 | + public function customize_button($settings) { |
|
161 | 161 | ?> |
162 | 162 | <tr valign="top"> |
163 | - <th scope="row" class="titledesc"><?php echo $settings['title'];?></th> |
|
164 | - <td class="forminp forminp-<?php echo sanitize_title( $settings['type'] ) ?>"> |
|
165 | - <a href="<?php echo $settings['link']; ?>" class="button-secondary <?php echo esc_attr( $settings['class'] ); ?>"> |
|
163 | + <th scope="row" class="titledesc"><?php echo $settings['title']; ?></th> |
|
164 | + <td class="forminp forminp-<?php echo sanitize_title($settings['type']) ?>"> |
|
165 | + <a href="<?php echo $settings['link']; ?>" class="button-secondary <?php echo esc_attr($settings['class']); ?>"> |
|
166 | 166 | <?php echo $settings['button_text']; ?> |
167 | 167 | </a> |
168 | - <span class="description"><?php echo $settings['desc'];?></span> |
|
168 | + <span class="description"><?php echo $settings['desc']; ?></span> |
|
169 | 169 | </td> |
170 | 170 | </tr> |
171 | 171 | <?php |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function output() { |
183 | 183 | $settings = $this->get_settings(); |
184 | 184 | |
185 | - Auto_Load_Next_Post_Admin_Settings::output_fields( $settings ); |
|
185 | + Auto_Load_Next_Post_Admin_Settings::output_fields($settings); |
|
186 | 186 | } // END output() |
187 | 187 | |
188 | 188 | /** |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | public function save() { |
195 | 195 | $settings = $this->get_settings(); |
196 | 196 | |
197 | - Auto_Load_Next_Post_Admin_Settings::save_fields( $settings ); |
|
197 | + Auto_Load_Next_Post_Admin_Settings::save_fields($settings); |
|
198 | 198 | } // END save() |
199 | 199 | |
200 | 200 | } // END class |