@@ -10,12 +10,12 @@ 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 | 17 | // Exit if Auto_Load_Next_Post_Customizer_Scripts class already exists. |
18 | -if ( !class_exists( 'Auto_Load_Next_Post_Customizer_Scripts' ) ) { |
|
18 | +if ( ! class_exists('Auto_Load_Next_Post_Customizer_Scripts')) { |
|
19 | 19 | |
20 | 20 | class Auto_Load_Next_Post_Customizer_Scripts { |
21 | 21 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * @access public |
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | - add_action( 'customize_preview_init', array( $this, 'alnp_add_customizer_preview_scripts' ) ); |
|
30 | - add_action( 'customize_controls_print_scripts', array( $this, 'alnp_add_scripts' ), 30 ); |
|
29 | + add_action('customize_preview_init', array($this, 'alnp_add_customizer_preview_scripts')); |
|
30 | + add_action('customize_controls_print_scripts', array($this, 'alnp_add_scripts'), 30); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @since 1.5.0 |
37 | 37 | */ |
38 | 38 | public function alnp_add_customizer_preview_scripts() { |
39 | - Auto_Load_Next_Post::load_file( 'alnp-theme-customizer', '/assets/js/customizer/theme-customizer.js', true, array( 'jquery', 'customize-preview' ), '', true ); |
|
39 | + Auto_Load_Next_Post::load_file('alnp-theme-customizer', '/assets/js/customizer/theme-customizer.js', true, array('jquery', 'customize-preview'), '', true); |
|
40 | 40 | } // END alnp_add_customizer_preview_scripts() |
41 | 41 | |
42 | 42 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | if ( isExpanded && !is_page_single ) { |
70 | 70 | console.log( "Random single post loaded." ); |
71 | - wp.customize.previewer.previewUrl.set( '<?php echo esc_js( Auto_Load_Next_Post_Customizer::alnp_get_random_page_permalink() ); ?>' ); |
|
71 | + wp.customize.previewer.previewUrl.set( '<?php echo esc_js(Auto_Load_Next_Post_Customizer::alnp_get_random_page_permalink()); ?>' ); |
|
72 | 72 | } |
73 | 73 | else { |
74 | 74 | console.log( 'Already viewing a single post!' ); |
@@ -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_Display_Video_Controller' ) ) { |
|
24 | +if ( ! class_exists('Auto_Load_Next_Post_Display_Video_Controller')) { |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * This class is for the display video control in the Customizer. |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function render_content() { |
47 | 47 | ?> |
48 | - <span class="customize-control-title"><?php esc_html_e( $this->label ); ?></span> |
|
48 | + <span class="customize-control-title"><?php esc_html_e($this->label); ?></span> |
|
49 | 49 | |
50 | 50 | <p> |
51 | 51 | <iframe width="320" height="180" src="https://www.youtube-nocookie.com/embed/<?php echo $this->value(); ?>?rel=0&showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | <div class="notice notice-error auto-load-next-post-message"> |
18 | - <p><?php echo sprintf( __( 'It seems that not all of the required theme selectors have been set. These theme selectors are required in order for %1$s to work. %2$sHow to find my theme selectors?%3$s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>' ); ?></p> |
|
18 | + <p><?php echo sprintf(__('It seems that not all of the required theme selectors have been set. These theme selectors are required in order for %1$s to work. %2$sHow to find my theme selectors?%3$s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>'); ?></p> |
|
19 | 19 | </div> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | <div class="notice notice-info auto-load-next-post-message"> |
18 | - <p><?php echo sprintf( __( 'This theme supports %s. No need to change the theme selectors as they have already been set by the theme.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p> |
|
18 | + <p><?php echo sprintf(__('This theme supports %s. No need to change the theme selectors as they have already been set by the theme.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p> |
|
19 | 19 | </div> |
@@ -10,7 +10,7 @@ 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 | |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | <div class="notice notice-success auto-load-next-post-notice is-dismissible"> |
20 | 20 | <div class="auto-load-next-post-notice-inner"> |
21 | 21 | <div class="auto-load-next-post-notice-icon"> |
22 | - <img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" /> |
|
22 | + <img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" /> |
|
23 | 23 | </div> |
24 | 24 | |
25 | 25 | <div class="auto-load-next-post-notice-content"> |
26 | - <h3><?php echo esc_html__( 'Congratulations!', 'auto-load-next-post' ); ?></h3> |
|
27 | - <p><?php echo sprintf( __( 'Your current theme <strong>%1$s</strong> is supported. %2$s is ready to increase your pageviews. There is nothing else to setup so your good to go.', 'auto-load-next-post' ), $active_theme->name, esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p> |
|
26 | + <h3><?php echo esc_html__('Congratulations!', 'auto-load-next-post'); ?></h3> |
|
27 | + <p><?php echo sprintf(__('Your current theme <strong>%1$s</strong> is supported. %2$s is ready to increase your pageviews. There is nothing else to setup so your good to go.', 'auto-load-next-post'), $active_theme->name, esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p> |
|
28 | 28 | </div> |
29 | 29 | </div> |
30 | 30 | </div> |
@@ -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( 'https://autoloadnextpost.com/contact/' ), esc_html__( 'Give Feedback', 'auto-load-next-post' ) ); ?> |
|
31 | - <a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_beta_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Ask me again in 7 days', 'auto-load-next-post' ); ?></a> |
|
30 | + <?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url('https://autoloadnextpost.com/contact/'), esc_html__('Give Feedback', 'auto-load-next-post')); ?> |
|
31 | + <a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_beta_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Ask me again in 7 days', 'auto-load-next-post'); ?></a> |
|
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | </div> |
@@ -10,10 +10,10 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | <div class="notice notice-error auto-load-next-post-message"> |
18 | - <p><?php echo sprintf( __( 'In order to remove comments we need to know what the comments container is. Please identify the comments container under <strong>Theme Selectors</strong>. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>' ); ?></p> |
|
18 | + <p><?php echo sprintf(__('In order to remove comments we need to know what the comments container is. Please identify the comments container under <strong>Theme Selectors</strong>. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>'); ?></p> |
|
19 | 19 | </div> |
@@ -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="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" /> |
|
25 | + <img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" /> |
|
26 | 26 | </div> |
27 | 27 | |
28 | 28 | <div class="auto-load-next-post-notice-content"> |
29 | - <h3><?php echo esc_html__( 'Are you enjoying Auto Load Next Post?', 'auto-load-next-post' ); ?></h3> |
|
30 | - <p><?php printf( esc_html__( 'You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), esc_html( $time ) ); ?></p> |
|
29 | + <h3><?php echo esc_html__('Are you enjoying Auto Load Next Post?', 'auto-load-next-post'); ?></h3> |
|
30 | + <p><?php printf(esc_html__('You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), esc_html($time)); ?></p> |
|
31 | 31 | </div> |
32 | 32 | |
33 | 33 | <div class="auto-load-next-post-review-now"> |
34 | - <?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url( 'https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post' ), esc_html__( 'Leave a Review', 'auto-load-next-post' ) ); ?> |
|
35 | - <a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_review_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'No thank you / I already have', 'auto-load-next-post' ); ?></a> |
|
34 | + <?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url('https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post'), esc_html__('Leave a Review', 'auto-load-next-post')); ?> |
|
35 | + <a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_review_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('No thank you / I already have', 'auto-load-next-post'); ?></a> |
|
36 | 36 | </div> |
37 | 37 | </div> |
38 | 38 | </div> |
@@ -10,31 +10,31 @@ 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 | 17 | <div class="notice notice-success auto-load-next-post-notice"> |
18 | 18 | <div class="auto-load-next-post-notice-inner"> |
19 | 19 | <div class="auto-load-next-post-notice-icon"> |
20 | - <img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" /> |
|
20 | + <img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" /> |
|
21 | 21 | </div> |
22 | 22 | |
23 | 23 | <div class="auto-load-next-post-notice-content"> |
24 | - <h3><?php echo esc_html__( 'Welcome!', 'auto-load-next-post' ); ?></h3> |
|
24 | + <h3><?php echo esc_html__('Welcome!', 'auto-load-next-post'); ?></h3> |
|
25 | 25 | <p> |
26 | - <?php echo sprintf( __( 'Thank you for activating %1$s! If you\'re a first time user, welcome! You\'re well on your way to increasing your pageviews.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?> |
|
26 | + <?php echo sprintf(__('Thank you for activating %1$s! If you\'re a first time user, welcome! You\'re well on your way to increasing your pageviews.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?> |
|
27 | 27 | <?php |
28 | 28 | // If the theme has not added support then encourage the user to see the documentation. |
29 | - if ( !is_alnp_supported() ) { |
|
29 | + if ( ! is_alnp_supported()) { |
|
30 | 30 | $query = array( |
31 | 31 | 'autofocus[panel]' => 'alnp', |
32 | 32 | 'autofocus[section]' => 'auto_load_next_post_theme_selectors', |
33 | 33 | 'url' => ALNP_Customizer::alnp_get_random_page_permalink(), |
34 | - 'return' => admin_url( 'options-general.php?page=auto-load-next-post-settings' ), |
|
34 | + 'return' => admin_url('options-general.php?page=auto-load-next-post-settings'), |
|
35 | 35 | ); |
36 | - $customizer_link = add_query_arg( $query, admin_url( 'customize.php' ) ); |
|
37 | - echo sprintf( __( 'I encourage you to check out the plugin documentation and getting started with %1$ssetting up your theme selectors%2$s.', 'auto-load-next-post' ), '<a href="' . esc_url( $customizer_link ) . '">', '</a>' ); |
|
36 | + $customizer_link = add_query_arg($query, admin_url('customize.php')); |
|
37 | + echo sprintf(__('I encourage you to check out the plugin documentation and getting started with %1$ssetting up your theme selectors%2$s.', 'auto-load-next-post'), '<a href="'.esc_url($customizer_link).'">', '</a>'); |
|
38 | 38 | } |
39 | 39 | ?> |
40 | 40 | </p> |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | <div class="auto-load-next-post-documentation"> |
44 | 44 | <?php |
45 | 45 | // If the theme has not added support then display button to documentation. |
46 | - if ( !is_alnp_supported() ) { |
|
47 | - printf( '<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url( 'https://autoloadnextpost.com/documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice' ), esc_html__( 'Documentation', 'auto-load-next-post' ) ); |
|
46 | + if ( ! is_alnp_supported()) { |
|
47 | + printf('<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url('https://autoloadnextpost.com/documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice'), esc_html__('Documentation', 'auto-load-next-post')); |
|
48 | 48 | } |
49 | 49 | ?> |
50 | - <a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_welcome_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Dismiss Notice', 'auto-load-next-post' ); ?></a> |
|
50 | + <a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_welcome_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Dismiss Notice', 'auto-load-next-post'); ?></a> |
|
51 | 51 | </div> |
52 | 52 | </div> |
53 | 53 | </div> |