@@ -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,10 +29,10 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public static function init() { |
31 | 31 | // Filters the repeater template location. |
32 | - add_filter( 'alnp_template_redirect', array( __CLASS__, 'alnp_make_template_redirect' ) ); |
|
32 | + add_filter('alnp_template_redirect', array(__CLASS__, 'alnp_make_template_redirect')); |
|
33 | 33 | |
34 | 34 | // Add theme support and preset the theme selectors. |
35 | - add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) ); |
|
35 | + add_action('after_setup_theme', array(__CLASS__, 'add_theme_support')); |
|
36 | 36 | } // END init() |
37 | 37 | |
38 | 38 | /** |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @return string |
44 | 44 | */ |
45 | 45 | public static function alnp_make_template_redirect() { |
46 | - return AUTO_LOAD_NEXT_POST_FILE_PATH . '/template/theme-support/make/content-alnp.php'; |
|
46 | + return AUTO_LOAD_NEXT_POST_FILE_PATH.'/template/theme-support/make/content-alnp.php'; |
|
47 | 47 | } // END alnp_make_template_redirect() |
48 | 48 | |
49 | 49 | /** |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | * @static |
55 | 55 | */ |
56 | 56 | public static function add_theme_support() { |
57 | - add_theme_support( 'auto-load-next-post', array( |
|
57 | + add_theme_support('auto-load-next-post', array( |
|
58 | 58 | 'content_container' => 'main.site-main', |
59 | 59 | 'title_selector' => 'h1.entry-title', |
60 | 60 | 'navigation_container' => 'nav.post-navigation', |
61 | 61 | 'comments_container' => 'div#comments', |
62 | 62 | 'load_js_in_footer' => 'no', |
63 | 63 | 'lock_js_in_footer' => 'no', |
64 | - ) ); |
|
64 | + )); |
|
65 | 65 | } // END add_theme_support() |
66 | 66 | |
67 | 67 | } // 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,10 +29,10 @@ 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 | |
34 | 34 | // Filters the repeater template location. |
35 | - add_filter( 'alnp_template_location', array( __CLASS__, 'alnp_understrap_template_location' ) ); |
|
35 | + add_filter('alnp_template_location', array(__CLASS__, 'alnp_understrap_template_location')); |
|
36 | 36 | } // END init() |
37 | 37 | |
38 | 38 | /** |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | * @static |
54 | 54 | */ |
55 | 55 | public static function add_theme_support() { |
56 | - add_theme_support( 'auto-load-next-post', array( |
|
56 | + add_theme_support('auto-load-next-post', array( |
|
57 | 57 | 'content_container' => 'main.site-main', |
58 | 58 | 'title_selector' => 'h1.entry-title', |
59 | 59 | 'navigation_container' => 'nav.post-navigation', |
60 | 60 | 'comments_container' => 'div#comments', |
61 | 61 | 'load_js_in_footer' => 'no', |
62 | 62 | 'lock_js_in_footer' => 'no', |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | } // END add_theme_support() |
65 | 65 | |
66 | 66 | } // END class |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // Exit if accessed directly. |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; |
16 | 16 | } |
17 | 17 | |
@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | * @param string|array $var Data to sanitize. |
25 | 25 | * @return string|array * |
26 | 26 | */ |
27 | -if ( ! function_exists( 'auto_load_next_post_clean' ) ) { |
|
28 | - function auto_load_next_post_clean( $var ) { |
|
29 | - if ( is_array( $var ) ) { |
|
30 | - return array_map( 'auto_load_next_post_clean', $var ); |
|
27 | +if ( ! function_exists('auto_load_next_post_clean')) { |
|
28 | + function auto_load_next_post_clean($var) { |
|
29 | + if (is_array($var)) { |
|
30 | + return array_map('auto_load_next_post_clean', $var); |
|
31 | 31 | } else { |
32 | - return is_scalar( $var ) ? sanitize_text_field( $var ) : $var; |
|
32 | + return is_scalar($var) ? sanitize_text_field($var) : $var; |
|
33 | 33 | } |
34 | 34 | } // END auto_load_next_post_clean() |
35 | 35 | } |
@@ -44,60 +44,60 @@ discard block |
||
44 | 44 | * @param string $seconds Seconds in time. |
45 | 45 | * @return string |
46 | 46 | */ |
47 | -if ( ! function_exists( 'auto_load_next_post_seconds_to_words' ) ) { |
|
48 | - function auto_load_next_post_seconds_to_words( $seconds ) { |
|
47 | +if ( ! function_exists('auto_load_next_post_seconds_to_words')) { |
|
48 | + function auto_load_next_post_seconds_to_words($seconds) { |
|
49 | 49 | // Get the years. |
50 | - $years = ( intval( $seconds ) / YEAR_IN_SECONDS ) % 100; |
|
51 | - if ( $years > 1 ) { |
|
50 | + $years = (intval($seconds) / YEAR_IN_SECONDS) % 100; |
|
51 | + if ($years > 1) { |
|
52 | 52 | /* translators: Number of years */ |
53 | - return sprintf( __( '%s years', 'auto-load-next-post' ), $years ); |
|
54 | - } elseif ( $years > 0 ) { |
|
55 | - return __( 'a year', 'auto-load-next-post' ); |
|
53 | + return sprintf(__('%s years', 'auto-load-next-post'), $years); |
|
54 | + } elseif ($years > 0) { |
|
55 | + return __('a year', 'auto-load-next-post'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // Get the weeks. |
59 | - $weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) % 52; |
|
60 | - if ( $weeks > 1 ) { |
|
59 | + $weeks = (intval($seconds) / WEEK_IN_SECONDS) % 52; |
|
60 | + if ($weeks > 1) { |
|
61 | 61 | /* translators: Number of weeks */ |
62 | - return sprintf( __( '%s weeks', 'auto-load-next-post' ), $weeks ); |
|
63 | - } elseif ( $weeks > 0 ) { |
|
64 | - return __( 'a week', 'auto-load-next-post' ); |
|
62 | + return sprintf(__('%s weeks', 'auto-load-next-post'), $weeks); |
|
63 | + } elseif ($weeks > 0) { |
|
64 | + return __('a week', 'auto-load-next-post'); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | // Get the days. |
68 | - $days = ( intval( $seconds ) / DAY_IN_SECONDS ) % 7; |
|
69 | - if ( $days > 1 ) { |
|
68 | + $days = (intval($seconds) / DAY_IN_SECONDS) % 7; |
|
69 | + if ($days > 1) { |
|
70 | 70 | /* translators: Number of days */ |
71 | - return sprintf( __( '%s days', 'auto-load-next-post' ), $days ); |
|
72 | - } elseif ( $days > 0 ) { |
|
73 | - return __( 'a day', 'auto-load-next-post' ); |
|
71 | + return sprintf(__('%s days', 'auto-load-next-post'), $days); |
|
72 | + } elseif ($days > 0) { |
|
73 | + return __('a day', 'auto-load-next-post'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | // Get the hours. |
77 | - $hours = ( intval( $seconds ) / HOUR_IN_SECONDS ) % 24; |
|
78 | - if ( $hours > 1 ) { |
|
77 | + $hours = (intval($seconds) / HOUR_IN_SECONDS) % 24; |
|
78 | + if ($hours > 1) { |
|
79 | 79 | /* translators: Number of hours */ |
80 | - return sprintf( __( '%s hours', 'auto-load-next-post' ), $hours ); |
|
81 | - } elseif ( $hours > 0 ) { |
|
82 | - return __( 'an hour', 'auto-load-next-post' ); |
|
80 | + return sprintf(__('%s hours', 'auto-load-next-post'), $hours); |
|
81 | + } elseif ($hours > 0) { |
|
82 | + return __('an hour', 'auto-load-next-post'); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | // Get the minutes. |
86 | - $minutes = ( intval( $seconds ) / MINUTE_IN_SECONDS ) % 60; |
|
87 | - if ( $minutes > 1 ) { |
|
86 | + $minutes = (intval($seconds) / MINUTE_IN_SECONDS) % 60; |
|
87 | + if ($minutes > 1) { |
|
88 | 88 | /* translators: Number of minutes */ |
89 | - return sprintf( __( '%s minutes', 'auto-load-next-post' ), $minutes ); |
|
90 | - } elseif ( $minutes > 0 ) { |
|
91 | - return __( 'a minute', 'auto-load-next-post' ); |
|
89 | + return sprintf(__('%s minutes', 'auto-load-next-post'), $minutes); |
|
90 | + } elseif ($minutes > 0) { |
|
91 | + return __('a minute', 'auto-load-next-post'); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | // Get the seconds. |
95 | - $seconds = intval( $seconds ) % 60; |
|
96 | - if ( $seconds > 1 ) { |
|
95 | + $seconds = intval($seconds) % 60; |
|
96 | + if ($seconds > 1) { |
|
97 | 97 | /* translators: Number of seconds */ |
98 | - return sprintf( __( '%s seconds', 'auto-load-next-post' ), $seconds ); |
|
99 | - } elseif ( $seconds > 0 ) { |
|
100 | - return __( 'a second', 'auto-load-next-post' ); |
|
98 | + return sprintf(__('%s seconds', 'auto-load-next-post'), $seconds); |
|
99 | + } elseif ($seconds > 0) { |
|
100 | + return __('a second', 'auto-load-next-post'); |
|
101 | 101 | } |
102 | 102 | } // END auto_load_next_post_seconds_to_words() |
103 | 103 | } |
@@ -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( 'customize-preview' ), '', true ); |
|
39 | + Auto_Load_Next_Post::load_file('alnp-theme-customizer', '/assets/js/customizer/theme-customizer.js', true, array('customize-preview'), '', true); |
|
40 | 40 | } // END alnp_add_customizer_preview_scripts() |
41 | 41 | |
42 | 42 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * but we are not viewing a single post. |
68 | 68 | */ |
69 | 69 | if ( isExpanded && !is_page_single ) { |
70 | - wp.customize.previewer.previewUrl.set( '<?php echo esc_js( alnp_get_random_page_permalink() ); ?>' ); |
|
70 | + wp.customize.previewer.previewUrl.set( '<?php echo esc_js(alnp_get_random_page_permalink()); ?>' ); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | } ); |
@@ -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,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 |