PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 3.5.2
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v3.5.2
3.5.2 3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / addons / CleanTalk / CleanTalk.php
everest-forms / addons / CleanTalk Last commit date
Builder 1 year ago Settings 2 months ago assets 1 year ago CleanTalk.php 2 months ago
CleanTalk.php
109 lines
1 <?php
2 /**
3 * CleanTalk.
4 *
5 * @since 3.2.2
6 * @package EverestForms\Addons\CleanTalk
7 */
8
9 namespace EverestForms\Addons\CleanTalk;
10
11 use EverestForms\Addons\CleanTalk\Builder\Builder;
12 use EverestForms\Addons\CleanTalk\Settings\Settings;
13 use EverestForms\Traits\Singleton;
14
15 /**
16 * CleanTalk.
17 *
18 * @since 3.2.2
19 */
20 class CleanTalk {
21
22 use Singleton;
23
24 /**
25 * Constructor.
26 *
27 * @since 3.2.2
28 */
29 public function __construct() {
30 $this->setup();
31 }
32
33 /**
34 * Setup the CleanTalk.
35 *
36 * @since 3.2.2
37 */
38 public function setup() {
39 if ( ! is_admin() ) {
40 return;
41 }
42 new Builder();
43 add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
44 }
45
46 /**
47 * Admin Enqueue Scripts.
48 */
49 public function admin_enqueue_scripts() {
50 $screen = get_current_screen();
51 $screen_id = $screen ? $screen->id : '';
52 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
53
54 wp_register_script( 'everest-forms-clean-talk', plugins_url( "addons/CleanTalk/assets/js/admin/admin{$suffix}.js", EVF_PLUGIN_FILE ), array( 'jquery' ), EVF_VERSION, true );
55 wp_register_style( 'everest-forms-clean-talk-backward', plugins_url( 'addons/CleanTalk/assets/css/admin/backward.css', EVF_PLUGIN_FILE ), array(), EVF_VERSION );
56 wp_register_style( 'everest-forms-clean-talk-style', plugins_url( 'addons/CleanTalk/assets/css/admin/admin.css', EVF_PLUGIN_FILE ), array(), EVF_VERSION );
57
58 if ( 'everest-forms_page_evf-settings' === $screen_id || 'everest-forms_page_evf-builder' === $screen_id ) {
59 if ( ! defined( 'EFP_PLUGIN_FILE' ) ) {
60 wp_enqueue_style( 'everest-forms-clean-talk-backward' );
61 }
62
63 wp_enqueue_script( 'everest-forms-clean-talk' );
64 wp_enqueue_style( 'everest-forms-clean-talk-style' );
65 wp_localize_script(
66 'everest-forms-clean-talk',
67 'everest_forms_clean_talk',
68 array(
69 'ajax_url' => admin_url( 'admin-ajax.php' ),
70 'security' => wp_create_nonce( 'everest_forms_clean_talk_nonce' ),
71 'output' => $this->evf_get_popup_output(),
72 )
73 );
74 }
75 }
76
77 /**
78 * Get the output for the CleanTalk popup.
79 *
80 * @since 3.2.3
81 */
82 public function evf_get_popup_output() {
83 $output = '';
84
85 $output .= '<form action="" class="everest-forms-clean-talk-form-container">';
86 $output .= '<div class="clean-talk-form-group">';
87 $output .= '<div class="everest-forms-clean-talk-error-message-container" style="display: none"></div>';
88 $output .= '<div class="everest-forms-clean-talk-access-key-title">' . __( 'CleanTalk Access Key', 'everest-forms' ) . '</div>';
89 $output .= '<input type="password" class="everest-forms-clean-talk-access-key" placeholder="Enter access key" required />';
90 $output .= '<p style="margin-top: 8px; font-size: 14px; text-align: left; margin-bottom: 24px; font">';
91 $output .= __( 'Enter your CleanTalk REST API key from your ', 'everest-forms' );
92 $output .= '<a href="https://cleantalk.org/my" target="_blank">' . __( 'account dashboard here', 'everest-forms' ) . '</a>.';
93 $output .= '</p>';
94
95 $output .= '<div class="everest-forms-clean-talk-note">';
96 $output .= '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" style="vertical-align: text-bottom; margin-right: 5px;">';
97 $output .= '<path fill-rule="evenodd" clip-rule="evenodd" d="M8 1.45455C4.38505 1.45455 1.45455 4.38505 1.45455 8C1.45455 11.615 4.38505 14.5455 8 14.5455C11.615 14.5455 14.5455 11.615 14.5455 8C14.5455 4.38505 11.615 1.45455 8 1.45455ZM0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8ZM8 7.27273C8.40166 7.27273 8.72727 7.59834 8.72727 8V10.9091C8.72727 11.3108 8.40166 11.6364 8 11.6364C7.59834 11.6364 7.27273 11.3108 7.27273 10.9091V8C7.27273 7.59834 7.59834 7.27273 8 7.27273ZM8 4.36364C7.59834 4.36364 7.27273 4.68925 7.27273 5.09091C7.27273 5.49257 7.59834 5.81818 8 5.81818H8.00727C8.40894 5.81818 8.73455 5.49257 8.73455 5.09091C8.73455 4.68925 8.40894 4.36364 8.00727 4.36364H8Z" fill="#4584FF"/>';
98 $output .= '</svg>';
99 $output .= '<p><strong>Note : </strong>' . __( 'This will update the CleanTalk Access Key globally. You can check here on ', 'everest-forms' );
100 $output .= '<a href="' . esc_url( admin_url( 'admin.php?page=evf-settings&tab=recaptcha&section=integration' ) ) . '" target="__blank">' . __( 'Settings &gt; Security &gt; Integration &gt; CleanTalk', 'everest-forms' ) . '</a>.</p>';
101 $output .= '</div>';
102
103 $output .= '</div>';
104 $output .= '</form>';
105
106 return $output;
107 }
108 }
109