@@ -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 | |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | * @return string|array * |
27 | 27 | */ |
28 | 28 | function auto_load_next_post_clean($var) { |
29 | - if ( is_array( $var ) ) { |
|
30 | - return array_map( '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 | |
@@ -40,58 +40,58 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @param string $seconds Seconds in time. |
42 | 42 | */ |
43 | -function auto_load_next_post_seconds_to_words( $seconds ) { |
|
43 | +function auto_load_next_post_seconds_to_words($seconds) { |
|
44 | 44 | // Get the years. |
45 | - $years = ( intval( $seconds ) / YEAR_IN_SECONDS ) % 100; |
|
46 | - if ( $years > 1 ) { |
|
45 | + $years = (intval($seconds) / YEAR_IN_SECONDS) % 100; |
|
46 | + if ($years > 1) { |
|
47 | 47 | /* translators: Number of years */ |
48 | - return sprintf( __( '%s years', 'auto-load-next-post' ), $years ); |
|
49 | - } elseif ( $years > 0 ) { |
|
50 | - return __( 'a year', 'auto-load-next-post' ); |
|
48 | + return sprintf(__('%s years', 'auto-load-next-post'), $years); |
|
49 | + } elseif ($years > 0) { |
|
50 | + return __('a year', 'auto-load-next-post'); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | // Get the weeks. |
54 | - $weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) % 52; |
|
55 | - if ( $weeks > 1 ) { |
|
54 | + $weeks = (intval($seconds) / WEEK_IN_SECONDS) % 52; |
|
55 | + if ($weeks > 1) { |
|
56 | 56 | /* translators: Number of weeks */ |
57 | - return sprintf( __( '%s weeks', 'auto-load-next-post' ), $weeks ); |
|
58 | - } elseif ( $weeks > 0 ) { |
|
59 | - return __( 'a week', 'auto-load-next-post' ); |
|
57 | + return sprintf(__('%s weeks', 'auto-load-next-post'), $weeks); |
|
58 | + } elseif ($weeks > 0) { |
|
59 | + return __('a week', 'auto-load-next-post'); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | // Get the days. |
63 | - $days = ( intval( $seconds ) / DAY_IN_SECONDS ) % 7; |
|
64 | - if ( $days > 1 ) { |
|
63 | + $days = (intval($seconds) / DAY_IN_SECONDS) % 7; |
|
64 | + if ($days > 1) { |
|
65 | 65 | /* translators: Number of days */ |
66 | - return sprintf( __( '%s days', 'auto-load-next-post' ), $days ); |
|
67 | - } elseif ( $days > 0 ) { |
|
68 | - return __( 'a day', 'auto-load-next-post' ); |
|
66 | + return sprintf(__('%s days', 'auto-load-next-post'), $days); |
|
67 | + } elseif ($days > 0) { |
|
68 | + return __('a day', 'auto-load-next-post'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | // Get the hours. |
72 | - $hours = ( intval( $seconds ) / HOUR_IN_SECONDS ) % 24; |
|
73 | - if ( $hours > 1 ) { |
|
72 | + $hours = (intval($seconds) / HOUR_IN_SECONDS) % 24; |
|
73 | + if ($hours > 1) { |
|
74 | 74 | /* translators: Number of hours */ |
75 | - return sprintf( __( '%s hours', 'auto-load-next-post' ), $hours ); |
|
76 | - } elseif ( $hours > 0 ) { |
|
77 | - return __( 'an hour', 'auto-load-next-post' ); |
|
75 | + return sprintf(__('%s hours', 'auto-load-next-post'), $hours); |
|
76 | + } elseif ($hours > 0) { |
|
77 | + return __('an hour', 'auto-load-next-post'); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | // Get the minutes. |
81 | - $minutes = ( intval( $seconds ) / MINUTE_IN_SECONDS ) % 60; |
|
82 | - if ( $minutes > 1 ) { |
|
81 | + $minutes = (intval($seconds) / MINUTE_IN_SECONDS) % 60; |
|
82 | + if ($minutes > 1) { |
|
83 | 83 | /* translators: Number of minutes */ |
84 | - return sprintf( __( '%s minutes', 'auto-load-next-post' ), $minutes ); |
|
85 | - } elseif ( $minutes > 0 ) { |
|
86 | - return __( 'a minute', 'auto-load-next-post' ); |
|
84 | + return sprintf(__('%s minutes', 'auto-load-next-post'), $minutes); |
|
85 | + } elseif ($minutes > 0) { |
|
86 | + return __('a minute', 'auto-load-next-post'); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | // Get the seconds. |
90 | - $seconds = intval( $seconds ) % 60; |
|
91 | - if ( $seconds > 1 ) { |
|
90 | + $seconds = intval($seconds) % 60; |
|
91 | + if ($seconds > 1) { |
|
92 | 92 | /* translators: Number of seconds */ |
93 | - return sprintf( __( '%s seconds', 'auto-load-next-post' ), $seconds ); |
|
94 | - } elseif ( $seconds > 0 ) { |
|
95 | - return __( 'a second', 'auto-load-next-post' ); |
|
93 | + return sprintf(__('%s seconds', 'auto-load-next-post'), $seconds); |
|
94 | + } elseif ($seconds > 0) { |
|
95 | + return __('a second', 'auto-load-next-post'); |
|
96 | 96 | } |
97 | 97 | } |
@@ -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. |
@@ -42,41 +42,41 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function render_content() { |
44 | 44 | ?> |
45 | - <span class="customize-control-title"><?php esc_html_e( $this->label ); ?></span> |
|
45 | + <span class="customize-control-title"><?php esc_html_e($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__( 'Exclude Post Formats', 'auto-load-next-post' ) ); ?></li> |
|
56 | - <li><?php echo wptexturize( esc_html__( 'Limit Posts per Session', 'auto-load-next-post' ) ); ?></li> |
|
57 | - <li><?php echo wptexturize( esc_html__( 'Query Posts by Category and Tag', 'auto-load-next-post' ) ); ?></li> |
|
58 | - <li><?php echo wptexturize( esc_html__( 'Exclude User Roles and Specific Users', 'auto-load-next-post' ) ); ?></li> |
|
59 | - <li><?php echo wptexturize( esc_html__( 'Pre-Query Posts Ready to Load', 'auto-load-next-post' ) ); ?></li> |
|
60 | - <li><?php echo wptexturize( esc_html__( 'Hide Comments and Show by Toggle Button', 'auto-load-next-post' ) ); ?></li> |
|
61 | - <li><?php echo wptexturize( sprintf( esc_html__( 'Multilingual Support for %1$s and %2$s', 'auto-load-next-post' ), 'WPML', 'Polylang' ) ); ?></li> |
|
62 | - <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__('Exclude Post Formats', 'auto-load-next-post')); ?></li> |
|
56 | + <li><?php echo wptexturize(esc_html__('Limit Posts per Session', 'auto-load-next-post')); ?></li> |
|
57 | + <li><?php echo wptexturize(esc_html__('Query Posts by Category and Tag', 'auto-load-next-post')); ?></li> |
|
58 | + <li><?php echo wptexturize(esc_html__('Exclude User Roles and Specific Users', 'auto-load-next-post')); ?></li> |
|
59 | + <li><?php echo wptexturize(esc_html__('Pre-Query Posts Ready to Load', 'auto-load-next-post')); ?></li> |
|
60 | + <li><?php echo wptexturize(esc_html__('Hide Comments and Show by Toggle Button', 'auto-load-next-post')); ?></li> |
|
61 | + <li><?php echo wptexturize(sprintf(esc_html__('Multilingual Support for %1$s and %2$s', 'auto-load-next-post'), 'WPML', 'Polylang')); ?></li> |
|
62 | + <li><?php echo wptexturize(esc_html__('Email Support', 'auto-load-next-post')); ?></li> |
|
63 | 63 | </ul> |
64 | 64 | |
65 | 65 | <p> |
66 | - <?php printf( esc_html__( 'Find out more about %1$s%2$s%3$s.', 'auto-load-next-post'), '<a target="_blank" href="' . esc_url( 'https://autoloadnextpost.com/pro/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ), '</a>' ); ?> |
|
66 | + <?php printf(esc_html__('Find out more about %1$s%2$s%3$s.', 'auto-load-next-post'), '<a target="_blank" href="'.esc_url('https://autoloadnextpost.com/pro/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview').'">', esc_html__('Auto Load Next Post Pro', 'auto-load-next-post'), '</a>'); ?> |
|
67 | 67 | </p> |
68 | 68 | |
69 | - <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> |
|
69 | + <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 | 70 | |
71 | 71 | <p> |
72 | - <?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( 'https://autoloadnextpost.com/add-ons/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', '</a>' ); ?> |
|
72 | + <?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('https://autoloadnextpost.com/add-ons/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview').'">', '</a>'); ?> |
|
73 | 73 | </p> |
74 | 74 | |
75 | - <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> |
|
75 | + <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 | 76 | |
77 | 77 | <div class="notice inline notice-info"> |
78 | 78 | <p> |
79 | - <?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>' ); ?> |
|
79 | + <?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 | 80 | </p> |
81 | 81 | </div> |
82 | 82 | <?php |