PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.4.6
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.4.6
7.8.14 7.8.14.1 7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / views / admin / settings / recaptcha / api-keys.php
wordpress-popup / views / admin / settings / recaptcha Last commit date
api-keys.php 6 years ago language.php 6 years ago
api-keys.php
156 lines
1 <?php
2 /**
3 * API keys section under the "recaptcha" tab.
4 *
5 * @package Hustle
6 * @since 4.0.4
7 */
8
9 $types = array(
10 'v2_checkbox' => array(
11 'menu' => esc_html__( 'v2 Checkbox', 'hustle' ),
12 'label' => esc_html__( 'reCAPTCHA v2 Checkbox', 'hustle' ),
13 ),
14 'v2_invisible' => array(
15 'menu' => esc_html__( 'v2 Invisible', 'hustle' ),
16 'label' => esc_html__( 'reCAPTCHA v2 Invisible', 'hustle' ),
17 ),
18 'v3_recaptcha' => array(
19 'menu' => esc_html__( 'reCaptcha v3', 'hustle' ),
20 'label' => esc_html__( 'reCAPTCHA v3', 'hustle' ),
21 ),
22 );
23 ?>
24
25 <div class="sui-form-field">
26
27 <label id="hustle-api-keys-label" class="sui-settings-label"><?php esc_html_e( 'API Keys', 'hustle' ); ?></label>
28
29 <span id="hustle-api-keys-description" class="sui-description">
30 <?php /* translators: 1. opening 'a' tag to recaptcha's list, 2. closing 'a' tag */ ?>
31 <?php printf( esc_html__( 'Enter the API keys for each reCAPTCHA type you want to use in your opt-ins. Note that each reCAPTCHA type requires a different set of API keys. %1$sGenerate API keys%2$s.', 'hustle' ), '<a href="https://www.google.com/recaptcha/admin#list" target="_blank">', '</a>' ); ?>
32 </span>
33
34 <div class="sui-tabs sui-tabs-overflow" style="margin-top: 10px;">
35
36 <div role="tablist" class="sui-tabs-menu">
37
38 <?php
39 $i = 0;
40 foreach ( $types as $key => $text ) :
41 $i++;
42 ?>
43
44 <button
45 type="button"
46 role="tab"
47 id="hustle-api-key-tab--<?php echo esc_attr( $key ); ?>"
48 class="sui-tab-item<?php echo ( 1 === $i ) ? ' active' : ''; ?>"
49 aria-controls="hustle-api-key-content--<?php echo esc_attr( $key ); ?>"
50 aria-selected="<?php echo ( 1 === $i ) ? 'true' : 'false'; ?>"
51 <?php echo ( 1 === $i ) ? '' : 'tabindex="-1"'; ?>
52 >
53 <?php echo esc_html( $text['menu'] ); ?>
54 </button>
55
56 <?php
57 endforeach;
58 ?>
59
60 </div>
61
62 <div class="sui-tabs-content">
63
64 <?php
65 $i = 0;
66 foreach ( $types as $key => $text ) :
67 $i++;
68 ?>
69
70 <div
71 role="tabpanel"
72 tabindex="0"
73 id="hustle-api-key-content--<?php echo esc_attr( $key ); ?>"
74 class="sui-tab-content<?php echo ( 1 === $i ) ? ' active' : ''; ?>"
75 aria-labelledby="hustle-api-key-tab--<?php echo esc_attr( $key ); ?>"
76 <?php echo ( 1 === $i ) ? '' : 'hidden'; ?>
77 >
78
79 <?php /* translators: recaptcha key */ ?>
80 <span class="sui-description"><?php printf( esc_html__( 'Enter the API keys for %s type below:', 'hustle' ), esc_html( $text['label'] ) ); ?></span>
81
82 <div class="sui-form-field">
83
84 <label for="hustle-<?php echo esc_attr( $key ); ?>-site-key" id="hustle-<?php echo esc_attr( $key ); ?>-site-key-label" class="sui-label"><?php esc_html_e( 'Site Key', 'hustle' ); ?></label>
85
86 <input
87 type="text"
88 name="<?php echo esc_attr( $key . '_site_key' ); ?>"
89 value="<?php echo esc_attr( $settings[ $key . '_site_key' ] ); ?>"
90 placeholder="<?php esc_html_e( 'Enter your site key here', 'hustle' ); ?>"
91 id="hustle-<?php echo esc_attr( $key ); ?>-site-key"
92 class="sui-form-control"
93 aria-labelledby="hustle-<?php echo esc_attr( $key ); ?>-site-key-label"
94 />
95
96 </div>
97
98 <div class="sui-form-field">
99
100 <label for="hustle-<?php echo esc_attr( $key ); ?>-secret-key" id="hustle-<?php echo esc_attr( $key ); ?>-site-secret-label" class="sui-label"><?php esc_html_e( 'Secret Key', 'hustle' ); ?></label>
101
102 <input
103 type="text"
104 name="<?php echo esc_attr( $key . '_secret_key' ); ?>"
105 value="<?php echo esc_attr( $settings[ $key . '_secret_key' ] ); ?>"
106 placeholder="<?php esc_html_e( 'Enter your secret key here', 'hustle' ); ?>"
107 id="hustle-<?php echo esc_attr( $key ); ?>-secret-key"
108 class="sui-form-control"
109 aria-labelledby="hustle-<?php echo esc_attr( $key ); ?>-secret-key-label"
110 />
111
112 </div>
113
114 <div class="sui-form-field" data-id="<?php echo esc_attr( $key ); ?>" data-render-id="0">
115
116 <label class="sui-label"><?php esc_html_e( 'reCAPTCHA Preview', 'hustle' ); ?></label>
117
118 <div
119 id="hustle-modal-recaptcha-<?php echo esc_attr( $key ); ?>-0"
120 class="hustle-recaptcha-preview-container hustle-recaptcha"
121 style="display: none;"
122 data-sitekey=""
123 data-version="<?php echo esc_attr( $key ); ?>"
124 data-theme="light"
125 data-size="<?php echo 'v2_checkbox' === $key ? 'full' : 'invisible'; ?>"
126 data-badge="<?php echo 'v2_checkbox' === $key ? '' : 'inline'; ?>"
127 ></div>
128
129 <?php
130 $this->get_html_for_options(
131 array(
132 array(
133 'type' => 'inline_notice',
134 'class' => 'hustle-recaptcha-' . esc_attr( $key ) . '-preview-notice',
135 'icon' => 'info',
136 'value' => esc_html__( 'Save your API keys to load the reCAPTCHA preview.', 'hustle' ),
137 'attributes' => array(
138 'style' => 'margin-top: 0;',
139 ),
140 ),
141 )
142 );
143 ?>
144
145 </div>
146
147 </div>
148
149 <?php endforeach; ?>
150
151 </div>
152
153 </div>
154
155 </div>
156