admin.php
1 year ago
ajax.php
1 year ago
captcha.php
1 year ago
functions.php
1 year ago
setup.php
1 year ago
stats.php
1 year ago
utility.php
1 year ago
admin.php
549 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * WP Captcha |
| 5 | * https://getwpcaptcha.com/ |
| 6 | * (c) WebFactory Ltd, 2022 - 2025, www.webfactoryltd.com |
| 7 | */ |
| 8 | |
| 9 | class WPCaptcha_Admin extends WPCaptcha |
| 10 | { |
| 11 | |
| 12 | /** |
| 13 | * Enqueue Admin Scripts |
| 14 | * |
| 15 | * @since 5.0 |
| 16 | * |
| 17 | * @return null |
| 18 | */ |
| 19 | static function admin_enqueue_scripts($hook) |
| 20 | { |
| 21 | if ('settings_page_wpcaptcha' == $hook) { |
| 22 | wp_enqueue_style('wpcaptcha-admin', WPCAPTCHA_PLUGIN_URL . 'css/wpcaptcha.css', array(), self::$version); |
| 23 | wp_enqueue_style('wpcaptcha-dataTables', WPCAPTCHA_PLUGIN_URL . 'css/jquery.dataTables.min.css', array(), self::$version); |
| 24 | wp_enqueue_style('wpcaptcha-sweetalert', WPCAPTCHA_PLUGIN_URL . 'css/sweetalert2.min.css', array(), self::$version); |
| 25 | wp_enqueue_style('wpcaptcha-tooltipster', WPCAPTCHA_PLUGIN_URL . 'css/tooltipster.bundle.min.css', array(), self::$version); |
| 26 | wp_enqueue_style('wp-color-picker'); |
| 27 | wp_enqueue_style('wp-jquery-ui-dialog'); |
| 28 | |
| 29 | wp_enqueue_script('jquery-ui-tabs'); |
| 30 | wp_enqueue_script('jquery-ui-core'); |
| 31 | wp_enqueue_script('jquery-ui-position'); |
| 32 | wp_enqueue_script('jquery-effects-core'); |
| 33 | wp_enqueue_script('jquery-effects-blind'); |
| 34 | wp_enqueue_script('jquery-ui-dialog'); |
| 35 | |
| 36 | wp_enqueue_script('wpcaptcha-tooltipster', WPCAPTCHA_PLUGIN_URL . 'js/tooltipster.bundle.min.js', array('jquery'), self::$version, true); |
| 37 | wp_enqueue_script('wpcaptcha-dataTables', WPCAPTCHA_PLUGIN_URL . 'js/jquery.dataTables.min.js', array(), self::$version, true); |
| 38 | wp_enqueue_script('wpcaptcha-chart', WPCAPTCHA_PLUGIN_URL . 'js/chart.min.js', array(), self::$version, true); |
| 39 | wp_enqueue_script('wpcaptcha-moment', WPCAPTCHA_PLUGIN_URL . 'js/moment.min.js', array(), self::$version, true); |
| 40 | wp_enqueue_script('wpcaptcha-sweetalert', WPCAPTCHA_PLUGIN_URL . 'js/sweetalert2.min.js', array(), self::$version, true); |
| 41 | |
| 42 | wp_enqueue_script('wp-color-picker'); |
| 43 | wp_enqueue_media(); |
| 44 | |
| 45 | $js_localize = array( |
| 46 | 'undocumented_error' => __('An undocumented error has occurred. Please refresh the page and try again.', 'advanced-google-recaptcha'), |
| 47 | 'documented_error' => __('An error has occurred.', 'advanced-google-recaptcha'), |
| 48 | 'plugin_name' => __('WP Captcha', 'advanced-google-recaptcha'), |
| 49 | 'plugin_url' => WPCAPTCHA_PLUGIN_URL, |
| 50 | 'icon_url' => WPCAPTCHA_PLUGIN_URL . 'images/wp-captcha-loader.gif', |
| 51 | 'settings_url' => admin_url('options-general.php?page=wpcaptcha'), |
| 52 | 'version' => self::$version, |
| 53 | 'site' => get_home_url(), |
| 54 | 'url' => WPCAPTCHA_PLUGIN_URL, |
| 55 | 'cancel_button' => __('Cancel', 'advanced-google-recaptcha'), |
| 56 | 'ok_button' => __('OK', 'advanced-google-recaptcha'), |
| 57 | 'run_tool_nonce' => wp_create_nonce('wpcaptcha_run_tool'), |
| 58 | 'stats_unavailable' => 'Stats will be available once enough data is collected.', |
| 59 | 'stats_locks' => WPCaptcha_Stats::get_stats('locks'), |
| 60 | 'stats_fails' => WPCaptcha_Stats::get_stats('fails'), |
| 61 | 'wp301_install_url' => add_query_arg(array('action' => 'wpcaptcha_install_wp301', '_wpnonce' => wp_create_nonce('install_wp301'), 'rnd' => wp_rand()), admin_url('admin.php')), |
| 62 | ); |
| 63 | |
| 64 | $js_localize['chart_colors'] = array('#4285f4', '#ff5429', '#ff7d5c', '#ffac97'); |
| 65 | |
| 66 | wp_enqueue_script('wpcaptcha-admin', WPCAPTCHA_PLUGIN_URL . 'js/wpcaptcha.js', array('jquery'), self::$version, true); |
| 67 | wp_localize_script('wpcaptcha-admin', 'wpcaptcha_vars', $js_localize); |
| 68 | |
| 69 | // fix for aggressive plugins that include their CSS or JS on all pages |
| 70 | wp_dequeue_style('uiStyleSheet'); |
| 71 | wp_dequeue_style('wpcufpnAdmin'); |
| 72 | wp_dequeue_style('unifStyleSheet'); |
| 73 | wp_dequeue_style('wpcufpn_codemirror'); |
| 74 | wp_dequeue_style('wpcufpn_codemirrorTheme'); |
| 75 | wp_dequeue_style('collapse-admin-css'); |
| 76 | wp_dequeue_style('jquery-ui-css'); |
| 77 | wp_dequeue_style('tribe-common-admin'); |
| 78 | wp_dequeue_style('file-manager__jquery-ui-css'); |
| 79 | wp_dequeue_style('file-manager__jquery-ui-css-theme'); |
| 80 | wp_dequeue_style('wpmegmaps-jqueryui'); |
| 81 | wp_dequeue_style('wp-botwatch-css'); |
| 82 | wp_dequeue_style('njt-filebird-admin'); |
| 83 | wp_dequeue_style('ihc_jquery-ui.min.css'); |
| 84 | wp_dequeue_style('badgeos-juqery-autocomplete-css'); |
| 85 | wp_dequeue_style('mainwp'); |
| 86 | wp_dequeue_style('mainwp-responsive-layouts'); |
| 87 | wp_dequeue_style('jquery-ui-style'); |
| 88 | wp_dequeue_style('additional_style'); |
| 89 | wp_dequeue_style('wobd-jqueryui-style'); |
| 90 | wp_dequeue_style('wpdp-style3'); |
| 91 | wp_dequeue_style('jquery_smoothness_ui'); |
| 92 | wp_dequeue_style('uap_main_admin_style'); |
| 93 | wp_dequeue_style('uap_font_awesome'); |
| 94 | wp_dequeue_style('uap_jquery-ui.min.css'); |
| 95 | wp_dequeue_style('wqm-select2-style'); |
| 96 | |
| 97 | wp_deregister_script('wqm-select2-script'); |
| 98 | |
| 99 | WPCaptcha_Utility::dismiss_pointer_ajax(); |
| 100 | } |
| 101 | |
| 102 | $pointers = get_option(WPCAPTCHA_POINTERS_KEY); |
| 103 | |
| 104 | if ('settings_page_wpcaptcha' != $hook) { |
| 105 | if ($pointers) { |
| 106 | $pointers['run_tool_nonce'] = wp_create_nonce('wpcaptcha_run_tool'); |
| 107 | wp_enqueue_script('wp-pointer'); |
| 108 | wp_enqueue_style('wp-pointer'); |
| 109 | wp_localize_script('wp-pointer', 'wpcaptcha_pointers', $pointers); |
| 110 | } |
| 111 | |
| 112 | if ($pointers) { |
| 113 | wp_enqueue_script('wpcaptcha-pointers', WPCAPTCHA_PLUGIN_URL . 'js/wpcaptcha-pointers.js', array('jquery'), self::$version, true); |
| 114 | } |
| 115 | } |
| 116 | } // admin_enqueue_scripts |
| 117 | |
| 118 | static function admin_notices() |
| 119 | { |
| 120 | $notices = get_option(WPCAPTCHA_NOTICES_KEY); |
| 121 | |
| 122 | if (is_array($notices)) { |
| 123 | foreach ($notices as $id => $notice) { |
| 124 | WPCaptcha_Utility::wp_kses_wf('<div class="notice-' . $notice['type'] . ' notice is-dismissible"><p>' . $notice['text'] . '<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></p></div>'); |
| 125 | if ($notice['once'] == true) { |
| 126 | unset($notices[$id]); |
| 127 | update_option(WPCAPTCHA_NOTICES_KEY, $notices); |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | } // notices |
| 132 | |
| 133 | static function add_notice($id = false, $text = '', $type = 'warning', $show_once = false) |
| 134 | { |
| 135 | if ($id) { |
| 136 | $notices = get_option(WPCAPTCHA_NOTICES_KEY, array()); |
| 137 | $notices[$id] = array('text' => $text, 'type' => $type, 'once' => $show_once); |
| 138 | update_option(WPCAPTCHA_NOTICES_KEY, $notices); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Admin menu entry |
| 144 | * |
| 145 | * @since 5.0 |
| 146 | * |
| 147 | * @return null |
| 148 | */ |
| 149 | static function admin_menu() |
| 150 | { |
| 151 | add_options_page( |
| 152 | __('Advanced Google reCAPTCHA', 'advanced-google-recaptcha'), |
| 153 | __('Advanced Google reCAPTCHA', 'advanced-google-recaptcha'), |
| 154 | 'manage_options', |
| 155 | 'wpcaptcha', |
| 156 | array(__CLASS__, 'main_page') |
| 157 | ); |
| 158 | } // admin_menu |
| 159 | |
| 160 | /** |
| 161 | * Add settings link to plugins page |
| 162 | * |
| 163 | * @since 5.0 |
| 164 | * |
| 165 | * @return null |
| 166 | */ |
| 167 | static function plugin_action_links($links) |
| 168 | { |
| 169 | $settings_link = '<a href="' . admin_url('options-general.php?page=wpcaptcha') . '" title="WP Captcha Settings">' . __('Settings', 'advanced-google-recaptcha') . '</a>'; |
| 170 | $pro_link = '<a href="' . admin_url('options-general.php?page=wpcaptcha#open-pro-dialog') . '" title="Get more protection with WP Captcha PRO"><b>' . __('Get EXTRA protection', 'advanced-google-recaptcha') . '</b></a>'; |
| 171 | |
| 172 | array_unshift($links, $settings_link); |
| 173 | array_unshift($links, $pro_link); |
| 174 | |
| 175 | return $links; |
| 176 | } // plugin_action_links |
| 177 | |
| 178 | /** |
| 179 | * Add links to plugin's description in plugins table |
| 180 | * |
| 181 | * @since 5.0 |
| 182 | * |
| 183 | * @return null |
| 184 | */ |
| 185 | static function plugin_meta_links($links, $file) |
| 186 | { |
| 187 | if ($file !== 'advanced-google-recaptcha/advanced-google-recaptcha.php') { |
| 188 | return $links; |
| 189 | } |
| 190 | |
| 191 | $support_link = '<a href="https://getwpcaptcha.com/support/" title="' . __('Get help', 'advanced-google-recaptcha') . '">' . __('Support', 'advanced-google-recaptcha') . '</a>'; |
| 192 | $links[] = $support_link; |
| 193 | |
| 194 | return $links; |
| 195 | } // plugin_meta_links |
| 196 | |
| 197 | /** |
| 198 | * Admin footer text |
| 199 | * |
| 200 | * @since 5.0 |
| 201 | * |
| 202 | * @return null |
| 203 | */ |
| 204 | static function admin_footer_text($text) |
| 205 | { |
| 206 | if (!self::is_plugin_page()) { |
| 207 | return $text; |
| 208 | } |
| 209 | |
| 210 | $text = '<i class="wpcaptcha-footer">WP Captcha v' . self::$version . ' <a href="' . self::generate_web_link('admin_footer') . '" title="Visit WP Captcha page for more info" target="_blank">WebFactory Ltd</a>. Please <a target="_blank" href="https://wordpress.org/support/plugin/advanced-google-recaptcha/reviews/#new-post" title="Rate the plugin">rate the plugin <span>� |
| 211 | � |
| 212 | � |
| 213 | � |
| 214 | � |
| 215 | </span></a> to help us spread the word. Thank you 🙌 from the WebFactory team!</i>'; |
| 216 | |
| 217 | return $text; |
| 218 | } // admin_footer_text |
| 219 | |
| 220 | /** |
| 221 | * Helper function for generating UTM tagged links |
| 222 | * |
| 223 | * @param string $placement Optional. UTM content param. |
| 224 | * @param string $page Optional. Page to link to. |
| 225 | * @param array $params Optional. Extra URL params. |
| 226 | * @param string $anchor Optional. URL anchor part. |
| 227 | * |
| 228 | * @return string |
| 229 | */ |
| 230 | static function generate_web_link($placement = '', $page = '/', $params = array(), $anchor = '') |
| 231 | { |
| 232 | $base_url = 'https://getwpcaptcha.com'; |
| 233 | |
| 234 | if ('/' != $page) { |
| 235 | $page = '/' . trim($page, '/') . '/'; |
| 236 | } |
| 237 | if ($page == '//') { |
| 238 | $page = '/'; |
| 239 | } |
| 240 | |
| 241 | $parts = array_merge(array('utm_source' => 'advanced-google-recaptcha', 'utm_medium' => 'plugin', 'utm_content' => $placement, 'utm_campaign' => 'wpcaptcha-v' . self::$version), $params); |
| 242 | |
| 243 | if (!empty($anchor)) { |
| 244 | $anchor = '#' . trim($anchor, '#'); |
| 245 | } |
| 246 | |
| 247 | $out = $base_url . $page . '?' . http_build_query($parts, '', '&') . $anchor; |
| 248 | |
| 249 | return $out; |
| 250 | } // generate_web_link |
| 251 | |
| 252 | /** |
| 253 | * Test if we're on plugin's page |
| 254 | * |
| 255 | * @since 5.0 |
| 256 | * |
| 257 | * @return null |
| 258 | */ |
| 259 | static function is_plugin_page() |
| 260 | { |
| 261 | $current_screen = get_current_screen(); |
| 262 | |
| 263 | if ($current_screen->id == 'settings_page_wpcaptcha') { |
| 264 | return true; |
| 265 | } else { |
| 266 | return false; |
| 267 | } |
| 268 | } // is_plugin_page |
| 269 | |
| 270 | /** |
| 271 | * Settings Page HTML |
| 272 | * |
| 273 | * @since 5.0 |
| 274 | * |
| 275 | * @return null |
| 276 | */ |
| 277 | static function main_page() |
| 278 | { |
| 279 | if (!current_user_can('manage_options')) { |
| 280 | wp_die('You do not have sufficient permissions to access this page.'); |
| 281 | } |
| 282 | |
| 283 | $options = WPCaptcha_Setup::get_options(); |
| 284 | |
| 285 | // auto remove welcome pointer when options are opened |
| 286 | $pointers = get_option(WPCAPTCHA_POINTERS_KEY); |
| 287 | if (isset($pointers['welcome'])) { |
| 288 | unset($pointers['welcome']); |
| 289 | update_option(WPCAPTCHA_POINTERS_KEY, $pointers); |
| 290 | } |
| 291 | |
| 292 | echo '<div class="wrap">'; |
| 293 | echo '<div class="wpcaptcha-header"> |
| 294 | <div class="wp-captcha-logo"> |
| 295 | <img src="' . esc_url(WPCAPTCHA_PLUGIN_URL) . '/images/wp-captcha-logo.png" alt="WP Captcha" height="60" title="WP Captcha"> |
| 296 | </div>'; |
| 297 | |
| 298 | echo '<a data-tab="firewall" data-tab2="general" title="Click to open Firewall Settings" class="tooltip change_tab wpcaptcha-header-status wpcaptcha-header-status-' . ($options['firewall_block_bots'] == 1 ? 'enabled' : 'disabled') . '" style="width: 142px;">'; |
| 299 | echo '<span class="dashicons dashicons-yes"></span>'; |
| 300 | echo '<div class="option">Firewall</span></div>'; |
| 301 | if ($options['firewall_block_bots'] == 'disabled') { |
| 302 | echo '<div class="status">Disabled</div>'; |
| 303 | } else { |
| 304 | echo '<div class="status">Enabled</div>'; |
| 305 | } |
| 306 | echo '</a>'; |
| 307 | |
| 308 | echo '<a data-tab="login_form" data-tab2="login_basic" title="Click to open Login Protection settings" class="tooltip change_tab wpcaptcha-header-status wpcaptcha-header-status-' . ($options['login_protection'] == 1 ? 'enabled' : 'disabled') . '">'; |
| 309 | echo '<span class="dashicons dashicons-yes"></span>'; |
| 310 | echo '<div class="option">Login Protection</span></div>'; |
| 311 | if ($options['login_protection'] == 'disabled') { |
| 312 | echo '<div class="status">Disabled</div>'; |
| 313 | } else { |
| 314 | echo '<div class="status">Enabled</div>'; |
| 315 | } |
| 316 | echo '</a>'; |
| 317 | |
| 318 | echo '<a data-tab="captcha" data-tab2="captcha" title="Click to open Captcha settings" class="tooltip change_tab wpcaptcha-header-status wpcaptcha-header-status-' . ($options['captcha'] == 'disabled' ? 'disabled' : 'enabled') . '" style="width: 142px;">'; |
| 319 | echo '<span class="dashicons dashicons-yes"></span>'; |
| 320 | echo '<div class="option">Captcha</span></div>'; |
| 321 | if ($options['captcha'] == 'disabled') { |
| 322 | echo '<div class="status">Disabled</div>'; |
| 323 | } else { |
| 324 | echo '<div class="status">Enabled</div>'; |
| 325 | } |
| 326 | echo '</a>'; |
| 327 | |
| 328 | echo '</div>'; |
| 329 | |
| 330 | echo '<h1></h1>'; |
| 331 | |
| 332 | echo '<form method="post" action="options.php" enctype="multipart/form-data" id="wpcaptcha_form">'; |
| 333 | settings_fields(WPCAPTCHA_OPTIONS_KEY); |
| 334 | |
| 335 | $tabs = array(); |
| 336 | |
| 337 | $tabs[] = array('id' => 'wpcaptcha_captcha', 'icon' => 'wpcaptcha-icon wpcaptcha-make-group', 'class' => '', 'label' => __('Captcha', 'advanced-google-recaptcha'), 'callback' => array('WPCaptcha_Tab_Captcha', 'display')); |
| 338 | $tabs[] = array('id' => 'wpcaptcha_activity', 'icon' => 'wpcaptcha-icon wpcaptcha-log', 'class' => '', 'label' => __('Activity', 'advanced-google-recaptcha'), 'callback' => array('WPCaptcha_Tab_Activity', 'display')); |
| 339 | $tabs[] = array('id' => 'wpcaptcha_login_form', 'icon' => 'wpcaptcha-icon wpcaptcha-enter', 'class' => '', 'label' => __('Login Protection', 'advanced-google-recaptcha'), 'callback' => array('WPCaptcha_Tab_Login_Form', 'display')); |
| 340 | $tabs[] = array('id' => 'wpcaptcha_firewall', 'icon' => 'wpcaptcha-icon wpcaptcha-check', 'class' => '', 'label' => __('Firewall', 'advanced-google-recaptcha'), 'callback' => array('WPCaptcha_Tab_Firewall', 'display')); |
| 341 | $tabs[] = array('id' => 'wpcaptcha_geoip', 'icon' => 'wpcaptcha-icon wpcaptcha-globe', 'class' => '', 'label' => __('Country Blocking', 'advanced-google-recaptcha'), 'callback' => array('WPCaptcha_Tab_GeoIP', 'display')); |
| 342 | $tabs[] = array('id' => 'wpcaptcha_design', 'icon' => 'wpcaptcha-icon wpcaptcha-settings', 'class' => '', 'label' => __('Design', 'advanced-google-recaptcha'), 'callback' => array('WPCaptcha_Tab_Design', 'display')); |
| 343 | $tabs[] = array('id' => 'wpcaptcha_temp_access', 'icon' => 'wpcaptcha-icon wpcaptcha-hour-glass', 'class' => '', 'label' => __('Temp Access', 'advanced-google-recaptcha'), 'callback' => array('WPCaptcha_Tab_Temporary_Access', 'display')); |
| 344 | $tabs[] = array('id' => 'wpcaptcha_pro', 'class' => 'open-upsell nav-tab-pro', 'icon' => '<span class="dashicons dashicons-star-filled"></span>', 'label' => __('PRO', 'advanced-google-recaptcha'), 'callback' => ''); |
| 345 | |
| 346 | $tabs = apply_filters('wpcaptcha_tabs', $tabs); |
| 347 | echo '<div id="wpcaptcha_tabs_wrapper" class="ui-tabs">'; |
| 348 | |
| 349 | echo '<div id="wpcaptcha_tabs" class="ui-tabs" style="display: none;">'; |
| 350 | echo '<ul class="wpcaptcha-main-tab">'; |
| 351 | foreach ($tabs as $tab) { |
| 352 | echo '<li><a ' . (!empty($tab['callback']) ? 'href="#' . esc_attr($tab['id']) . '"' : '') . 'class="' . esc_attr($tab['class']) . '">'; |
| 353 | if (strpos($tab['icon'], 'dashicon')) { |
| 354 | WPCaptcha_Utility::wp_kses_wf($tab['icon']); |
| 355 | } else { |
| 356 | echo '<span class="icon"><i class="' . esc_attr($tab['icon']) . '"></i></span>'; |
| 357 | } |
| 358 | echo '<span class="label">' . esc_attr($tab['label']) . '</span></a></li>'; |
| 359 | } |
| 360 | echo '</ul>'; |
| 361 | |
| 362 | foreach ($tabs as $tab) { |
| 363 | if (is_callable($tab['callback'])) { |
| 364 | echo '<div style="display: none;" id="' . esc_attr($tab['id']) . '">'; |
| 365 | call_user_func($tab['callback']); |
| 366 | echo '</div>'; |
| 367 | } |
| 368 | } // foreach |
| 369 | |
| 370 | echo '</div>'; |
| 371 | echo '</div>'; |
| 372 | |
| 373 | echo '<div id="wpcaptcha_tabs_sidebar" style="display:none;">'; |
| 374 | echo '<div class="sidebar-box pro-ad-box"> |
| 375 | <p class="text-center"><a href="#" data-pro-feature="sidebar-box-logo" class="open-pro-dialog"> |
| 376 | <img src="' . esc_url(WPCAPTCHA_PLUGIN_URL . '/images/wp-captcha-logo.png') . '" alt="WP Captcha PRO" title="WP Captcha PRO"></a><br><b>PRO version is here! Grab the launch discount.</b></p> |
| 377 | <ul class="plain-list"> |
| 378 | <li>7 Types of Captcha + GDPR Compatibility</li> |
| 379 | <li>Login Page Customization - Visual & URL</li> |
| 380 | <li>Advanced Login Page Protection</li> |
| 381 | <li>Email Based Two Factor Authentication (2FA)</li> |
| 382 | <li>Advanced Firewall + Cloud Blacklists</li> |
| 383 | <li>Country Blocking (whitelist & blacklist)</li> |
| 384 | <li>Temporary Access Links</li> |
| 385 | <li>Recovery URL - You Can Never Get Locked Out</li> |
| 386 | <li>Licenses & Sites Manager (remote SaaS dashboard)</li> |
| 387 | <li>White-label Mode</li> |
| 388 | <li>Complete Codeless Plugin Rebranding</li> |
| 389 | <li>Email support from plugin developers</li> |
| 390 | </ul> |
| 391 | |
| 392 | <p class="text-center"><a href="#" class="open-pro-dialog button button-buy" data-pro-feature="sidebar-box">Get PRO Now</a></p> |
| 393 | </div>'; |
| 394 | |
| 395 | if (!defined('EPS_REDIRECT_VERSION') && !defined('WF301_PLUGIN_FILE')) { |
| 396 | echo '<div class="sidebar-box pro-ad-box box-301"> |
| 397 | <h3 class="textcenter"><b>Problems with redirects?<br>Moving content around or changing posts\' URL?<br>Old URLs giving you problems?<br><br><u>Improve your SEO & manage all redirects in one place!</u></b></h3> |
| 398 | |
| 399 | <p class="text-center"><a href="#" class="install-wp301"> |
| 400 | <img src="' . esc_url(WPCAPTCHA_PLUGIN_URL . '/images/wp-301-logo.png') . '" alt="WP 301 Redirects" title="WP 301 Redirects"></a></p> |
| 401 | |
| 402 | <p class="text-center"><a href="#" class="button button-buy install-wp301">Install and activate the <u>free</u> WP 301 Redirects plugin</a></p> |
| 403 | |
| 404 | <p><a href="https://wordpress.org/plugins/eps-301-redirects/" target="_blank">WP 301 Redirects</a> is a free WP plugin maintained by the same team as this WP Captcha plugin. It has <b>+250,000 users, 5-star rating</b>, and is hosted on the official WP repository.</p> |
| 405 | </div>'; |
| 406 | } |
| 407 | |
| 408 | echo '<div class="sidebar-box" style="margin-top: 35px;"> |
| 409 | <p>Please <a href="https://wordpress.org/support/plugin/advanced-google-recaptcha/reviews/#new-post" target="_blank">rate the plugin � |
| 410 | � |
| 411 | � |
| 412 | � |
| 413 | � |
| 414 | </a> to <b>keep it up-to-date & maintained</b>. It only takes a second to rate. Thank you! 👋</p> |
| 415 | </div>'; |
| 416 | echo '</div>'; |
| 417 | echo '</form>'; |
| 418 | |
| 419 | echo ' <div id="wpcaptcha-pro-dialog" style="display: none;" title="WP Captcha PRO is here!"><span class="ui-helper-hidden-accessible"><input type="text"/></span> |
| 420 | |
| 421 | <div class="center logo"><a href="https://getwpcaptcha.com/?ref=wpcaptcha-free-pricing-table" target="_blank"><img src="' . esc_url(WPCAPTCHA_PLUGIN_URL . '/images/wp-captcha-logo.png') . '" alt="WP Captcha PRO" title="WP Captcha PRO"></a><br> |
| 422 | |
| 423 | <span>Grab the limited PRO <b>Launch Discount</b></span> |
| 424 | </div> |
| 425 | |
| 426 | <table id="wpcaptcha-pro-table"> |
| 427 | <tr> |
| 428 | <td class="center">Personal License</td> |
| 429 | <td class="center">Team License</td> |
| 430 | <td class="center">Agency License</td> |
| 431 | </tr> |
| 432 | |
| 433 | <tr class="prices"> |
| 434 | <td class="center"><span><del>$59</del> $49</span> <b>/year</b></td> |
| 435 | <td class="center"><span><del>$119</del> $99</span> <b>/year</b></td> |
| 436 | <td class="center"><span><del>$149</del> $119</span> <b>/year</b></td> |
| 437 | </tr> |
| 438 | |
| 439 | <tr> |
| 440 | <td><span class="dashicons dashicons-yes"></span><b>1 Site License</b> ($49 per site)</td> |
| 441 | <td><span class="dashicons dashicons-yes"></span><b>5 Sites License</b> ($20 per site)</td> |
| 442 | <td><span class="dashicons dashicons-yes"></span><b>100 Sites License</b> ($1.2 per site)</td> |
| 443 | </tr> |
| 444 | |
| 445 | <tr> |
| 446 | <td><span class="dashicons dashicons-yes"></span>All Plugin Features</td> |
| 447 | <td><span class="dashicons dashicons-yes"></span>All Plugin Features</td> |
| 448 | <td><span class="dashicons dashicons-yes"></span>All Plugin Features</td> |
| 449 | </tr> |
| 450 | |
| 451 | <tr> |
| 452 | <td><span class="dashicons dashicons-yes"></span>7 Types of Captcha</td> |
| 453 | <td><span class="dashicons dashicons-yes"></span>7 Types of Captcha</td> |
| 454 | <td><span class="dashicons dashicons-yes"></span>7 Types of Captcha</td> |
| 455 | </tr> |
| 456 | |
| 457 | <tr> |
| 458 | <td><span class="dashicons dashicons-yes"></span>Advanced Firewall + Cloud Blacklists</td> |
| 459 | <td><span class="dashicons dashicons-yes"></span>Advanced Firewall + Cloud Blacklists</td> |
| 460 | <td><span class="dashicons dashicons-yes"></span>Advanced Firewall + Cloud Blacklists</td> |
| 461 | </tr> |
| 462 | |
| 463 | <tr> |
| 464 | <td><span class="dashicons dashicons-yes"></span>Login Page Customization</td> |
| 465 | <td><span class="dashicons dashicons-yes"></span>Login Page Customization</td> |
| 466 | <td><span class="dashicons dashicons-yes"></span>Login Page Customization</td> |
| 467 | </tr> |
| 468 | |
| 469 | <tr> |
| 470 | <td><span class="dashicons dashicons-yes"></span>Email Based 2FA</td> |
| 471 | <td><span class="dashicons dashicons-yes"></span>Email Based 2FA</td> |
| 472 | <td><span class="dashicons dashicons-yes"></span>Email Based 2FA</td> |
| 473 | </tr> |
| 474 | |
| 475 | <tr> |
| 476 | <td><span class="dashicons dashicons-yes"></span>Temporary Access Links</td> |
| 477 | <td><span class="dashicons dashicons-yes"></span>Temporary Access Links</td> |
| 478 | <td><span class="dashicons dashicons-yes"></span>Temporary Access Links</td> |
| 479 | </tr> |
| 480 | |
| 481 | <tr> |
| 482 | <td><span class="dashicons dashicons-yes"></span>Country Blocking</td> |
| 483 | <td><span class="dashicons dashicons-yes"></span>Country Blocking</td> |
| 484 | <td><span class="dashicons dashicons-yes"></span>Country Blocking</td> |
| 485 | </tr> |
| 486 | |
| 487 | <tr> |
| 488 | <td><span class="dashicons dashicons-yes"></span>SaaS Dashboard</td> |
| 489 | <td><span class="dashicons dashicons-yes"></span>SaaS Dashboard</td> |
| 490 | <td><span class="dashicons dashicons-yes"></span>SaaS Dashboard</td> |
| 491 | </tr> |
| 492 | |
| 493 | <tr> |
| 494 | <td><span class="dashicons dashicons-no"></span>White-label Mode</td> |
| 495 | <td><span class="dashicons dashicons-yes"></span>White-label Mode</td> |
| 496 | <td><span class="dashicons dashicons-yes"></span>White-label Mode</td> |
| 497 | </tr> |
| 498 | |
| 499 | <tr> |
| 500 | <td><span class="dashicons dashicons-no"></span>Full Plugin Rebranding</td> |
| 501 | <td><span class="dashicons dashicons-no"></span>Full Plugin Rebranding</td> |
| 502 | <td><span class="dashicons dashicons-yes"></span>Full Plugin Rebranding</td> |
| 503 | </tr> |
| 504 | |
| 505 | <tr> |
| 506 | <td><a class="button button-buy" data-href-org="https://getwpcaptcha.com/buy/?product=personal-yearly-launch&ref=pricing-table" href="https://getwpcaptcha.com/buy/?product=personal-yearly-launch&ref=pricing-table" target="_blank"><del>$59</del> $49 <small>/y</small><br>BUY NOW</a> |
| 507 | <br>or <a class="button-buy" data-href-org="https://getwpcaptcha.com/buy/?product=personal-ltd-launch&ref=pricing-table" href="https://getwpcaptcha.com/buy/?product=personal-ltd-launch&ref=pricing-table" target="_blank">only <del>$99</del> $79 for a lifetime license</a></td> |
| 508 | <td><a class="button button-buy" data-href-org="https://getwpcaptcha.com/buy/?product=team-yearly-launch&ref=pricing-table" href="https://getwpcaptcha.com/buy/?product=team-yearly-launch&ref=pricing-table" target="_blank"><del>$119</del> $99 <small>/y</small><br>BUY NOW</a></td> |
| 509 | <td><a class="button button-buy" data-href-org="https://getwpcaptcha.com/buy/?product=agency-yearly-launch&ref=pricing-table" href="https://getwpcaptcha.com/buy/?product=agency-yearly-launch&ref=pricing-table" target="_blank"><del>$149</del> $119 <small>/y</small><br>BUY NOW</a></td> |
| 510 | </tr> |
| 511 | |
| 512 | </table> |
| 513 | |
| 514 | <div class="center footer"><b>100% No-Risk Money Back Guarantee!</b> If you don\'t like the plugin over the next 7 days, we will happily refund 100% of your money. No questions asked! Payments are processed by our merchant of records - <a href="https://paddle.com/" target="_blank">Paddle</a>.</div> |
| 515 | </div>'; |
| 516 | |
| 517 | echo '</div>'; // wrap |
| 518 | } // options_page |
| 519 | |
| 520 | /** |
| 521 | * Reset pointers |
| 522 | * |
| 523 | * @since 5.0 |
| 524 | * |
| 525 | * @return null |
| 526 | */ |
| 527 | static function reset_pointers() |
| 528 | { |
| 529 | $pointers = array(); |
| 530 | $pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b style="font-weight: 800; font-variant: small-caps;">Advanced Google reCAPTCHA</b> plugin! Please open <a href="' . admin_url('options-general.php?page=wpcaptcha') . '">Settings - Advanced Google reCaptcha</a> to set up your captcha and website protection settings.'); |
| 531 | |
| 532 | update_option(WPCAPTCHA_POINTERS_KEY, $pointers); |
| 533 | } // reset_pointers |
| 534 | |
| 535 | /** |
| 536 | * Settings footer submit button HTML |
| 537 | * |
| 538 | * @since 5.0 |
| 539 | * |
| 540 | * @return null |
| 541 | */ |
| 542 | static function footer_save_button() |
| 543 | { |
| 544 | echo '<p class="submit">'; |
| 545 | echo '<button class="button button-primary button-large save-settings">' . esc_html__('Save Changes', 'advanced-google-recaptcha') . ' <i class="wpcaptcha-icon wpcaptcha-checkmark"></i></button>'; |
| 546 | echo '</p>'; |
| 547 | } // footer_save_button |
| 548 | } // class |
| 549 |