tab_activity.php
2 years ago
tab_captcha.php
1 year ago
tab_design.php
1 year ago
tab_firewall.php
2 years ago
tab_geoip.php
2 years ago
tab_login_form.php
1 year ago
tab_temp_access.php
2 years ago
tab_design.php
54 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * WP Captcha |
| 5 | * https://getwpcaptcha.com/ |
| 6 | * (c) WebFactory Ltd, 2022 - 2023, www.webfactoryltd.com |
| 7 | */ |
| 8 | |
| 9 | class WPCaptcha_Tab_Design extends WPCaptcha |
| 10 | { |
| 11 | static function display() |
| 12 | { |
| 13 | echo '<div class="tab-content">'; |
| 14 | |
| 15 | $options = WPCaptcha_Setup::get_options(); |
| 16 | $templates = WPCaptcha_Functions::get_templates(); |
| 17 | |
| 18 | echo '<table class="form-table"><tbody>'; |
| 19 | echo '<tr valign="top"> |
| 20 | <th scope="row"><label for="block_bots">Enable Customizer</label></th> |
| 21 | <td>'; |
| 22 | WPCaptcha_Utility::create_toggle_switch('design_enable', array('saved_value' => $options['design_enable'], 'option_key' => esc_attr(WPCAPTCHA_OPTIONS_KEY) . '[design_enable]')); |
| 23 | echo '<br /><span>You can enable the customizer to use the settings below or leave it turned off to show the default WordPress login page style or customize it using a different plugin or theme settings</span>'; |
| 24 | echo '</td></tr>'; |
| 25 | echo '</tbody>'; |
| 26 | echo '</table>'; |
| 27 | |
| 28 | echo '<h3>Templates:</h3>'; |
| 29 | echo '<ul class="design-templates">'; |
| 30 | foreach($templates as $template_id => $template){ |
| 31 | $redirect_url = ''; |
| 32 | if(isset($_SERVER['REQUEST_URI'])){ |
| 33 | $redirect_url = urlencode(sanitize_url(wp_unslash($_SERVER['REQUEST_URI']))); |
| 34 | } |
| 35 | WPCaptcha_Utility::wp_kses_wf('<li><a class="disable_confirm_action ' . ($template_id == $options['design_template']?'design-template-active':'') . '" data-confirm="Are you sure you want to enable this template? This will overwrite all Design settings." href="' . add_query_arg(array('_wpnonce' => wp_create_nonce('wpcaptcha_install_template'), 'template' => $template_id, 'action' => 'wpcaptcha_install_template', 'redirect' => $redirect_url), admin_url('admin.php')) . '"><img src="' . WPCAPTCHA_PLUGIN_URL . '/images/templates/' . $template_id . '.jpg"></a></li>'); |
| 36 | } |
| 37 | echo '</ul>'; |
| 38 | |
| 39 | echo '<tr><td></td><td>'; |
| 40 | WPCaptcha_admin::footer_save_button(); |
| 41 | echo '</td></tr>'; |
| 42 | |
| 43 | echo '<br />'; |
| 44 | |
| 45 | echo '<div class="notice-box-info"> |
| 46 | The Design options allow you to completely customize the login page appearance.<a href="#" class="open-pro-dialog" data-pro-feature="design">Get PRO now</a> to use the Design feature. |
| 47 | </div>'; |
| 48 | |
| 49 | echo '<img class="open-upsell open-upsell-block" data-feature="design" style="width: 100%;" src="' . esc_url(WPCAPTCHA_PLUGIN_URL) . '/images/design.png" alt="WP Captcha" title="WP Captcha Design" />'; |
| 50 | echo '</div>'; |
| 51 | } // display |
| 52 | |
| 53 | } // class WPCaptcha_Tab_Login_Form |
| 54 |