@@ -46,11 +46,9 @@ discard block |
||
46 | 46 | |
47 | 47 | if ( file_exists( $child_path . 'content-alnp.php' ) ) { |
48 | 48 | $template_redirect = $child_path . 'content-alnp.php'; |
49 | - } |
|
50 | - else if( file_exists( $template_path . 'content-alnp.php') ) { |
|
49 | + } else if( file_exists( $template_path . 'content-alnp.php') ) { |
|
51 | 50 | $template_redirect = $template_path . 'content-alnp.php'; |
52 | - } |
|
53 | - else if( file_exists( $default_path . '/template/content-alnp.php' ) ) { |
|
51 | + } else if( file_exists( $default_path . '/template/content-alnp.php' ) ) { |
|
54 | 52 | $template_redirect = $default_path . '/template/content-alnp.php'; |
55 | 53 | } |
56 | 54 | |
@@ -122,8 +120,7 @@ discard block |
||
122 | 120 | |
123 | 121 | return get_permalink( $id ); |
124 | 122 | endwhile; |
125 | - } |
|
126 | - else { |
|
123 | + } else { |
|
127 | 124 | return false; |
128 | 125 | } |
129 | 126 | } // END alnp_get_random_page_permalink() |
@@ -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,28 +40,28 @@ 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 | |
47 | - if ( file_exists( $child_path . 'content-alnp.php' ) ) { |
|
48 | - $template_redirect = $child_path . 'content-alnp.php'; |
|
47 | + if (file_exists($child_path.'content-alnp.php')) { |
|
48 | + $template_redirect = $child_path.'content-alnp.php'; |
|
49 | 49 | } |
50 | - else if( file_exists( $template_path . 'content-alnp.php') ) { |
|
51 | - $template_redirect = $template_path . 'content-alnp.php'; |
|
50 | + else if (file_exists($template_path.'content-alnp.php')) { |
|
51 | + $template_redirect = $template_path.'content-alnp.php'; |
|
52 | 52 | } |
53 | - else if( file_exists( $default_path . '/template/content-alnp.php' ) ) { |
|
54 | - $template_redirect = $default_path . '/template/content-alnp.php'; |
|
53 | + else if (file_exists($default_path.'/template/content-alnp.php')) { |
|
54 | + $template_redirect = $default_path.'/template/content-alnp.php'; |
|
55 | 55 | } |
56 | 56 | |
57 | - $template_redirect = apply_filters( 'alnp_template_redirect', $template_redirect ); |
|
57 | + $template_redirect = apply_filters('alnp_template_redirect', $template_redirect); |
|
58 | 58 | |
59 | - include( $template_redirect ); |
|
59 | + include($template_redirect); |
|
60 | 60 | |
61 | 61 | exit; |
62 | 62 | } // END auto_load_next_post_template_redirect() |
63 | 63 | } |
64 | -add_action( 'template_redirect', 'auto_load_next_post_template_redirect' ); |
|
64 | +add_action('template_redirect', 'auto_load_next_post_template_redirect'); |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Adds the comments template after the post content. |
@@ -70,15 +70,15 @@ discard block |
||
70 | 70 | * @since 1.4.8 |
71 | 71 | * @version 1.5.4 |
72 | 72 | */ |
73 | -if ( ! function_exists( 'auto_load_next_post_comments' ) ) { |
|
73 | +if ( ! function_exists('auto_load_next_post_comments')) { |
|
74 | 74 | function auto_load_next_post_comments() { |
75 | 75 | // If comments are open or we have at least one comment, load up the comment template. |
76 | - if ( comments_open() || get_comments_number() ) : |
|
76 | + if (comments_open() || get_comments_number()) : |
|
77 | 77 | comments_template(); |
78 | 78 | endif; |
79 | 79 | } // END auto_load_next_post_comments() |
80 | 80 | } |
81 | -add_action( 'alnp_load_after_content', 'auto_load_next_post_comments', 1, 5 ); |
|
81 | +add_action('alnp_load_after_content', 'auto_load_next_post_comments', 1, 5); |
|
82 | 82 | |
83 | 83 | /** |
84 | 84 | * Adds the post navigation for the previous link only after the post content. |
@@ -87,16 +87,16 @@ discard block |
||
87 | 87 | * @since 1.4.8 |
88 | 88 | * @version 1.5.4 |
89 | 89 | */ |
90 | -if ( ! function_exists( 'auto_load_next_post_navigation' ) ) { |
|
90 | +if ( ! function_exists('auto_load_next_post_navigation')) { |
|
91 | 91 | function auto_load_next_post_navigation() { |
92 | 92 | ?> |
93 | 93 | <nav class="navigation post-navigation" role="navigation"> |
94 | - <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 | + <span class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav">'._x('←', 'Previous post link', 'auto-load-next-post').'</span> %title'); ?></span> |
|
95 | 95 | </nav> |
96 | 96 | <?php |
97 | 97 | } // END auto_load_next_post_navigation() |
98 | 98 | } |
99 | -add_action( 'alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10 ); |
|
99 | +add_action('alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10); |
|
100 | 100 | |
101 | 101 | /** |
102 | 102 | * Returns the permalink of a random page |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | * @param string $post_type - Default is post. |
106 | 106 | * @return int|boolean |
107 | 107 | */ |
108 | -if ( ! function_exists( 'alnp_get_random_page_permalink' ) ) { |
|
109 | - function alnp_get_random_page_permalink( $post_type = 'post' ) { |
|
108 | +if ( ! function_exists('alnp_get_random_page_permalink')) { |
|
109 | + function alnp_get_random_page_permalink($post_type = 'post') { |
|
110 | 110 | $args = array( |
111 | 111 | 'post_type' => $post_type, |
112 | 112 | 'post_status' => 'publish', |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | 'posts_per_page' => 1 |
115 | 115 | ); |
116 | 116 | |
117 | - $query = new WP_Query( $args ); |
|
117 | + $query = new WP_Query($args); |
|
118 | 118 | |
119 | - if ( $query->have_posts() ) { |
|
120 | - while ( $query->have_posts() ) : $query->the_post(); |
|
119 | + if ($query->have_posts()) { |
|
120 | + while ($query->have_posts()) : $query->the_post(); |
|
121 | 121 | $id = get_the_ID(); |
122 | 122 | |
123 | - return get_permalink( $id ); |
|
123 | + return get_permalink($id); |
|
124 | 124 | endwhile; |
125 | 125 | } |
126 | 126 | else { |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | * @since 1.5.7 |
136 | 136 | * @return boolean |
137 | 137 | */ |
138 | -if ( ! function_exists( 'alnp_load_js_in_footer' ) ) { |
|
138 | +if ( ! function_exists('alnp_load_js_in_footer')) { |
|
139 | 139 | function alnp_load_js_in_footer() { |
140 | - $load_in_footer = get_option( 'auto_load_next_post_load_js_in_footer', false ); |
|
140 | + $load_in_footer = get_option('auto_load_next_post_load_js_in_footer', false); |
|
141 | 141 | |
142 | - if ( isset( $load_in_footer ) && $load_in_footer == 'yes' ) { |
|
142 | + if (isset($load_in_footer) && $load_in_footer == 'yes') { |
|
143 | 143 | return true; |
144 | 144 | } |
145 | 145 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @since 1.5.11 |
155 | 155 | * @return array |
156 | 156 | */ |
157 | -if ( ! function_exists( 'alnp_get_admin_screens' ) ) { |
|
157 | +if ( ! function_exists('alnp_get_admin_screens')) { |
|
158 | 158 | function alnp_get_admin_screens() { |
159 | 159 | $show_on_screens = array( |
160 | 160 | 'dashboard', |
@@ -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( __( '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="' . AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>' ); ?></p> |
|
19 | + <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="'.AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>'); ?></p> |
|
20 | 20 | </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( 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,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="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__( '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,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> |
@@ -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 |
@@ -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_Events_Tab' ) ) { |
|
18 | +if ( ! class_exists('Auto_Load_Next_Post_Settings_Events_Tab')) { |
|
19 | 19 | |
20 | 20 | class Auto_Load_Next_Post_Settings_Events_Tab extends Auto_Load_Next_Post_Settings_Page { |
21 | 21 | |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function __construct() { |
28 | 28 | $this->id = 'events'; |
29 | - $this->label = esc_html__( 'Events', 'auto-load-next-post' ); |
|
29 | + $this->label = esc_html__('Events', 'auto-load-next-post'); |
|
30 | 30 | |
31 | 31 | parent::__construct(); |
32 | 32 | |
33 | - add_action( 'auto_load_next_post_settings_events', array( __CLASS__, 'is_jetpack_lazy_images_active' ), 10 ); |
|
33 | + add_action('auto_load_next_post_settings_events', array(__CLASS__, 'is_jetpack_lazy_images_active'), 10); |
|
34 | 34 | } // END __construct() |
35 | 35 | |
36 | 36 | /** |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | * @static |
42 | 42 | */ |
43 | 43 | public static function is_jetpack_lazy_images_active() { |
44 | - if ( alnp_check_jetpack() == 'yes' ) { |
|
45 | - if ( Jetpack::is_module_active( 'lazy-images' ) ) { |
|
46 | - include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-jetpack-lazy-images-module.php' ); |
|
44 | + if (alnp_check_jetpack() == 'yes') { |
|
45 | + if (Jetpack::is_module_active('lazy-images')) { |
|
46 | + include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-jetpack-lazy-images-module.php'); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | } // END is_jetpack_lazy_images_active() |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | array( |
62 | 62 | 'title' => $this->label, |
63 | 63 | 'type' => 'title', |
64 | - 'desc' => 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>' ), |
|
64 | + 'desc' => 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>'), |
|
65 | 65 | 'id' => 'events_options' |
66 | 66 | ), |
67 | 67 | |
68 | 68 | array( |
69 | - 'title' => esc_html__( 'Post loaded', 'auto-load-next-post' ), |
|
70 | - 'desc' => esc_html__( 'Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post' ), |
|
69 | + 'title' => esc_html__('Post loaded', 'auto-load-next-post'), |
|
70 | + 'desc' => esc_html__('Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post'), |
|
71 | 71 | 'id' => 'auto_load_next_post_on_load_event', |
72 | 72 | 'default' => '', |
73 | 73 | 'type' => 'textarea', |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | ), |
77 | 77 | |
78 | 78 | array( |
79 | - 'title' => esc_html__( 'Entering a Post', 'auto-load-next-post' ), |
|
80 | - 'desc' => esc_html__( 'Events listed here will be triggered when entering a post.', 'auto-load-next-post' ), |
|
79 | + 'title' => esc_html__('Entering a Post', 'auto-load-next-post'), |
|
80 | + 'desc' => esc_html__('Events listed here will be triggered when entering a post.', 'auto-load-next-post'), |
|
81 | 81 | 'id' => 'auto_load_next_post_on_entering_event', |
82 | 82 | 'default' => '', |
83 | 83 | 'type' => 'textarea', |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function output() { |
101 | 101 | $settings = $this->get_settings(); |
102 | 102 | |
103 | - Auto_Load_Next_Post_Admin_Settings::output_fields( $settings ); |
|
103 | + Auto_Load_Next_Post_Admin_Settings::output_fields($settings); |
|
104 | 104 | } // END output() |
105 | 105 | |
106 | 106 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function save() { |
112 | 112 | $settings = $this->get_settings(); |
113 | 113 | |
114 | - Auto_Load_Next_Post_Admin_Settings::save_fields( $settings ); |
|
114 | + Auto_Load_Next_Post_Admin_Settings::save_fields($settings); |
|
115 | 115 | } // END save() |
116 | 116 | |
117 | 117 | } // END class |
@@ -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 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public static function init() { |
31 | 31 | // Add theme support and preset the theme selectors. |
32 | - add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) ); |
|
32 | + add_action('after_setup_theme', array(__CLASS__, 'add_theme_support')); |
|
33 | 33 | } // END init() |
34 | 34 | |
35 | 35 | /** |
@@ -40,14 +40,14 @@ discard block |
||
40 | 40 | * @static |
41 | 41 | */ |
42 | 42 | public static function add_theme_support() { |
43 | - add_theme_support( 'auto-load-next-post', array( |
|
43 | + add_theme_support('auto-load-next-post', array( |
|
44 | 44 | 'content_container' => 'main.site-main', |
45 | 45 | 'title_selector' => 'h1.entry-title', |
46 | 46 | 'navigation_container' => 'nav.post-navigation', |
47 | 47 | 'comments_container' => 'section#comments', |
48 | 48 | 'load_js_in_footer' => 'no', |
49 | 49 | 'lock_js_in_footer' => 'no', |
50 | - ) ); |
|
50 | + )); |
|
51 | 51 | } // END add_theme_support() |
52 | 52 | |
53 | 53 | } // END class |