@@ -46,25 +46,25 @@ discard block |
||
46 | 46 | * @param array $requirements Minimum and Recommended version of PHP. |
47 | 47 | */ |
48 | 48 | public function __construct($plugin = array(), $requirements = array()) { |
49 | - if ( is_array($plugin) && !empty($plugin['name']) ) { |
|
49 | + if (is_array($plugin) && ! empty($plugin['name'])) { |
|
50 | 50 | $this->plugin_name = $plugin['name']; |
51 | 51 | } else { |
52 | 52 | $this->plugin_name = ''; |
53 | 53 | } |
54 | 54 | |
55 | - if ( is_array($plugin) && !empty($plugin['textdomain']) ) { |
|
55 | + if (is_array($plugin) && ! empty($plugin['textdomain'])) { |
|
56 | 56 | $this->textdomain = $plugin['textdomain']; |
57 | 57 | } else { |
58 | 58 | $this->textdomain = 'wpupdatephp'; |
59 | 59 | } |
60 | 60 | |
61 | - if ( is_array($requirements) && !empty($requirements['recommended_version']) ) { |
|
61 | + if (is_array($requirements) && ! empty($requirements['recommended_version'])) { |
|
62 | 62 | $this->minimum_version = $requirements['minimum_version']; |
63 | 63 | } else { |
64 | 64 | $this->minimum_version = '5.3.0'; |
65 | 65 | } |
66 | 66 | |
67 | - if ( is_array($requirements) && !empty($requirements['recommended_version']) ) { |
|
67 | + if (is_array($requirements) && ! empty($requirements['recommended_version'])) { |
|
68 | 68 | $this->recommended_version = $requirements['recommended_version']; |
69 | 69 | } else { |
70 | 70 | $this->recommended_version = null; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * @param callable $callback Callable that displays admin notice. |
127 | 127 | */ |
128 | 128 | private function load_version_notice($callback) { |
129 | - if ( is_admin() && ! defined('DOING_AJAX')) { |
|
129 | + if (is_admin() && ! defined('DOING_AJAX')) { |
|
130 | 130 | add_action('admin_notices', $callback); |
131 | 131 | add_action('network_admin_notices', $callback); |
132 | 132 | } |
@@ -9,27 +9,27 @@ |
||
9 | 9 | * @package Auto Load Next Post |
10 | 10 | * @license GPL-2.0+ |
11 | 11 | */ |
12 | -if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
|
12 | +if ( ! defined('ABSPATH') || ! defined('WP_UNINSTALL_PLUGIN')) { |
|
13 | 13 | exit(); // Exit if accessed directly. |
14 | 14 | } |
15 | 15 | |
16 | 16 | global $wpdb; |
17 | 17 | |
18 | 18 | // Make sure it is only a single site we are uninstalling from. |
19 | -if ( ! is_multisite() ) { |
|
20 | - $uninstall = get_option( 'auto_load_next_post_uninstall_data' ); |
|
19 | +if ( ! is_multisite()) { |
|
20 | + $uninstall = get_option('auto_load_next_post_uninstall_data'); |
|
21 | 21 | |
22 | - if ( ! empty( $uninstall ) ) { |
|
22 | + if ( ! empty($uninstall)) { |
|
23 | 23 | // Delete options |
24 | 24 | $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'auto_load_next_post_%'"); |
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | 28 | // Delete Install Date |
29 | -delete_site_option( 'auto_load_next_post_install_date' ); |
|
29 | +delete_site_option('auto_load_next_post_install_date'); |
|
30 | 30 | |
31 | 31 | // Delete Uninstall Data - Just to double check it has been removed. |
32 | -delete_option( 'auto_load_next_post_uninstall_data' ); |
|
32 | +delete_option('auto_load_next_post_uninstall_data'); |
|
33 | 33 | |
34 | 34 | // Clear any cached data that has been removed. |
35 | 35 | wp_cache_flush(); |
@@ -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_General_Tab' ) ) { |
|
18 | +if ( ! class_exists('Auto_Load_Next_Post_Settings_General_Tab')) { |
|
19 | 19 | |
20 | 20 | class Auto_Load_Next_Post_Settings_General_Tab extends Auto_Load_Next_Post_Settings_Page { |
21 | 21 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function __construct() { |
30 | 30 | $this->id = 'general'; |
31 | - $this->label = __( 'General', 'auto-load-next-post' ); |
|
31 | + $this->label = __('General', 'auto-load-next-post'); |
|
32 | 32 | |
33 | 33 | parent::__construct(); |
34 | 34 | } // END __construct() |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | 'auto_load_next_post_general_settings', array( |
46 | 46 | |
47 | 47 | array( |
48 | - 'title' => __( 'General', 'auto-load-next-post' ), |
|
48 | + 'title' => __('General', 'auto-load-next-post'), |
|
49 | 49 | 'type' => 'title', |
50 | - 'desc' => sprintf( __( 'Set the theme selectors below according to your active theme. All are required for %s to work. <a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-general" target="_blank">How to find my theme selectors?</a>', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ), |
|
50 | + 'desc' => sprintf(__('Set the theme selectors below according to your active theme. All are required for %s to work. <a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-general" target="_blank">How to find my theme selectors?</a>', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')), |
|
51 | 51 | 'id' => 'general_options' |
52 | 52 | ), |
53 | 53 | |
54 | 54 | array( |
55 | - 'title' => __( 'Content Container', 'auto-load-next-post' ), |
|
56 | - 'desc' => __( 'This is the primary container were the post content is loaded in. Example: <code>main.site-main</code>', 'auto-load-next-post' ), |
|
55 | + 'title' => __('Content Container', 'auto-load-next-post'), |
|
56 | + 'desc' => __('This is the primary container were the post content is loaded in. Example: <code>main.site-main</code>', 'auto-load-next-post'), |
|
57 | 57 | //'desc_tip' => true, |
58 | 58 | 'id' => 'auto_load_next_post_content_container', |
59 | 59 | 'default' => 'main.site-main', |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | ), |
64 | 64 | |
65 | 65 | array( |
66 | - 'title' => __( 'Post Title', 'auto-load-next-post' ), |
|
67 | - 'desc' => __( 'This is used to identify which article the user is reading and track if Google Analytics is enabled. Example: <code>h1.entry-title</code>', 'auto-load-next-post' ), |
|
66 | + 'title' => __('Post Title', 'auto-load-next-post'), |
|
67 | + 'desc' => __('This is used to identify which article the user is reading and track if Google Analytics is enabled. Example: <code>h1.entry-title</code>', 'auto-load-next-post'), |
|
68 | 68 | //'desc_tip' => true, |
69 | 69 | 'id' => 'auto_load_next_post_title_selector', |
70 | 70 | 'default' => 'h1.entry-title', |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | ), |
75 | 75 | |
76 | 76 | array( |
77 | - 'title' => __( 'Post Navigation', 'auto-load-next-post' ), |
|
78 | - 'desc' => __( 'The post navigation needs to be indentified to find the next post. Example: <code>nav.post-navigation</code>', 'auto-load-next-post' ), |
|
77 | + 'title' => __('Post Navigation', 'auto-load-next-post'), |
|
78 | + 'desc' => __('The post navigation needs to be indentified to find the next post. Example: <code>nav.post-navigation</code>', 'auto-load-next-post'), |
|
79 | 79 | //'desc_tip' => true, |
80 | 80 | 'id' => 'auto_load_next_post_navigation_container', |
81 | 81 | 'default' => 'nav.post-navigation', |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | ), |
86 | 86 | |
87 | 87 | array( |
88 | - 'title' => __( 'Comments Container', 'auto-load-next-post' ), |
|
89 | - 'desc' => __( 'This is so comments can be removed if enabled below. Example: <code>div#comments</code>', 'auto-load-next-post' ), |
|
88 | + 'title' => __('Comments Container', 'auto-load-next-post'), |
|
89 | + 'desc' => __('This is so comments can be removed if enabled below. Example: <code>div#comments</code>', 'auto-load-next-post'), |
|
90 | 90 | //'desc_tip' => true, |
91 | 91 | 'id' => 'auto_load_next_post_comments_container', |
92 | 92 | 'default' => 'div#comments', |
@@ -96,32 +96,32 @@ discard block |
||
96 | 96 | ), |
97 | 97 | |
98 | 98 | array( |
99 | - 'title' => __( 'Remove Comments', 'auto-load-next-post' ), |
|
100 | - 'desc' => __( 'Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post' ), |
|
99 | + 'title' => __('Remove Comments', 'auto-load-next-post'), |
|
100 | + 'desc' => __('Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post'), |
|
101 | 101 | 'id' => 'auto_load_next_post_remove_comments', |
102 | 102 | 'default' => 'yes', |
103 | 103 | 'type' => 'checkbox' |
104 | 104 | ), |
105 | 105 | |
106 | 106 | array( |
107 | - 'title' => __( 'Update Google Analytics', 'auto-load-next-post' ), |
|
108 | - 'desc' => __( 'Each time a post has loaded and is in view it will count as a pageview. Must have reference to Google Analytics tracking code on the site.', 'auto-load-next-post' ), |
|
107 | + 'title' => __('Update Google Analytics', 'auto-load-next-post'), |
|
108 | + 'desc' => __('Each time a post has loaded and is in view it will count as a pageview. Must have reference to Google Analytics tracking code on the site.', 'auto-load-next-post'), |
|
109 | 109 | 'id' => 'auto_load_next_post_google_analytics', |
110 | 110 | 'default' => 'no', |
111 | 111 | 'type' => 'checkbox' |
112 | 112 | ), |
113 | 113 | |
114 | 114 | array( |
115 | - 'title' => __( 'Reset all data?', 'auto-load-next-post' ), |
|
116 | - 'desc' => __( 'Press the reset button to clear all settings for this plugin and re-install the default settings.', 'auto-load-next-post' ), |
|
115 | + 'title' => __('Reset all data?', 'auto-load-next-post'), |
|
116 | + 'desc' => __('Press the reset button to clear all settings for this plugin and re-install the default settings.', 'auto-load-next-post'), |
|
117 | 117 | 'id' => 'auto_load_next_post_reset_data', |
118 | 118 | 'default' => 'no', |
119 | 119 | 'type' => 'reset_data' |
120 | 120 | ), |
121 | 121 | |
122 | 122 | array( |
123 | - 'title' => __( 'Remove all data on uninstall?', 'auto-load-next-post' ), |
|
124 | - 'desc' => __( 'If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post' ), |
|
123 | + 'title' => __('Remove all data on uninstall?', 'auto-load-next-post'), |
|
124 | + 'desc' => __('If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post'), |
|
125 | 125 | 'id' => 'auto_load_next_post_uninstall_data', |
126 | 126 | 'default' => 'no', |
127 | 127 | 'type' => 'checkbox' |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | public function output() { |
144 | 144 | $settings = $this->get_settings(); |
145 | 145 | |
146 | - Auto_Load_Next_Post_Admin_Settings::output_fields( $settings ); |
|
146 | + Auto_Load_Next_Post_Admin_Settings::output_fields($settings); |
|
147 | 147 | } // END output() |
148 | 148 | |
149 | 149 | /** |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | $settings = $this->get_settings(); |
160 | 160 | |
161 | - Auto_Load_Next_Post_Admin_Settings::save_fields( $settings, $current_tab ); |
|
161 | + Auto_Load_Next_Post_Admin_Settings::save_fields($settings, $current_tab); |
|
162 | 162 | } // END save() |
163 | 163 | |
164 | 164 | /** |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * @return array |
172 | 172 | */ |
173 | 173 | public function get_post_types() { |
174 | - $post_types = get_post_types( array( 'public' => true ), 'names' ); |
|
174 | + $post_types = get_post_types(array('public' => true), 'names'); |
|
175 | 175 | |
176 | 176 | return $post_types; |
177 | 177 | } // END get_post_types() |
@@ -14,7 +14,7 @@ discard block |
||
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 |
@@ -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_Notices' ) ) { |
|
18 | +if ( ! class_exists('Auto_Load_Next_Post_Admin_Notices')) { |
|
19 | 19 | |
20 | 20 | class Auto_Load_Next_Post_Admin_Notices { |
21 | 21 | |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | * @version 1.4.10 |
38 | 38 | */ |
39 | 39 | public function __construct() { |
40 | - self::$install_date = get_site_option( 'auto_load_next_post_install_date', time() ); |
|
40 | + self::$install_date = get_site_option('auto_load_next_post_install_date', time()); |
|
41 | 41 | |
42 | - add_action( 'admin_init', array( $this, 'check_wp' ), 12 ); |
|
43 | - add_action( 'admin_init', array( $this, 'dont_bug_me' ), 15 ); |
|
42 | + add_action('admin_init', array($this, 'check_wp'), 12); |
|
43 | + add_action('admin_init', array($this, 'dont_bug_me'), 15); |
|
44 | 44 | |
45 | - add_action( 'admin_notices', array( $this, 'add_notices' ), 0 ); |
|
45 | + add_action('admin_notices', array($this, 'add_notices'), 0); |
|
46 | 46 | } // END __construct() |
47 | 47 | |
48 | 48 | /** |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | public function check_wp() { |
57 | 57 | global $wp_version; |
58 | 58 | |
59 | - if ( ! version_compare( $wp_version, AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE, '>=' ) ) { |
|
60 | - add_action( 'admin_notices', array( $this, 'requirement_wp_notice' ) ); |
|
59 | + if ( ! version_compare($wp_version, AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE, '>=')) { |
|
60 | + add_action('admin_notices', array($this, 'requirement_wp_notice')); |
|
61 | 61 | return false; |
62 | 62 | } |
63 | 63 | |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | global $current_user; |
76 | 76 | |
77 | 77 | // If the user is allowed to install plugins and requested to hide the notice then hide it for that user. |
78 | - if ( ! empty( $_GET['hide_auto_load_next_post_review_notice'] ) && current_user_can( 'install_plugins' ) ) { |
|
79 | - add_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', '1', true ); |
|
78 | + if ( ! empty($_GET['hide_auto_load_next_post_review_notice']) && current_user_can('install_plugins')) { |
|
79 | + add_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', '1', true); |
|
80 | 80 | // Redirect to the plugins page. |
81 | - wp_safe_redirect( admin_url( 'plugins.php' ) ); exit; |
|
81 | + wp_safe_redirect(admin_url('plugins.php')); exit; |
|
82 | 82 | } |
83 | 83 | } // END dont_bug_me() |
84 | 84 | |
@@ -96,26 +96,26 @@ discard block |
||
96 | 96 | |
97 | 97 | $template = get_option('template'); |
98 | 98 | |
99 | - if ( ! supports_alnp() ) { |
|
99 | + if ( ! supports_alnp()) { |
|
100 | 100 | // If user hides theme support notice then set active theme. |
101 | - if ( ! empty( $_GET['hide_auto_load_next_post_theme_support_check'] ) ) { |
|
102 | - update_option( 'auto_load_next_post_theme_support_check', $template ); |
|
101 | + if ( ! empty($_GET['hide_auto_load_next_post_theme_support_check'])) { |
|
102 | + update_option('auto_load_next_post_theme_support_check', $template); |
|
103 | 103 | return; |
104 | 104 | } |
105 | 105 | |
106 | - if ( get_option( 'auto_load_next_post_theme_support_check' ) !== $template ) { |
|
107 | - add_action( 'admin_notices', array( $this, 'theme_check_notice' ) ); |
|
106 | + if (get_option('auto_load_next_post_theme_support_check') !== $template) { |
|
107 | + add_action('admin_notices', array($this, 'theme_check_notice')); |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | 111 | // Is admin notice hidden? |
112 | - $hide_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', true ); |
|
112 | + $hide_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', true); |
|
113 | 113 | |
114 | 114 | // Check if we need to display the review plugin notice. |
115 | - if ( current_user_can( 'install_plugins' ) && empty( $hide_notice ) ) { |
|
115 | + if (current_user_can('install_plugins') && empty($hide_notice)) { |
|
116 | 116 | // If it has been a week or more since activating the plugin then display the review notice. |
117 | - if ( ( time() - self::$install_date ) > WEEK_IN_SECONDS ) { |
|
118 | - add_action( 'admin_notices', array( $this, 'plugin_review_notice' ) ); |
|
117 | + if ((time() - self::$install_date) > WEEK_IN_SECONDS) { |
|
118 | + add_action('admin_notices', array($this, 'plugin_review_notice')); |
|
119 | 119 | } |
120 | 120 | } |
121 | 121 | } // END add_notices() |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @since 1.4.3 |
128 | 128 | */ |
129 | 129 | public function requirement_wp_notice() { |
130 | - include( dirname( __FILE__ ) . '/views/html-notice-requirement-wp.php' ); |
|
130 | + include(dirname(__FILE__).'/views/html-notice-requirement-wp.php'); |
|
131 | 131 | } // END requirement_wp_notice() |
132 | 132 | |
133 | 133 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @since 1.3.2 |
138 | 138 | */ |
139 | 139 | public function theme_check_notice() { |
140 | - include( dirname( __FILE__ ) . '/views/html-notice-theme-support.php' ); |
|
140 | + include(dirname(__FILE__).'/views/html-notice-theme-support.php'); |
|
141 | 141 | } // END theme_check_notice() |
142 | 142 | |
143 | 143 | /** |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | public function plugin_review_notice() { |
151 | 151 | $install_date = self::$install_date; |
152 | 152 | |
153 | - include( dirname( __FILE__ ) . '/views/html-notice-please-review.php' ); |
|
153 | + include(dirname(__FILE__).'/views/html-notice-please-review.php'); |
|
154 | 154 | } // END plugin_review_notice() |
155 | 155 | |
156 | 156 | } // END class. |
@@ -12,11 +12,11 @@ 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 | -if ( ! class_exists( 'Auto_Load_Next_Post_Admin' ) ) { |
|
19 | +if ( ! class_exists('Auto_Load_Next_Post_Admin')) { |
|
20 | 20 | |
21 | 21 | class Auto_Load_Next_Post_Admin { |
22 | 22 | |
@@ -29,17 +29,17 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function __construct() { |
31 | 31 | // Actions |
32 | - add_action( 'admin_init', array( $this, 'includes' ), 10 ); |
|
33 | - add_action( 'admin_init', array( $this, 'admin_scripts' ), 100 ); |
|
32 | + add_action('admin_init', array($this, 'includes'), 10); |
|
33 | + add_action('admin_init', array($this, 'admin_scripts'), 100); |
|
34 | 34 | |
35 | 35 | // Add settings page. |
36 | - add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 ); |
|
36 | + add_action('admin_menu', array($this, 'admin_menu'), 9); |
|
37 | 37 | |
38 | 38 | // Filters |
39 | - add_filter( 'plugin_action_links_' . plugin_basename( AUTO_LOAD_NEXT_POST_FILE ), array( $this, 'plugin_action_links' ) ); |
|
40 | - add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta'), 10, 3 ); |
|
41 | - add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ) ); |
|
42 | - add_filter( 'update_footer', array( $this, 'update_footer'), 15 ); |
|
39 | + add_filter('plugin_action_links_'.plugin_basename(AUTO_LOAD_NEXT_POST_FILE), array($this, 'plugin_action_links')); |
|
40 | + add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 3); |
|
41 | + add_filter('admin_footer_text', array($this, 'admin_footer_text')); |
|
42 | + add_filter('update_footer', array($this, 'update_footer'), 15); |
|
43 | 43 | } // END __construct() |
44 | 44 | |
45 | 45 | /** |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function includes() { |
52 | 52 | // Classes we only need if the ajax is not-ajax |
53 | - if ( ! auto_load_next_post_is_ajax() ) { |
|
54 | - include( dirname( __FILE__ ) . '/class-auto-load-next-post-admin-notices.php' ); // Plugin Notices |
|
55 | - include( dirname( __FILE__ ) . '/class-auto-load-next-post-admin-help.php' ); // Plugin Help Tab |
|
53 | + if ( ! auto_load_next_post_is_ajax()) { |
|
54 | + include(dirname(__FILE__).'/class-auto-load-next-post-admin-notices.php'); // Plugin Notices |
|
55 | + include(dirname(__FILE__).'/class-auto-load-next-post-admin-help.php'); // Plugin Help Tab |
|
56 | 56 | } |
57 | 57 | } // END includes() |
58 | 58 | |
@@ -65,22 +65,22 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function admin_scripts() { |
67 | 67 | // Auto Load Next Post Main Javascript |
68 | - Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_admin_script', '/assets/js/admin/auto-load-next-post' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION ); |
|
68 | + Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_admin_script', '/assets/js/admin/auto-load-next-post'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION); |
|
69 | 69 | |
70 | 70 | // Chosen |
71 | - Auto_Load_Next_Post::load_file( 'chosen', '/assets/js/libs/chosen/chosen.jquery' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION ); |
|
71 | + Auto_Load_Next_Post::load_file('chosen', '/assets/js/libs/chosen/chosen.jquery'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION); |
|
72 | 72 | |
73 | 73 | // TipTip |
74 | - Auto_Load_Next_Post::load_file( 'jquery-tiptip', '/assets/js/libs/jquery-tiptip/jquery.tipTip' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION ); |
|
74 | + Auto_Load_Next_Post::load_file('jquery-tiptip', '/assets/js/libs/jquery-tiptip/jquery.tipTip'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION); |
|
75 | 75 | |
76 | 76 | // Variables for Admin JavaScripts |
77 | - wp_localize_script( AUTO_LOAD_NEXT_POST_SLUG . '_admin_script', 'auto_load_next_post_admin_params', array( |
|
78 | - 'i18n_nav_warning' => __( 'The changes you made will be lost if you navigate away from this page.', 'auto-load-next-post' ), |
|
77 | + wp_localize_script(AUTO_LOAD_NEXT_POST_SLUG.'_admin_script', 'auto_load_next_post_admin_params', array( |
|
78 | + 'i18n_nav_warning' => __('The changes you made will be lost if you navigate away from this page.', 'auto-load-next-post'), |
|
79 | 79 | )); |
80 | 80 | |
81 | 81 | // Stylesheets |
82 | - Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_admin_style', '/assets/css/admin/auto-load-next-post' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.css' ); |
|
83 | - Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG.'_chosen_style', '/assets/css/libs/chosen' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.css' ); |
|
82 | + Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_admin_style', '/assets/css/admin/auto-load-next-post'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.css'); |
|
83 | + Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_chosen_style', '/assets/css/libs/chosen'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.css'); |
|
84 | 84 | } // END admin_scripts() |
85 | 85 | |
86 | 86 | /** |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function admin_menu() { |
94 | 94 | $settings_page = add_options_page( |
95 | - sprintf( __( '%s Settings', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ), |
|
96 | - esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), |
|
95 | + sprintf(__('%s Settings', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')), |
|
96 | + esc_html__('Auto Load Next Post', 'auto-load-next-post'), |
|
97 | 97 | 'manage_options', |
98 | 98 | 'auto-load-next-post-settings', |
99 | - array( $this, 'settings_page' ) |
|
99 | + array($this, 'settings_page') |
|
100 | 100 | ); |
101 | 101 | |
102 | - add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) ); |
|
102 | + add_action('load-'.$settings_page, array($this, 'settings_page_init')); |
|
103 | 103 | } // END admin_menu() |
104 | 104 | |
105 | 105 | /** |
@@ -113,29 +113,29 @@ discard block |
||
113 | 113 | global $current_tab, $current_section; |
114 | 114 | |
115 | 115 | // Include settings pages. |
116 | - include_once( dirname( __FILE__ ) . '/class-auto-load-next-post-admin-settings.php' ); |
|
116 | + include_once(dirname(__FILE__).'/class-auto-load-next-post-admin-settings.php'); |
|
117 | 117 | |
118 | 118 | Auto_Load_Next_Post_Admin_Settings::get_settings_pages(); |
119 | 119 | |
120 | 120 | // Get current tab/section. |
121 | - $current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( wp_unslash( $_GET['tab'] ) ); |
|
122 | - $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( wp_unslash( $_REQUEST['section'] ) ); |
|
121 | + $current_tab = empty($_GET['tab']) ? 'general' : sanitize_title(wp_unslash($_GET['tab'])); |
|
122 | + $current_section = empty($_REQUEST['section']) ? '' : sanitize_title(wp_unslash($_REQUEST['section'])); |
|
123 | 123 | |
124 | 124 | // Save settings if data has been posted. |
125 | - 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 ) ) ) { |
|
125 | + 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))) { |
|
126 | 126 | Auto_Load_Next_Post_Admin_Settings::save(); |
127 | 127 | } |
128 | 128 | |
129 | 129 | // Add any posted messages. |
130 | - if ( ! empty( $_GET['auto_load_next_post_error'] ) ) { |
|
131 | - Auto_Load_Next_Post_Admin_Settings::add_error( wp_kses_post( wp_unslash( $_GET['auto_load_next_post_error'] ) ) ); |
|
130 | + if ( ! empty($_GET['auto_load_next_post_error'])) { |
|
131 | + Auto_Load_Next_Post_Admin_Settings::add_error(wp_kses_post(wp_unslash($_GET['auto_load_next_post_error']))); |
|
132 | 132 | } |
133 | 133 | |
134 | - if ( ! empty( $_GET['auto_load_next_post_message'] ) ) { |
|
135 | - Auto_Load_Next_Post_Admin_Settings::add_message( wp_kses_post( wp_unslash( $_GET['auto_load_next_post_message'] ) ) ); |
|
134 | + if ( ! empty($_GET['auto_load_next_post_message'])) { |
|
135 | + Auto_Load_Next_Post_Admin_Settings::add_message(wp_kses_post(wp_unslash($_GET['auto_load_next_post_message']))); |
|
136 | 136 | } |
137 | 137 | |
138 | - do_action( 'auto_load_next_post_settings_page_init' ); |
|
138 | + do_action('auto_load_next_post_settings_page_init'); |
|
139 | 139 | } // END settings_page_init() |
140 | 140 | |
141 | 141 | /** |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @since 1.0.0 |
146 | 146 | */ |
147 | 147 | public function settings_page() { |
148 | - include_once( dirname( __FILE__ ) . '/class-auto-load-next-post-admin-settings.php' ); |
|
148 | + include_once(dirname(__FILE__).'/class-auto-load-next-post-admin-settings.php'); |
|
149 | 149 | |
150 | 150 | Auto_Load_Next_Post_Admin_Settings::output(); |
151 | 151 | } // END settings_page() |
@@ -159,18 +159,18 @@ discard block |
||
159 | 159 | * @param array $links |
160 | 160 | * @return array $links |
161 | 161 | */ |
162 | - public function plugin_action_links( $links ) { |
|
162 | + public function plugin_action_links($links) { |
|
163 | 163 | $plugin_action_links = array(); |
164 | 164 | |
165 | - if ( current_user_can( 'manage_options' ) ) { |
|
165 | + if (current_user_can('manage_options')) { |
|
166 | 166 | // Checks if Auto Load Next Post Pro has been installed. |
167 | - if ( ! is_alnp_pro_version_installed() ) { |
|
168 | - $plugin_action_links['go-pro'] = '<a href="' . esc_url( 'https://autoloadnextpost.com/pro/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page' ) . '" target="_blank" style="color:green; font-weight:bold;">' . __( 'Upgrade to Pro', 'auto-load-next-post' ) . '</a>'; |
|
167 | + if ( ! is_alnp_pro_version_installed()) { |
|
168 | + $plugin_action_links['go-pro'] = '<a href="'.esc_url('https://autoloadnextpost.com/pro/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page').'" target="_blank" style="color:green; font-weight:bold;">'.__('Upgrade to Pro', 'auto-load-next-post').'</a>'; |
|
169 | 169 | } |
170 | 170 | |
171 | - $plugin_action_links['settings'] = '<a href="' . admin_url( 'options-general.php?page=auto-load-next-post-settings' ) . '">' . __( 'Settings', 'auto-load-next-post' ) . '</a>'; |
|
171 | + $plugin_action_links['settings'] = '<a href="'.admin_url('options-general.php?page=auto-load-next-post-settings').'">'.__('Settings', 'auto-load-next-post').'</a>'; |
|
172 | 172 | |
173 | - return array_merge( $plugin_action_links, $links ); |
|
173 | + return array_merge($plugin_action_links, $links); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | return $links; |
@@ -187,17 +187,17 @@ discard block |
||
187 | 187 | * @param array $data Plugin Information |
188 | 188 | * @return array $links |
189 | 189 | */ |
190 | - public function plugin_row_meta( $links, $file, $data ) { |
|
191 | - if ( $file == plugin_basename( AUTO_LOAD_NEXT_POST_FILE ) ) { |
|
192 | - $links[ 1 ] = sprintf( __( 'Developed By %s', 'auto-load-next-post' ), '<a href="' . $data[ 'AuthorURI' ] . '">' . $data[ 'Author' ] . '</a>' ); |
|
190 | + public function plugin_row_meta($links, $file, $data) { |
|
191 | + if ($file == plugin_basename(AUTO_LOAD_NEXT_POST_FILE)) { |
|
192 | + $links[1] = sprintf(__('Developed By %s', 'auto-load-next-post'), '<a href="'.$data['AuthorURI'].'">'.$data['Author'].'</a>'); |
|
193 | 193 | |
194 | 194 | $row_meta = array( |
195 | - 'docs' => '<a href="' . esc_url( 'https://autoloadnextpost.com/documentation/' ) . '" target="_blank">' . __( 'Documentation', 'auto-load-next-post' ) . '</a>', |
|
196 | - 'community' => '<a href="' . esc_url( 'https://wordpress.org/support/plugin/auto-load-next-post' ) . '" target="_blank">' . __( 'Community Support', 'auto-load-next-post' ) . '</a>', |
|
197 | - 'theme-support' => '<a href="' . esc_url( 'https://autoloadnextpost.com/product/theme-support/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page' ) . '" target="_blank">' . __( 'Theme Support', 'auto-load-next-post' ) . '</a>', |
|
195 | + 'docs' => '<a href="'.esc_url('https://autoloadnextpost.com/documentation/').'" target="_blank">'.__('Documentation', 'auto-load-next-post').'</a>', |
|
196 | + 'community' => '<a href="'.esc_url('https://wordpress.org/support/plugin/auto-load-next-post').'" target="_blank">'.__('Community Support', 'auto-load-next-post').'</a>', |
|
197 | + 'theme-support' => '<a href="'.esc_url('https://autoloadnextpost.com/product/theme-support/?utm_source=plugin&utm_medium=link&utm_campaign=plugins-page').'" target="_blank">'.__('Theme Support', 'auto-load-next-post').'</a>', |
|
198 | 198 | ); |
199 | 199 | |
200 | - $links = array_merge( $links, $row_meta ); |
|
200 | + $links = array_merge($links, $row_meta); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | return $links; |
@@ -213,16 +213,16 @@ discard block |
||
213 | 213 | * @param string $text |
214 | 214 | * @return string $text |
215 | 215 | */ |
216 | - public function admin_footer_text( $text ) { |
|
216 | + public function admin_footer_text($text) { |
|
217 | 217 | $current_screen = get_current_screen(); |
218 | 218 | |
219 | - if ( isset( $current_screen->id ) && $current_screen->id == 'settings_page_auto-load-next-post-settings' ) { |
|
219 | + if (isset($current_screen->id) && $current_screen->id == 'settings_page_auto-load-next-post-settings') { |
|
220 | 220 | // Rating and Review |
221 | 221 | return sprintf( |
222 | 222 | /* translators: 1: Auto Load Next Post 2:: five stars */ |
223 | - __( 'If you like %1$s, please leave a %2$s rating. A huge thank you in advance!', 'auto-load-next-post' ), |
|
224 | - sprintf( '<strong>%1$s</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ), |
|
225 | - '<a href="https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post" target="_blank" data-rated="' . esc_attr__( 'Thanks :)', 'auto-load-next-post' ) . '">★★★★★</a>' |
|
223 | + __('If you like %1$s, please leave a %2$s rating. A huge thank you in advance!', 'auto-load-next-post'), |
|
224 | + sprintf('<strong>%1$s</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')), |
|
225 | + '<a href="https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post" target="_blank" data-rated="'.esc_attr__('Thanks :)', 'auto-load-next-post').'">★★★★★</a>' |
|
226 | 226 | ); |
227 | 227 | } |
228 | 228 | |
@@ -239,11 +239,11 @@ discard block |
||
239 | 239 | * @param string $text |
240 | 240 | * @return string $text |
241 | 241 | */ |
242 | - public function update_footer( $text ) { |
|
242 | + public function update_footer($text) { |
|
243 | 243 | $screen = get_current_screen(); |
244 | 244 | |
245 | - if ( $screen->id == 'settings_page_auto-load-next-post-settings' ) { |
|
246 | - 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>'; |
|
245 | + if ($screen->id == 'settings_page_auto-load-next-post-settings') { |
|
246 | + 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>'; |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | return $text; |
@@ -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 auto-load-next-post-message"> |
19 | - <p><?php echo sprintf( __( 'Sorry, <strong>%s</strong> requires WordPress %s or higher. Please upgrade your WordPress setup.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE ); ?></p> |
|
19 | + <p><?php echo sprintf(__('Sorry, <strong>%s</strong> requires WordPress %s or higher. Please upgrade your WordPress setup.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE); ?></p> |
|
20 | 20 | </div> |
@@ -11,15 +11,15 @@ 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 | -$tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'auto_load_next_post_sections_' . $current_tab ) || has_action( 'auto_load_next_post_settings_' . $current_tab ) || has_action( 'auto_load_next_post_settings_tabs_' . $current_tab ); |
|
19 | -$current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : ''; |
|
18 | +$tab_exists = isset($tabs[$current_tab]) || has_action('auto_load_next_post_sections_'.$current_tab) || has_action('auto_load_next_post_settings_'.$current_tab) || has_action('auto_load_next_post_settings_tabs_'.$current_tab); |
|
19 | +$current_tab_label = isset($tabs[$current_tab]) ? $tabs[$current_tab] : ''; |
|
20 | 20 | |
21 | -if ( ! $tab_exists ) { |
|
22 | - wp_safe_redirect( admin_url( 'options-general.php?page=auto-load-next-post-settings' ) ); |
|
21 | +if ( ! $tab_exists) { |
|
22 | + wp_safe_redirect(admin_url('options-general.php?page=auto-load-next-post-settings')); |
|
23 | 23 | exit; |
24 | 24 | } |
25 | 25 | ?> |
@@ -28,23 +28,23 @@ discard block |
||
28 | 28 | <h2 class="nav-tab-wrapper"> |
29 | 29 | <span>Auto Load Next Post v<?php echo AUTO_LOAD_NEXT_POST_VERSION; ?></span> |
30 | 30 | <?php |
31 | - foreach ( $tabs as $slug => $label ) { |
|
32 | - echo '<a href="' . esc_html( admin_url( 'options-general.php?page=auto-load-next-post-settings&tab=' . esc_attr( $slug ) ) ) . '" class="nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>'; |
|
31 | + foreach ($tabs as $slug => $label) { |
|
32 | + echo '<a href="'.esc_html(admin_url('options-general.php?page=auto-load-next-post-settings&tab='.esc_attr($slug))).'" class="nav-tab '.($current_tab === $slug ? 'nav-tab-active' : '').'">'.esc_html($label).'</a>'; |
|
33 | 33 | } |
34 | 34 | |
35 | - do_action( 'auto_load_next_post_settings_tabs' ); |
|
35 | + do_action('auto_load_next_post_settings_tabs'); |
|
36 | 36 | ?> |
37 | 37 | </h2> |
38 | 38 | <?php |
39 | - do_action( 'auto_load_next_post_sections_' . $current_tab ); |
|
39 | + do_action('auto_load_next_post_sections_'.$current_tab); |
|
40 | 40 | |
41 | 41 | self::show_messages(); |
42 | 42 | |
43 | - do_action( 'auto_load_next_post_settings_' . $current_tab ); |
|
43 | + do_action('auto_load_next_post_settings_'.$current_tab); |
|
44 | 44 | ?> |
45 | 45 | <p class="submit"> |
46 | - <input name="save" class="button-primary" type="submit" value="<?php esc_attr_e( 'Save Changes', 'auto-load-next-post' ); ?>" /> |
|
47 | - <?php wp_nonce_field( 'auto-load-next-post-settings' ); ?> |
|
46 | + <input name="save" class="button-primary" type="submit" value="<?php esc_attr_e('Save Changes', 'auto-load-next-post'); ?>" /> |
|
47 | + <?php wp_nonce_field('auto-load-next-post-settings'); ?> |
|
48 | 48 | </p> |
49 | 49 | </form> |
50 | 50 | </div> |
@@ -11,11 +11,11 @@ |
||
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-warning auto-load-next-post-message"> |
19 | - <p><?php printf( esc_html__( 'The theme you are using has not declared support for %s – please see documentation or the F.A.Q. to find out how to support your theme.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p> |
|
20 | - <p><a href="<?php echo esc_url( 'https://autoloadnextpost.com/documentation/' ); ?>" target="_blank" class="button-primary"><?php esc_html_e( 'Documentation', 'auto-load-next-post' ); ?></a> <a href="<?php echo esc_url( 'https://autoloadnextpost.com/f-a-q/' ); ?>" target="_blank" class="button-secondary"><?php esc_html_e( 'Frequently Asked Questions', 'auto-load-next-post' ); ?></a> <a class="skip button-secondary" href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_theme_support_check', 'true' ) ); ?>"><?php esc_html_e( 'Hide this notice', 'auto-load-next-post' ); ?></a></p> |
|
19 | + <p><?php printf(esc_html__('The theme you are using has not declared support for %s – please see documentation or the F.A.Q. to find out how to support your theme.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p> |
|
20 | + <p><a href="<?php echo esc_url('https://autoloadnextpost.com/documentation/'); ?>" target="_blank" class="button-primary"><?php esc_html_e('Documentation', 'auto-load-next-post'); ?></a> <a href="<?php echo esc_url('https://autoloadnextpost.com/f-a-q/'); ?>" target="_blank" class="button-secondary"><?php esc_html_e('Frequently Asked Questions', 'auto-load-next-post'); ?></a> <a class="skip button-secondary" href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_theme_support_check', 'true')); ?>"><?php esc_html_e('Hide this notice', 'auto-load-next-post'); ?></a></p> |
|
21 | 21 | </div> |