Version Description
- Offer nonce verification for contact forms.
- Add several options to retrieve logged-in user info as default value of field.
- Introduce wpcf7_validate filter for validation independent from specific form tag type.
- Search contact form by title when failed to find by ID.
- Include all $_POST variables into $cf->posted_data and make them referable from mail.
- Add watermark option to captchar (CAPTCHA-response) field.
- Introduce wpcf7_ajax_loader() function and wpcf7_ajax_loader filter.
- Introduce wpcf7_akismet_comment_check filter.
- Introduce menu icons created by Takao Honda.
- Translation for Azeri has been created.
- Translations for Italian, Russian, Arabic, Danish, Persian, Romanian, and Portuguese have been updated.
=
Download this release
Release Info
Developer | takayukister |
Plugin | Contact Form 7 |
Version | 3.1 |
Comparing to | |
See all releases |
Code changes from version 3.0.2.1 to 3.1
- admin/admin.php +319 -329
- admin/edit.php +159 -159
- {images → admin/images}/dropdown.gif +0 -0
- admin/images/menu-icon.png +0 -0
- admin/images/screen-icon.png +0 -0
- admin/scripts.js +74 -74
- admin/styles-rtl.css +17 -17
- admin/styles.css +274 -270
- includes/classes.php +732 -576
- includes/controller.php +17 -73
- includes/functions.php +259 -252
- includes/pipe.php +66 -66
- includes/shortcodes.php +10 -2
- includes/taggenerator.php +0 -25
- jquery.form.js +2 -2
- languages/wpcf7-ar.mo +0 -0
- languages/wpcf7-az_AZ.mo +0 -0
- languages/wpcf7-da_DK.mo +0 -0
- languages/wpcf7-fa_IR.mo +0 -0
- languages/wpcf7-it_IT.mo +0 -0
- languages/wpcf7-ja.mo +0 -0
- languages/wpcf7-pt_PT.mo +0 -0
- languages/wpcf7-ro_RO.mo +0 -0
- languages/wpcf7-ru_RU.mo +0 -0
- languages/wpcf7.pot +173 -169
- modules/acceptance.php +11 -8
- modules/akismet.php +5 -0
- modules/captcha.php +22 -12
- modules/checkbox.php +6 -28
- modules/file.php +7 -11
- modules/quiz.php +8 -9
- modules/select.php +12 -23
- modules/submit.php +2 -10
- modules/text.php +26 -12
- modules/textarea.php +6 -4
- readme.txt +132 -145
- scripts.js +218 -197
- settings.php +1 -1
- styles-rtl.css +12 -12
- styles.css +64 -64
- wp-contact-form-7.php +75 -72
admin/admin.php
CHANGED
@@ -1,330 +1,320 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function wpcf7_admin_has_edit_cap() {
|
4 |
-
return current_user_can( WPCF7_ADMIN_READ_WRITE_CAPABILITY );
|
5 |
-
}
|
6 |
-
|
7 |
-
add_action( 'admin_init', 'wpcf7_admin_init' );
|
8 |
-
|
9 |
-
function wpcf7_admin_init() {
|
10 |
-
if ( ! wpcf7_admin_has_edit_cap() )
|
11 |
-
return;
|
12 |
-
|
13 |
-
if ( isset( $_POST['wpcf7-save'] ) ) {
|
14 |
-
$id = $_POST['post_ID'];
|
15 |
-
check_admin_referer( 'wpcf7-save_' . $id );
|
16 |
-
|
17 |
-
if ( ! $contact_form = wpcf7_contact_form( $id ) ) {
|
18 |
-
$contact_form = new WPCF7_ContactForm();
|
19 |
-
$contact_form->initial = true;
|
20 |
-
}
|
21 |
-
|
22 |
-
$contact_form->title = trim( $_POST['wpcf7-title'] );
|
23 |
-
|
24 |
-
$form = trim( $_POST['wpcf7-form'] );
|
25 |
-
|
26 |
-
$mail = array(
|
27 |
-
'subject' => trim( $_POST['wpcf7-mail-subject'] ),
|
28 |
-
'sender' => trim( $_POST['wpcf7-mail-sender'] ),
|
29 |
-
'body' => trim( $_POST['wpcf7-mail-body'] ),
|
30 |
-
'recipient' => trim( $_POST['wpcf7-mail-recipient'] ),
|
31 |
-
'additional_headers' => trim( $_POST['wpcf7-mail-additional-headers'] ),
|
32 |
-
'attachments' => trim( $_POST['wpcf7-mail-attachments'] ),
|
33 |
-
'use_html' =>
|
34 |
-
isset( $_POST['wpcf7-mail-use-html'] ) && 1 == $_POST['wpcf7-mail-use-html']
|
35 |
-
);
|
36 |
-
|
37 |
-
$mail_2 = array(
|
38 |
-
'active' =>
|
39 |
-
isset( $_POST['wpcf7-mail-2-active'] ) && 1 == $_POST['wpcf7-mail-2-active'],
|
40 |
-
'subject' => trim( $_POST['wpcf7-mail-2-subject'] ),
|
41 |
-
'sender' => trim( $_POST['wpcf7-mail-2-sender'] ),
|
42 |
-
'body' => trim( $_POST['wpcf7-mail-2-body'] ),
|
43 |
-
'recipient' => trim( $_POST['wpcf7-mail-2-recipient'] ),
|
44 |
-
'additional_headers' => trim( $_POST['wpcf7-mail-2-additional-headers'] ),
|
45 |
-
'attachments' => trim( $_POST['wpcf7-mail-2-attachments'] ),
|
46 |
-
'use_html' =>
|
47 |
-
isset( $_POST['wpcf7-mail-2-use-html'] ) && 1 == $_POST['wpcf7-mail-2-use-html']
|
48 |
-
);
|
49 |
-
|
50 |
-
$messages = isset( $contact_form->messages ) ? $contact_form->messages : array();
|
51 |
-
|
52 |
-
foreach ( wpcf7_messages() as $key => $arr ) {
|
53 |
-
$field_name = 'wpcf7-message-' . strtr( $key, '_', '-' );
|
54 |
-
if ( isset( $_POST[$field_name] ) )
|
55 |
-
$messages[$key] = trim( $_POST[$field_name] );
|
56 |
-
}
|
57 |
-
|
58 |
-
$additional_settings = trim( $_POST['wpcf7-additional-settings'] );
|
59 |
-
|
60 |
-
$props = apply_filters( 'wpcf7_contact_form_admin_posted_properties',
|
61 |
-
compact( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' ) );
|
62 |
-
|
63 |
-
foreach ( (array) $props as $key => $prop )
|
64 |
-
$contact_form->{$key} = $prop;
|
65 |
-
|
66 |
-
$query = array();
|
67 |
-
$query['message'] = ( $contact_form->initial ) ? 'created' : 'saved';
|
68 |
-
|
69 |
-
$contact_form->save();
|
70 |
-
|
71 |
-
$query['contactform'] = $contact_form->id;
|
72 |
-
$redirect_to = wpcf7_admin_url( $query );
|
73 |
-
wp_safe_redirect( $redirect_to );
|
74 |
-
exit();
|
75 |
-
}
|
76 |
-
|
77 |
-
if ( isset( $_POST['wpcf7-copy'] ) ) {
|
78 |
-
$id = $_POST['post_ID'];
|
79 |
-
check_admin_referer( 'wpcf7-copy_' . $id );
|
80 |
-
|
81 |
-
$query = array();
|
82 |
-
|
83 |
-
if ( $contact_form = wpcf7_contact_form( $id ) ) {
|
84 |
-
$new_contact_form = $contact_form->copy();
|
85 |
-
$new_contact_form->save();
|
86 |
-
|
87 |
-
$query['contactform'] = $new_contact_form->id;
|
88 |
-
$query['message'] = 'created';
|
89 |
-
} else {
|
90 |
-
$query['contactform'] = $contact_form->id;
|
91 |
-
}
|
92 |
-
|
93 |
-
$redirect_to = wpcf7_admin_url( $query );
|
94 |
-
wp_safe_redirect( $redirect_to );
|
95 |
-
exit();
|
96 |
-
}
|
97 |
-
|
98 |
-
if ( isset( $_POST['wpcf7-delete'] ) ) {
|
99 |
-
$id = $_POST['post_ID'];
|
100 |
-
check_admin_referer( 'wpcf7-delete_' . $id );
|
101 |
-
|
102 |
-
if ( $contact_form = wpcf7_contact_form( $id ) )
|
103 |
-
$contact_form->delete();
|
104 |
-
|
105 |
-
$redirect_to = wpcf7_admin_url( array( 'message' => 'deleted' ) );
|
106 |
-
wp_safe_redirect( $redirect_to );
|
107 |
-
exit();
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
add_action( 'admin_menu', 'wpcf7_admin_menu', 9 );
|
112 |
-
|
113 |
-
function wpcf7_admin_menu() {
|
114 |
-
add_menu_page( __( 'Contact Form 7', 'wpcf7' ), __( 'Contact', 'wpcf7' ),
|
115 |
-
WPCF7_ADMIN_READ_CAPABILITY, 'wpcf7', 'wpcf7_admin_management_page'
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
}
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
wp_enqueue_script( '
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
$
|
191 |
-
|
192 |
-
|
193 |
-
$
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
if (
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
$
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) )
|
321 |
-
return;
|
322 |
-
|
323 |
-
?>
|
324 |
-
<div class="error">
|
325 |
-
<p><?php echo sprintf( __( '<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href="%3$s">update WordPress</a> first.', 'wpcf7' ), WPCF7_VERSION, WPCF7_REQUIRED_WP_VERSION, admin_url( 'update-core.php' ) ); ?></p>
|
326 |
-
</div>
|
327 |
-
<?php
|
328 |
-
}
|
329 |
-
|
330 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function wpcf7_admin_has_edit_cap() {
|
4 |
+
return current_user_can( WPCF7_ADMIN_READ_WRITE_CAPABILITY );
|
5 |
+
}
|
6 |
+
|
7 |
+
add_action( 'admin_init', 'wpcf7_admin_init' );
|
8 |
+
|
9 |
+
function wpcf7_admin_init() {
|
10 |
+
if ( ! wpcf7_admin_has_edit_cap() )
|
11 |
+
return;
|
12 |
+
|
13 |
+
if ( isset( $_POST['wpcf7-save'] ) ) {
|
14 |
+
$id = $_POST['post_ID'];
|
15 |
+
check_admin_referer( 'wpcf7-save_' . $id );
|
16 |
+
|
17 |
+
if ( ! $contact_form = wpcf7_contact_form( $id ) ) {
|
18 |
+
$contact_form = new WPCF7_ContactForm();
|
19 |
+
$contact_form->initial = true;
|
20 |
+
}
|
21 |
+
|
22 |
+
$contact_form->title = trim( $_POST['wpcf7-title'] );
|
23 |
+
|
24 |
+
$form = trim( $_POST['wpcf7-form'] );
|
25 |
+
|
26 |
+
$mail = array(
|
27 |
+
'subject' => trim( $_POST['wpcf7-mail-subject'] ),
|
28 |
+
'sender' => trim( $_POST['wpcf7-mail-sender'] ),
|
29 |
+
'body' => trim( $_POST['wpcf7-mail-body'] ),
|
30 |
+
'recipient' => trim( $_POST['wpcf7-mail-recipient'] ),
|
31 |
+
'additional_headers' => trim( $_POST['wpcf7-mail-additional-headers'] ),
|
32 |
+
'attachments' => trim( $_POST['wpcf7-mail-attachments'] ),
|
33 |
+
'use_html' =>
|
34 |
+
isset( $_POST['wpcf7-mail-use-html'] ) && 1 == $_POST['wpcf7-mail-use-html']
|
35 |
+
);
|
36 |
+
|
37 |
+
$mail_2 = array(
|
38 |
+
'active' =>
|
39 |
+
isset( $_POST['wpcf7-mail-2-active'] ) && 1 == $_POST['wpcf7-mail-2-active'],
|
40 |
+
'subject' => trim( $_POST['wpcf7-mail-2-subject'] ),
|
41 |
+
'sender' => trim( $_POST['wpcf7-mail-2-sender'] ),
|
42 |
+
'body' => trim( $_POST['wpcf7-mail-2-body'] ),
|
43 |
+
'recipient' => trim( $_POST['wpcf7-mail-2-recipient'] ),
|
44 |
+
'additional_headers' => trim( $_POST['wpcf7-mail-2-additional-headers'] ),
|
45 |
+
'attachments' => trim( $_POST['wpcf7-mail-2-attachments'] ),
|
46 |
+
'use_html' =>
|
47 |
+
isset( $_POST['wpcf7-mail-2-use-html'] ) && 1 == $_POST['wpcf7-mail-2-use-html']
|
48 |
+
);
|
49 |
+
|
50 |
+
$messages = isset( $contact_form->messages ) ? $contact_form->messages : array();
|
51 |
+
|
52 |
+
foreach ( wpcf7_messages() as $key => $arr ) {
|
53 |
+
$field_name = 'wpcf7-message-' . strtr( $key, '_', '-' );
|
54 |
+
if ( isset( $_POST[$field_name] ) )
|
55 |
+
$messages[$key] = trim( $_POST[$field_name] );
|
56 |
+
}
|
57 |
+
|
58 |
+
$additional_settings = trim( $_POST['wpcf7-additional-settings'] );
|
59 |
+
|
60 |
+
$props = apply_filters( 'wpcf7_contact_form_admin_posted_properties',
|
61 |
+
compact( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' ) );
|
62 |
+
|
63 |
+
foreach ( (array) $props as $key => $prop )
|
64 |
+
$contact_form->{$key} = $prop;
|
65 |
+
|
66 |
+
$query = array();
|
67 |
+
$query['message'] = ( $contact_form->initial ) ? 'created' : 'saved';
|
68 |
+
|
69 |
+
$contact_form->save();
|
70 |
+
|
71 |
+
$query['contactform'] = $contact_form->id;
|
72 |
+
$redirect_to = wpcf7_admin_url( $query );
|
73 |
+
wp_safe_redirect( $redirect_to );
|
74 |
+
exit();
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( isset( $_POST['wpcf7-copy'] ) ) {
|
78 |
+
$id = $_POST['post_ID'];
|
79 |
+
check_admin_referer( 'wpcf7-copy_' . $id );
|
80 |
+
|
81 |
+
$query = array();
|
82 |
+
|
83 |
+
if ( $contact_form = wpcf7_contact_form( $id ) ) {
|
84 |
+
$new_contact_form = $contact_form->copy();
|
85 |
+
$new_contact_form->save();
|
86 |
+
|
87 |
+
$query['contactform'] = $new_contact_form->id;
|
88 |
+
$query['message'] = 'created';
|
89 |
+
} else {
|
90 |
+
$query['contactform'] = $contact_form->id;
|
91 |
+
}
|
92 |
+
|
93 |
+
$redirect_to = wpcf7_admin_url( $query );
|
94 |
+
wp_safe_redirect( $redirect_to );
|
95 |
+
exit();
|
96 |
+
}
|
97 |
+
|
98 |
+
if ( isset( $_POST['wpcf7-delete'] ) ) {
|
99 |
+
$id = $_POST['post_ID'];
|
100 |
+
check_admin_referer( 'wpcf7-delete_' . $id );
|
101 |
+
|
102 |
+
if ( $contact_form = wpcf7_contact_form( $id ) )
|
103 |
+
$contact_form->delete();
|
104 |
+
|
105 |
+
$redirect_to = wpcf7_admin_url( array( 'message' => 'deleted' ) );
|
106 |
+
wp_safe_redirect( $redirect_to );
|
107 |
+
exit();
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
add_action( 'admin_menu', 'wpcf7_admin_menu', 9 );
|
112 |
+
|
113 |
+
function wpcf7_admin_menu() {
|
114 |
+
add_menu_page( __( 'Contact Form 7', 'wpcf7' ), __( 'Contact', 'wpcf7' ),
|
115 |
+
WPCF7_ADMIN_READ_CAPABILITY, 'wpcf7', 'wpcf7_admin_management_page',
|
116 |
+
wpcf7_plugin_url( 'admin/images/menu-icon.png' ) );
|
117 |
+
|
118 |
+
add_submenu_page( 'wpcf7', __( 'Edit Contact Forms', 'wpcf7' ), __( 'Edit', 'wpcf7' ),
|
119 |
+
WPCF7_ADMIN_READ_CAPABILITY, 'wpcf7', 'wpcf7_admin_management_page' );
|
120 |
+
}
|
121 |
+
|
122 |
+
add_action( 'admin_enqueue_scripts', 'wpcf7_admin_enqueue_styles' );
|
123 |
+
|
124 |
+
function wpcf7_admin_enqueue_styles() {
|
125 |
+
global $plugin_page;
|
126 |
+
|
127 |
+
if ( ! isset( $plugin_page ) || 'wpcf7' != $plugin_page )
|
128 |
+
return;
|
129 |
+
|
130 |
+
wp_enqueue_style( 'thickbox' );
|
131 |
+
|
132 |
+
wp_enqueue_style( 'contact-form-7-admin', wpcf7_plugin_url( 'admin/styles.css' ),
|
133 |
+
array(), WPCF7_VERSION, 'all' );
|
134 |
+
|
135 |
+
if ( wpcf7_is_rtl() ) {
|
136 |
+
wp_enqueue_style( 'contact-form-7-admin-rtl',
|
137 |
+
wpcf7_plugin_url( 'admin/styles-rtl.css' ), array(), WPCF7_VERSION, 'all' );
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
add_action( 'admin_enqueue_scripts', 'wpcf7_admin_enqueue_scripts' );
|
142 |
+
|
143 |
+
function wpcf7_admin_enqueue_scripts() {
|
144 |
+
global $plugin_page, $wpcf7_tag_generators;
|
145 |
+
|
146 |
+
if ( ! isset( $plugin_page ) || 'wpcf7' != $plugin_page )
|
147 |
+
return;
|
148 |
+
|
149 |
+
wp_enqueue_script( 'thickbox' );
|
150 |
+
wp_enqueue_script( 'postbox' );
|
151 |
+
|
152 |
+
wp_enqueue_script( 'wpcf7-admin-taggenerator', wpcf7_plugin_url( 'admin/taggenerator.js' ),
|
153 |
+
array( 'jquery' ), WPCF7_VERSION, true );
|
154 |
+
|
155 |
+
wp_enqueue_script( 'wpcf7-admin', wpcf7_plugin_url( 'admin/scripts.js' ),
|
156 |
+
array( 'jquery', 'wpcf7-admin-taggenerator' ), WPCF7_VERSION, true );
|
157 |
+
|
158 |
+
$taggenerators = array();
|
159 |
+
|
160 |
+
foreach ( (array) $wpcf7_tag_generators as $name => $tg ) {
|
161 |
+
$taggenerators[$name] = array_merge(
|
162 |
+
(array) $tg['options'],
|
163 |
+
array( 'title' => $tg['title'], 'content' => $tg['content'] ) );
|
164 |
+
}
|
165 |
+
|
166 |
+
wp_localize_script( 'wpcf7-admin', '_wpcf7', array(
|
167 |
+
'generateTag' => __( 'Generate Tag', 'wpcf7' ),
|
168 |
+
'pluginUrl' => wpcf7_plugin_url(),
|
169 |
+
'tagGenerators' => $taggenerators ) );
|
170 |
+
}
|
171 |
+
|
172 |
+
function wpcf7_admin_management_page() {
|
173 |
+
$contact_forms = get_posts( array(
|
174 |
+
'numberposts' => -1,
|
175 |
+
'orderby' => 'ID',
|
176 |
+
'order' => 'ASC',
|
177 |
+
'post_type' => 'wpcf7_contact_form' ) );
|
178 |
+
|
179 |
+
$cf = null;
|
180 |
+
$unsaved = false;
|
181 |
+
|
182 |
+
if ( ! isset( $_GET['contactform'] ) )
|
183 |
+
$_GET['contactform'] = '';
|
184 |
+
|
185 |
+
if ( 'new' == $_GET['contactform'] && wpcf7_admin_has_edit_cap() ) {
|
186 |
+
$unsaved = true;
|
187 |
+
$current = -1;
|
188 |
+
$cf = wpcf7_get_contact_form_default_pack(
|
189 |
+
array( 'locale' => ( isset( $_GET['locale'] ) ? $_GET['locale'] : '' ) ) );
|
190 |
+
} elseif ( $cf = wpcf7_contact_form( $_GET['contactform'] ) ) {
|
191 |
+
$current = (int) $_GET['contactform'];
|
192 |
+
} else {
|
193 |
+
$first = reset( $contact_forms ); // Returns first item
|
194 |
+
|
195 |
+
if ( $first ) {
|
196 |
+
$current = $first->ID;
|
197 |
+
$cf = wpcf7_contact_form( $current );
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
require_once WPCF7_PLUGIN_DIR . '/admin/includes/meta-boxes.php';
|
202 |
+
require_once WPCF7_PLUGIN_DIR . '/admin/edit.php';
|
203 |
+
}
|
204 |
+
|
205 |
+
/* Misc */
|
206 |
+
|
207 |
+
add_filter( 'plugin_action_links', 'wpcf7_plugin_action_links', 10, 2 );
|
208 |
+
|
209 |
+
function wpcf7_plugin_action_links( $links, $file ) {
|
210 |
+
if ( $file != WPCF7_PLUGIN_BASENAME )
|
211 |
+
return $links;
|
212 |
+
|
213 |
+
$url = wpcf7_admin_url();
|
214 |
+
|
215 |
+
$settings_link = '<a href="' . esc_attr( $url ) . '">'
|
216 |
+
. esc_html( __( 'Settings', 'wpcf7' ) ) . '</a>';
|
217 |
+
|
218 |
+
array_unshift( $links, $settings_link );
|
219 |
+
|
220 |
+
return $links;
|
221 |
+
}
|
222 |
+
|
223 |
+
add_action( 'wpcf7_admin_before_subsubsub', 'wpcf7_cf7com_links', 9 );
|
224 |
+
|
225 |
+
function wpcf7_cf7com_links( &$contact_form ) {
|
226 |
+
$links = '<div class="cf7com-links">'
|
227 |
+
. '<a href="' . esc_url_raw( __( 'http://contactform7.com/', 'wpcf7' ) ) . '" target="_blank">'
|
228 |
+
. esc_html( __( 'Contactform7.com', 'wpcf7' ) ) . '</a> '
|
229 |
+
. '<a href="' . esc_url_raw( __( 'http://contactform7.com/docs/', 'wpcf7' ) ) . '" target="_blank">'
|
230 |
+
. esc_html( __( 'Docs', 'wpcf7' ) ) . '</a> - '
|
231 |
+
. '<a href="' . esc_url_raw( __( 'http://contactform7.com/faq/', 'wpcf7' ) ) . '" target="_blank">'
|
232 |
+
. esc_html( __( 'FAQ', 'wpcf7' ) ) . '</a> - '
|
233 |
+
. '<a href="' . esc_url_raw( __( 'http://contactform7.com/support/', 'wpcf7' ) ) . '" target="_blank">'
|
234 |
+
. esc_html( __( 'Support', 'wpcf7' ) ) . '</a>'
|
235 |
+
. '</div>';
|
236 |
+
|
237 |
+
echo apply_filters( 'wpcf7_cf7com_links', $links );
|
238 |
+
}
|
239 |
+
|
240 |
+
add_action( 'wpcf7_admin_before_subsubsub', 'wpcf7_updated_message' );
|
241 |
+
|
242 |
+
function wpcf7_updated_message( &$contact_form ) {
|
243 |
+
if ( ! isset( $_GET['message'] ) )
|
244 |
+
return;
|
245 |
+
|
246 |
+
switch ( $_GET['message'] ) {
|
247 |
+
case 'created':
|
248 |
+
$updated_message = __( "Contact form created.", 'wpcf7' );
|
249 |
+
break;
|
250 |
+
case 'saved':
|
251 |
+
$updated_message = __( "Contact form saved.", 'wpcf7' );
|
252 |
+
break;
|
253 |
+
case 'deleted':
|
254 |
+
$updated_message = __( "Contact form deleted.", 'wpcf7' );
|
255 |
+
break;
|
256 |
+
}
|
257 |
+
|
258 |
+
if ( ! $updated_message )
|
259 |
+
return;
|
260 |
+
|
261 |
+
?>
|
262 |
+
<div id="message" class="updated"><p><?php echo esc_html( $updated_message ); ?></p></div>
|
263 |
+
<?php
|
264 |
+
}
|
265 |
+
|
266 |
+
add_action( 'wpcf7_admin_before_subsubsub', 'wpcf7_donation_link' );
|
267 |
+
|
268 |
+
function wpcf7_donation_link( &$contact_form ) {
|
269 |
+
if ( ! WPCF7_SHOW_DONATION_LINK )
|
270 |
+
return;
|
271 |
+
|
272 |
+
if ( 'new' == $_GET['contactform'] || ! empty( $_GET['message'] ) )
|
273 |
+
return;
|
274 |
+
|
275 |
+
$show_link = true;
|
276 |
+
|
277 |
+
$num = mt_rand( 0, 99 );
|
278 |
+
|
279 |
+
if ( $num >= 20 )
|
280 |
+
$show_link = false;
|
281 |
+
|
282 |
+
$show_link = apply_filters( 'wpcf7_show_donation_link', $show_link );
|
283 |
+
|
284 |
+
if ( ! $show_link )
|
285 |
+
return;
|
286 |
+
|
287 |
+
$texts = array(
|
288 |
+
__( "Contact Form 7 needs your support. Please donate today.", 'wpcf7' ),
|
289 |
+
__( "Your contribution is needed for making this plugin better.", 'wpcf7' ) );
|
290 |
+
|
291 |
+
$text = $texts[array_rand( $texts )];
|
292 |
+
|
293 |
+
?>
|
294 |
+
<div class="donation">
|
295 |
+
<p><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/donate/', 'wpcf7' ) ); ?>"><?php echo esc_html( $text ); ?></a> <a href="<?php echo esc_url_raw( __( 'http://contactform7.com/donate/', 'wpcf7' ) ); ?>" class="button"><?php echo esc_html( __( "Donate", 'wpcf7' ) ); ?></a></p>
|
296 |
+
</div>
|
297 |
+
<?php
|
298 |
+
}
|
299 |
+
|
300 |
+
add_action( 'admin_notices', 'wpcf7_old_wp_version_error', 9 );
|
301 |
+
|
302 |
+
function wpcf7_old_wp_version_error() {
|
303 |
+
global $plugin_page;
|
304 |
+
|
305 |
+
if ( 'wpcf7' != $plugin_page )
|
306 |
+
return;
|
307 |
+
|
308 |
+
$wp_version = get_bloginfo( 'version' );
|
309 |
+
|
310 |
+
if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) )
|
311 |
+
return;
|
312 |
+
|
313 |
+
?>
|
314 |
+
<div class="error">
|
315 |
+
<p><?php echo sprintf( __( '<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href="%3$s">update WordPress</a> first.', 'wpcf7' ), WPCF7_VERSION, WPCF7_REQUIRED_WP_VERSION, admin_url( 'update-core.php' ) ); ?></p>
|
316 |
+
</div>
|
317 |
+
<?php
|
318 |
+
}
|
319 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
?>
|
admin/edit.php
CHANGED
@@ -1,159 +1,159 @@
|
|
1 |
-
<div class="wrap">
|
2 |
-
|
3 |
-
<?php screen_icon(
|
4 |
-
|
5 |
-
<h2><?php echo esc_html( __( 'Contact Form 7', 'wpcf7' ) ); ?></h2>
|
6 |
-
|
7 |
-
<?php do_action_ref_array( 'wpcf7_admin_before_subsubsub', array( &$cf ) ); ?>
|
8 |
-
|
9 |
-
<ul class="subsubsub">
|
10 |
-
<?php
|
11 |
-
$first = array_shift( $contact_forms );
|
12 |
-
if ( ! is_null( $first ) ) : ?>
|
13 |
-
<li><a href="<?php echo wpcf7_admin_url( array( 'contactform' => $first->ID ) ); ?>"<?php if ( $first->ID == $current ) echo ' class="current"'; ?>><?php echo esc_html( $first->post_title ); ?></a></li>
|
14 |
-
<?php endif;
|
15 |
-
foreach ( $contact_forms as $v ) : ?>
|
16 |
-
<li>| <a href="<?php echo wpcf7_admin_url( array( 'contactform' => $v->ID ) ); ?>"<?php if ( $v->ID == $current ) echo ' class="current"'; ?>><?php echo esc_html( $v->post_title ); ?></a></li>
|
17 |
-
<?php endforeach; ?>
|
18 |
-
|
19 |
-
<?php if ( wpcf7_admin_has_edit_cap() ) : ?>
|
20 |
-
<li class="addnew"><a class="button thickbox<?php if ( $unsaved ) echo ' current'; ?>" href="#TB_inline?height=300&width=400&inlineId=wpcf7-lang-select-modal"><?php echo esc_html( __( 'Add New', 'wpcf7' ) ); ?></a></li>
|
21 |
-
<?php endif; ?>
|
22 |
-
</ul>
|
23 |
-
|
24 |
-
<br class="clear" />
|
25 |
-
|
26 |
-
<?php if ( $cf ) : ?>
|
27 |
-
<?php $disabled = ( wpcf7_admin_has_edit_cap() ) ? '' : ' disabled="disabled"'; ?>
|
28 |
-
|
29 |
-
<form method="post" action="<?php echo wpcf7_admin_url( array( 'contactform' => $current ) ); ?>" id="wpcf7-admin-form-element"<?php do_action( 'wpcf7_post_edit_form_tag' ); ?>>
|
30 |
-
<?php if ( wpcf7_admin_has_edit_cap() ) wp_nonce_field( 'wpcf7-save_' . $current ); ?>
|
31 |
-
<input type="hidden" id="post_ID" name="post_ID" value="<?php echo (int) $current; ?>" />
|
32 |
-
<input type="hidden" id="wpcf7-id" name="wpcf7-id" value="<?php echo (int) get_post_meta( $cf->id, '_old_cf7_unit_id', true ); ?>" />
|
33 |
-
|
34 |
-
<div id="poststuff" class="metabox-holder">
|
35 |
-
|
36 |
-
<div id="titlediv">
|
37 |
-
<input type="text" id="wpcf7-title" name="wpcf7-title" size="40" value="<?php echo esc_attr( $cf->title ); ?>"<?php echo $disabled; ?> />
|
38 |
-
|
39 |
-
<?php if ( ! $unsaved ) : ?>
|
40 |
-
<p class="tagcode">
|
41 |
-
<?php echo esc_html( __( "Copy this code and paste it into your post, page or text widget content.", 'wpcf7' ) ); ?><br />
|
42 |
-
|
43 |
-
<input type="text" id="contact-form-anchor-text" onfocus="this.select();" readonly="readonly" />
|
44 |
-
</p>
|
45 |
-
|
46 |
-
<p class="tagcode" style="display: none;">
|
47 |
-
<?php echo esc_html( __( "Old code is also available.", 'wpcf7' ) ); ?><br />
|
48 |
-
|
49 |
-
<input type="text" id="contact-form-anchor-text-old" onfocus="this.select();" readonly="readonly" />
|
50 |
-
</p>
|
51 |
-
<?php endif; ?>
|
52 |
-
|
53 |
-
<?php if ( wpcf7_admin_has_edit_cap() ) : ?>
|
54 |
-
<div class="save-contact-form">
|
55 |
-
<input type="submit" class="button" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'wpcf7' ) ); ?>" />
|
56 |
-
</div>
|
57 |
-
<?php endif; ?>
|
58 |
-
|
59 |
-
<?php if ( wpcf7_admin_has_edit_cap() && ! $unsaved ) : ?>
|
60 |
-
<div class="actions-link">
|
61 |
-
<?php $copy_nonce = wp_create_nonce( 'wpcf7-copy_' . $current ); ?>
|
62 |
-
<input type="submit" name="wpcf7-copy" class="copy" value="<?php echo esc_attr( __( 'Copy', 'wpcf7' ) ); ?>"
|
63 |
-
<?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; return true;\""; ?> />
|
64 |
-
|
|
65 |
-
|
66 |
-
<?php $delete_nonce = wp_create_nonce( 'wpcf7-delete_' . $current ); ?>
|
67 |
-
<input type="submit" name="wpcf7-delete" class="delete" value="<?php echo esc_attr( __( 'Delete', 'wpcf7' ) ); ?>"
|
68 |
-
<?php echo "onclick=\"if (confirm('" .
|
69 |
-
esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'wpcf7' ) ) .
|
70 |
-
"')) {this.form._wpnonce.value = '$delete_nonce'; return true;} return false;\""; ?> />
|
71 |
-
</div>
|
72 |
-
<?php endif; ?>
|
73 |
-
</div>
|
74 |
-
|
75 |
-
<?php
|
76 |
-
|
77 |
-
if ( wpcf7_admin_has_edit_cap() ) {
|
78 |
-
add_meta_box( 'formdiv', __( 'Form', 'wpcf7' ),
|
79 |
-
'wpcf7_form_meta_box', 'cfseven', 'form', 'core' );
|
80 |
-
|
81 |
-
add_meta_box( 'maildiv', __( 'Mail', 'wpcf7' ),
|
82 |
-
'wpcf7_mail_meta_box', 'cfseven', 'mail', 'core' );
|
83 |
-
|
84 |
-
add_meta_box( 'mail2div', __( 'Mail (2)', 'wpcf7' ),
|
85 |
-
'wpcf7_mail_meta_box', 'cfseven', 'mail_2', 'core',
|
86 |
-
array(
|
87 |
-
'id' => 'wpcf7-mail-2',
|
88 |
-
'name' => 'mail_2',
|
89 |
-
'use' => __( 'Use mail (2)', 'wpcf7' ) ) );
|
90 |
-
|
91 |
-
add_meta_box( 'messagesdiv', __( 'Messages', 'wpcf7' ),
|
92 |
-
'wpcf7_messages_meta_box', 'cfseven', 'messages', 'core' );
|
93 |
-
|
94 |
-
add_meta_box( 'additionalsettingsdiv', __( 'Additional Settings', 'wpcf7' ),
|
95 |
-
'wpcf7_additional_settings_meta_box', 'cfseven', 'additional_settings', 'core' );
|
96 |
-
}
|
97 |
-
|
98 |
-
do_action_ref_array( 'wpcf7_admin_after_general_settings', array( &$cf ) );
|
99 |
-
|
100 |
-
do_meta_boxes( 'cfseven', 'form', $cf );
|
101 |
-
|
102 |
-
do_action_ref_array( 'wpcf7_admin_after_form', array( &$cf ) );
|
103 |
-
|
104 |
-
do_meta_boxes( 'cfseven', 'mail', $cf );
|
105 |
-
|
106 |
-
do_action_ref_array( 'wpcf7_admin_after_mail', array( &$cf ) );
|
107 |
-
|
108 |
-
do_meta_boxes( 'cfseven', 'mail_2', $cf );
|
109 |
-
|
110 |
-
do_action_ref_array( 'wpcf7_admin_after_mail_2', array( &$cf ) );
|
111 |
-
|
112 |
-
do_meta_boxes( 'cfseven', 'messages', $cf );
|
113 |
-
|
114 |
-
do_action_ref_array( 'wpcf7_admin_after_messages', array( &$cf ) );
|
115 |
-
|
116 |
-
do_meta_boxes( 'cfseven', 'additional_settings', $cf );
|
117 |
-
|
118 |
-
do_action_ref_array( 'wpcf7_admin_after_additional_settings', array( &$cf ) );
|
119 |
-
|
120 |
-
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
121 |
-
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
122 |
-
|
123 |
-
?>
|
124 |
-
</div>
|
125 |
-
|
126 |
-
</form>
|
127 |
-
|
128 |
-
<?php endif; ?>
|
129 |
-
|
130 |
-
</div>
|
131 |
-
|
132 |
-
<div id="wpcf7-lang-select-modal" class="hidden">
|
133 |
-
<?php
|
134 |
-
$available_locales = wpcf7_l10n();
|
135 |
-
$default_locale = get_locale();
|
136 |
-
|
137 |
-
if ( ! isset( $available_locales[$default_locale] ) )
|
138 |
-
$default_locale = 'en_US';
|
139 |
-
|
140 |
-
?>
|
141 |
-
<h4><?php echo esc_html( sprintf( __( 'Use the default language (%s)', 'wpcf7' ), $available_locales[$default_locale] ) ); ?></h4>
|
142 |
-
<p><a href="<?php echo wpcf7_admin_url( array( 'contactform' => 'new' ) ); ?>" class="button" /><?php echo esc_html( __( 'Add New', 'wpcf7' ) ); ?></a></p>
|
143 |
-
|
144 |
-
<?php unset( $available_locales[$default_locale] ); ?>
|
145 |
-
<h4><?php echo esc_html( __( 'Or', 'wpcf7' ) ); ?></h4>
|
146 |
-
<form action="" method="get">
|
147 |
-
<input type="hidden" name="page" value="wpcf7" />
|
148 |
-
<input type="hidden" name="contactform" value="new" />
|
149 |
-
<select name="locale">
|
150 |
-
<option value="" selected="selected"><?php echo esc_html( __( '(select language)', 'wpcf7' ) ); ?></option>
|
151 |
-
<?php foreach ( $available_locales as $code => $locale ) : ?>
|
152 |
-
<option value="<?php echo esc_attr( $code ); ?>"><?php echo esc_html( $locale ); ?></option>
|
153 |
-
<?php endforeach; ?>
|
154 |
-
</select>
|
155 |
-
<input type="submit" class="button" value="<?php echo esc_attr( __( 'Add New', 'wpcf7' ) ); ?>" />
|
156 |
-
</form>
|
157 |
-
</div>
|
158 |
-
|
159 |
-
<?php do_action_ref_array( 'wpcf7_admin_footer', array( &$cf ) ); ?>
|
1 |
+
<div class="wrap">
|
2 |
+
|
3 |
+
<?php screen_icon(); ?>
|
4 |
+
|
5 |
+
<h2><?php echo esc_html( __( 'Contact Form 7', 'wpcf7' ) ); ?></h2>
|
6 |
+
|
7 |
+
<?php do_action_ref_array( 'wpcf7_admin_before_subsubsub', array( &$cf ) ); ?>
|
8 |
+
|
9 |
+
<ul class="subsubsub">
|
10 |
+
<?php
|
11 |
+
$first = array_shift( $contact_forms );
|
12 |
+
if ( ! is_null( $first ) ) : ?>
|
13 |
+
<li><a href="<?php echo wpcf7_admin_url( array( 'contactform' => $first->ID ) ); ?>"<?php if ( $first->ID == $current ) echo ' class="current"'; ?>><?php echo esc_html( $first->post_title ); ?></a></li>
|
14 |
+
<?php endif;
|
15 |
+
foreach ( $contact_forms as $v ) : ?>
|
16 |
+
<li>| <a href="<?php echo wpcf7_admin_url( array( 'contactform' => $v->ID ) ); ?>"<?php if ( $v->ID == $current ) echo ' class="current"'; ?>><?php echo esc_html( $v->post_title ); ?></a></li>
|
17 |
+
<?php endforeach; ?>
|
18 |
+
|
19 |
+
<?php if ( wpcf7_admin_has_edit_cap() ) : ?>
|
20 |
+
<li class="addnew"><a class="button thickbox<?php if ( $unsaved ) echo ' current'; ?>" href="#TB_inline?height=300&width=400&inlineId=wpcf7-lang-select-modal"><?php echo esc_html( __( 'Add New', 'wpcf7' ) ); ?></a></li>
|
21 |
+
<?php endif; ?>
|
22 |
+
</ul>
|
23 |
+
|
24 |
+
<br class="clear" />
|
25 |
+
|
26 |
+
<?php if ( $cf ) : ?>
|
27 |
+
<?php $disabled = ( wpcf7_admin_has_edit_cap() ) ? '' : ' disabled="disabled"'; ?>
|
28 |
+
|
29 |
+
<form method="post" action="<?php echo wpcf7_admin_url( array( 'contactform' => $current ) ); ?>" id="wpcf7-admin-form-element"<?php do_action( 'wpcf7_post_edit_form_tag' ); ?>>
|
30 |
+
<?php if ( wpcf7_admin_has_edit_cap() ) wp_nonce_field( 'wpcf7-save_' . $current ); ?>
|
31 |
+
<input type="hidden" id="post_ID" name="post_ID" value="<?php echo (int) $current; ?>" />
|
32 |
+
<input type="hidden" id="wpcf7-id" name="wpcf7-id" value="<?php echo (int) get_post_meta( $cf->id, '_old_cf7_unit_id', true ); ?>" />
|
33 |
+
|
34 |
+
<div id="poststuff" class="metabox-holder">
|
35 |
+
|
36 |
+
<div id="titlediv">
|
37 |
+
<input type="text" id="wpcf7-title" name="wpcf7-title" size="40" value="<?php echo esc_attr( $cf->title ); ?>"<?php echo $disabled; ?> />
|
38 |
+
|
39 |
+
<?php if ( ! $unsaved ) : ?>
|
40 |
+
<p class="tagcode">
|
41 |
+
<?php echo esc_html( __( "Copy this code and paste it into your post, page or text widget content.", 'wpcf7' ) ); ?><br />
|
42 |
+
|
43 |
+
<input type="text" id="contact-form-anchor-text" onfocus="this.select();" readonly="readonly" />
|
44 |
+
</p>
|
45 |
+
|
46 |
+
<p class="tagcode" style="display: none;">
|
47 |
+
<?php echo esc_html( __( "Old code is also available.", 'wpcf7' ) ); ?><br />
|
48 |
+
|
49 |
+
<input type="text" id="contact-form-anchor-text-old" onfocus="this.select();" readonly="readonly" />
|
50 |
+
</p>
|
51 |
+
<?php endif; ?>
|
52 |
+
|
53 |
+
<?php if ( wpcf7_admin_has_edit_cap() ) : ?>
|
54 |
+
<div class="save-contact-form">
|
55 |
+
<input type="submit" class="button" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'wpcf7' ) ); ?>" />
|
56 |
+
</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
|
59 |
+
<?php if ( wpcf7_admin_has_edit_cap() && ! $unsaved ) : ?>
|
60 |
+
<div class="actions-link">
|
61 |
+
<?php $copy_nonce = wp_create_nonce( 'wpcf7-copy_' . $current ); ?>
|
62 |
+
<input type="submit" name="wpcf7-copy" class="copy" value="<?php echo esc_attr( __( 'Copy', 'wpcf7' ) ); ?>"
|
63 |
+
<?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; return true;\""; ?> />
|
64 |
+
|
|
65 |
+
|
66 |
+
<?php $delete_nonce = wp_create_nonce( 'wpcf7-delete_' . $current ); ?>
|
67 |
+
<input type="submit" name="wpcf7-delete" class="delete" value="<?php echo esc_attr( __( 'Delete', 'wpcf7' ) ); ?>"
|
68 |
+
<?php echo "onclick=\"if (confirm('" .
|
69 |
+
esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'wpcf7' ) ) .
|
70 |
+
"')) {this.form._wpnonce.value = '$delete_nonce'; return true;} return false;\""; ?> />
|
71 |
+
</div>
|
72 |
+
<?php endif; ?>
|
73 |
+
</div>
|
74 |
+
|
75 |
+
<?php
|
76 |
+
|
77 |
+
if ( wpcf7_admin_has_edit_cap() ) {
|
78 |
+
add_meta_box( 'formdiv', __( 'Form', 'wpcf7' ),
|
79 |
+
'wpcf7_form_meta_box', 'cfseven', 'form', 'core' );
|
80 |
+
|
81 |
+
add_meta_box( 'maildiv', __( 'Mail', 'wpcf7' ),
|
82 |
+
'wpcf7_mail_meta_box', 'cfseven', 'mail', 'core' );
|
83 |
+
|
84 |
+
add_meta_box( 'mail2div', __( 'Mail (2)', 'wpcf7' ),
|
85 |
+
'wpcf7_mail_meta_box', 'cfseven', 'mail_2', 'core',
|
86 |
+
array(
|
87 |
+
'id' => 'wpcf7-mail-2',
|
88 |
+
'name' => 'mail_2',
|
89 |
+
'use' => __( 'Use mail (2)', 'wpcf7' ) ) );
|
90 |
+
|
91 |
+
add_meta_box( 'messagesdiv', __( 'Messages', 'wpcf7' ),
|
92 |
+
'wpcf7_messages_meta_box', 'cfseven', 'messages', 'core' );
|
93 |
+
|
94 |
+
add_meta_box( 'additionalsettingsdiv', __( 'Additional Settings', 'wpcf7' ),
|
95 |
+
'wpcf7_additional_settings_meta_box', 'cfseven', 'additional_settings', 'core' );
|
96 |
+
}
|
97 |
+
|
98 |
+
do_action_ref_array( 'wpcf7_admin_after_general_settings', array( &$cf ) );
|
99 |
+
|
100 |
+
do_meta_boxes( 'cfseven', 'form', $cf );
|
101 |
+
|
102 |
+
do_action_ref_array( 'wpcf7_admin_after_form', array( &$cf ) );
|
103 |
+
|
104 |
+
do_meta_boxes( 'cfseven', 'mail', $cf );
|
105 |
+
|
106 |
+
do_action_ref_array( 'wpcf7_admin_after_mail', array( &$cf ) );
|
107 |
+
|
108 |
+
do_meta_boxes( 'cfseven', 'mail_2', $cf );
|
109 |
+
|
110 |
+
do_action_ref_array( 'wpcf7_admin_after_mail_2', array( &$cf ) );
|
111 |
+
|
112 |
+
do_meta_boxes( 'cfseven', 'messages', $cf );
|
113 |
+
|
114 |
+
do_action_ref_array( 'wpcf7_admin_after_messages', array( &$cf ) );
|
115 |
+
|
116 |
+
do_meta_boxes( 'cfseven', 'additional_settings', $cf );
|
117 |
+
|
118 |
+
do_action_ref_array( 'wpcf7_admin_after_additional_settings', array( &$cf ) );
|
119 |
+
|
120 |
+
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
121 |
+
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
122 |
+
|
123 |
+
?>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
</form>
|
127 |
+
|
128 |
+
<?php endif; ?>
|
129 |
+
|
130 |
+
</div>
|
131 |
+
|
132 |
+
<div id="wpcf7-lang-select-modal" class="hidden">
|
133 |
+
<?php
|
134 |
+
$available_locales = wpcf7_l10n();
|
135 |
+
$default_locale = get_locale();
|
136 |
+
|
137 |
+
if ( ! isset( $available_locales[$default_locale] ) )
|
138 |
+
$default_locale = 'en_US';
|
139 |
+
|
140 |
+
?>
|
141 |
+
<h4><?php echo esc_html( sprintf( __( 'Use the default language (%s)', 'wpcf7' ), $available_locales[$default_locale] ) ); ?></h4>
|
142 |
+
<p><a href="<?php echo wpcf7_admin_url( array( 'contactform' => 'new' ) ); ?>" class="button" /><?php echo esc_html( __( 'Add New', 'wpcf7' ) ); ?></a></p>
|
143 |
+
|
144 |
+
<?php unset( $available_locales[$default_locale] ); ?>
|
145 |
+
<h4><?php echo esc_html( __( 'Or', 'wpcf7' ) ); ?></h4>
|
146 |
+
<form action="" method="get">
|
147 |
+
<input type="hidden" name="page" value="wpcf7" />
|
148 |
+
<input type="hidden" name="contactform" value="new" />
|
149 |
+
<select name="locale">
|
150 |
+
<option value="" selected="selected"><?php echo esc_html( __( '(select language)', 'wpcf7' ) ); ?></option>
|
151 |
+
<?php foreach ( $available_locales as $code => $locale ) : ?>
|
152 |
+
<option value="<?php echo esc_attr( $code ); ?>"><?php echo esc_html( $locale ); ?></option>
|
153 |
+
<?php endforeach; ?>
|
154 |
+
</select>
|
155 |
+
<input type="submit" class="button" value="<?php echo esc_attr( __( 'Add New', 'wpcf7' ) ); ?>" />
|
156 |
+
</form>
|
157 |
+
</div>
|
158 |
+
|
159 |
+
<?php do_action_ref_array( 'wpcf7_admin_footer', array( &$cf ) ); ?>
|
{images → admin/images}/dropdown.gif
RENAMED
File without changes
|
admin/images/menu-icon.png
ADDED
Binary file
|
admin/images/screen-icon.png
ADDED
Binary file
|
admin/scripts.js
CHANGED
@@ -1,75 +1,75 @@
|
|
1 |
-
(function($) {
|
2 |
-
|
3 |
-
$(function() {
|
4 |
-
try {
|
5 |
-
$('div.cf7com-links').insertAfter($('div.wrap h2:first'));
|
6 |
-
|
7 |
-
$.extend($.tgPanes, _wpcf7.tagGenerators);
|
8 |
-
$('#taggenerator').tagGenerator(
|
9 |
-
{ dropdownIconUrl: _wpcf7.pluginUrl + '/images/dropdown.gif' });
|
10 |
-
|
11 |
-
$('input#wpcf7-title:disabled').css({cursor: 'default'});
|
12 |
-
|
13 |
-
$('input#wpcf7-title').mouseover(function() {
|
14 |
-
$(this).not('.focus').addClass('mouseover');
|
15 |
-
});
|
16 |
-
|
17 |
-
$('input#wpcf7-title').mouseout(function() {
|
18 |
-
$(this).removeClass('mouseover');
|
19 |
-
});
|
20 |
-
|
21 |
-
$('input#wpcf7-title').focus(function() {
|
22 |
-
$(this).addClass('focus').removeClass('mouseover');
|
23 |
-
});
|
24 |
-
|
25 |
-
$('input#wpcf7-title').blur(function() {
|
26 |
-
$(this).removeClass('focus');
|
27 |
-
});
|
28 |
-
|
29 |
-
$('input#wpcf7-title').change(function() {
|
30 |
-
updateTag();
|
31 |
-
});
|
32 |
-
|
33 |
-
updateTag();
|
34 |
-
|
35 |
-
$('.check-if-these-fields-are-active').each(function(index) {
|
36 |
-
if (! $(this).is(':checked'))
|
37 |
-
$(this).parent().siblings('.mail-fields').hide();
|
38 |
-
|
39 |
-
$(this).click(function() {
|
40 |
-
if ($(this).parent().siblings('.mail-fields').is(':hidden')
|
41 |
-
&& $(this).is(':checked')) {
|
42 |
-
$(this).parent().siblings('.mail-fields').slideDown('fast');
|
43 |
-
} else if ($(this).parent().siblings('.mail-fields').is(':visible')
|
44 |
-
&& $(this).not(':checked')) {
|
45 |
-
$(this).parent().siblings('.mail-fields').slideUp('fast');
|
46 |
-
}
|
47 |
-
});
|
48 |
-
});
|
49 |
-
|
50 |
-
postboxes.add_postbox_toggles('cfseven');
|
51 |
-
|
52 |
-
} catch (e) {
|
53 |
-
}
|
54 |
-
});
|
55 |
-
|
56 |
-
function updateTag() {
|
57 |
-
var title = $('input#wpcf7-title').val();
|
58 |
-
|
59 |
-
if (title)
|
60 |
-
title = title.replace(/["'\[\]]/g, '');
|
61 |
-
|
62 |
-
$('input#wpcf7-title').val(title);
|
63 |
-
var postId = $('input#post_ID').val();
|
64 |
-
var tag = '[contact-form-7 id="' + postId + '" title="' + title + '"]';
|
65 |
-
$('input#contact-form-anchor-text').val(tag);
|
66 |
-
|
67 |
-
var oldId = $('input#wpcf7-id').val();
|
68 |
-
|
69 |
-
if (0 != oldId) {
|
70 |
-
var tagOld = '[contact-form ' + oldId + ' "' + title + '"]';
|
71 |
-
$('input#contact-form-anchor-text-old').val(tagOld).parent('p.tagcode').show();
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
+
|
3 |
+
$(function() {
|
4 |
+
try {
|
5 |
+
$('div.cf7com-links').insertAfter($('div.wrap h2:first'));
|
6 |
+
|
7 |
+
$.extend($.tgPanes, _wpcf7.tagGenerators);
|
8 |
+
$('#taggenerator').tagGenerator(_wpcf7.generateTag,
|
9 |
+
{ dropdownIconUrl: _wpcf7.pluginUrl + '/admin/images/dropdown.gif' });
|
10 |
+
|
11 |
+
$('input#wpcf7-title:disabled').css({cursor: 'default'});
|
12 |
+
|
13 |
+
$('input#wpcf7-title').mouseover(function() {
|
14 |
+
$(this).not('.focus').addClass('mouseover');
|
15 |
+
});
|
16 |
+
|
17 |
+
$('input#wpcf7-title').mouseout(function() {
|
18 |
+
$(this).removeClass('mouseover');
|
19 |
+
});
|
20 |
+
|
21 |
+
$('input#wpcf7-title').focus(function() {
|
22 |
+
$(this).addClass('focus').removeClass('mouseover');
|
23 |
+
});
|
24 |
+
|
25 |
+
$('input#wpcf7-title').blur(function() {
|
26 |
+
$(this).removeClass('focus');
|
27 |
+
});
|
28 |
+
|
29 |
+
$('input#wpcf7-title').change(function() {
|
30 |
+
updateTag();
|
31 |
+
});
|
32 |
+
|
33 |
+
updateTag();
|
34 |
+
|
35 |
+
$('.check-if-these-fields-are-active').each(function(index) {
|
36 |
+
if (! $(this).is(':checked'))
|
37 |
+
$(this).parent().siblings('.mail-fields').hide();
|
38 |
+
|
39 |
+
$(this).click(function() {
|
40 |
+
if ($(this).parent().siblings('.mail-fields').is(':hidden')
|
41 |
+
&& $(this).is(':checked')) {
|
42 |
+
$(this).parent().siblings('.mail-fields').slideDown('fast');
|
43 |
+
} else if ($(this).parent().siblings('.mail-fields').is(':visible')
|
44 |
+
&& $(this).not(':checked')) {
|
45 |
+
$(this).parent().siblings('.mail-fields').slideUp('fast');
|
46 |
+
}
|
47 |
+
});
|
48 |
+
});
|
49 |
+
|
50 |
+
postboxes.add_postbox_toggles('cfseven');
|
51 |
+
|
52 |
+
} catch (e) {
|
53 |
+
}
|
54 |
+
});
|
55 |
+
|
56 |
+
function updateTag() {
|
57 |
+
var title = $('input#wpcf7-title').val();
|
58 |
+
|
59 |
+
if (title)
|
60 |
+
title = title.replace(/["'\[\]]/g, '');
|
61 |
+
|
62 |
+
$('input#wpcf7-title').val(title);
|
63 |
+
var postId = $('input#post_ID').val();
|
64 |
+
var tag = '[contact-form-7 id="' + postId + '" title="' + title + '"]';
|
65 |
+
$('input#contact-form-anchor-text').val(tag);
|
66 |
+
|
67 |
+
var oldId = $('input#wpcf7-id').val();
|
68 |
+
|
69 |
+
if (0 != oldId) {
|
70 |
+
var tagOld = '[contact-form ' + oldId + ' "' + title + '"]';
|
71 |
+
$('input#contact-form-anchor-text-old').val(tagOld).parent('p.tagcode').show();
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
})(jQuery);
|
admin/styles-rtl.css
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
ul.subsubsub li.addnew {
|
2 |
-
margin-left: 0;
|
3 |
-
margin-right: 0.5em;
|
4 |
-
}
|
5 |
-
div.save-contact-form {
|
6 |
-
direction: rtl;
|
7 |
-
}
|
8 |
-
div.actions-link {
|
9 |
-
right: auto;
|
10 |
-
left: 0;
|
11 |
-
}
|
12 |
-
div.tg-pane table caption {
|
13 |
-
text-align: right;
|
14 |
-
}
|
15 |
-
div.tg-dropdown {
|
16 |
-
left: auto;
|
17 |
-
right: 0;
|
18 |
}
|
1 |
+
ul.subsubsub li.addnew {
|
2 |
+
margin-left: 0;
|
3 |
+
margin-right: 0.5em;
|
4 |
+
}
|
5 |
+
div.save-contact-form {
|
6 |
+
direction: rtl;
|
7 |
+
}
|
8 |
+
div.actions-link {
|
9 |
+
right: auto;
|
10 |
+
left: 0;
|
11 |
+
}
|
12 |
+
div.tg-pane table caption {
|
13 |
+
text-align: right;
|
14 |
+
}
|
15 |
+
div.tg-dropdown {
|
16 |
+
left: auto;
|
17 |
+
right: 0;
|
18 |
}
|
admin/styles.css
CHANGED
@@ -1,271 +1,275 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
}
|
10 |
-
|
11 |
-
div.wrap div.
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
border-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
font-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
div.wrap
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
ul.subsubsub
|
44 |
-
|
45 |
-
}
|
46 |
-
|
47 |
-
ul.subsubsub li.addnew
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
ul.subsubsub li.addnew a
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.subsubsub li.addnew a
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
padding:
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
padding:
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
div.actions-link input.
|
93 |
-
color: #
|
94 |
-
}
|
95 |
-
|
96 |
-
|
97 |
-
color: #
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
color:
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
background-color:
|
114 |
-
}
|
115 |
-
|
116 |
-
|
117 |
-
color: #
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
}
|
138 |
-
|
139 |
-
.postbox .
|
140 |
-
margin-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
}
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
}
|
156 |
-
|
157 |
-
input
|
158 |
-
|
159 |
-
}
|
160 |
-
|
161 |
-
|
162 |
-
width: 100%;
|
163 |
-
}
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
}
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
}
|
200 |
-
|
201 |
-
div.tg-pane table
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
border
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
}
|
236 |
-
|
237 |
-
div.tg-pane input.
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
}
|
251 |
-
|
252 |
-
div.tg-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
|
|
|
|
|
|
|
|
271 |
}
|
1 |
+
#icon-wpcf7 {
|
2 |
+
background: transparent url(./images/screen-icon.png) no-repeat 2px 1px;
|
3 |
+
}
|
4 |
+
|
5 |
+
div.wrap div.cf7com-links {
|
6 |
+
text-align: right;
|
7 |
+
font-size: .9em;
|
8 |
+
margin-top: -1.6em;
|
9 |
+
}
|
10 |
+
|
11 |
+
div.wrap div.cf7com-links a {
|
12 |
+
text-decoration: none;
|
13 |
+
}
|
14 |
+
|
15 |
+
div.wrap div.donation {
|
16 |
+
border-width: 1px;
|
17 |
+
border-style: solid;
|
18 |
+
padding: 0 0.6em;
|
19 |
+
margin: 5px 0 15px;
|
20 |
+
-webkit-border-radius: 3px;
|
21 |
+
border-radius: 3px;
|
22 |
+
background-color: #ffffe0;
|
23 |
+
border-color: #e6db55;
|
24 |
+
text-align: center;
|
25 |
+
}
|
26 |
+
|
27 |
+
div.wrap div.donation p {
|
28 |
+
margin: .7em 0;
|
29 |
+
line-height: 1;
|
30 |
+
padding: 2px;
|
31 |
+
font-size: 107%;
|
32 |
+
}
|
33 |
+
|
34 |
+
div.wrap div.donation p a {
|
35 |
+
font-weight: bold;
|
36 |
+
color: #3f3f3f;
|
37 |
+
}
|
38 |
+
|
39 |
+
div.wrap div.donation p a.button {
|
40 |
+
margin-left: 1em;
|
41 |
+
}
|
42 |
+
|
43 |
+
div.wrap ul.subsubsub {
|
44 |
+
white-space: normal;
|
45 |
+
}
|
46 |
+
|
47 |
+
ul.subsubsub li.addnew {
|
48 |
+
margin-left: 0.5em;
|
49 |
+
}
|
50 |
+
|
51 |
+
ul.subsubsub li.addnew a {
|
52 |
+
color: #e6255b;
|
53 |
+
}
|
54 |
+
|
55 |
+
ul.subsubsub li.addnew a.current {
|
56 |
+
border: 1px solid #bbb;
|
57 |
+
}
|
58 |
+
|
59 |
+
ul.subsubsub li.addnew a:hover,
|
60 |
+
ul.subsubsub li.addnew a:active {
|
61 |
+
color: #999;
|
62 |
+
}
|
63 |
+
|
64 |
+
#titlediv {
|
65 |
+
margin-bottom: 20px;
|
66 |
+
position: relative;
|
67 |
+
border: 1px solid #c7c7c7;
|
68 |
+
padding: 6px;
|
69 |
+
}
|
70 |
+
|
71 |
+
div.save-contact-form {
|
72 |
+
padding: 1.4em 0 0 0;
|
73 |
+
text-align: right;
|
74 |
+
}
|
75 |
+
|
76 |
+
div.actions-link {
|
77 |
+
position: absolute;
|
78 |
+
top: 0;
|
79 |
+
right: 0;
|
80 |
+
margin: 0;
|
81 |
+
padding: 6px;
|
82 |
+
}
|
83 |
+
|
84 |
+
div.actions-link input {
|
85 |
+
padding: 0;
|
86 |
+
margin: 0;
|
87 |
+
border: none;
|
88 |
+
font-size: 11px;
|
89 |
+
cursor: pointer;
|
90 |
+
}
|
91 |
+
|
92 |
+
div.actions-link input.copy {
|
93 |
+
color: #006505;
|
94 |
+
}
|
95 |
+
|
96 |
+
div.actions-link input.delete {
|
97 |
+
color: #bc0b0b;
|
98 |
+
}
|
99 |
+
|
100 |
+
input#wpcf7-title {
|
101 |
+
color: #555;
|
102 |
+
border: none;
|
103 |
+
font: bold 20px serif;
|
104 |
+
cursor: pointer;
|
105 |
+
background-color: transparent;
|
106 |
+
}
|
107 |
+
|
108 |
+
input#wpcf7-title.focus {
|
109 |
+
color: #333;
|
110 |
+
border: 1px solid #777;
|
111 |
+
font: normal 13px Verdana, Arial, Helvetica, sans-serif;
|
112 |
+
cursor: text;
|
113 |
+
background-color: transparent;
|
114 |
+
}
|
115 |
+
|
116 |
+
input#wpcf7-title.mouseover {
|
117 |
+
background-color: #ffffdd;
|
118 |
+
}
|
119 |
+
|
120 |
+
p.tagcode {
|
121 |
+
color: #333;
|
122 |
+
margin: 2ex 0 1ex 0;
|
123 |
+
}
|
124 |
+
|
125 |
+
input#contact-form-anchor-text, input#contact-form-anchor-text-old {
|
126 |
+
color: #fff;
|
127 |
+
background: #7e4e0b;
|
128 |
+
border: none;
|
129 |
+
width: 100%;
|
130 |
+
-webkit-border-radius: 6px;
|
131 |
+
border-radius: 6px;
|
132 |
+
}
|
133 |
+
|
134 |
+
.postbox .half, .postbox .half-left, .postbox .half-right {
|
135 |
+
float: left;
|
136 |
+
width: 50%;
|
137 |
+
}
|
138 |
+
|
139 |
+
.postbox .half-right > * {
|
140 |
+
margin-left: 10px;
|
141 |
+
}
|
142 |
+
|
143 |
+
.postbox .mail-field, .postbox .message-field {
|
144 |
+
margin-top: 6px;
|
145 |
+
margin-bottom: 8px;
|
146 |
+
}
|
147 |
+
|
148 |
+
.postbox .mail-field label, .postbox .message-field label {
|
149 |
+
line-height: 1.4em;
|
150 |
+
}
|
151 |
+
|
152 |
+
div.pseudo-hr {
|
153 |
+
border-bottom: 1px solid transparent;
|
154 |
+
margin: 8px 0;
|
155 |
+
}
|
156 |
+
|
157 |
+
input, textarea {
|
158 |
+
border: 1px solid #dfdfdf;
|
159 |
+
}
|
160 |
+
|
161 |
+
input.wide {
|
162 |
+
width: 100%;
|
163 |
+
}
|
164 |
+
|
165 |
+
textarea {
|
166 |
+
width: 100%;
|
167 |
+
}
|
168 |
+
|
169 |
+
label.disabled {
|
170 |
+
color: #777;
|
171 |
+
}
|
172 |
+
|
173 |
+
div.tag-generator {
|
174 |
+
position: relative;
|
175 |
+
background: transparent;
|
176 |
+
padding: 0 0 5px 1px;
|
177 |
+
}
|
178 |
+
|
179 |
+
div.tg-pane {
|
180 |
+
border: 1px dashed #999;
|
181 |
+
background: #f1f1f1;
|
182 |
+
margin: 1ex 0 0 0;
|
183 |
+
padding: 10px;
|
184 |
+
-webkit-border-radius: 6px;
|
185 |
+
border-radius: 6px;
|
186 |
+
line-height: 140%;
|
187 |
+
}
|
188 |
+
|
189 |
+
div.tg-pane table {
|
190 |
+
width: 100%;
|
191 |
+
margin: 0 0 0.7em 0;
|
192 |
+
}
|
193 |
+
|
194 |
+
div.tg-pane table caption {
|
195 |
+
text-align: left;
|
196 |
+
padding: 0 0 0.2em 0;
|
197 |
+
font-weight: bolder;
|
198 |
+
color: #777;
|
199 |
+
}
|
200 |
+
|
201 |
+
div.tg-pane table code {
|
202 |
+
background-color: inherit;
|
203 |
+
}
|
204 |
+
|
205 |
+
div.tg-pane table td {
|
206 |
+
vertical-align: top;
|
207 |
+
width: 50%;
|
208 |
+
border: none;
|
209 |
+
padding: 2px 0;
|
210 |
+
}
|
211 |
+
|
212 |
+
div.tg-pane input.tag, div.tg-pane input.mail-tag {
|
213 |
+
width: 100%;
|
214 |
+
border: none;
|
215 |
+
color: #fff;
|
216 |
+
background-color: #7e4e0b;
|
217 |
+
-webkit-border-radius: 6px;
|
218 |
+
border-radius: 6px;
|
219 |
+
}
|
220 |
+
|
221 |
+
div.tg-pane input.mail-tag {
|
222 |
+
width: 50%;
|
223 |
+
background-color: #404f03;
|
224 |
+
}
|
225 |
+
|
226 |
+
div.tg-mail-tag {
|
227 |
+
margin-top: 2.4em;
|
228 |
+
text-align: right;
|
229 |
+
}
|
230 |
+
|
231 |
+
div.tg-pane span.arrow {
|
232 |
+
font-family: monospace;
|
233 |
+
font-size: 1.2em;
|
234 |
+
color: #333;
|
235 |
+
}
|
236 |
+
|
237 |
+
div.tg-pane input.tg-name {
|
238 |
+
border-color: #555;
|
239 |
+
}
|
240 |
+
|
241 |
+
div.tg-pane input.oneline {
|
242 |
+
width: 98%;
|
243 |
+
font-size: smaller;
|
244 |
+
}
|
245 |
+
|
246 |
+
div.tg-pane textarea {
|
247 |
+
width: 98%;
|
248 |
+
height: 100px;
|
249 |
+
font-size: smaller;
|
250 |
+
}
|
251 |
+
|
252 |
+
div.tg-pane div.tg-tag {
|
253 |
+
margin: .4em 0;
|
254 |
+
}
|
255 |
+
|
256 |
+
div.tg-dropdown {
|
257 |
+
position: absolute;
|
258 |
+
top: 26px;
|
259 |
+
left: 0;
|
260 |
+
z-index: 10;
|
261 |
+
border: 1px solid #ddd;
|
262 |
+
}
|
263 |
+
|
264 |
+
span.tg-closebutton {
|
265 |
+
color: #777;
|
266 |
+
font: bold 18px monospace;
|
267 |
+
padding: 1px 4px;
|
268 |
+
cursor: pointer;
|
269 |
+
}
|
270 |
+
|
271 |
+
div.tg-panetitle {
|
272 |
+
font: bold 132% sans-serif;
|
273 |
+
margin: 0 0 10px;
|
274 |
+
color: #777;
|
275 |
}
|
includes/classes.php
CHANGED
@@ -1,577 +1,733 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WPCF7_ContactForm {
|
4 |
-
|
5 |
-
var $initial = false;
|
6 |
-
|
7 |
-
var $id;
|
8 |
-
var $title;
|
9 |
-
|
10 |
-
var $unit_tag;
|
11 |
-
|
12 |
-
var $responses_count = 0;
|
13 |
-
var $scanned_form_tags;
|
14 |
-
|
15 |
-
var $posted_data;
|
16 |
-
var $uploaded_files = array();
|
17 |
-
|
18 |
-
var $skip_mail = false;
|
19 |
-
|
20 |
-
// Return true if this form is the same one as currently POSTed.
|
21 |
-
function is_posted() {
|
22 |
-
if ( ! isset( $_POST['_wpcf7_unit_tag'] ) || empty( $_POST['_wpcf7_unit_tag'] ) )
|
23 |
-
return false;
|
24 |
-
|
25 |
-
if ( $this->unit_tag == $_POST['_wpcf7_unit_tag'] )
|
26 |
-
return true;
|
27 |
-
|
28 |
-
return false;
|
29 |
-
}
|
30 |
-
|
31 |
-
function clear_post() {
|
32 |
-
$fes = $this->form_scan_shortcode();
|
33 |
-
|
34 |
-
foreach ( $fes as $fe ) {
|
35 |
-
if ( ! isset( $fe['name'] ) || empty( $fe['name'] ) )
|
36 |
-
continue;
|
37 |
-
|
38 |
-
$name = $fe['name'];
|
39 |
-
|
40 |
-
if ( isset( $_POST[$name] ) )
|
41 |
-
unset( $_POST[$name] );
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
/* Generating Form HTML */
|
46 |
-
|
47 |
-
function form_html() {
|
48 |
-
$form = '<div class="wpcf7" id="' . $this->unit_tag . '">';
|
49 |
-
|
50 |
-
$url = wpcf7_get_request_uri();
|
51 |
-
|
52 |
-
if ( $frag = strstr( $url, '#' ) )
|
53 |
-
$url = substr( $url, 0, -strlen( $frag ) );
|
54 |
-
|
55 |
-
$url .= '#' . $this->unit_tag;
|
56 |
-
|
57 |
-
$url = apply_filters( 'wpcf7_form_action_url', $url );
|
58 |
-
$enctype = apply_filters( 'wpcf7_form_enctype', '' );
|
59 |
-
$class = apply_filters( 'wpcf7_form_class_attr', 'wpcf7-form' );
|
60 |
-
|
61 |
-
$form .= '<form action="' . esc_url_raw( $url ) . '" method="post"'
|
62 |
-
. ' class="' . esc_attr( $class ) . '"' . $enctype . '>' . "\n";
|
63 |
-
|
64 |
-
$form .=
|
65 |
-
|
66 |
-
$form .=
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
$form .=
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
$
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
$
|
134 |
-
|
135 |
-
if (
|
136 |
-
$
|
137 |
-
|
138 |
-
}
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
$
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
$
|
225 |
-
$
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
$value = $
|
236 |
-
}
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
}
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
$
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
}
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
$
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
577 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WPCF7_ContactForm {
|
4 |
+
|
5 |
+
var $initial = false;
|
6 |
+
|
7 |
+
var $id;
|
8 |
+
var $title;
|
9 |
+
|
10 |
+
var $unit_tag;
|
11 |
+
|
12 |
+
var $responses_count = 0;
|
13 |
+
var $scanned_form_tags;
|
14 |
+
|
15 |
+
var $posted_data;
|
16 |
+
var $uploaded_files = array();
|
17 |
+
|
18 |
+
var $skip_mail = false;
|
19 |
+
|
20 |
+
// Return true if this form is the same one as currently POSTed.
|
21 |
+
function is_posted() {
|
22 |
+
if ( ! isset( $_POST['_wpcf7_unit_tag'] ) || empty( $_POST['_wpcf7_unit_tag'] ) )
|
23 |
+
return false;
|
24 |
+
|
25 |
+
if ( $this->unit_tag == $_POST['_wpcf7_unit_tag'] )
|
26 |
+
return true;
|
27 |
+
|
28 |
+
return false;
|
29 |
+
}
|
30 |
+
|
31 |
+
function clear_post() {
|
32 |
+
$fes = $this->form_scan_shortcode();
|
33 |
+
|
34 |
+
foreach ( $fes as $fe ) {
|
35 |
+
if ( ! isset( $fe['name'] ) || empty( $fe['name'] ) )
|
36 |
+
continue;
|
37 |
+
|
38 |
+
$name = $fe['name'];
|
39 |
+
|
40 |
+
if ( isset( $_POST[$name] ) )
|
41 |
+
unset( $_POST[$name] );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
/* Generating Form HTML */
|
46 |
+
|
47 |
+
function form_html() {
|
48 |
+
$form = '<div class="wpcf7" id="' . $this->unit_tag . '">';
|
49 |
+
|
50 |
+
$url = wpcf7_get_request_uri();
|
51 |
+
|
52 |
+
if ( $frag = strstr( $url, '#' ) )
|
53 |
+
$url = substr( $url, 0, -strlen( $frag ) );
|
54 |
+
|
55 |
+
$url .= '#' . $this->unit_tag;
|
56 |
+
|
57 |
+
$url = apply_filters( 'wpcf7_form_action_url', $url );
|
58 |
+
$enctype = apply_filters( 'wpcf7_form_enctype', '' );
|
59 |
+
$class = apply_filters( 'wpcf7_form_class_attr', 'wpcf7-form' );
|
60 |
+
|
61 |
+
$form .= '<form action="' . esc_url_raw( $url ) . '" method="post"'
|
62 |
+
. ' class="' . esc_attr( $class ) . '"' . $enctype . '>' . "\n";
|
63 |
+
|
64 |
+
$form .= $this->form_hidden_fields();
|
65 |
+
|
66 |
+
$form .= $this->form_elements();
|
67 |
+
|
68 |
+
if ( ! $this->responses_count )
|
69 |
+
$form .= $this->form_response_output();
|
70 |
+
|
71 |
+
$form .= '</form>';
|
72 |
+
|
73 |
+
$form .= '</div>';
|
74 |
+
|
75 |
+
return $form;
|
76 |
+
}
|
77 |
+
|
78 |
+
function form_hidden_fields() {
|
79 |
+
$hidden_fields = array(
|
80 |
+
'_wpcf7' => $this->id,
|
81 |
+
'_wpcf7_version' => WPCF7_VERSION,
|
82 |
+
'_wpcf7_unit_tag' => $this->unit_tag );
|
83 |
+
|
84 |
+
if ( WPCF7_VERIFY_NONCE )
|
85 |
+
$hidden_fields['_wpnonce'] = wp_create_nonce( $this->unit_tag );
|
86 |
+
|
87 |
+
$content = '';
|
88 |
+
|
89 |
+
foreach ( $hidden_fields as $name => $value ) {
|
90 |
+
$content .= '<input type="hidden"'
|
91 |
+
. ' name="' . esc_attr( $name ) . '"'
|
92 |
+
. ' value="' . esc_attr( $value ) . '" />' . "\n";
|
93 |
+
}
|
94 |
+
|
95 |
+
return '<div style="display: none;">' . "\n" . $content . '</div>' . "\n";
|
96 |
+
}
|
97 |
+
|
98 |
+
function form_response_output() {
|
99 |
+
$class = 'wpcf7-response-output';
|
100 |
+
$content = '';
|
101 |
+
|
102 |
+
if ( $this->is_posted() ) { // Post response output for non-AJAX
|
103 |
+
if ( isset( $_POST['_wpcf7_mail_sent'] ) && $_POST['_wpcf7_mail_sent']['id'] == $this->id ) {
|
104 |
+
if ( $_POST['_wpcf7_mail_sent']['ok'] ) {
|
105 |
+
$class .= ' wpcf7-mail-sent-ok';
|
106 |
+
$content = $_POST['_wpcf7_mail_sent']['message'];
|
107 |
+
} else {
|
108 |
+
$class .= ' wpcf7-mail-sent-ng';
|
109 |
+
if ( $_POST['_wpcf7_mail_sent']['spam'] )
|
110 |
+
$class .= ' wpcf7-spam-blocked';
|
111 |
+
$content = $_POST['_wpcf7_mail_sent']['message'];
|
112 |
+
}
|
113 |
+
} elseif ( isset( $_POST['_wpcf7_validation_errors'] ) && $_POST['_wpcf7_validation_errors']['id'] == $this->id ) {
|
114 |
+
$class .= ' wpcf7-validation-errors';
|
115 |
+
$content = $this->message( 'validation_error' );
|
116 |
+
}
|
117 |
+
} else {
|
118 |
+
$class .= ' wpcf7-display-none';
|
119 |
+
}
|
120 |
+
|
121 |
+
$class = ' class="' . $class . '"';
|
122 |
+
|
123 |
+
return '<div' . $class . '>' . $content . '</div>';
|
124 |
+
}
|
125 |
+
|
126 |
+
function validation_error( $name ) {
|
127 |
+
if ( ! $this->is_posted() )
|
128 |
+
return '';
|
129 |
+
|
130 |
+
if ( ! isset( $_POST['_wpcf7_validation_errors']['messages'][$name] ) )
|
131 |
+
return '';
|
132 |
+
|
133 |
+
$ve = trim( $_POST['_wpcf7_validation_errors']['messages'][$name] );
|
134 |
+
|
135 |
+
if ( ! empty( $ve ) ) {
|
136 |
+
$ve = '<span class="wpcf7-not-valid-tip-no-ajax">' . esc_html( $ve ) . '</span>';
|
137 |
+
return apply_filters( 'wpcf7_validation_error', $ve, $name, $this );
|
138 |
+
}
|
139 |
+
|
140 |
+
return '';
|
141 |
+
}
|
142 |
+
|
143 |
+
/* Form Elements */
|
144 |
+
|
145 |
+
function form_do_shortcode() {
|
146 |
+
global $wpcf7_shortcode_manager;
|
147 |
+
|
148 |
+
$form = $this->form;
|
149 |
+
|
150 |
+
if ( WPCF7_AUTOP ) {
|
151 |
+
$form = $wpcf7_shortcode_manager->normalize_shortcode( $form );
|
152 |
+
$form = wpcf7_autop( $form );
|
153 |
+
}
|
154 |
+
|
155 |
+
$form = $wpcf7_shortcode_manager->do_shortcode( $form );
|
156 |
+
$this->scanned_form_tags = $wpcf7_shortcode_manager->scanned_tags;
|
157 |
+
|
158 |
+
return $form;
|
159 |
+
}
|
160 |
+
|
161 |
+
function form_scan_shortcode( $cond = null ) {
|
162 |
+
global $wpcf7_shortcode_manager;
|
163 |
+
|
164 |
+
if ( ! empty( $this->scanned_form_tags ) ) {
|
165 |
+
$scanned = $this->scanned_form_tags;
|
166 |
+
} else {
|
167 |
+
$scanned = $wpcf7_shortcode_manager->scan_shortcode( $this->form );
|
168 |
+
$this->scanned_form_tags = $scanned;
|
169 |
+
}
|
170 |
+
|
171 |
+
if ( empty( $scanned ) )
|
172 |
+
return null;
|
173 |
+
|
174 |
+
if ( ! is_array( $cond ) || empty( $cond ) )
|
175 |
+
return $scanned;
|
176 |
+
|
177 |
+
for ( $i = 0, $size = count( $scanned ); $i < $size; $i++ ) {
|
178 |
+
|
179 |
+
if ( isset( $cond['type'] ) ) {
|
180 |
+
if ( is_string( $cond['type'] ) && ! empty( $cond['type'] ) ) {
|
181 |
+
if ( $scanned[$i]['type'] != $cond['type'] ) {
|
182 |
+
unset( $scanned[$i] );
|
183 |
+
continue;
|
184 |
+
}
|
185 |
+
} elseif ( is_array( $cond['type'] ) ) {
|
186 |
+
if ( ! in_array( $scanned[$i]['type'], $cond['type'] ) ) {
|
187 |
+
unset( $scanned[$i] );
|
188 |
+
continue;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
if ( isset( $cond['name'] ) ) {
|
194 |
+
if ( is_string( $cond['name'] ) && ! empty( $cond['name'] ) ) {
|
195 |
+
if ( $scanned[$i]['name'] != $cond['name'] ) {
|
196 |
+
unset ( $scanned[$i] );
|
197 |
+
continue;
|
198 |
+
}
|
199 |
+
} elseif ( is_array( $cond['name'] ) ) {
|
200 |
+
if ( ! in_array( $scanned[$i]['name'], $cond['name'] ) ) {
|
201 |
+
unset( $scanned[$i] );
|
202 |
+
continue;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
return array_values( $scanned );
|
209 |
+
}
|
210 |
+
|
211 |
+
function form_elements() {
|
212 |
+
return apply_filters( 'wpcf7_form_elements', $this->form_do_shortcode() );
|
213 |
+
}
|
214 |
+
|
215 |
+
function setup_posted_data() {
|
216 |
+
$posted_data = (array) $_POST;
|
217 |
+
|
218 |
+
$fes = $this->form_scan_shortcode();
|
219 |
+
|
220 |
+
foreach ( $fes as $fe ) {
|
221 |
+
if ( empty( $fe['name'] ) )
|
222 |
+
continue;
|
223 |
+
|
224 |
+
$name = $fe['name'];
|
225 |
+
$pipes = $fe['pipes'];
|
226 |
+
$value = $_POST[$name];
|
227 |
+
|
228 |
+
if ( WPCF7_USE_PIPE && is_a( $pipes, 'WPCF7_Pipes' ) && ! $pipes->zero() ) {
|
229 |
+
if ( is_array( $value) ) {
|
230 |
+
$new_value = array();
|
231 |
+
|
232 |
+
foreach ( $value as $v )
|
233 |
+
$new_value[] = $pipes->do_pipe( stripslashes( $v ) );
|
234 |
+
|
235 |
+
$value = $new_value;
|
236 |
+
} else {
|
237 |
+
$value = $pipes->do_pipe( stripslashes( $value ) );
|
238 |
+
}
|
239 |
+
}
|
240 |
+
|
241 |
+
$posted_data[$name] = $value;
|
242 |
+
}
|
243 |
+
|
244 |
+
$this->posted_data = apply_filters( 'wpcf7_posted_data', $posted_data );
|
245 |
+
|
246 |
+
return $this->posted_data;
|
247 |
+
}
|
248 |
+
|
249 |
+
function submit( $ajax = false ) {
|
250 |
+
$result = array(
|
251 |
+
'valid' => true,
|
252 |
+
'invalid_reasons' => array(),
|
253 |
+
'spam' => false,
|
254 |
+
'message' => '',
|
255 |
+
'mail_sent' => false,
|
256 |
+
'scripts_on_sent_ok' => null );
|
257 |
+
|
258 |
+
$this->setup_posted_data();
|
259 |
+
|
260 |
+
$validation = $this->validate();
|
261 |
+
|
262 |
+
if ( ! $validation['valid'] ) { // Validation error occured
|
263 |
+
$result['valid'] = false;
|
264 |
+
$result['invalid_reasons'] = $validation['reason'];
|
265 |
+
$result['message'] = $this->message( 'validation_error' );
|
266 |
+
|
267 |
+
} elseif ( ! $this->accepted() ) { // Not accepted terms
|
268 |
+
$result['message'] = $this->message( 'accept_terms' );
|
269 |
+
|
270 |
+
} elseif ( $this->spam() ) { // Spam!
|
271 |
+
$result['message'] = $this->message( 'spam' );
|
272 |
+
$result['spam'] = true;
|
273 |
+
|
274 |
+
} elseif ( $this->mail() ) {
|
275 |
+
$result['mail_sent'] = true;
|
276 |
+
$result['message'] = $this->message( 'mail_sent_ok' );
|
277 |
+
|
278 |
+
do_action_ref_array( 'wpcf7_mail_sent', array( &$this ) );
|
279 |
+
|
280 |
+
if ( $ajax ) {
|
281 |
+
$on_sent_ok = $this->additional_setting( 'on_sent_ok', false );
|
282 |
+
|
283 |
+
if ( ! empty( $on_sent_ok ) )
|
284 |
+
$result['scripts_on_sent_ok'] = array_map( 'wpcf7_strip_quote', $on_sent_ok );
|
285 |
+
} else {
|
286 |
+
$this->clear_post();
|
287 |
+
}
|
288 |
+
|
289 |
+
} else {
|
290 |
+
$result['message'] = $this->message( 'mail_sent_ng' );
|
291 |
+
}
|
292 |
+
|
293 |
+
// remove upload files
|
294 |
+
foreach ( (array) $this->uploaded_files as $name => $path ) {
|
295 |
+
@unlink( $path );
|
296 |
+
}
|
297 |
+
|
298 |
+
return $result;
|
299 |
+
}
|
300 |
+
|
301 |
+
/* Validate */
|
302 |
+
|
303 |
+
function validate() {
|
304 |
+
$fes = $this->form_scan_shortcode();
|
305 |
+
|
306 |
+
$result = array( 'valid' => true, 'reason' => array() );
|
307 |
+
|
308 |
+
foreach ( $fes as $fe ) {
|
309 |
+
$result = apply_filters( 'wpcf7_validate_' . $fe['type'], $result, $fe );
|
310 |
+
}
|
311 |
+
|
312 |
+
$result = apply_filters( 'wpcf7_validate', $result );
|
313 |
+
|
314 |
+
return $result;
|
315 |
+
}
|
316 |
+
|
317 |
+
function accepted() {
|
318 |
+
$accepted = true;
|
319 |
+
|
320 |
+
return apply_filters( 'wpcf7_acceptance', $accepted );
|
321 |
+
}
|
322 |
+
|
323 |
+
function spam() {
|
324 |
+
$spam = false;
|
325 |
+
|
326 |
+
if ( WPCF7_VERIFY_NONCE && ! $this->verify_nonce() )
|
327 |
+
$spam = true;
|
328 |
+
|
329 |
+
return apply_filters( 'wpcf7_spam', $spam );
|
330 |
+
}
|
331 |
+
|
332 |
+
function verify_nonce() {
|
333 |
+
return wp_verify_nonce( $_POST['_wpnonce'], $_POST['_wpcf7_unit_tag'] );
|
334 |
+
}
|
335 |
+
|
336 |
+
/* Mail */
|
337 |
+
|
338 |
+
function mail() {
|
339 |
+
if ( $this->in_demo_mode() )
|
340 |
+
$this->skip_mail = true;
|
341 |
+
|
342 |
+
do_action_ref_array( 'wpcf7_before_send_mail', array( &$this ) );
|
343 |
+
|
344 |
+
if ( $this->skip_mail )
|
345 |
+
return true;
|
346 |
+
|
347 |
+
$result = $this->compose_mail( $this->setup_mail_template( $this->mail, 'mail' ) );
|
348 |
+
|
349 |
+
if ( $result ) {
|
350 |
+
$additional_mail = array();
|
351 |
+
|
352 |
+
if ( $this->mail_2['active'] )
|
353 |
+
$additional_mail[] = $this->setup_mail_template( $this->mail_2, 'mail_2' );
|
354 |
+
|
355 |
+
$additional_mail = apply_filters_ref_array( 'wpcf7_additional_mail',
|
356 |
+
array( $additional_mail, &$this ) );
|
357 |
+
|
358 |
+
foreach ( $additional_mail as $mail )
|
359 |
+
$this->compose_mail( $mail );
|
360 |
+
|
361 |
+
return true;
|
362 |
+
}
|
363 |
+
|
364 |
+
return false;
|
365 |
+
}
|
366 |
+
|
367 |
+
function setup_mail_template( $mail_template, $name = '' ) {
|
368 |
+
$defaults = array(
|
369 |
+
'subject' => '', 'sender' => '', 'body' => '',
|
370 |
+
'recipient' => '', 'additional_headers' => '',
|
371 |
+
'attachments' => '', 'use_html' => false );
|
372 |
+
|
373 |
+
$mail_template = wp_parse_args( $mail_template, $defaults );
|
374 |
+
|
375 |
+
$name = trim( $name );
|
376 |
+
|
377 |
+
if ( ! empty( $name ) )
|
378 |
+
$mail_template['name'] = $name;
|
379 |
+
|
380 |
+
return $mail_template;
|
381 |
+
}
|
382 |
+
|
383 |
+
function compose_mail( $mail_template, $send = true ) {
|
384 |
+
$this->mail_template_in_process = $mail_template;
|
385 |
+
|
386 |
+
$regex = '/(\[?)\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\](\]?)/';
|
387 |
+
|
388 |
+
$use_html = (bool) $mail_template['use_html'];
|
389 |
+
|
390 |
+
$callback = array( &$this, 'mail_callback' );
|
391 |
+
$callback_html = array( &$this, 'mail_callback_html' );
|
392 |
+
|
393 |
+
$subject = preg_replace_callback( $regex, $callback, $mail_template['subject'] );
|
394 |
+
$sender = preg_replace_callback( $regex, $callback, $mail_template['sender'] );
|
395 |
+
$recipient = preg_replace_callback( $regex, $callback, $mail_template['recipient'] );
|
396 |
+
$additional_headers =
|
397 |
+
preg_replace_callback( $regex, $callback, $mail_template['additional_headers'] );
|
398 |
+
|
399 |
+
if ( $use_html ) {
|
400 |
+
$body = preg_replace_callback( $regex, $callback_html, $mail_template['body'] );
|
401 |
+
$body = wpautop( $body );
|
402 |
+
} else {
|
403 |
+
$body = preg_replace_callback( $regex, $callback, $mail_template['body'] );
|
404 |
+
}
|
405 |
+
|
406 |
+
$attachments = array();
|
407 |
+
|
408 |
+
foreach ( (array) $this->uploaded_files as $name => $path ) {
|
409 |
+
if ( false === strpos( $mail_template['attachments'], "[${name}]" ) || empty( $path ) )
|
410 |
+
continue;
|
411 |
+
|
412 |
+
$attachments[] = $path;
|
413 |
+
}
|
414 |
+
|
415 |
+
$components = compact(
|
416 |
+
'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments' );
|
417 |
+
|
418 |
+
$components = apply_filters_ref_array( 'wpcf7_mail_components',
|
419 |
+
array( $components, &$this ) );
|
420 |
+
|
421 |
+
extract( $components );
|
422 |
+
|
423 |
+
$headers = "From: $sender\n";
|
424 |
+
|
425 |
+
if ( $use_html )
|
426 |
+
$headers .= "Content-Type: text/html\n";
|
427 |
+
|
428 |
+
$headers .= trim( $additional_headers ) . "\n";
|
429 |
+
|
430 |
+
if ( $send )
|
431 |
+
return @wp_mail( $recipient, $subject, $body, $headers, $attachments );
|
432 |
+
|
433 |
+
return compact( 'subject', 'sender', 'body', 'recipient', 'headers', 'attachments' );
|
434 |
+
}
|
435 |
+
|
436 |
+
function mail_callback_html( $matches ) {
|
437 |
+
return $this->mail_callback( $matches, true );
|
438 |
+
}
|
439 |
+
|
440 |
+
function mail_callback( $matches, $html = false ) {
|
441 |
+
// allow [[foo]] syntax for escaping a tag
|
442 |
+
if ( $matches[1] == '[' && $matches[3] == ']' )
|
443 |
+
return substr( $matches[0], 1, -1 );
|
444 |
+
|
445 |
+
if ( isset( $this->posted_data[$matches[2]] ) ) {
|
446 |
+
$submitted = $this->posted_data[$matches[2]];
|
447 |
+
|
448 |
+
if ( is_array( $submitted ) )
|
449 |
+
$replaced = join( ', ', $submitted );
|
450 |
+
else
|
451 |
+
$replaced = $submitted;
|
452 |
+
|
453 |
+
if ( $html ) {
|
454 |
+
$replaced = strip_tags( $replaced );
|
455 |
+
$replaced = wptexturize( $replaced );
|
456 |
+
}
|
457 |
+
|
458 |
+
$replaced = apply_filters( 'wpcf7_mail_tag_replaced', $replaced, $submitted );
|
459 |
+
|
460 |
+
return stripslashes( $replaced );
|
461 |
+
}
|
462 |
+
|
463 |
+
if ( $special = apply_filters( 'wpcf7_special_mail_tags', '', $matches[2] ) )
|
464 |
+
return $special;
|
465 |
+
|
466 |
+
return $matches[0];
|
467 |
+
}
|
468 |
+
|
469 |
+
/* Message */
|
470 |
+
|
471 |
+
function message( $status ) {
|
472 |
+
$messages = $this->messages;
|
473 |
+
$message = isset( $messages[$status] ) ? $messages[$status] : '';
|
474 |
+
|
475 |
+
return apply_filters( 'wpcf7_display_message', $message, $status );
|
476 |
+
}
|
477 |
+
|
478 |
+
/* Additional settings */
|
479 |
+
|
480 |
+
function additional_setting( $name, $max = 1 ) {
|
481 |
+
$tmp_settings = (array) explode( "\n", $this->additional_settings );
|
482 |
+
|
483 |
+
$count = 0;
|
484 |
+
$values = array();
|
485 |
+
|
486 |
+
foreach ( $tmp_settings as $setting ) {
|
487 |
+
if ( preg_match('/^([a-zA-Z0-9_]+)\s*:(.*)$/', $setting, $matches ) ) {
|
488 |
+
if ( $matches[1] != $name )
|
489 |
+
continue;
|
490 |
+
|
491 |
+
if ( ! $max || $count < (int) $max ) {
|
492 |
+
$values[] = trim( $matches[2] );
|
493 |
+
$count += 1;
|
494 |
+
}
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
return $values;
|
499 |
+
}
|
500 |
+
|
501 |
+
function in_demo_mode() {
|
502 |
+
$settings = $this->additional_setting( 'demo_mode', false );
|
503 |
+
|
504 |
+
foreach ( $settings as $setting ) {
|
505 |
+
if ( in_array( $setting, array( 'on', 'true', '1' ) ) )
|
506 |
+
return true;
|
507 |
+
}
|
508 |
+
|
509 |
+
return false;
|
510 |
+
}
|
511 |
+
|
512 |
+
/* Upgrade */
|
513 |
+
|
514 |
+
function upgrade() {
|
515 |
+
if ( ! isset( $this->mail['recipient'] ) )
|
516 |
+
$this->mail['recipient'] = get_option( 'admin_email' );
|
517 |
+
|
518 |
+
|
519 |
+
if ( ! is_array( $this->messages ) )
|
520 |
+
$this->messages = array();
|
521 |
+
|
522 |
+
|
523 |
+
foreach ( wpcf7_messages() as $key => $arr ) {
|
524 |
+
if ( ! isset( $this->messages[$key] ) )
|
525 |
+
$this->messages[$key] = $arr['default'];
|
526 |
+
}
|
527 |
+
}
|
528 |
+
|
529 |
+
/* Save */
|
530 |
+
|
531 |
+
function save() {
|
532 |
+
$postarr = array(
|
533 |
+
'ID' => (int) $this->id,
|
534 |
+
'post_type' => 'wpcf7_contact_form',
|
535 |
+
'post_status' => 'publish',
|
536 |
+
'post_title' => $this->title );
|
537 |
+
|
538 |
+
$post_id = wp_insert_post( $postarr );
|
539 |
+
|
540 |
+
if ( $post_id ) {
|
541 |
+
$metas = array( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' );
|
542 |
+
|
543 |
+
foreach ( $metas as $meta )
|
544 |
+
update_post_meta( $post_id, $meta, wpcf7_normalize_newline_deep( $this->{$meta} ) );
|
545 |
+
|
546 |
+
if ( $this->initial ) {
|
547 |
+
$this->initial = false;
|
548 |
+
$this->id = $post_id;
|
549 |
+
do_action_ref_array( 'wpcf7_after_create', array( &$this ) );
|
550 |
+
} else {
|
551 |
+
do_action_ref_array( 'wpcf7_after_update', array( &$this ) );
|
552 |
+
}
|
553 |
+
|
554 |
+
do_action_ref_array( 'wpcf7_after_save', array( &$this ) );
|
555 |
+
}
|
556 |
+
|
557 |
+
return $post_id;
|
558 |
+
}
|
559 |
+
|
560 |
+
function copy() {
|
561 |
+
$new = new WPCF7_ContactForm();
|
562 |
+
$new->initial = true;
|
563 |
+
$new->title = $this->title . '_copy';
|
564 |
+
|
565 |
+
$new->form = $this->form;
|
566 |
+
$new->mail = $this->mail;
|
567 |
+
$new->mail_2 = $this->mail_2;
|
568 |
+
$new->messages = $this->messages;
|
569 |
+
$new->additional_settings = $this->additional_settings;
|
570 |
+
|
571 |
+
$new = apply_filters_ref_array( 'wpcf7_copy', array( &$new, &$this ) );
|
572 |
+
|
573 |
+
return $new;
|
574 |
+
}
|
575 |
+
|
576 |
+
function delete() {
|
577 |
+
if ( $this->initial )
|
578 |
+
return;
|
579 |
+
|
580 |
+
wp_delete_post( $this->id, true );
|
581 |
+
|
582 |
+
$this->initial = true;
|
583 |
+
$this->id = null;
|
584 |
+
}
|
585 |
+
}
|
586 |
+
|
587 |
+
function wpcf7_contact_form( $id ) {
|
588 |
+
$post = get_post( $id );
|
589 |
+
|
590 |
+
if ( empty( $post ) || 'wpcf7_contact_form' != get_post_type( $post ) )
|
591 |
+
return false;
|
592 |
+
|
593 |
+
$contact_form = new WPCF7_ContactForm();
|
594 |
+
$contact_form->id = $post->ID;
|
595 |
+
$contact_form->title = $post->post_title;
|
596 |
+
|
597 |
+
$contact_form->form = get_post_meta( $post->ID, 'form', true );
|
598 |
+
$contact_form->mail = get_post_meta( $post->ID, 'mail', true );
|
599 |
+
$contact_form->mail_2 = get_post_meta( $post->ID, 'mail_2', true );
|
600 |
+
$contact_form->messages = get_post_meta( $post->ID, 'messages', true );
|
601 |
+
$contact_form->additional_settings = get_post_meta( $post->ID, 'additional_settings', true );
|
602 |
+
|
603 |
+
$contact_form->upgrade();
|
604 |
+
|
605 |
+
$contact_form = apply_filters_ref_array( 'wpcf7_contact_form', array( &$contact_form ) );
|
606 |
+
|
607 |
+
return $contact_form;
|
608 |
+
}
|
609 |
+
|
610 |
+
function wpcf7_get_contact_form_by_old_id( $old_id ) {
|
611 |
+
global $wpdb;
|
612 |
+
|
613 |
+
$q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_old_cf7_unit_id'"
|
614 |
+
. $wpdb->prepare( " AND meta_value = %d", $old_id );
|
615 |
+
|
616 |
+
if ( $new_id = $wpdb->get_var( $q ) )
|
617 |
+
return wpcf7_contact_form( $new_id );
|
618 |
+
}
|
619 |
+
|
620 |
+
function wpcf7_get_contact_form_by_title( $title ) {
|
621 |
+
$page = get_page_by_title( $title, OBJECT, 'wpcf7_contact_form' );
|
622 |
+
|
623 |
+
if ( $page )
|
624 |
+
return wpcf7_contact_form( $page->ID );
|
625 |
+
|
626 |
+
return null;
|
627 |
+
}
|
628 |
+
|
629 |
+
function wpcf7_contact_form_default_pack( $locale = null ) {
|
630 |
+
// For backward compatibility
|
631 |
+
|
632 |
+
return wpcf7_get_contact_form_default_pack( array( 'locale' => $locale ) );
|
633 |
+
}
|
634 |
+
|
635 |
+
function wpcf7_get_contact_form_default_pack( $args = '' ) {
|
636 |
+
global $l10n;
|
637 |
+
|
638 |
+
$defaults = array( 'locale' => null, 'title' => '' );
|
639 |
+
$args = wp_parse_args( $args, $defaults );
|
640 |
+
|
641 |
+
$locale = $args['locale'];
|
642 |
+
$title = $args['title'];
|
643 |
+
|
644 |
+
if ( $locale && $locale != get_locale() ) {
|
645 |
+
$mo_orig = $l10n['wpcf7'];
|
646 |
+
unset( $l10n['wpcf7'] );
|
647 |
+
|
648 |
+
if ( 'en_US' != $locale ) {
|
649 |
+
$mofile = wpcf7_plugin_path( 'languages/wpcf7-' . $locale . '.mo' );
|
650 |
+
if ( ! load_textdomain( 'wpcf7', $mofile ) ) {
|
651 |
+
$l10n['wpcf7'] = $mo_orig;
|
652 |
+
unset( $mo_orig );
|
653 |
+
}
|
654 |
+
}
|
655 |
+
}
|
656 |
+
|
657 |
+
$contact_form = new WPCF7_ContactForm();
|
658 |
+
$contact_form->initial = true;
|
659 |
+
|
660 |
+
$contact_form->title = ( $title ? $title : __( 'Untitled', 'wpcf7' ) );
|
661 |
+
|
662 |
+
$contact_form->form = wpcf7_get_default_template( 'form' );
|
663 |
+
$contact_form->mail = wpcf7_get_default_template( 'mail' );
|
664 |
+
$contact_form->mail_2 = wpcf7_get_default_template( 'mail_2' );
|
665 |
+
$contact_form->messages = wpcf7_get_default_template( 'messages' );
|
666 |
+
$contact_form->additional_settings = wpcf7_get_default_template( 'additional_settings' );
|
667 |
+
|
668 |
+
if ( isset( $mo_orig ) )
|
669 |
+
$l10n['wpcf7'] = $mo_orig;
|
670 |
+
|
671 |
+
$contact_form = apply_filters_ref_array( 'wpcf7_contact_form_default_pack',
|
672 |
+
array( &$contact_form, $args ) );
|
673 |
+
|
674 |
+
return $contact_form;
|
675 |
+
}
|
676 |
+
|
677 |
+
function wpcf7_get_current_contact_form() {
|
678 |
+
global $wpcf7_contact_form;
|
679 |
+
|
680 |
+
if ( ! is_a( $wpcf7_contact_form, 'WPCF7_ContactForm' ) )
|
681 |
+
return null;
|
682 |
+
|
683 |
+
return $wpcf7_contact_form;
|
684 |
+
}
|
685 |
+
|
686 |
+
function wpcf7_is_posted() {
|
687 |
+
if ( ! $contact_form = wpcf7_get_current_contact_form() )
|
688 |
+
return false;
|
689 |
+
|
690 |
+
return $contact_form->is_posted();
|
691 |
+
}
|
692 |
+
|
693 |
+
function wpcf7_get_validation_error( $name ) {
|
694 |
+
if ( ! $contact_form = wpcf7_get_current_contact_form() )
|
695 |
+
return '';
|
696 |
+
|
697 |
+
return $contact_form->validation_error( $name );
|
698 |
+
}
|
699 |
+
|
700 |
+
function wpcf7_get_message( $status ) {
|
701 |
+
if ( ! $contact_form = wpcf7_get_current_contact_form() )
|
702 |
+
return '';
|
703 |
+
|
704 |
+
return $contact_form->message( $status );
|
705 |
+
}
|
706 |
+
|
707 |
+
function wpcf7_scan_shortcode( $cond = null ) {
|
708 |
+
if ( ! $contact_form = wpcf7_get_current_contact_form() )
|
709 |
+
return null;
|
710 |
+
|
711 |
+
return $contact_form->form_scan_shortcode( $cond );
|
712 |
+
}
|
713 |
+
|
714 |
+
function wpcf7_form_controls_class( $type, $default = '' ) {
|
715 |
+
$type = trim( $type );
|
716 |
+
$default = explode( ' ', $default );
|
717 |
+
|
718 |
+
$classes = array_merge( array( 'wpcf7-form-control' ), $default );
|
719 |
+
|
720 |
+
$typebase = rtrim( $type, '*' );
|
721 |
+
$required = ( '*' == substr( $type, -1 ) );
|
722 |
+
|
723 |
+
$classes[] = 'wpcf7-' . $typebase;
|
724 |
+
|
725 |
+
if ( $required )
|
726 |
+
$classes[] = 'wpcf7-validates-as-required';
|
727 |
+
|
728 |
+
$classes = array_unique( $classes );
|
729 |
+
|
730 |
+
return implode( ' ', $classes );
|
731 |
+
}
|
732 |
+
|
733 |
?>
|
includes/controller.php
CHANGED
@@ -50,7 +50,7 @@ function wpcf7_ajax_json_echo() {
|
|
50 |
'into' => '#' . $unit_tag,
|
51 |
'captcha' => null );
|
52 |
|
53 |
-
$result =
|
54 |
|
55 |
if ( ! empty( $result['message'] ) )
|
56 |
$items['message'] = $result['message'];
|
@@ -113,7 +113,7 @@ function wpcf7_submit_nonajax() {
|
|
113 |
$id = (int) $_POST['_wpcf7'];
|
114 |
|
115 |
if ( $wpcf7_contact_form = wpcf7_contact_form( $id ) ) {
|
116 |
-
$result =
|
117 |
|
118 |
if ( ! $result['valid'] ) {
|
119 |
$_POST['_wpcf7_validation_errors'] = array(
|
@@ -131,61 +131,6 @@ function wpcf7_submit_nonajax() {
|
|
131 |
}
|
132 |
}
|
133 |
|
134 |
-
function wpcf7_submit( $ajax = false ) {
|
135 |
-
global $wpcf7_contact_form;
|
136 |
-
|
137 |
-
if ( ! is_a( $wpcf7_contact_form, 'WPCF7_ContactForm' ) )
|
138 |
-
return false;
|
139 |
-
|
140 |
-
$result = array(
|
141 |
-
'valid' => true,
|
142 |
-
'invalid_reasons' => array(),
|
143 |
-
'spam' => false,
|
144 |
-
'message' => '',
|
145 |
-
'mail_sent' => false,
|
146 |
-
'scripts_on_sent_ok' => null );
|
147 |
-
|
148 |
-
$validation = $wpcf7_contact_form->validate();
|
149 |
-
|
150 |
-
if ( ! $validation['valid'] ) { // Validation error occured
|
151 |
-
$result['valid'] = false;
|
152 |
-
$result['invalid_reasons'] = $validation['reason'];
|
153 |
-
$result['message'] = wpcf7_get_message( 'validation_error' );
|
154 |
-
|
155 |
-
} elseif ( ! apply_filters( 'wpcf7_acceptance', true ) ) { // Not accepted terms
|
156 |
-
$result['message'] = wpcf7_get_message( 'accept_terms' );
|
157 |
-
|
158 |
-
} elseif ( apply_filters( 'wpcf7_spam', false ) ) { // Spam!
|
159 |
-
$result['message'] = wpcf7_get_message( 'spam' );
|
160 |
-
$result['spam'] = true;
|
161 |
-
|
162 |
-
} elseif ( $wpcf7_contact_form->mail() ) {
|
163 |
-
$result['mail_sent'] = true;
|
164 |
-
$result['message'] = wpcf7_get_message( 'mail_sent_ok' );
|
165 |
-
|
166 |
-
do_action_ref_array( 'wpcf7_mail_sent', array( &$wpcf7_contact_form ) );
|
167 |
-
|
168 |
-
if ( $ajax ) {
|
169 |
-
$on_sent_ok = $wpcf7_contact_form->additional_setting( 'on_sent_ok', false );
|
170 |
-
|
171 |
-
if ( ! empty( $on_sent_ok ) )
|
172 |
-
$result['scripts_on_sent_ok'] = array_map( 'wpcf7_strip_quote', $on_sent_ok );
|
173 |
-
} else {
|
174 |
-
$wpcf7_contact_form->clear_post();
|
175 |
-
}
|
176 |
-
|
177 |
-
} else {
|
178 |
-
$result['message'] = wpcf7_get_message( 'mail_sent_ng' );
|
179 |
-
}
|
180 |
-
|
181 |
-
// remove upload files
|
182 |
-
foreach ( (array) $wpcf7_contact_form->uploaded_files as $name => $path ) {
|
183 |
-
@unlink( $path );
|
184 |
-
}
|
185 |
-
|
186 |
-
return $result;
|
187 |
-
}
|
188 |
-
|
189 |
add_action( 'the_post', 'wpcf7_the_post' );
|
190 |
|
191 |
function wpcf7_the_post() {
|
@@ -235,8 +180,13 @@ function wpcf7_contact_form_tag_func( $atts, $content = null, $code = '' ) {
|
|
235 |
|
236 |
if ( 'contact-form-7' == $code ) {
|
237 |
$atts = shortcode_atts( array( 'id' => 0, 'title' => '' ), $atts );
|
|
|
238 |
$id = (int) $atts['id'];
|
239 |
-
$
|
|
|
|
|
|
|
|
|
240 |
} else {
|
241 |
if ( is_string( $atts ) )
|
242 |
$atts = explode( ' ', $atts, 2 );
|
@@ -273,21 +223,6 @@ function wpcf7_contact_form_tag_func( $atts, $content = null, $code = '' ) {
|
|
273 |
return $form;
|
274 |
}
|
275 |
|
276 |
-
add_action( 'wp_head', 'wpcf7_head' );
|
277 |
-
|
278 |
-
function wpcf7_head() {
|
279 |
-
// Cached?
|
280 |
-
if ( wpcf7_script_is() && defined( 'WP_CACHE' ) && WP_CACHE ) :
|
281 |
-
?>
|
282 |
-
<script type="text/javascript">
|
283 |
-
//<![CDATA[
|
284 |
-
var _wpcf7 = { cached: 1 };
|
285 |
-
//]]>
|
286 |
-
</script>
|
287 |
-
<?php
|
288 |
-
endif;
|
289 |
-
}
|
290 |
-
|
291 |
if ( WPCF7_LOAD_JS )
|
292 |
add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' );
|
293 |
|
@@ -305,6 +240,15 @@ function wpcf7_enqueue_scripts() {
|
|
305 |
wp_enqueue_script( 'contact-form-7', wpcf7_plugin_url( 'scripts.js' ),
|
306 |
array( 'jquery', 'jquery-form' ), WPCF7_VERSION, $in_footer );
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
do_action( 'wpcf7_enqueue_scripts' );
|
309 |
}
|
310 |
|
50 |
'into' => '#' . $unit_tag,
|
51 |
'captcha' => null );
|
52 |
|
53 |
+
$result = $wpcf7_contact_form->submit( true );
|
54 |
|
55 |
if ( ! empty( $result['message'] ) )
|
56 |
$items['message'] = $result['message'];
|
113 |
$id = (int) $_POST['_wpcf7'];
|
114 |
|
115 |
if ( $wpcf7_contact_form = wpcf7_contact_form( $id ) ) {
|
116 |
+
$result = $wpcf7_contact_form->submit();
|
117 |
|
118 |
if ( ! $result['valid'] ) {
|
119 |
$_POST['_wpcf7_validation_errors'] = array(
|
131 |
}
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
add_action( 'the_post', 'wpcf7_the_post' );
|
135 |
|
136 |
function wpcf7_the_post() {
|
180 |
|
181 |
if ( 'contact-form-7' == $code ) {
|
182 |
$atts = shortcode_atts( array( 'id' => 0, 'title' => '' ), $atts );
|
183 |
+
|
184 |
$id = (int) $atts['id'];
|
185 |
+
$title = trim( $atts['title'] );
|
186 |
+
|
187 |
+
if ( ! $wpcf7_contact_form = wpcf7_contact_form( $id ) )
|
188 |
+
$wpcf7_contact_form = wpcf7_get_contact_form_by_title( $title );
|
189 |
+
|
190 |
} else {
|
191 |
if ( is_string( $atts ) )
|
192 |
$atts = explode( ' ', $atts, 2 );
|
223 |
return $form;
|
224 |
}
|
225 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
if ( WPCF7_LOAD_JS )
|
227 |
add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' );
|
228 |
|
240 |
wp_enqueue_script( 'contact-form-7', wpcf7_plugin_url( 'scripts.js' ),
|
241 |
array( 'jquery', 'jquery-form' ), WPCF7_VERSION, $in_footer );
|
242 |
|
243 |
+
$_wpcf7 = array(
|
244 |
+
'loaderUrl' => wpcf7_ajax_loader(),
|
245 |
+
'sending' => __( 'Sending ...', 'wpcf7' ) );
|
246 |
+
|
247 |
+
if ( defined( 'WP_CACHE' ) && WP_CACHE )
|
248 |
+
$_wpcf7['cached'] = 1;
|
249 |
+
|
250 |
+
wp_localize_script( 'contact-form-7', '_wpcf7', $_wpcf7 );
|
251 |
+
|
252 |
do_action( 'wpcf7_enqueue_scripts' );
|
253 |
}
|
254 |
|
includes/functions.php
CHANGED
@@ -1,253 +1,260 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function wpcf7_plugin_path( $path = '' ) {
|
4 |
-
return path_join( WPCF7_PLUGIN_DIR, trim( $path, '/' ) );
|
5 |
-
}
|
6 |
-
|
7 |
-
function wpcf7_plugin_url( $path = '' ) {
|
8 |
-
return plugins_url( $path, WPCF7_PLUGIN_BASENAME );
|
9 |
-
}
|
10 |
-
|
11 |
-
function wpcf7_admin_url( $args = array() ) {
|
12 |
-
$defaults = array( 'page' => 'wpcf7' );
|
13 |
-
$args = wp_parse_args( $args, $defaults );
|
14 |
-
|
15 |
-
$url = menu_page_url( $args['page'], false );
|
16 |
-
unset( $args['page'] );
|
17 |
-
|
18 |
-
$url = add_query_arg( $args, $url );
|
19 |
-
|
20 |
-
return esc_url_raw( $url );
|
21 |
-
}
|
22 |
-
|
23 |
-
function wpcf7_messages() {
|
24 |
-
$messages = array(
|
25 |
-
'mail_sent_ok' => array(
|
26 |
-
'description' => __( "Sender's message was sent successfully", 'wpcf7' ),
|
27 |
-
'default' => __( 'Your message was sent successfully. Thanks.', 'wpcf7' )
|
28 |
-
),
|
29 |
-
|
30 |
-
'mail_sent_ng' => array(
|
31 |
-
'description' => __( "Sender's message was failed to send", 'wpcf7' ),
|
32 |
-
'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'wpcf7' )
|
33 |
-
),
|
34 |
-
|
35 |
-
'validation_error' => array(
|
36 |
-
'description' => __( "Validation errors occurred", 'wpcf7' ),
|
37 |
-
'default' => __( 'Validation errors occurred. Please confirm the fields and submit it again.', 'wpcf7' )
|
38 |
-
),
|
39 |
-
|
40 |
-
'accept_terms' => array(
|
41 |
-
'description' => __( "There are terms that the sender must accept", 'wpcf7' ),
|
42 |
-
'default' => __( 'Please accept the terms to proceed.', 'wpcf7' )
|
43 |
-
),
|
44 |
-
|
45 |
-
'invalid_email' => array(
|
46 |
-
'description' => __( "Email address that the sender entered is invalid", 'wpcf7' ),
|
47 |
-
'default' => __( 'Email address seems invalid.', 'wpcf7' )
|
48 |
-
),
|
49 |
-
|
50 |
-
'invalid_required' => array(
|
51 |
-
'description' => __( "There is a field that the sender must fill in", 'wpcf7' ),
|
52 |
-
'default' => __( 'Please fill the required field.', 'wpcf7' )
|
53 |
-
)
|
54 |
-
);
|
55 |
-
|
56 |
-
return apply_filters( 'wpcf7_messages', $messages );
|
57 |
-
}
|
58 |
-
|
59 |
-
function wpcf7_get_default_template( $prop = 'form' ) {
|
60 |
-
if ( 'form' == $prop )
|
61 |
-
$template = wpcf7_default_form_template();
|
62 |
-
elseif ( 'mail' == $prop )
|
63 |
-
$template = wpcf7_default_mail_template();
|
64 |
-
elseif ( 'mail_2' == $prop )
|
65 |
-
$template = wpcf7_default_mail_2_template();
|
66 |
-
elseif ( 'messages' == $prop )
|
67 |
-
$template = wpcf7_default_messages_template();
|
68 |
-
else
|
69 |
-
$template = null;
|
70 |
-
|
71 |
-
return apply_filters( 'wpcf7_default_template', $template, $prop );
|
72 |
-
}
|
73 |
-
|
74 |
-
function wpcf7_default_form_template() {
|
75 |
-
$template =
|
76 |
-
'<p>' . __( 'Your Name', 'wpcf7' ) . ' ' . __( '(required)', 'wpcf7' ) . '<br />' . "\n"
|
77 |
-
. ' [text* your-name] </p>' . "\n\n"
|
78 |
-
. '<p>' . __( 'Your Email', 'wpcf7' ) . ' ' . __( '(required)', 'wpcf7' ) . '<br />' . "\n"
|
79 |
-
. ' [email* your-email] </p>' . "\n\n"
|
80 |
-
. '<p>' . __( 'Subject', 'wpcf7' ) . '<br />' . "\n"
|
81 |
-
. ' [text your-subject] </p>' . "\n\n"
|
82 |
-
. '<p>' . __( 'Your Message', 'wpcf7' ) . '<br />' . "\n"
|
83 |
-
. ' [textarea your-message] </p>' . "\n\n"
|
84 |
-
. '<p>[submit "' . __( 'Send', 'wpcf7' ) . '"]</p>';
|
85 |
-
|
86 |
-
return $template;
|
87 |
-
}
|
88 |
-
|
89 |
-
function wpcf7_default_mail_template() {
|
90 |
-
$subject = '[your-subject]';
|
91 |
-
$sender = '[your-name] <[your-email]>';
|
92 |
-
$body = sprintf( __( 'From: %s', 'wpcf7' ), '[your-name] <[your-email]>' ) . "\n"
|
93 |
-
. sprintf( __( 'Subject: %s', 'wpcf7' ), '[your-subject]' ) . "\n\n"
|
94 |
-
. __( 'Message Body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
|
95 |
-
. sprintf( __( 'This mail is sent via contact form on %1$s %2$s', 'wpcf7' ),
|
96 |
-
get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
|
97 |
-
$recipient = get_option( 'admin_email' );
|
98 |
-
$additional_headers = '';
|
99 |
-
$attachments = '';
|
100 |
-
$use_html = 0;
|
101 |
-
return compact( 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html' );
|
102 |
-
}
|
103 |
-
|
104 |
-
function wpcf7_default_mail_2_template() {
|
105 |
-
$active = false;
|
106 |
-
$subject = '[your-subject]';
|
107 |
-
$sender = '[your-name] <[your-email]>';
|
108 |
-
$body = __( 'Message body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
|
109 |
-
. sprintf( __( 'This mail is sent via contact form on %1$s %2$s', 'wpcf7' ),
|
110 |
-
get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
|
111 |
-
$recipient = '[your-email]';
|
112 |
-
$additional_headers = '';
|
113 |
-
$attachments = '';
|
114 |
-
$use_html = 0;
|
115 |
-
return compact( 'active', 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html' );
|
116 |
-
}
|
117 |
-
|
118 |
-
function wpcf7_default_messages_template() {
|
119 |
-
$messages = array();
|
120 |
-
|
121 |
-
foreach ( wpcf7_messages() as $key => $arr ) {
|
122 |
-
$messages[$key] = $arr['default'];
|
123 |
-
}
|
124 |
-
|
125 |
-
return $messages;
|
126 |
-
}
|
127 |
-
|
128 |
-
function wpcf7_upload_dir( $type = false ) {
|
129 |
-
global $switched;
|
130 |
-
|
131 |
-
$siteurl = get_option( 'siteurl' );
|
132 |
-
$upload_path = trim( get_option( 'upload_path' ) );
|
133 |
-
|
134 |
-
$main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site();
|
135 |
-
|
136 |
-
if ( empty( $upload_path ) ) {
|
137 |
-
$dir = WP_CONTENT_DIR . '/uploads';
|
138 |
-
} else {
|
139 |
-
$dir = $upload_path;
|
140 |
-
|
141 |
-
if ( 'wp-content/uploads' == $upload_path ) {
|
142 |
-
$dir = WP_CONTENT_DIR . '/uploads';
|
143 |
-
} elseif ( 0 !== strpos( $dir, ABSPATH ) ) {
|
144 |
-
// $dir is absolute, $upload_path is (maybe) relative to ABSPATH
|
145 |
-
$dir = path_join( ABSPATH, $dir );
|
146 |
-
}
|
147 |
-
}
|
148 |
-
|
149 |
-
if ( ! $url = get_option( 'upload_url_path' ) ) {
|
150 |
-
if ( empty( $upload_path )
|
151 |
-
|| ( 'wp-content/uploads' == $upload_path )
|
152 |
-
|| ( $upload_path == $dir ) )
|
153 |
-
$url = WP_CONTENT_URL . '/uploads';
|
154 |
-
else
|
155 |
-
$url = trailingslashit( $siteurl ) . $upload_path;
|
156 |
-
}
|
157 |
-
|
158 |
-
if ( defined( 'UPLOADS' ) && ! $main_override
|
159 |
-
&& ( ! isset( $switched ) || $switched === false ) ) {
|
160 |
-
$dir = ABSPATH . UPLOADS;
|
161 |
-
$url = trailingslashit( $siteurl ) . UPLOADS;
|
162 |
-
}
|
163 |
-
|
164 |
-
if ( is_multisite() && ! $main_override
|
165 |
-
&& ( ! isset( $switched ) || $switched === false ) ) {
|
166 |
-
|
167 |
-
if ( defined( 'BLOGUPLOADDIR' ) )
|
168 |
-
$dir = untrailingslashit( BLOGUPLOADDIR );
|
169 |
-
|
170 |
-
$url = str_replace( UPLOADS, 'files', $url );
|
171 |
-
}
|
172 |
-
|
173 |
-
$uploads = apply_filters( 'wpcf7_upload_dir', array( 'dir' => $dir, 'url' => $url ) );
|
174 |
-
|
175 |
-
if ( 'dir' == $type )
|
176 |
-
return $uploads['dir'];
|
177 |
-
if ( 'url' == $type )
|
178 |
-
return $uploads['url'];
|
179 |
-
|
180 |
-
return $uploads;
|
181 |
-
}
|
182 |
-
|
183 |
-
function wpcf7_l10n() {
|
184 |
-
$l10n = array(
|
185 |
-
'af' => __( 'Afrikaans', 'wpcf7' ),
|
186 |
-
'sq' => __( 'Albanian', 'wpcf7' ),
|
187 |
-
'ar' => __( 'Arabic', 'wpcf7' ),
|
188 |
-
'hy_AM' => __( 'Armenian', 'wpcf7' ),
|
189 |
-
'
|
190 |
-
'
|
191 |
-
'
|
192 |
-
'
|
193 |
-
'
|
194 |
-
'
|
195 |
-
'
|
196 |
-
'
|
197 |
-
'
|
198 |
-
'
|
199 |
-
'
|
200 |
-
'
|
201 |
-
'
|
202 |
-
'
|
203 |
-
'
|
204 |
-
'
|
205 |
-
'
|
206 |
-
'
|
207 |
-
'
|
208 |
-
'
|
209 |
-
'
|
210 |
-
'
|
211 |
-
'
|
212 |
-
'
|
213 |
-
'
|
214 |
-
'
|
215 |
-
'
|
216 |
-
'
|
217 |
-
'
|
218 |
-
'
|
219 |
-
'
|
220 |
-
'
|
221 |
-
'
|
222 |
-
'
|
223 |
-
'
|
224 |
-
'
|
225 |
-
'
|
226 |
-
'
|
227 |
-
'
|
228 |
-
'
|
229 |
-
'
|
230 |
-
'
|
231 |
-
'
|
232 |
-
'
|
233 |
-
'
|
234 |
-
'
|
235 |
-
'
|
236 |
-
'
|
237 |
-
'
|
238 |
-
'
|
239 |
-
'
|
240 |
-
'
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function wpcf7_plugin_path( $path = '' ) {
|
4 |
+
return path_join( WPCF7_PLUGIN_DIR, trim( $path, '/' ) );
|
5 |
+
}
|
6 |
+
|
7 |
+
function wpcf7_plugin_url( $path = '' ) {
|
8 |
+
return plugins_url( $path, WPCF7_PLUGIN_BASENAME );
|
9 |
+
}
|
10 |
+
|
11 |
+
function wpcf7_admin_url( $args = array() ) {
|
12 |
+
$defaults = array( 'page' => 'wpcf7' );
|
13 |
+
$args = wp_parse_args( $args, $defaults );
|
14 |
+
|
15 |
+
$url = menu_page_url( $args['page'], false );
|
16 |
+
unset( $args['page'] );
|
17 |
+
|
18 |
+
$url = add_query_arg( $args, $url );
|
19 |
+
|
20 |
+
return esc_url_raw( $url );
|
21 |
+
}
|
22 |
+
|
23 |
+
function wpcf7_messages() {
|
24 |
+
$messages = array(
|
25 |
+
'mail_sent_ok' => array(
|
26 |
+
'description' => __( "Sender's message was sent successfully", 'wpcf7' ),
|
27 |
+
'default' => __( 'Your message was sent successfully. Thanks.', 'wpcf7' )
|
28 |
+
),
|
29 |
+
|
30 |
+
'mail_sent_ng' => array(
|
31 |
+
'description' => __( "Sender's message was failed to send", 'wpcf7' ),
|
32 |
+
'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'wpcf7' )
|
33 |
+
),
|
34 |
+
|
35 |
+
'validation_error' => array(
|
36 |
+
'description' => __( "Validation errors occurred", 'wpcf7' ),
|
37 |
+
'default' => __( 'Validation errors occurred. Please confirm the fields and submit it again.', 'wpcf7' )
|
38 |
+
),
|
39 |
+
|
40 |
+
'accept_terms' => array(
|
41 |
+
'description' => __( "There are terms that the sender must accept", 'wpcf7' ),
|
42 |
+
'default' => __( 'Please accept the terms to proceed.', 'wpcf7' )
|
43 |
+
),
|
44 |
+
|
45 |
+
'invalid_email' => array(
|
46 |
+
'description' => __( "Email address that the sender entered is invalid", 'wpcf7' ),
|
47 |
+
'default' => __( 'Email address seems invalid.', 'wpcf7' )
|
48 |
+
),
|
49 |
+
|
50 |
+
'invalid_required' => array(
|
51 |
+
'description' => __( "There is a field that the sender must fill in", 'wpcf7' ),
|
52 |
+
'default' => __( 'Please fill the required field.', 'wpcf7' )
|
53 |
+
)
|
54 |
+
);
|
55 |
+
|
56 |
+
return apply_filters( 'wpcf7_messages', $messages );
|
57 |
+
}
|
58 |
+
|
59 |
+
function wpcf7_get_default_template( $prop = 'form' ) {
|
60 |
+
if ( 'form' == $prop )
|
61 |
+
$template = wpcf7_default_form_template();
|
62 |
+
elseif ( 'mail' == $prop )
|
63 |
+
$template = wpcf7_default_mail_template();
|
64 |
+
elseif ( 'mail_2' == $prop )
|
65 |
+
$template = wpcf7_default_mail_2_template();
|
66 |
+
elseif ( 'messages' == $prop )
|
67 |
+
$template = wpcf7_default_messages_template();
|
68 |
+
else
|
69 |
+
$template = null;
|
70 |
+
|
71 |
+
return apply_filters( 'wpcf7_default_template', $template, $prop );
|
72 |
+
}
|
73 |
+
|
74 |
+
function wpcf7_default_form_template() {
|
75 |
+
$template =
|
76 |
+
'<p>' . __( 'Your Name', 'wpcf7' ) . ' ' . __( '(required)', 'wpcf7' ) . '<br />' . "\n"
|
77 |
+
. ' [text* your-name] </p>' . "\n\n"
|
78 |
+
. '<p>' . __( 'Your Email', 'wpcf7' ) . ' ' . __( '(required)', 'wpcf7' ) . '<br />' . "\n"
|
79 |
+
. ' [email* your-email] </p>' . "\n\n"
|
80 |
+
. '<p>' . __( 'Subject', 'wpcf7' ) . '<br />' . "\n"
|
81 |
+
. ' [text your-subject] </p>' . "\n\n"
|
82 |
+
. '<p>' . __( 'Your Message', 'wpcf7' ) . '<br />' . "\n"
|
83 |
+
. ' [textarea your-message] </p>' . "\n\n"
|
84 |
+
. '<p>[submit "' . __( 'Send', 'wpcf7' ) . '"]</p>';
|
85 |
+
|
86 |
+
return $template;
|
87 |
+
}
|
88 |
+
|
89 |
+
function wpcf7_default_mail_template() {
|
90 |
+
$subject = '[your-subject]';
|
91 |
+
$sender = '[your-name] <[your-email]>';
|
92 |
+
$body = sprintf( __( 'From: %s', 'wpcf7' ), '[your-name] <[your-email]>' ) . "\n"
|
93 |
+
. sprintf( __( 'Subject: %s', 'wpcf7' ), '[your-subject]' ) . "\n\n"
|
94 |
+
. __( 'Message Body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
|
95 |
+
. sprintf( __( 'This mail is sent via contact form on %1$s %2$s', 'wpcf7' ),
|
96 |
+
get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
|
97 |
+
$recipient = get_option( 'admin_email' );
|
98 |
+
$additional_headers = '';
|
99 |
+
$attachments = '';
|
100 |
+
$use_html = 0;
|
101 |
+
return compact( 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html' );
|
102 |
+
}
|
103 |
+
|
104 |
+
function wpcf7_default_mail_2_template() {
|
105 |
+
$active = false;
|
106 |
+
$subject = '[your-subject]';
|
107 |
+
$sender = '[your-name] <[your-email]>';
|
108 |
+
$body = __( 'Message body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
|
109 |
+
. sprintf( __( 'This mail is sent via contact form on %1$s %2$s', 'wpcf7' ),
|
110 |
+
get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
|
111 |
+
$recipient = '[your-email]';
|
112 |
+
$additional_headers = '';
|
113 |
+
$attachments = '';
|
114 |
+
$use_html = 0;
|
115 |
+
return compact( 'active', 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html' );
|
116 |
+
}
|
117 |
+
|
118 |
+
function wpcf7_default_messages_template() {
|
119 |
+
$messages = array();
|
120 |
+
|
121 |
+
foreach ( wpcf7_messages() as $key => $arr ) {
|
122 |
+
$messages[$key] = $arr['default'];
|
123 |
+
}
|
124 |
+
|
125 |
+
return $messages;
|
126 |
+
}
|
127 |
+
|
128 |
+
function wpcf7_upload_dir( $type = false ) {
|
129 |
+
global $switched;
|
130 |
+
|
131 |
+
$siteurl = get_option( 'siteurl' );
|
132 |
+
$upload_path = trim( get_option( 'upload_path' ) );
|
133 |
+
|
134 |
+
$main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site();
|
135 |
+
|
136 |
+
if ( empty( $upload_path ) ) {
|
137 |
+
$dir = WP_CONTENT_DIR . '/uploads';
|
138 |
+
} else {
|
139 |
+
$dir = $upload_path;
|
140 |
+
|
141 |
+
if ( 'wp-content/uploads' == $upload_path ) {
|
142 |
+
$dir = WP_CONTENT_DIR . '/uploads';
|
143 |
+
} elseif ( 0 !== strpos( $dir, ABSPATH ) ) {
|
144 |
+
// $dir is absolute, $upload_path is (maybe) relative to ABSPATH
|
145 |
+
$dir = path_join( ABSPATH, $dir );
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
if ( ! $url = get_option( 'upload_url_path' ) ) {
|
150 |
+
if ( empty( $upload_path )
|
151 |
+
|| ( 'wp-content/uploads' == $upload_path )
|
152 |
+
|| ( $upload_path == $dir ) )
|
153 |
+
$url = WP_CONTENT_URL . '/uploads';
|
154 |
+
else
|
155 |
+
$url = trailingslashit( $siteurl ) . $upload_path;
|
156 |
+
}
|
157 |
+
|
158 |
+
if ( defined( 'UPLOADS' ) && ! $main_override
|
159 |
+
&& ( ! isset( $switched ) || $switched === false ) ) {
|
160 |
+
$dir = ABSPATH . UPLOADS;
|
161 |
+
$url = trailingslashit( $siteurl ) . UPLOADS;
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( is_multisite() && ! $main_override
|
165 |
+
&& ( ! isset( $switched ) || $switched === false ) ) {
|
166 |
+
|
167 |
+
if ( defined( 'BLOGUPLOADDIR' ) )
|
168 |
+
$dir = untrailingslashit( BLOGUPLOADDIR );
|
169 |
+
|
170 |
+
$url = str_replace( UPLOADS, 'files', $url );
|
171 |
+
}
|
172 |
+
|
173 |
+
$uploads = apply_filters( 'wpcf7_upload_dir', array( 'dir' => $dir, 'url' => $url ) );
|
174 |
+
|
175 |
+
if ( 'dir' == $type )
|
176 |
+
return $uploads['dir'];
|
177 |
+
if ( 'url' == $type )
|
178 |
+
return $uploads['url'];
|
179 |
+
|
180 |
+
return $uploads;
|
181 |
+
}
|
182 |
+
|
183 |
+
function wpcf7_l10n() {
|
184 |
+
$l10n = array(
|
185 |
+
'af' => __( 'Afrikaans', 'wpcf7' ),
|
186 |
+
'sq' => __( 'Albanian', 'wpcf7' ),
|
187 |
+
'ar' => __( 'Arabic', 'wpcf7' ),
|
188 |
+
'hy_AM' => __( 'Armenian', 'wpcf7' ),
|
189 |
+
'az_AZ' => __( 'Azeri', 'wpcf7' ),
|
190 |
+
'bn_BD' => __( 'Bangla', 'wpcf7' ),
|
191 |
+
'be_BY' => __( 'Belarusian', 'wpcf7' ),
|
192 |
+
'bs' => __( 'Bosnian', 'wpcf7' ),
|
193 |
+
'pt_BR' => __( 'Brazilian Portuguese', 'wpcf7' ),
|
194 |
+
'bg_BG' => __( 'Bulgarian', 'wpcf7' ),
|
195 |
+
'ca' => __( 'Catalan', 'wpcf7' ),
|
196 |
+
'zh_CN' => __( 'Chinese (Simplified)', 'wpcf7' ),
|
197 |
+
'zh_TW' => __( 'Chinese (Traditional)', 'wpcf7' ),
|
198 |
+
'hr' => __( 'Croatian', 'wpcf7' ),
|
199 |
+
'cs_CZ' => __( 'Czech', 'wpcf7' ),
|
200 |
+
'da_DK' => __( 'Danish', 'wpcf7' ),
|
201 |
+
'nl_NL' => __( 'Dutch', 'wpcf7' ),
|
202 |
+
'en_US' => __( 'English', 'wpcf7' ),
|
203 |
+
'eo_EO' => __( 'Esperanto', 'wpcf7' ),
|
204 |
+
'et' => __( 'Estonian', 'wpcf7' ),
|
205 |
+
'fi' => __( 'Finnish', 'wpcf7' ),
|
206 |
+
'fr_FR' => __( 'French', 'wpcf7' ),
|
207 |
+
'gl_ES' => __( 'Galician', 'wpcf7' ),
|
208 |
+
'ka_GE' => __( 'Georgian', 'wpcf7' ),
|
209 |
+
'de_DE' => __( 'German', 'wpcf7' ),
|
210 |
+
'el' => __( 'Greek', 'wpcf7' ),
|
211 |
+
'he_IL' => __( 'Hebrew', 'wpcf7' ),
|
212 |
+
'hi_IN' => __( 'Hindi', 'wpcf7' ),
|
213 |
+
'hu_HU' => __( 'Hungarian', 'wpcf7' ),
|
214 |
+
'id_ID' => __( 'Indonesian', 'wpcf7' ),
|
215 |
+
'it_IT' => __( 'Italian', 'wpcf7' ),
|
216 |
+
'ja' => __( 'Japanese', 'wpcf7' ),
|
217 |
+
'ko_KR' => __( 'Korean', 'wpcf7' ),
|
218 |
+
'lv' => __( 'Latvian', 'wpcf7' ),
|
219 |
+
'lt_LT' => __( 'Lithuanian', 'wpcf7' ),
|
220 |
+
'mk_MK' => __( 'Macedonian', 'wpcf7' ),
|
221 |
+
'ms_MY' => __( 'Malay', 'wpcf7' ),
|
222 |
+
'ml_IN' => __( 'Malayalam', 'wpcf7' ),
|
223 |
+
'mt_MT' => __( 'Maltese', 'wpcf7' ),
|
224 |
+
'nb_NO' => __( 'Norwegian', 'wpcf7' ),
|
225 |
+
'fa_IR' => __( 'Persian', 'wpcf7' ),
|
226 |
+
'pl_PL' => __( 'Polish', 'wpcf7' ),
|
227 |
+
'pt_PT' => __( 'Portuguese', 'wpcf7' ),
|
228 |
+
'ru_RU' => __( 'Russian', 'wpcf7' ),
|
229 |
+
'ro_RO' => __( 'Romanian', 'wpcf7' ),
|
230 |
+
'sr_RS' => __( 'Serbian', 'wpcf7' ),
|
231 |
+
'si_LK' => __( 'Sinhala', 'wpcf7' ),
|
232 |
+
'sk_SK' => __( 'Slovak', 'wpcf7' ),
|
233 |
+
'sl_SI' => __( 'Slovene', 'wpcf7' ),
|
234 |
+
'es_ES' => __( 'Spanish', 'wpcf7' ),
|
235 |
+
'sv_SE' => __( 'Swedish', 'wpcf7' ),
|
236 |
+
'ta' => __( 'Tamil', 'wpcf7' ),
|
237 |
+
'th' => __( 'Thai', 'wpcf7' ),
|
238 |
+
'tl' => __( 'Tagalog', 'wpcf7' ),
|
239 |
+
'tr_TR' => __( 'Turkish', 'wpcf7' ),
|
240 |
+
'uk' => __( 'Ukrainian', 'wpcf7' ),
|
241 |
+
'vi' => __( 'Vietnamese', 'wpcf7' )
|
242 |
+
);
|
243 |
+
|
244 |
+
return $l10n;
|
245 |
+
}
|
246 |
+
|
247 |
+
function wpcf7_is_rtl() {
|
248 |
+
if ( function_exists( 'is_rtl' ) )
|
249 |
+
return is_rtl();
|
250 |
+
|
251 |
+
return false;
|
252 |
+
}
|
253 |
+
|
254 |
+
function wpcf7_ajax_loader() {
|
255 |
+
$url = wpcf7_plugin_url( 'images/ajax-loader.gif' );
|
256 |
+
|
257 |
+
return apply_filters( 'wpcf7_ajax_loader', $url );
|
258 |
+
}
|
259 |
+
|
260 |
?>
|
includes/pipe.php
CHANGED
@@ -1,67 +1,67 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WPCF7_Pipe {
|
4 |
-
|
5 |
-
var $before = '';
|
6 |
-
var $after = '';
|
7 |
-
|
8 |
-
function WPCF7_Pipe( $text ) {
|
9 |
-
$pipe_pos = strpos( $text, '|' );
|
10 |
-
if ( false === $pipe_pos ) {
|
11 |
-
$this->before = $this->after = $text;
|
12 |
-
} else {
|
13 |
-
$this->before = substr( $text, 0, $pipe_pos );
|
14 |
-
$this->after = substr( $text, $pipe_pos + 1 );
|
15 |
-
}
|
16 |
-
}
|
17 |
-
}
|
18 |
-
|
19 |
-
class WPCF7_Pipes {
|
20 |
-
|
21 |
-
var $pipes = array();
|
22 |
-
|
23 |
-
function WPCF7_Pipes( $texts ) {
|
24 |
-
if ( ! is_array( $texts ) )
|
25 |
-
return;
|
26 |
-
|
27 |
-
foreach ( $texts as $text ) {
|
28 |
-
$this->add_pipe( $text );
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
function add_pipe( $text ) {
|
33 |
-
$pipe = new WPCF7_Pipe( $text );
|
34 |
-
$this->pipes[] = $pipe;
|
35 |
-
}
|
36 |
-
|
37 |
-
function do_pipe( $before ) {
|
38 |
-
foreach ( $this->pipes as $pipe ) {
|
39 |
-
if ( $pipe->before == $before )
|
40 |
-
return $pipe->after;
|
41 |
-
}
|
42 |
-
return $before;
|
43 |
-
}
|
44 |
-
|
45 |
-
function collect_befores() {
|
46 |
-
$befores = array();
|
47 |
-
|
48 |
-
foreach ( $this->pipes as $pipe ) {
|
49 |
-
$befores[] = $pipe->before;
|
50 |
-
}
|
51 |
-
|
52 |
-
return $befores;
|
53 |
-
}
|
54 |
-
|
55 |
-
function zero() {
|
56 |
-
return empty( $this->pipes );
|
57 |
-
}
|
58 |
-
|
59 |
-
function random_pipe() {
|
60 |
-
if ( $this->zero() )
|
61 |
-
return null;
|
62 |
-
|
63 |
-
return $this->pipes[array_rand( $this->pipes )];
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WPCF7_Pipe {
|
4 |
+
|
5 |
+
var $before = '';
|
6 |
+
var $after = '';
|
7 |
+
|
8 |
+
function WPCF7_Pipe( $text ) {
|
9 |
+
$pipe_pos = strpos( $text, '|' );
|
10 |
+
if ( false === $pipe_pos ) {
|
11 |
+
$this->before = $this->after = $text;
|
12 |
+
} else {
|
13 |
+
$this->before = substr( $text, 0, $pipe_pos );
|
14 |
+
$this->after = substr( $text, $pipe_pos + 1 );
|
15 |
+
}
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
class WPCF7_Pipes {
|
20 |
+
|
21 |
+
var $pipes = array();
|
22 |
+
|
23 |
+
function WPCF7_Pipes( $texts ) {
|
24 |
+
if ( ! is_array( $texts ) )
|
25 |
+
return;
|
26 |
+
|
27 |
+
foreach ( $texts as $text ) {
|
28 |
+
$this->add_pipe( $text );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
function add_pipe( $text ) {
|
33 |
+
$pipe = new WPCF7_Pipe( $text );
|
34 |
+
$this->pipes[] = $pipe;
|
35 |
+
}
|
36 |
+
|
37 |
+
function do_pipe( $before ) {
|
38 |
+
foreach ( $this->pipes as $pipe ) {
|
39 |
+
if ( $pipe->before == $before )
|
40 |
+
return $pipe->after;
|
41 |
+
}
|
42 |
+
return $before;
|
43 |
+
}
|
44 |
+
|
45 |
+
function collect_befores() {
|
46 |
+
$befores = array();
|
47 |
+
|
48 |
+
foreach ( $this->pipes as $pipe ) {
|
49 |
+
$befores[] = $pipe->before;
|
50 |
+
}
|
51 |
+
|
52 |
+
return $befores;
|
53 |
+
}
|
54 |
+
|
55 |
+
function zero() {
|
56 |
+
return empty( $this->pipes );
|
57 |
+
}
|
58 |
+
|
59 |
+
function random_pipe() {
|
60 |
+
if ( $this->zero() )
|
61 |
+
return null;
|
62 |
+
|
63 |
+
return $this->pipes[array_rand( $this->pipes )];
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
?>
|
includes/shortcodes.php
CHANGED
@@ -85,8 +85,16 @@ class WPCF7_ShortcodeManager {
|
|
85 |
$tag = $m[2];
|
86 |
$attr = $this->shortcode_parse_atts( $m[3] );
|
87 |
|
88 |
-
$scanned_tag = array(
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
if ( is_array( $attr ) ) {
|
92 |
if ( is_array( $attr['options'] ) ) {
|
85 |
$tag = $m[2];
|
86 |
$attr = $this->shortcode_parse_atts( $m[3] );
|
87 |
|
88 |
+
$scanned_tag = array(
|
89 |
+
'type' => $tag,
|
90 |
+
'name' => '',
|
91 |
+
'options' => array(),
|
92 |
+
'raw_values' => array(),
|
93 |
+
'values' => array(),
|
94 |
+
'pipes' => null,
|
95 |
+
'labels' => array(),
|
96 |
+
'attr' => '',
|
97 |
+
'content' => '' );
|
98 |
|
99 |
if ( is_array( $attr ) ) {
|
100 |
if ( is_array( $attr['options'] ) ) {
|
includes/taggenerator.php
CHANGED
@@ -21,29 +21,4 @@ function wpcf7_add_tag_generator( $name, $title, $elm_id, $callback, $options =
|
|
21 |
return true;
|
22 |
}
|
23 |
|
24 |
-
function wpcf7_print_tag_generators() {
|
25 |
-
global $wpcf7_tag_generators;
|
26 |
-
|
27 |
-
$output = array();
|
28 |
-
|
29 |
-
foreach ( (array) $wpcf7_tag_generators as $name => $tg ) {
|
30 |
-
$pane = " " . esc_js( $name ) . ": { ";
|
31 |
-
$pane .= "title: '" . esc_js( $tg['title'] ) . "'";
|
32 |
-
$pane .= ", content: '" . esc_js( $tg['content'] ) . "'";
|
33 |
-
|
34 |
-
foreach ( (array) $tg['options'] as $option_name => $option_value ) {
|
35 |
-
if ( is_int( $option_value ) )
|
36 |
-
$pane .= ", $option_name: $option_value";
|
37 |
-
else
|
38 |
-
$pane .= ", $option_name: '" . esc_js( $option_value ) . "'";
|
39 |
-
}
|
40 |
-
|
41 |
-
$pane .= " }";
|
42 |
-
|
43 |
-
$output[] = $pane;
|
44 |
-
}
|
45 |
-
|
46 |
-
echo implode( ",\n", $output ) . "\n";
|
47 |
-
}
|
48 |
-
|
49 |
?>
|
21 |
return true;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
?>
|
jquery.form.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* jQuery Form Plugin
|
3 |
-
* version: 2.
|
4 |
* @requires jQuery v1.3.2 or later
|
5 |
*
|
6 |
* Examples and documentation at: http://malsup.com/jquery/form/
|
@@ -218,7 +218,7 @@ $.fn.ajaxSubmit = function(options) {
|
|
218 |
type: 'POST'
|
219 |
});
|
220 |
|
221 |
-
s.context = s.context || s;
|
222 |
|
223 |
s.data = null;
|
224 |
var beforeSend = s.beforeSend;
|
1 |
/*!
|
2 |
* jQuery Form Plugin
|
3 |
+
* version: 2.95 (30-JAN-2012)
|
4 |
* @requires jQuery v1.3.2 or later
|
5 |
*
|
6 |
* Examples and documentation at: http://malsup.com/jquery/form/
|
218 |
type: 'POST'
|
219 |
});
|
220 |
|
221 |
+
//s.context = s.context || s;
|
222 |
|
223 |
s.data = null;
|
224 |
var beforeSend = s.beforeSend;
|
languages/wpcf7-ar.mo
CHANGED
Binary file
|
languages/wpcf7-az_AZ.mo
ADDED
Binary file
|
languages/wpcf7-da_DK.mo
CHANGED
Binary file
|
languages/wpcf7-fa_IR.mo
CHANGED
Binary file
|
languages/wpcf7-it_IT.mo
CHANGED
Binary file
|
languages/wpcf7-ja.mo
CHANGED
Binary file
|
languages/wpcf7-pt_PT.mo
CHANGED
Binary file
|
languages/wpcf7-ro_RO.mo
CHANGED
Binary file
|
languages/wpcf7-ru_RU.mo
CHANGED
Binary file
|
languages/wpcf7.pot
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contact Form 7\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -27,7 +27,7 @@ msgstr ""
|
|
27 |
msgid "Contact Form"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: contact-form-7/settings.php:
|
31 |
#, php-format
|
32 |
msgid "Contact form %d"
|
33 |
msgstr ""
|
@@ -41,83 +41,83 @@ msgstr ""
|
|
41 |
msgid "Contact"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: contact-form-7/admin/admin.php:
|
45 |
msgid "Edit Contact Forms"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: contact-form-7/admin/admin.php:
|
49 |
msgid "Edit"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: contact-form-7/admin/admin.php:
|
53 |
msgid "Generate Tag"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: contact-form-7/admin/admin.php:
|
57 |
msgid "Settings"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: contact-form-7/admin/admin.php:
|
61 |
msgid "http://contactform7.com/"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: contact-form-7/admin/admin.php:
|
65 |
msgid "Contactform7.com"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: contact-form-7/admin/admin.php:
|
69 |
msgid "http://contactform7.com/docs/"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: contact-form-7/admin/admin.php:
|
73 |
msgid "Docs"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: contact-form-7/admin/admin.php:
|
77 |
msgid "http://contactform7.com/faq/"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: contact-form-7/admin/admin.php:
|
81 |
msgid "FAQ"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: contact-form-7/admin/admin.php:
|
85 |
msgid "http://contactform7.com/support/"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: contact-form-7/admin/admin.php:
|
89 |
msgid "Support"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: contact-form-7/admin/admin.php:
|
93 |
msgid "Contact form created."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: contact-form-7/admin/admin.php:
|
97 |
msgid "Contact form saved."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: contact-form-7/admin/admin.php:
|
101 |
msgid "Contact form deleted."
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: contact-form-7/admin/admin.php:
|
105 |
msgid "Contact Form 7 needs your support. Please donate today."
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: contact-form-7/admin/admin.php:
|
109 |
msgid "Your contribution is needed for making this plugin better."
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: contact-form-7/admin/admin.php:
|
113 |
msgid "http://contactform7.com/donate/"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: contact-form-7/admin/admin.php:
|
117 |
msgid "Donate"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: contact-form-7/admin/admin.php:
|
121 |
#, php-format
|
122 |
msgid "<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href=\"%3$s\">update WordPress</a> first."
|
123 |
msgstr ""
|
@@ -220,10 +220,14 @@ msgstr ""
|
|
220 |
msgid "Message body:"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: contact-form-7/includes/classes.php:
|
224 |
msgid "Untitled"
|
225 |
msgstr ""
|
226 |
|
|
|
|
|
|
|
|
|
227 |
#: contact-form-7/includes/functions.php:26
|
228 |
msgid "Sender's message was sent successfully"
|
229 |
msgstr ""
|
@@ -237,7 +241,7 @@ msgid "Sender's message was failed to send"
|
|
237 |
msgstr ""
|
238 |
|
239 |
#: contact-form-7/includes/functions.php:32
|
240 |
-
#: contact-form-7/modules/akismet.php:
|
241 |
msgid "Failed to send your message. Please try later or contact the administrator by another method."
|
242 |
msgstr ""
|
243 |
|
@@ -335,507 +339,507 @@ msgid "Armenian"
|
|
335 |
msgstr ""
|
336 |
|
337 |
#: contact-form-7/includes/functions.php:189
|
338 |
-
msgid "
|
339 |
msgstr ""
|
340 |
|
341 |
#: contact-form-7/includes/functions.php:190
|
342 |
-
msgid "
|
343 |
msgstr ""
|
344 |
|
345 |
#: contact-form-7/includes/functions.php:191
|
346 |
-
msgid "
|
347 |
msgstr ""
|
348 |
|
349 |
#: contact-form-7/includes/functions.php:192
|
350 |
-
msgid "
|
351 |
msgstr ""
|
352 |
|
353 |
#: contact-form-7/includes/functions.php:193
|
354 |
-
msgid "
|
355 |
msgstr ""
|
356 |
|
357 |
#: contact-form-7/includes/functions.php:194
|
358 |
-
msgid "
|
359 |
msgstr ""
|
360 |
|
361 |
#: contact-form-7/includes/functions.php:195
|
362 |
-
msgid "
|
363 |
msgstr ""
|
364 |
|
365 |
#: contact-form-7/includes/functions.php:196
|
366 |
-
msgid "Chinese (
|
367 |
msgstr ""
|
368 |
|
369 |
#: contact-form-7/includes/functions.php:197
|
370 |
-
msgid "
|
371 |
msgstr ""
|
372 |
|
373 |
#: contact-form-7/includes/functions.php:198
|
374 |
-
msgid "
|
375 |
msgstr ""
|
376 |
|
377 |
#: contact-form-7/includes/functions.php:199
|
378 |
-
msgid "
|
379 |
msgstr ""
|
380 |
|
381 |
#: contact-form-7/includes/functions.php:200
|
382 |
-
msgid "
|
383 |
msgstr ""
|
384 |
|
385 |
#: contact-form-7/includes/functions.php:201
|
386 |
-
msgid "
|
387 |
msgstr ""
|
388 |
|
389 |
#: contact-form-7/includes/functions.php:202
|
390 |
-
msgid "
|
391 |
msgstr ""
|
392 |
|
393 |
#: contact-form-7/includes/functions.php:203
|
394 |
-
msgid "
|
395 |
msgstr ""
|
396 |
|
397 |
#: contact-form-7/includes/functions.php:204
|
398 |
-
msgid "
|
399 |
msgstr ""
|
400 |
|
401 |
#: contact-form-7/includes/functions.php:205
|
402 |
-
msgid "
|
403 |
msgstr ""
|
404 |
|
405 |
#: contact-form-7/includes/functions.php:206
|
406 |
-
msgid "
|
407 |
msgstr ""
|
408 |
|
409 |
#: contact-form-7/includes/functions.php:207
|
410 |
-
msgid "
|
411 |
msgstr ""
|
412 |
|
413 |
#: contact-form-7/includes/functions.php:208
|
414 |
-
msgid "
|
415 |
msgstr ""
|
416 |
|
417 |
#: contact-form-7/includes/functions.php:209
|
418 |
-
msgid "
|
419 |
msgstr ""
|
420 |
|
421 |
#: contact-form-7/includes/functions.php:210
|
422 |
-
msgid "
|
423 |
msgstr ""
|
424 |
|
425 |
#: contact-form-7/includes/functions.php:211
|
426 |
-
msgid "
|
427 |
msgstr ""
|
428 |
|
429 |
#: contact-form-7/includes/functions.php:212
|
430 |
-
msgid "
|
431 |
msgstr ""
|
432 |
|
433 |
#: contact-form-7/includes/functions.php:213
|
434 |
-
msgid "
|
435 |
msgstr ""
|
436 |
|
437 |
#: contact-form-7/includes/functions.php:214
|
438 |
-
msgid "
|
439 |
msgstr ""
|
440 |
|
441 |
#: contact-form-7/includes/functions.php:215
|
442 |
-
msgid "
|
443 |
msgstr ""
|
444 |
|
445 |
#: contact-form-7/includes/functions.php:216
|
446 |
-
msgid "
|
447 |
msgstr ""
|
448 |
|
449 |
#: contact-form-7/includes/functions.php:217
|
450 |
-
msgid "
|
451 |
msgstr ""
|
452 |
|
453 |
#: contact-form-7/includes/functions.php:218
|
454 |
-
msgid "
|
455 |
msgstr ""
|
456 |
|
457 |
#: contact-form-7/includes/functions.php:219
|
458 |
-
msgid "
|
459 |
msgstr ""
|
460 |
|
461 |
#: contact-form-7/includes/functions.php:220
|
462 |
-
msgid "
|
463 |
msgstr ""
|
464 |
|
465 |
#: contact-form-7/includes/functions.php:221
|
466 |
-
msgid "
|
467 |
msgstr ""
|
468 |
|
469 |
#: contact-form-7/includes/functions.php:222
|
470 |
-
msgid "
|
471 |
msgstr ""
|
472 |
|
473 |
#: contact-form-7/includes/functions.php:223
|
474 |
-
msgid "
|
475 |
msgstr ""
|
476 |
|
477 |
#: contact-form-7/includes/functions.php:224
|
478 |
-
msgid "
|
479 |
msgstr ""
|
480 |
|
481 |
#: contact-form-7/includes/functions.php:225
|
482 |
-
msgid "
|
483 |
msgstr ""
|
484 |
|
485 |
#: contact-form-7/includes/functions.php:226
|
486 |
-
msgid "
|
487 |
msgstr ""
|
488 |
|
489 |
#: contact-form-7/includes/functions.php:227
|
490 |
-
msgid "
|
491 |
msgstr ""
|
492 |
|
493 |
#: contact-form-7/includes/functions.php:228
|
494 |
-
msgid "
|
495 |
msgstr ""
|
496 |
|
497 |
#: contact-form-7/includes/functions.php:229
|
498 |
-
msgid "
|
499 |
msgstr ""
|
500 |
|
501 |
#: contact-form-7/includes/functions.php:230
|
502 |
-
msgid "
|
503 |
msgstr ""
|
504 |
|
505 |
#: contact-form-7/includes/functions.php:231
|
506 |
-
msgid "
|
507 |
msgstr ""
|
508 |
|
509 |
#: contact-form-7/includes/functions.php:232
|
510 |
-
msgid "
|
511 |
msgstr ""
|
512 |
|
513 |
#: contact-form-7/includes/functions.php:233
|
514 |
-
msgid "
|
515 |
msgstr ""
|
516 |
|
517 |
#: contact-form-7/includes/functions.php:234
|
518 |
-
msgid "
|
519 |
msgstr ""
|
520 |
|
521 |
#: contact-form-7/includes/functions.php:235
|
522 |
-
msgid "
|
523 |
msgstr ""
|
524 |
|
525 |
#: contact-form-7/includes/functions.php:236
|
526 |
-
msgid "
|
527 |
msgstr ""
|
528 |
|
529 |
#: contact-form-7/includes/functions.php:237
|
530 |
-
msgid "
|
531 |
msgstr ""
|
532 |
|
533 |
#: contact-form-7/includes/functions.php:238
|
534 |
-
msgid "
|
535 |
msgstr ""
|
536 |
|
537 |
#: contact-form-7/includes/functions.php:239
|
538 |
-
msgid "
|
539 |
msgstr ""
|
540 |
|
541 |
#: contact-form-7/includes/functions.php:240
|
|
|
|
|
|
|
|
|
542 |
msgid "Vietnamese"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: contact-form-7/modules/acceptance.php:
|
546 |
msgid "Acceptance"
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: contact-form-7/modules/acceptance.php:
|
550 |
-
#: contact-form-7/modules/captcha.php:
|
551 |
msgid "Name"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: contact-form-7/modules/acceptance.php:164
|
555 |
#: contact-form-7/modules/acceptance.php:167
|
556 |
-
#: contact-form-7/modules/
|
557 |
-
#: contact-form-7/modules/captcha.php:
|
558 |
-
#: contact-form-7/modules/captcha.php:
|
559 |
-
#: contact-form-7/modules/captcha.php:
|
560 |
-
#: contact-form-7/modules/captcha.php:
|
561 |
-
#: contact-form-7/modules/captcha.php:
|
562 |
-
#: contact-form-7/modules/captcha.php:
|
563 |
-
#: contact-form-7/modules/captcha.php:
|
564 |
-
#: contact-form-7/modules/captcha.php:
|
|
|
565 |
msgid "optional"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: contact-form-7/modules/acceptance.php:
|
569 |
msgid "Make this checkbox checked by default?"
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: contact-form-7/modules/acceptance.php:
|
573 |
msgid "Make this checkbox work inversely?"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: contact-form-7/modules/acceptance.php:
|
577 |
msgid "* That means visitor who accepts the term unchecks it."
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: contact-form-7/modules/acceptance.php:
|
581 |
-
#: contact-form-7/modules/captcha.php:
|
582 |
msgid "Copy this code and paste it into the form left."
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: contact-form-7/modules/akismet.php:
|
586 |
msgid "Akismet judged the sending activity as spamming"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: contact-form-7/modules/captcha.php:
|
590 |
msgid "To use CAPTCHA, you need <a href=\"http://wordpress.org/extend/plugins/really-simple-captcha/\">Really Simple CAPTCHA</a> plugin installed."
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: contact-form-7/modules/captcha.php:
|
594 |
msgid "The code that sender entered does not match the CAPTCHA"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: contact-form-7/modules/captcha.php:
|
598 |
msgid "Your entered code is incorrect."
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: contact-form-7/modules/captcha.php:
|
602 |
msgid "CAPTCHA"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: contact-form-7/modules/captcha.php:
|
606 |
msgid "Note: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed."
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: contact-form-7/modules/captcha.php:
|
610 |
msgid "Image settings"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: contact-form-7/modules/captcha.php:
|
614 |
msgid "Foreground color"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: contact-form-7/modules/captcha.php:
|
618 |
msgid "Background color"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: contact-form-7/modules/captcha.php:
|
622 |
msgid "Image size"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: contact-form-7/modules/captcha.php:
|
626 |
msgid "Small"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: contact-form-7/modules/captcha.php:
|
630 |
msgid "Medium"
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: contact-form-7/modules/captcha.php:
|
634 |
msgid "Large"
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: contact-form-7/modules/captcha.php:
|
638 |
msgid "Input field settings"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: contact-form-7/modules/captcha.php:
|
642 |
msgid "For image"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: contact-form-7/modules/captcha.php:
|
646 |
msgid "For input field"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: contact-form-7/modules/captcha.php:
|
650 |
#, php-format
|
651 |
msgid "This contact form contains CAPTCHA fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually."
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: contact-form-7/modules/captcha.php:
|
655 |
msgid "This contact form contains CAPTCHA fields, but the necessary libraries (GD and FreeType) are not available on your server."
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: contact-form-7/modules/checkbox.php:
|
659 |
msgid "Checkboxes"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: contact-form-7/modules/checkbox.php:
|
663 |
msgid "Radio buttons"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: contact-form-7/modules/checkbox.php:
|
667 |
-
#: contact-form-7/modules/file.php:
|
668 |
-
#: contact-form-7/modules/select.php:
|
669 |
-
#: contact-form-7/modules/text.php:
|
670 |
-
#: contact-form-7/modules/textarea.php:
|
671 |
msgid "Required field?"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: contact-form-7/modules/checkbox.php:
|
675 |
-
#: contact-form-7/modules/select.php:
|
676 |
msgid "Choices"
|
677 |
msgstr ""
|
678 |
|
679 |
-
#: contact-form-7/modules/checkbox.php:
|
680 |
-
#: contact-form-7/modules/select.php:
|
681 |
msgid "* One choice per line."
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: contact-form-7/modules/checkbox.php:
|
685 |
msgid "Put a label first, a checkbox last?"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: contact-form-7/modules/checkbox.php:
|
689 |
msgid "Wrap each item with <label> tag?"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: contact-form-7/modules/checkbox.php:
|
693 |
msgid "Make checkboxes exclusive?"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: contact-form-7/modules/checkbox.php:
|
697 |
-
#: contact-form-7/modules/select.php:
|
698 |
-
#: contact-form-7/modules/text.php:
|
699 |
-
#: contact-form-7/modules/textarea.php:
|
700 |
msgid "And, put this code into the Mail fields below."
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: contact-form-7/modules/file.php:
|
704 |
msgid "Uploading a file fails for any reason"
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: contact-form-7/modules/file.php:
|
708 |
msgid "Failed to upload file."
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: contact-form-7/modules/file.php:
|
712 |
msgid "Uploaded file is not allowed file type"
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: contact-form-7/modules/file.php:
|
716 |
msgid "This file type is not allowed."
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: contact-form-7/modules/file.php:
|
720 |
msgid "Uploaded file is too large"
|
721 |
msgstr ""
|
722 |
|
723 |
-
#: contact-form-7/modules/file.php:
|
724 |
msgid "This file is too large."
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: contact-form-7/modules/file.php:
|
728 |
msgid "Uploading a file fails for PHP error"
|
729 |
msgstr ""
|
730 |
|
731 |
-
#: contact-form-7/modules/file.php:
|
732 |
msgid "Failed to upload file. Error occurred."
|
733 |
msgstr ""
|
734 |
|
735 |
-
#: contact-form-7/modules/file.php:
|
736 |
msgid "File upload"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: contact-form-7/modules/file.php:
|
740 |
msgid "File size limit"
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: contact-form-7/modules/file.php:
|
744 |
msgid "bytes"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: contact-form-7/modules/file.php:
|
748 |
msgid "Acceptable file types"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: contact-form-7/modules/file.php:
|
752 |
msgid "And, put this code into the File Attachments field below."
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: contact-form-7/modules/file.php:
|
756 |
#, php-format
|
757 |
msgid "This contact form contains file uploading fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually."
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: contact-form-7/modules/quiz.php:
|
761 |
msgid "Sender doesn't enter the correct answer to the quiz"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: contact-form-7/modules/quiz.php:
|
765 |
msgid "Your answer is not correct."
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: contact-form-7/modules/quiz.php:
|
769 |
msgid "Quiz"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: contact-form-7/modules/quiz.php:
|
773 |
msgid "Quizzes"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: contact-form-7/modules/quiz.php:
|
777 |
msgid "* quiz|answer (e.g. 1+1=?|2)"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: contact-form-7/modules/select.php:
|
781 |
msgid "Drop-down menu"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: contact-form-7/modules/select.php:
|
785 |
msgid "Allow multiple selections?"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: contact-form-7/modules/select.php:
|
789 |
msgid "Insert a blank item as the first option?"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: contact-form-7/modules/submit.php:
|
793 |
-
msgid "Sending ..."
|
794 |
-
msgstr ""
|
795 |
-
|
796 |
-
#: contact-form-7/modules/submit.php:66
|
797 |
msgid "Submit button"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: contact-form-7/modules/submit.php:
|
801 |
msgid "Label"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: contact-form-7/modules/text.php:
|
805 |
msgid "Text field"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: contact-form-7/modules/text.php:
|
809 |
msgid "Email field"
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: contact-form-7/modules/text.php:
|
813 |
msgid "Akismet"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: contact-form-7/modules/text.php:
|
817 |
msgid "This field requires author's name"
|
818 |
msgstr ""
|
819 |
|
820 |
-
#: contact-form-7/modules/text.php:
|
821 |
msgid "This field requires author's URL"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: contact-form-7/modules/text.php:
|
825 |
msgid "This field requires author's email address"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: contact-form-7/modules/text.php:
|
829 |
-
#: contact-form-7/modules/textarea.php:
|
830 |
msgid "Default value"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: contact-form-7/modules/text.php:
|
834 |
-
#: contact-form-7/modules/textarea.php:
|
835 |
msgid "Use this text as watermark?"
|
836 |
msgstr ""
|
837 |
|
838 |
-
#: contact-form-7/modules/textarea.php:
|
839 |
msgid "Text area"
|
840 |
msgstr ""
|
841 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contact Form 7\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-01-29 16:04+0900\n"
|
6 |
+
"PO-Revision-Date: 2012-01-29 16:04+0900\n"
|
7 |
"Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
27 |
msgid "Contact Form"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: contact-form-7/settings.php:168
|
31 |
#, php-format
|
32 |
msgid "Contact form %d"
|
33 |
msgstr ""
|
41 |
msgid "Contact"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: contact-form-7/admin/admin.php:118
|
45 |
msgid "Edit Contact Forms"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: contact-form-7/admin/admin.php:118
|
49 |
msgid "Edit"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: contact-form-7/admin/admin.php:167
|
53 |
msgid "Generate Tag"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: contact-form-7/admin/admin.php:216
|
57 |
msgid "Settings"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: contact-form-7/admin/admin.php:227
|
61 |
msgid "http://contactform7.com/"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: contact-form-7/admin/admin.php:228
|
65 |
msgid "Contactform7.com"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: contact-form-7/admin/admin.php:229
|
69 |
msgid "http://contactform7.com/docs/"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: contact-form-7/admin/admin.php:230
|
73 |
msgid "Docs"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: contact-form-7/admin/admin.php:231
|
77 |
msgid "http://contactform7.com/faq/"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: contact-form-7/admin/admin.php:232
|
81 |
msgid "FAQ"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: contact-form-7/admin/admin.php:233
|
85 |
msgid "http://contactform7.com/support/"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: contact-form-7/admin/admin.php:234
|
89 |
msgid "Support"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: contact-form-7/admin/admin.php:248
|
93 |
msgid "Contact form created."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: contact-form-7/admin/admin.php:251
|
97 |
msgid "Contact form saved."
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: contact-form-7/admin/admin.php:254
|
101 |
msgid "Contact form deleted."
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: contact-form-7/admin/admin.php:288
|
105 |
msgid "Contact Form 7 needs your support. Please donate today."
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: contact-form-7/admin/admin.php:289
|
109 |
msgid "Your contribution is needed for making this plugin better."
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: contact-form-7/admin/admin.php:295
|
113 |
msgid "http://contactform7.com/donate/"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: contact-form-7/admin/admin.php:295
|
117 |
msgid "Donate"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: contact-form-7/admin/admin.php:315
|
121 |
#, php-format
|
122 |
msgid "<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href=\"%3$s\">update WordPress</a> first."
|
123 |
msgstr ""
|
220 |
msgid "Message body:"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: contact-form-7/includes/classes.php:660
|
224 |
msgid "Untitled"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: contact-form-7/includes/controller.php:245
|
228 |
+
msgid "Sending ..."
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
#: contact-form-7/includes/functions.php:26
|
232 |
msgid "Sender's message was sent successfully"
|
233 |
msgstr ""
|
241 |
msgstr ""
|
242 |
|
243 |
#: contact-form-7/includes/functions.php:32
|
244 |
+
#: contact-form-7/modules/akismet.php:106
|
245 |
msgid "Failed to send your message. Please try later or contact the administrator by another method."
|
246 |
msgstr ""
|
247 |
|
339 |
msgstr ""
|
340 |
|
341 |
#: contact-form-7/includes/functions.php:189
|
342 |
+
msgid "Azeri"
|
343 |
msgstr ""
|
344 |
|
345 |
#: contact-form-7/includes/functions.php:190
|
346 |
+
msgid "Bangla"
|
347 |
msgstr ""
|
348 |
|
349 |
#: contact-form-7/includes/functions.php:191
|
350 |
+
msgid "Belarusian"
|
351 |
msgstr ""
|
352 |
|
353 |
#: contact-form-7/includes/functions.php:192
|
354 |
+
msgid "Bosnian"
|
355 |
msgstr ""
|
356 |
|
357 |
#: contact-form-7/includes/functions.php:193
|
358 |
+
msgid "Brazilian Portuguese"
|
359 |
msgstr ""
|
360 |
|
361 |
#: contact-form-7/includes/functions.php:194
|
362 |
+
msgid "Bulgarian"
|
363 |
msgstr ""
|
364 |
|
365 |
#: contact-form-7/includes/functions.php:195
|
366 |
+
msgid "Catalan"
|
367 |
msgstr ""
|
368 |
|
369 |
#: contact-form-7/includes/functions.php:196
|
370 |
+
msgid "Chinese (Simplified)"
|
371 |
msgstr ""
|
372 |
|
373 |
#: contact-form-7/includes/functions.php:197
|
374 |
+
msgid "Chinese (Traditional)"
|
375 |
msgstr ""
|
376 |
|
377 |
#: contact-form-7/includes/functions.php:198
|
378 |
+
msgid "Croatian"
|
379 |
msgstr ""
|
380 |
|
381 |
#: contact-form-7/includes/functions.php:199
|
382 |
+
msgid "Czech"
|
383 |
msgstr ""
|
384 |
|
385 |
#: contact-form-7/includes/functions.php:200
|
386 |
+
msgid "Danish"
|
387 |
msgstr ""
|
388 |
|
389 |
#: contact-form-7/includes/functions.php:201
|
390 |
+
msgid "Dutch"
|
391 |
msgstr ""
|
392 |
|
393 |
#: contact-form-7/includes/functions.php:202
|
394 |
+
msgid "English"
|
395 |
msgstr ""
|
396 |
|
397 |
#: contact-form-7/includes/functions.php:203
|
398 |
+
msgid "Esperanto"
|
399 |
msgstr ""
|
400 |
|
401 |
#: contact-form-7/includes/functions.php:204
|
402 |
+
msgid "Estonian"
|
403 |
msgstr ""
|
404 |
|
405 |
#: contact-form-7/includes/functions.php:205
|
406 |
+
msgid "Finnish"
|
407 |
msgstr ""
|
408 |
|
409 |
#: contact-form-7/includes/functions.php:206
|
410 |
+
msgid "French"
|
411 |
msgstr ""
|
412 |
|
413 |
#: contact-form-7/includes/functions.php:207
|
414 |
+
msgid "Galician"
|
415 |
msgstr ""
|
416 |
|
417 |
#: contact-form-7/includes/functions.php:208
|
418 |
+
msgid "Georgian"
|
419 |
msgstr ""
|
420 |
|
421 |
#: contact-form-7/includes/functions.php:209
|
422 |
+
msgid "German"
|
423 |
msgstr ""
|
424 |
|
425 |
#: contact-form-7/includes/functions.php:210
|
426 |
+
msgid "Greek"
|
427 |
msgstr ""
|
428 |
|
429 |
#: contact-form-7/includes/functions.php:211
|
430 |
+
msgid "Hebrew"
|
431 |
msgstr ""
|
432 |
|
433 |
#: contact-form-7/includes/functions.php:212
|
434 |
+
msgid "Hindi"
|
435 |
msgstr ""
|
436 |
|
437 |
#: contact-form-7/includes/functions.php:213
|
438 |
+
msgid "Hungarian"
|
439 |
msgstr ""
|
440 |
|
441 |
#: contact-form-7/includes/functions.php:214
|
442 |
+
msgid "Indonesian"
|
443 |
msgstr ""
|
444 |
|
445 |
#: contact-form-7/includes/functions.php:215
|
446 |
+
msgid "Italian"
|
447 |
msgstr ""
|
448 |
|
449 |
#: contact-form-7/includes/functions.php:216
|
450 |
+
msgid "Japanese"
|
451 |
msgstr ""
|
452 |
|
453 |
#: contact-form-7/includes/functions.php:217
|
454 |
+
msgid "Korean"
|
455 |
msgstr ""
|
456 |
|
457 |
#: contact-form-7/includes/functions.php:218
|
458 |
+
msgid "Latvian"
|
459 |
msgstr ""
|
460 |
|
461 |
#: contact-form-7/includes/functions.php:219
|
462 |
+
msgid "Lithuanian"
|
463 |
msgstr ""
|
464 |
|
465 |
#: contact-form-7/includes/functions.php:220
|
466 |
+
msgid "Macedonian"
|
467 |
msgstr ""
|
468 |
|
469 |
#: contact-form-7/includes/functions.php:221
|
470 |
+
msgid "Malay"
|
471 |
msgstr ""
|
472 |
|
473 |
#: contact-form-7/includes/functions.php:222
|
474 |
+
msgid "Malayalam"
|
475 |
msgstr ""
|
476 |
|
477 |
#: contact-form-7/includes/functions.php:223
|
478 |
+
msgid "Maltese"
|
479 |
msgstr ""
|
480 |
|
481 |
#: contact-form-7/includes/functions.php:224
|
482 |
+
msgid "Norwegian"
|
483 |
msgstr ""
|
484 |
|
485 |
#: contact-form-7/includes/functions.php:225
|
486 |
+
msgid "Persian"
|
487 |
msgstr ""
|
488 |
|
489 |
#: contact-form-7/includes/functions.php:226
|
490 |
+
msgid "Polish"
|
491 |
msgstr ""
|
492 |
|
493 |
#: contact-form-7/includes/functions.php:227
|
494 |
+
msgid "Portuguese"
|
495 |
msgstr ""
|
496 |
|
497 |
#: contact-form-7/includes/functions.php:228
|
498 |
+
msgid "Russian"
|
499 |
msgstr ""
|
500 |
|
501 |
#: contact-form-7/includes/functions.php:229
|
502 |
+
msgid "Romanian"
|
503 |
msgstr ""
|
504 |
|
505 |
#: contact-form-7/includes/functions.php:230
|
506 |
+
msgid "Serbian"
|
507 |
msgstr ""
|
508 |
|
509 |
#: contact-form-7/includes/functions.php:231
|
510 |
+
msgid "Sinhala"
|
511 |
msgstr ""
|
512 |
|
513 |
#: contact-form-7/includes/functions.php:232
|
514 |
+
msgid "Slovak"
|
515 |
msgstr ""
|
516 |
|
517 |
#: contact-form-7/includes/functions.php:233
|
518 |
+
msgid "Slovene"
|
519 |
msgstr ""
|
520 |
|
521 |
#: contact-form-7/includes/functions.php:234
|
522 |
+
msgid "Spanish"
|
523 |
msgstr ""
|
524 |
|
525 |
#: contact-form-7/includes/functions.php:235
|
526 |
+
msgid "Swedish"
|
527 |
msgstr ""
|
528 |
|
529 |
#: contact-form-7/includes/functions.php:236
|
530 |
+
msgid "Tamil"
|
531 |
msgstr ""
|
532 |
|
533 |
#: contact-form-7/includes/functions.php:237
|
534 |
+
msgid "Thai"
|
535 |
msgstr ""
|
536 |
|
537 |
#: contact-form-7/includes/functions.php:238
|
538 |
+
msgid "Tagalog"
|
539 |
msgstr ""
|
540 |
|
541 |
#: contact-form-7/includes/functions.php:239
|
542 |
+
msgid "Turkish"
|
543 |
msgstr ""
|
544 |
|
545 |
#: contact-form-7/includes/functions.php:240
|
546 |
+
msgid "Ukrainian"
|
547 |
+
msgstr ""
|
548 |
+
|
549 |
+
#: contact-form-7/includes/functions.php:241
|
550 |
msgid "Vietnamese"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: contact-form-7/modules/acceptance.php:153
|
554 |
msgid "Acceptance"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: contact-form-7/modules/acceptance.php:162
|
558 |
+
#: contact-form-7/modules/captcha.php:212
|
559 |
msgid "Name"
|
560 |
msgstr ""
|
561 |
|
|
|
562 |
#: contact-form-7/modules/acceptance.php:167
|
563 |
+
#: contact-form-7/modules/acceptance.php:170
|
564 |
+
#: contact-form-7/modules/captcha.php:219
|
565 |
+
#: contact-form-7/modules/captcha.php:222
|
566 |
+
#: contact-form-7/modules/captcha.php:227
|
567 |
+
#: contact-form-7/modules/captcha.php:230
|
568 |
+
#: contact-form-7/modules/captcha.php:234
|
569 |
+
#: contact-form-7/modules/captcha.php:245
|
570 |
+
#: contact-form-7/modules/captcha.php:248
|
571 |
+
#: contact-form-7/modules/captcha.php:253
|
572 |
+
#: contact-form-7/modules/captcha.php:256
|
573 |
msgid "optional"
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: contact-form-7/modules/acceptance.php:176
|
577 |
msgid "Make this checkbox checked by default?"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: contact-form-7/modules/acceptance.php:177
|
581 |
msgid "Make this checkbox work inversely?"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: contact-form-7/modules/acceptance.php:178
|
585 |
msgid "* That means visitor who accepts the term unchecks it."
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: contact-form-7/modules/acceptance.php:183
|
589 |
+
#: contact-form-7/modules/captcha.php:261
|
590 |
msgid "Copy this code and paste it into the form left."
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: contact-form-7/modules/akismet.php:105
|
594 |
msgid "Akismet judged the sending activity as spamming"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: contact-form-7/modules/captcha.php:73
|
598 |
msgid "To use CAPTCHA, you need <a href=\"http://wordpress.org/extend/plugins/really-simple-captcha/\">Really Simple CAPTCHA</a> plugin installed."
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: contact-form-7/modules/captcha.php:187
|
602 |
msgid "The code that sender entered does not match the CAPTCHA"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: contact-form-7/modules/captcha.php:188
|
606 |
msgid "Your entered code is incorrect."
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: contact-form-7/modules/captcha.php:198
|
610 |
msgid "CAPTCHA"
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: contact-form-7/modules/captcha.php:209
|
614 |
msgid "Note: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed."
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: contact-form-7/modules/captcha.php:216
|
618 |
msgid "Image settings"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: contact-form-7/modules/captcha.php:227
|
622 |
msgid "Foreground color"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: contact-form-7/modules/captcha.php:230
|
626 |
msgid "Background color"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: contact-form-7/modules/captcha.php:234
|
630 |
msgid "Image size"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: contact-form-7/modules/captcha.php:235
|
634 |
msgid "Small"
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: contact-form-7/modules/captcha.php:236
|
638 |
msgid "Medium"
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: contact-form-7/modules/captcha.php:237
|
642 |
msgid "Large"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: contact-form-7/modules/captcha.php:242
|
646 |
msgid "Input field settings"
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: contact-form-7/modules/captcha.php:262
|
650 |
msgid "For image"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: contact-form-7/modules/captcha.php:264
|
654 |
msgid "For input field"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: contact-form-7/modules/captcha.php:294
|
658 |
#, php-format
|
659 |
msgid "This contact form contains CAPTCHA fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually."
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: contact-form-7/modules/captcha.php:300
|
663 |
msgid "This contact form contains CAPTCHA fields, but the necessary libraries (GD and FreeType) are not available on your server."
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: contact-form-7/modules/checkbox.php:161
|
667 |
msgid "Checkboxes"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: contact-form-7/modules/checkbox.php:164
|
671 |
msgid "Radio buttons"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: contact-form-7/modules/checkbox.php:185
|
675 |
+
#: contact-form-7/modules/file.php:236
|
676 |
+
#: contact-form-7/modules/select.php:148
|
677 |
+
#: contact-form-7/modules/text.php:175
|
678 |
+
#: contact-form-7/modules/textarea.php:136
|
679 |
msgid "Required field?"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: contact-form-7/modules/checkbox.php:201
|
683 |
+
#: contact-form-7/modules/select.php:162
|
684 |
msgid "Choices"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: contact-form-7/modules/checkbox.php:203
|
688 |
+
#: contact-form-7/modules/select.php:164
|
689 |
msgid "* One choice per line."
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: contact-form-7/modules/checkbox.php:207
|
693 |
msgid "Put a label first, a checkbox last?"
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: contact-form-7/modules/checkbox.php:208
|
697 |
msgid "Wrap each item with <label> tag?"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: contact-form-7/modules/checkbox.php:210
|
701 |
msgid "Make checkboxes exclusive?"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: contact-form-7/modules/checkbox.php:218
|
705 |
+
#: contact-form-7/modules/select.php:176
|
706 |
+
#: contact-form-7/modules/text.php:218
|
707 |
+
#: contact-form-7/modules/textarea.php:168
|
708 |
msgid "And, put this code into the Mail fields below."
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: contact-form-7/modules/file.php:200
|
712 |
msgid "Uploading a file fails for any reason"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: contact-form-7/modules/file.php:201
|
716 |
msgid "Failed to upload file."
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: contact-form-7/modules/file.php:205
|
720 |
msgid "Uploaded file is not allowed file type"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: contact-form-7/modules/file.php:206
|
724 |
msgid "This file type is not allowed."
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: contact-form-7/modules/file.php:210
|
728 |
msgid "Uploaded file is too large"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: contact-form-7/modules/file.php:211
|
732 |
msgid "This file is too large."
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: contact-form-7/modules/file.php:215
|
736 |
msgid "Uploading a file fails for PHP error"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: contact-form-7/modules/file.php:216
|
740 |
msgid "Failed to upload file. Error occurred."
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: contact-form-7/modules/file.php:227
|
744 |
msgid "File upload"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: contact-form-7/modules/file.php:250
|
748 |
msgid "File size limit"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: contact-form-7/modules/file.php:250
|
752 |
msgid "bytes"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: contact-form-7/modules/file.php:253
|
756 |
msgid "Acceptable file types"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: contact-form-7/modules/file.php:260
|
760 |
msgid "And, put this code into the File Attachments field below."
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: contact-form-7/modules/file.php:285
|
764 |
#, php-format
|
765 |
msgid "This contact form contains file uploading fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually."
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: contact-form-7/modules/quiz.php:159
|
769 |
msgid "Sender doesn't enter the correct answer to the quiz"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: contact-form-7/modules/quiz.php:160
|
773 |
msgid "Your answer is not correct."
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: contact-form-7/modules/quiz.php:170
|
777 |
msgid "Quiz"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: contact-form-7/modules/quiz.php:200
|
781 |
msgid "Quizzes"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: contact-form-7/modules/quiz.php:202
|
785 |
msgid "* quiz|answer (e.g. 1+1=?|2)"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: contact-form-7/modules/select.php:139
|
789 |
msgid "Drop-down menu"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: contact-form-7/modules/select.php:168
|
793 |
msgid "Allow multiple selections?"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: contact-form-7/modules/select.php:169
|
797 |
msgid "Insert a blank item as the first option?"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: contact-form-7/modules/submit.php:58
|
|
|
|
|
|
|
|
|
801 |
msgid "Submit button"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: contact-form-7/modules/submit.php:76
|
805 |
msgid "Label"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: contact-form-7/modules/text.php:152
|
809 |
msgid "Text field"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: contact-form-7/modules/text.php:155
|
813 |
msgid "Email field"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: contact-form-7/modules/text.php:197
|
817 |
msgid "Akismet"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: contact-form-7/modules/text.php:199
|
821 |
msgid "This field requires author's name"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: contact-form-7/modules/text.php:200
|
825 |
msgid "This field requires author's URL"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: contact-form-7/modules/text.php:202
|
829 |
msgid "This field requires author's email address"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: contact-form-7/modules/text.php:208
|
833 |
+
#: contact-form-7/modules/textarea.php:158
|
834 |
msgid "Default value"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: contact-form-7/modules/text.php:211
|
838 |
+
#: contact-form-7/modules/textarea.php:161
|
839 |
msgid "Use this text as watermark?"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: contact-form-7/modules/textarea.php:127
|
843 |
msgid "Text area"
|
844 |
msgstr ""
|
845 |
|
modules/acceptance.php
CHANGED
@@ -19,12 +19,14 @@ function wpcf7_acceptance_shortcode_handler( $tag ) {
|
|
19 |
if ( empty( $name ) )
|
20 |
return '';
|
21 |
|
22 |
-
$
|
23 |
-
|
24 |
-
$
|
25 |
-
|
|
|
26 |
|
27 |
-
|
|
|
28 |
|
29 |
foreach ( $options as $option ) {
|
30 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -57,8 +59,6 @@ function wpcf7_acceptance_shortcode_handler( $tag ) {
|
|
57 |
|
58 |
$html = '<input type="checkbox" name="' . $name . '" value="1"' . $atts . $checked . ' />';
|
59 |
|
60 |
-
$validation_error = wpcf7_get_validation_error( $name );
|
61 |
-
|
62 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
63 |
|
64 |
return $html;
|
@@ -80,7 +80,7 @@ function wpcf7_acceptance_validation_filter( $result, $tag ) {
|
|
80 |
|
81 |
$options = (array) $tag['options'];
|
82 |
|
83 |
-
$value = $_POST[$name] ? 1 : 0;
|
84 |
|
85 |
$invert = (bool) preg_grep( '%^invert$%', $options );
|
86 |
|
@@ -98,6 +98,9 @@ function wpcf7_acceptance_validation_filter( $result, $tag ) {
|
|
98 |
add_filter( 'wpcf7_acceptance', 'wpcf7_acceptance_filter' );
|
99 |
|
100 |
function wpcf7_acceptance_filter( $accepted ) {
|
|
|
|
|
|
|
101 |
$fes = wpcf7_scan_shortcode( array( 'type' => 'acceptance' ) );
|
102 |
|
103 |
foreach ( $fes as $fe ) {
|
19 |
if ( empty( $name ) )
|
20 |
return '';
|
21 |
|
22 |
+
$validation_error = wpcf7_get_validation_error( $name );
|
23 |
+
|
24 |
+
$atts = $id_att = $tabindex_att = '';
|
25 |
+
|
26 |
+
$class_att = wpcf7_form_controls_class( $type );
|
27 |
|
28 |
+
if ( $validation_error )
|
29 |
+
$class_att .= ' wpcf7-not-valid';
|
30 |
|
31 |
foreach ( $options as $option ) {
|
32 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
59 |
|
60 |
$html = '<input type="checkbox" name="' . $name . '" value="1"' . $atts . $checked . ' />';
|
61 |
|
|
|
|
|
62 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
63 |
|
64 |
return $html;
|
80 |
|
81 |
$options = (array) $tag['options'];
|
82 |
|
83 |
+
$value = ( ! empty( $_POST[$name] ) ? 1 : 0 );
|
84 |
|
85 |
$invert = (bool) preg_grep( '%^invert$%', $options );
|
86 |
|
98 |
add_filter( 'wpcf7_acceptance', 'wpcf7_acceptance_filter' );
|
99 |
|
100 |
function wpcf7_acceptance_filter( $accepted ) {
|
101 |
+
if ( ! $accepted )
|
102 |
+
return $accepted;
|
103 |
+
|
104 |
$fes = wpcf7_scan_shortcode( array( 'type' => 'acceptance' ) );
|
105 |
|
106 |
foreach ( $fes as $fe ) {
|
modules/akismet.php
CHANGED
@@ -8,6 +8,9 @@ add_filter( 'wpcf7_spam', 'wpcf7_akismet' );
|
|
8 |
function wpcf7_akismet( $spam ) {
|
9 |
global $akismet_api_host, $akismet_api_port;
|
10 |
|
|
|
|
|
|
|
11 |
if ( ! function_exists( 'akismet_get_key' ) || ! akismet_get_key() )
|
12 |
return false;
|
13 |
|
@@ -87,6 +90,8 @@ function wpcf7_akismet( $spam ) {
|
|
87 |
if ( 'true' == $response[1] )
|
88 |
$spam = true;
|
89 |
|
|
|
|
|
90 |
return $spam;
|
91 |
}
|
92 |
|
8 |
function wpcf7_akismet( $spam ) {
|
9 |
global $akismet_api_host, $akismet_api_port;
|
10 |
|
11 |
+
if ( $spam )
|
12 |
+
return $spam;
|
13 |
+
|
14 |
if ( ! function_exists( 'akismet_get_key' ) || ! akismet_get_key() )
|
15 |
return false;
|
16 |
|
90 |
if ( 'true' == $response[1] )
|
91 |
$spam = true;
|
92 |
|
93 |
+
$spam = apply_filters( 'wpcf7_akismet_comment_check', $spam, $c );
|
94 |
+
|
95 |
return $spam;
|
96 |
}
|
97 |
|
modules/captcha.php
CHANGED
@@ -22,16 +22,16 @@ function wpcf7_captcha_shortcode_handler( $tag ) {
|
|
22 |
|
23 |
$validation_error = wpcf7_get_validation_error( $name );
|
24 |
|
25 |
-
$atts = '';
|
26 |
-
|
27 |
-
$class_att =
|
28 |
-
$size_att = '';
|
29 |
-
$maxlength_att = '';
|
30 |
-
$tabindex_att = '';
|
31 |
|
32 |
if ( 'captchac' == $type )
|
33 |
$class_att .= ' wpcf7-captcha-' . $name;
|
34 |
|
|
|
|
|
|
|
35 |
foreach ( $options as $option ) {
|
36 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
37 |
$id_att = $matches[1];
|
@@ -49,18 +49,25 @@ function wpcf7_captcha_shortcode_handler( $tag ) {
|
|
49 |
}
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
if ( $id_att )
|
53 |
$atts .= ' id="' . trim( $id_att ) . '"';
|
54 |
|
55 |
if ( $class_att )
|
56 |
$atts .= ' class="' . trim( $class_att ) . '"';
|
57 |
|
58 |
-
// Value.
|
59 |
-
if ( ! wpcf7_is_posted() && isset( $values[0] ) )
|
60 |
-
$value = $values[0];
|
61 |
-
else
|
62 |
-
$value = '';
|
63 |
-
|
64 |
if ( 'captchac' == $type ) {
|
65 |
if ( ! class_exists( 'ReallySimpleCaptcha' ) ) {
|
66 |
return '<em>' . __( 'To use CAPTCHA, you need <a href="http://wordpress.org/extend/plugins/really-simple-captcha/">Really Simple CAPTCHA</a> plugin installed.', 'wpcf7' ) . '</em>';
|
@@ -100,6 +107,9 @@ function wpcf7_captcha_shortcode_handler( $tag ) {
|
|
100 |
if ( '' !== $tabindex_att )
|
101 |
$atts .= sprintf( ' tabindex="%d"', $tabindex_att );
|
102 |
|
|
|
|
|
|
|
103 |
$html = '<input type="text" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';
|
104 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
105 |
|
22 |
|
23 |
$validation_error = wpcf7_get_validation_error( $name );
|
24 |
|
25 |
+
$atts = $id_att = $size_att = $maxlength_att = $tabindex_att = $title_att = '';
|
26 |
+
|
27 |
+
$class_att = wpcf7_form_controls_class( $type );
|
|
|
|
|
|
|
28 |
|
29 |
if ( 'captchac' == $type )
|
30 |
$class_att .= ' wpcf7-captcha-' . $name;
|
31 |
|
32 |
+
if ( $validation_error && 'captchar' == $type )
|
33 |
+
$class_att .= ' wpcf7-not-valid';
|
34 |
+
|
35 |
foreach ( $options as $option ) {
|
36 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
37 |
$id_att = $matches[1];
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
// Value.
|
53 |
+
$value = '';
|
54 |
+
|
55 |
+
if ( 'captchar' == $type && ! wpcf7_is_posted() && isset( $values[0] ) ) {
|
56 |
+
$value = $values[0];
|
57 |
+
|
58 |
+
if ( wpcf7_script_is() && preg_grep( '%^watermark$%', $options ) ) {
|
59 |
+
$class_att .= ' wpcf7-use-title-as-watermark';
|
60 |
+
$title_att .= sprintf( ' %s', $value );
|
61 |
+
$value = '';
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
if ( $id_att )
|
66 |
$atts .= ' id="' . trim( $id_att ) . '"';
|
67 |
|
68 |
if ( $class_att )
|
69 |
$atts .= ' class="' . trim( $class_att ) . '"';
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
if ( 'captchac' == $type ) {
|
72 |
if ( ! class_exists( 'ReallySimpleCaptcha' ) ) {
|
73 |
return '<em>' . __( 'To use CAPTCHA, you need <a href="http://wordpress.org/extend/plugins/really-simple-captcha/">Really Simple CAPTCHA</a> plugin installed.', 'wpcf7' ) . '</em>';
|
107 |
if ( '' !== $tabindex_att )
|
108 |
$atts .= sprintf( ' tabindex="%d"', $tabindex_att );
|
109 |
|
110 |
+
if ( '' !== $title_att )
|
111 |
+
$atts .= sprintf( ' title="%s"', trim( esc_attr( $title_att ) ) );
|
112 |
+
|
113 |
$html = '<input type="text" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';
|
114 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
115 |
|
modules/checkbox.php
CHANGED
@@ -22,24 +22,19 @@ function wpcf7_checkbox_shortcode_handler( $tag ) {
|
|
22 |
if ( empty( $name ) )
|
23 |
return '';
|
24 |
|
25 |
-
$
|
26 |
-
|
27 |
-
$
|
28 |
-
$tabindex_att = '';
|
29 |
|
30 |
$defaults = array();
|
31 |
|
32 |
$label_first = false;
|
33 |
$use_label_element = false;
|
34 |
|
35 |
-
|
36 |
-
$class_att .= ' wpcf7-validates-as-required';
|
37 |
|
38 |
-
if (
|
39 |
-
$class_att .= ' wpcf7-
|
40 |
-
|
41 |
-
if ( 'radio' == $type )
|
42 |
-
$class_att .= ' wpcf7-radio';
|
43 |
|
44 |
foreach ( $options as $option ) {
|
45 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -131,8 +126,6 @@ function wpcf7_checkbox_shortcode_handler( $tag ) {
|
|
131 |
|
132 |
$html = '<span' . $atts . '>' . $html . '</span>';
|
133 |
|
134 |
-
$validation_error = wpcf7_get_validation_error( $name );
|
135 |
-
|
136 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
137 |
|
138 |
return $html;
|
@@ -148,21 +141,6 @@ add_filter( 'wpcf7_validate_radio', 'wpcf7_checkbox_validation_filter', 10, 2 );
|
|
148 |
function wpcf7_checkbox_validation_filter( $result, $tag ) {
|
149 |
$type = $tag['type'];
|
150 |
$name = $tag['name'];
|
151 |
-
$values = $tag['values'];
|
152 |
-
|
153 |
-
if ( ! empty( $_POST[$name] ) ) {
|
154 |
-
if ( is_array( $_POST[$name] ) ) {
|
155 |
-
foreach ( $_POST[$name] as $key => $value ) {
|
156 |
-
$value = stripslashes( $value );
|
157 |
-
if ( ! in_array( $value, (array) $values ) ) // Not in given choices.
|
158 |
-
unset( $_POST[$name][$key] );
|
159 |
-
}
|
160 |
-
} else {
|
161 |
-
$value = stripslashes( $_POST[$name] );
|
162 |
-
if ( ! in_array( $value, (array) $values ) ) // Not in given choices.
|
163 |
-
$_POST[$name] = '';
|
164 |
-
}
|
165 |
-
}
|
166 |
|
167 |
if ( 'checkbox*' == $type ) {
|
168 |
if ( empty( $_POST[$name] ) ) {
|
22 |
if ( empty( $name ) )
|
23 |
return '';
|
24 |
|
25 |
+
$validation_error = wpcf7_get_validation_error( $name );
|
26 |
+
|
27 |
+
$atts = $id_att = $tabindex_att = '';
|
|
|
28 |
|
29 |
$defaults = array();
|
30 |
|
31 |
$label_first = false;
|
32 |
$use_label_element = false;
|
33 |
|
34 |
+
$class_att = wpcf7_form_controls_class( $type );
|
|
|
35 |
|
36 |
+
if ( $validation_error )
|
37 |
+
$class_att .= ' wpcf7-not-valid';
|
|
|
|
|
|
|
38 |
|
39 |
foreach ( $options as $option ) {
|
40 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
126 |
|
127 |
$html = '<span' . $atts . '>' . $html . '</span>';
|
128 |
|
|
|
|
|
129 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
130 |
|
131 |
return $html;
|
141 |
function wpcf7_checkbox_validation_filter( $result, $tag ) {
|
142 |
$type = $tag['type'];
|
143 |
$name = $tag['name'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
if ( 'checkbox*' == $type ) {
|
146 |
if ( empty( $_POST[$name] ) ) {
|
modules/file.php
CHANGED
@@ -20,16 +20,14 @@ function wpcf7_file_shortcode_handler( $tag ) {
|
|
20 |
if ( empty( $name ) )
|
21 |
return '';
|
22 |
|
23 |
-
$
|
24 |
-
|
25 |
-
$
|
26 |
-
$size_att = '';
|
27 |
-
$tabindex_att = '';
|
28 |
|
29 |
-
$class_att
|
30 |
|
31 |
-
if (
|
32 |
-
$class_att .= ' wpcf7-
|
33 |
|
34 |
foreach ( $options as $option ) {
|
35 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -63,8 +61,6 @@ function wpcf7_file_shortcode_handler( $tag ) {
|
|
63 |
|
64 |
$html = '<input type="file" name="' . $name . '"' . $atts . ' value="1" />';
|
65 |
|
66 |
-
$validation_error = wpcf7_get_validation_error( $name );
|
67 |
-
|
68 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
69 |
|
70 |
return $html;
|
@@ -95,7 +91,7 @@ function wpcf7_file_validation_filter( $result, $tag ) {
|
|
95 |
$name = $tag['name'];
|
96 |
$options = (array) $tag['options'];
|
97 |
|
98 |
-
$file = $_FILES[$name];
|
99 |
|
100 |
if ( $file['error'] && UPLOAD_ERR_NO_FILE != $file['error'] ) {
|
101 |
$result['valid'] = false;
|
20 |
if ( empty( $name ) )
|
21 |
return '';
|
22 |
|
23 |
+
$validation_error = wpcf7_get_validation_error( $name );
|
24 |
+
|
25 |
+
$atts = $id_att = $size_att = $tabindex_att = '';
|
|
|
|
|
26 |
|
27 |
+
$class_att = wpcf7_form_controls_class( $type );
|
28 |
|
29 |
+
if ( $validation_error )
|
30 |
+
$class_att .= ' wpcf7-not-valid';
|
31 |
|
32 |
foreach ( $options as $option ) {
|
33 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
61 |
|
62 |
$html = '<input type="file" name="' . $name . '"' . $atts . ' value="1" />';
|
63 |
|
|
|
|
|
64 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
65 |
|
66 |
return $html;
|
91 |
$name = $tag['name'];
|
92 |
$options = (array) $tag['options'];
|
93 |
|
94 |
+
$file = isset( $_FILES[$name] ) ? $_FILES[$name] : null;
|
95 |
|
96 |
if ( $file['error'] && UPLOAD_ERR_NO_FILE != $file['error'] ) {
|
97 |
$result['valid'] = false;
|
modules/quiz.php
CHANGED
@@ -19,14 +19,14 @@ function wpcf7_quiz_shortcode_handler( $tag ) {
|
|
19 |
if ( empty( $name ) )
|
20 |
return '';
|
21 |
|
22 |
-
$
|
23 |
-
|
24 |
-
$
|
25 |
-
|
26 |
-
$
|
27 |
-
$tabindex_att = '';
|
28 |
|
29 |
-
|
|
|
30 |
|
31 |
foreach ( $options as $option ) {
|
32 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -78,8 +78,6 @@ function wpcf7_quiz_shortcode_handler( $tag ) {
|
|
78 |
$html .= '<input type="text" name="' . $name . '"' . $atts . ' />';
|
79 |
$html .= '<input type="hidden" name="_wpcf7_quiz_answer_' . $name . '" value="' . wp_hash( $answer, 'wpcf7_quiz' ) . '" />';
|
80 |
|
81 |
-
$validation_error = wpcf7_get_validation_error( $name );
|
82 |
-
|
83 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
84 |
|
85 |
return $html;
|
@@ -97,6 +95,7 @@ function wpcf7_quiz_validation_filter( $result, $tag ) {
|
|
97 |
$answer = wpcf7_canonicalize( $_POST[$name] );
|
98 |
$answer_hash = wp_hash( $answer, 'wpcf7_quiz' );
|
99 |
$expected_hash = $_POST['_wpcf7_quiz_answer_' . $name];
|
|
|
100 |
if ( $answer_hash != $expected_hash ) {
|
101 |
$result['valid'] = false;
|
102 |
$result['reason'][$name] = wpcf7_get_message( 'quiz_answer_not_correct' );
|
19 |
if ( empty( $name ) )
|
20 |
return '';
|
21 |
|
22 |
+
$validation_error = wpcf7_get_validation_error( $name );
|
23 |
+
|
24 |
+
$atts = $id_att = $size_att = $maxlength_att = $tabindex_att = '';
|
25 |
+
|
26 |
+
$class_att = wpcf7_form_controls_class( $type );
|
|
|
27 |
|
28 |
+
if ( $validation_error )
|
29 |
+
$class_att .= ' wpcf7-not-valid';
|
30 |
|
31 |
foreach ( $options as $option ) {
|
32 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
78 |
$html .= '<input type="text" name="' . $name . '"' . $atts . ' />';
|
79 |
$html .= '<input type="hidden" name="_wpcf7_quiz_answer_' . $name . '" value="' . wp_hash( $answer, 'wpcf7_quiz' ) . '" />';
|
80 |
|
|
|
|
|
81 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
82 |
|
83 |
return $html;
|
95 |
$answer = wpcf7_canonicalize( $_POST[$name] );
|
96 |
$answer_hash = wp_hash( $answer, 'wpcf7_quiz' );
|
97 |
$expected_hash = $_POST['_wpcf7_quiz_answer_' . $name];
|
98 |
+
|
99 |
if ( $answer_hash != $expected_hash ) {
|
100 |
$result['valid'] = false;
|
101 |
$result['reason'][$name] = wpcf7_get_message( 'quiz_answer_not_correct' );
|
modules/select.php
CHANGED
@@ -21,17 +21,16 @@ function wpcf7_select_shortcode_handler( $tag ) {
|
|
21 |
if ( empty( $name ) )
|
22 |
return '';
|
23 |
|
24 |
-
$
|
25 |
-
|
26 |
-
$
|
27 |
-
$tabindex_att = '';
|
28 |
|
29 |
$defaults = array();
|
30 |
|
31 |
-
$class_att
|
32 |
|
33 |
-
if (
|
34 |
-
$class_att .= ' wpcf7-
|
35 |
|
36 |
foreach ( $options as $option ) {
|
37 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -64,7 +63,7 @@ function wpcf7_select_shortcode_handler( $tag ) {
|
|
64 |
$empty_select = empty( $values );
|
65 |
if ( $empty_select || $include_blank ) {
|
66 |
array_unshift( $labels, '---' );
|
67 |
-
array_unshift( $values, '
|
68 |
}
|
69 |
|
70 |
$html = '';
|
@@ -99,8 +98,6 @@ function wpcf7_select_shortcode_handler( $tag ) {
|
|
99 |
|
100 |
$html = '<select name="' . $name . ( $multiple ? '[]' : '' ) . '"' . $atts . '>' . $html . '</select>';
|
101 |
|
102 |
-
$validation_error = wpcf7_get_validation_error( $name );
|
103 |
-
|
104 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
105 |
|
106 |
return $html;
|
@@ -115,19 +112,11 @@ add_filter( 'wpcf7_validate_select*', 'wpcf7_select_validation_filter', 10, 2 );
|
|
115 |
function wpcf7_select_validation_filter( $result, $tag ) {
|
116 |
$type = $tag['type'];
|
117 |
$name = $tag['name'];
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
$value = stripslashes( $value );
|
124 |
-
if ( ! in_array( $value, (array) $values ) ) // Not in given choices.
|
125 |
-
unset( $_POST[$name][$key] );
|
126 |
-
}
|
127 |
-
} else {
|
128 |
-
$value = stripslashes( $_POST[$name] );
|
129 |
-
if ( ! in_array( $value, (array) $values ) ) // Not in given choices.
|
130 |
-
$_POST[$name] = '';
|
131 |
}
|
132 |
}
|
133 |
|
21 |
if ( empty( $name ) )
|
22 |
return '';
|
23 |
|
24 |
+
$validation_error = wpcf7_get_validation_error( $name );
|
25 |
+
|
26 |
+
$atts = $id_att = $tabindex_att = '';
|
|
|
27 |
|
28 |
$defaults = array();
|
29 |
|
30 |
+
$class_att = wpcf7_form_controls_class( $type );
|
31 |
|
32 |
+
if ( $validation_error )
|
33 |
+
$class_att .= ' wpcf7-not-valid';
|
34 |
|
35 |
foreach ( $options as $option ) {
|
36 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
63 |
$empty_select = empty( $values );
|
64 |
if ( $empty_select || $include_blank ) {
|
65 |
array_unshift( $labels, '---' );
|
66 |
+
array_unshift( $values, '' );
|
67 |
}
|
68 |
|
69 |
$html = '';
|
98 |
|
99 |
$html = '<select name="' . $name . ( $multiple ? '[]' : '' ) . '"' . $atts . '>' . $html . '</select>';
|
100 |
|
|
|
|
|
101 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
102 |
|
103 |
return $html;
|
112 |
function wpcf7_select_validation_filter( $result, $tag ) {
|
113 |
$type = $tag['type'];
|
114 |
$name = $tag['name'];
|
115 |
+
|
116 |
+
if ( isset( $_POST[$name] ) && is_array( $_POST[$name] ) ) {
|
117 |
+
foreach ( $_POST[$name] as $key => $value ) {
|
118 |
+
if ( '' === $value )
|
119 |
+
unset( $_POST[$name][$key] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
}
|
122 |
|
modules/submit.php
CHANGED
@@ -14,12 +14,9 @@ function wpcf7_submit_shortcode_handler( $tag ) {
|
|
14 |
$options = (array) $tag['options'];
|
15 |
$values = (array) $tag['values'];
|
16 |
|
17 |
-
$atts = '';
|
18 |
-
$id_att = '';
|
19 |
-
$class_att = '';
|
20 |
-
$tabindex_att = '';
|
21 |
|
22 |
-
$class_att
|
23 |
|
24 |
foreach ( $options as $option ) {
|
25 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -49,11 +46,6 @@ function wpcf7_submit_shortcode_handler( $tag ) {
|
|
49 |
|
50 |
$html = '<input type="submit" value="' . esc_attr( $value ) . '"' . $atts . ' />';
|
51 |
|
52 |
-
if ( wpcf7_script_is() ) {
|
53 |
-
$src = apply_filters( 'wpcf7_ajax_loader', wpcf7_plugin_url( 'images/ajax-loader.gif' ) );
|
54 |
-
$html .= '<img class="ajax-loader" style="visibility: hidden;" alt="' . esc_attr( __( 'Sending ...', 'wpcf7' ) ) . '" src="' . esc_url_raw( $src ) . '" />';
|
55 |
-
}
|
56 |
-
|
57 |
return $html;
|
58 |
}
|
59 |
|
14 |
$options = (array) $tag['options'];
|
15 |
$values = (array) $tag['values'];
|
16 |
|
17 |
+
$atts = $id_att = $tabindex_att = '';
|
|
|
|
|
|
|
18 |
|
19 |
+
$class_att = wpcf7_form_controls_class( 'submit' );
|
20 |
|
21 |
foreach ( $options as $option ) {
|
22 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
46 |
|
47 |
$html = '<input type="submit" value="' . esc_attr( $value ) . '"' . $atts . ' />';
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
return $html;
|
50 |
}
|
51 |
|
modules/text.php
CHANGED
@@ -22,21 +22,18 @@ function wpcf7_text_shortcode_handler( $tag ) {
|
|
22 |
if ( empty( $name ) )
|
23 |
return '';
|
24 |
|
25 |
-
$
|
26 |
-
|
27 |
-
$
|
28 |
-
$
|
29 |
-
$maxlength_att = '';
|
30 |
-
$tabindex_att = '';
|
31 |
-
$title_att = '';
|
32 |
|
33 |
-
$class_att
|
34 |
|
35 |
if ( 'email' == $type || 'email*' == $type )
|
36 |
$class_att .= ' wpcf7-validates-as-email';
|
37 |
|
38 |
-
if (
|
39 |
-
$class_att .= ' wpcf7-
|
40 |
|
41 |
foreach ( $options as $option ) {
|
42 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -61,6 +58,25 @@ function wpcf7_text_shortcode_handler( $tag ) {
|
|
61 |
$class_att .= ' wpcf7-use-title-as-watermark';
|
62 |
$title_att .= sprintf( ' %s', $value );
|
63 |
$value = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
|
66 |
if ( wpcf7_is_posted() && isset( $_POST[$name] ) )
|
@@ -88,8 +104,6 @@ function wpcf7_text_shortcode_handler( $tag ) {
|
|
88 |
|
89 |
$html = '<input type="text" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';
|
90 |
|
91 |
-
$validation_error = wpcf7_get_validation_error( $name );
|
92 |
-
|
93 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
94 |
|
95 |
return $html;
|
22 |
if ( empty( $name ) )
|
23 |
return '';
|
24 |
|
25 |
+
$validation_error = wpcf7_get_validation_error( $name );
|
26 |
+
|
27 |
+
$atts = $id_att = $size_att = $maxlength_att = '';
|
28 |
+
$tabindex_att = $title_att = '';
|
|
|
|
|
|
|
29 |
|
30 |
+
$class_att = wpcf7_form_controls_class( $type, 'wpcf7-text' );
|
31 |
|
32 |
if ( 'email' == $type || 'email*' == $type )
|
33 |
$class_att .= ' wpcf7-validates-as-email';
|
34 |
|
35 |
+
if ( $validation_error )
|
36 |
+
$class_att .= ' wpcf7-not-valid';
|
37 |
|
38 |
foreach ( $options as $option ) {
|
39 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
58 |
$class_att .= ' wpcf7-use-title-as-watermark';
|
59 |
$title_att .= sprintf( ' %s', $value );
|
60 |
$value = '';
|
61 |
+
|
62 |
+
} elseif ( empty( $value ) && is_user_logged_in() ) {
|
63 |
+
$user = wp_get_current_user();
|
64 |
+
|
65 |
+
$user_options = array(
|
66 |
+
'default:user_login' => 'user_login',
|
67 |
+
'default:user_email' => 'user_email',
|
68 |
+
'default:user_url' => 'user_url',
|
69 |
+
'default:user_first_name' => 'first_name',
|
70 |
+
'default:user_last_name' => 'last_name',
|
71 |
+
'default:user_nickname' => 'nickname',
|
72 |
+
'default:user_display_name' => 'display_name' );
|
73 |
+
|
74 |
+
foreach ( $user_options as $option => $prop ) {
|
75 |
+
if ( preg_grep( '%^' . $option . '$%', $options ) ) {
|
76 |
+
$value = $user->{$prop};
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
}
|
80 |
}
|
81 |
|
82 |
if ( wpcf7_is_posted() && isset( $_POST[$name] ) )
|
104 |
|
105 |
$html = '<input type="text" name="' . $name . '" value="' . esc_attr( $value ) . '"' . $atts . ' />';
|
106 |
|
|
|
|
|
107 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
108 |
|
109 |
return $html;
|
modules/textarea.php
CHANGED
@@ -21,6 +21,8 @@ function wpcf7_textarea_shortcode_handler( $tag ) {
|
|
21 |
if ( empty( $name ) )
|
22 |
return '';
|
23 |
|
|
|
|
|
24 |
$atts = '';
|
25 |
$id_att = '';
|
26 |
$class_att = '';
|
@@ -29,8 +31,10 @@ function wpcf7_textarea_shortcode_handler( $tag ) {
|
|
29 |
$tabindex_att = '';
|
30 |
$title_att = '';
|
31 |
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
|
35 |
foreach ( $options as $option ) {
|
36 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
@@ -87,8 +91,6 @@ function wpcf7_textarea_shortcode_handler( $tag ) {
|
|
87 |
|
88 |
$html = '<textarea name="' . $name . '"' . $atts . '>' . esc_textarea( $value ) . '</textarea>';
|
89 |
|
90 |
-
$validation_error = wpcf7_get_validation_error( $name );
|
91 |
-
|
92 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
93 |
|
94 |
return $html;
|
21 |
if ( empty( $name ) )
|
22 |
return '';
|
23 |
|
24 |
+
$validation_error = wpcf7_get_validation_error( $name );
|
25 |
+
|
26 |
$atts = '';
|
27 |
$id_att = '';
|
28 |
$class_att = '';
|
31 |
$tabindex_att = '';
|
32 |
$title_att = '';
|
33 |
|
34 |
+
$class_att = wpcf7_form_controls_class( $type );
|
35 |
+
|
36 |
+
if ( $validation_error )
|
37 |
+
$class_att .= ' wpcf7-not-valid';
|
38 |
|
39 |
foreach ( $options as $option ) {
|
40 |
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
91 |
|
92 |
$html = '<textarea name="' . $name . '"' . $atts . '>' . esc_textarea( $value ) . '</textarea>';
|
93 |
|
|
|
|
|
94 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
95 |
|
96 |
return $html;
|
readme.txt
CHANGED
@@ -1,145 +1,132 @@
|
|
1 |
-
=== Contact Form 7 ===
|
2 |
-
Contributors: takayukister
|
3 |
-
Donate link: http://contactform7.com/donate/
|
4 |
-
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
|
5 |
-
Requires at least: 3.2
|
6 |
-
Tested up to: 3.3
|
7 |
-
Stable tag: 3.
|
8 |
-
|
9 |
-
Just another contact form plugin. Simple but flexible.
|
10 |
-
|
11 |
-
== Description ==
|
12 |
-
|
13 |
-
Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
|
14 |
-
|
15 |
-
= Plugin's Official Site =
|
16 |
-
|
17 |
-
Contact Form 7 ([http://contactform7.com](http://contactform7.com/))
|
18 |
-
|
19 |
-
* [Docs](http://contactform7.com/docs/) - [FAQ](http://contactform7.com/faq/) - [Support](http://contactform7.com/support/)
|
20 |
-
|
21 |
-
= Contact Form 7 Needs Your Support =
|
22 |
-
|
23 |
-
It is hard to continue development and support for this plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider [__making a donation__](http://contactform7.com/donate/). Your donation will help encourage and support the plugin's continued development and better user support.
|
24 |
-
|
25 |
-
= Translators =
|
26 |
-
|
27 |
-
* Afrikaans (af) - [Schalk Burger](http://www.schalkburger.za.net/)
|
28 |
-
* Albanian (sq) - [Olgi Zenullari](http://www.olgizenullari.com/)
|
29 |
-
* Arabic (ar) - [Tarek Chaaban](http://www.chaaban.info/), Muhammed Lardi, [Yaser
|
30 |
-
* Armenian (hy_AM) - [Emmanuelle Traduction](http://www.translatonline.com/)
|
31 |
-
*
|
32 |
-
*
|
33 |
-
*
|
34 |
-
*
|
35 |
-
*
|
36 |
-
*
|
37 |
-
*
|
38 |
-
* Chinese,
|
39 |
-
*
|
40 |
-
*
|
41 |
-
*
|
42 |
-
*
|
43 |
-
*
|
44 |
-
*
|
45 |
-
*
|
46 |
-
*
|
47 |
-
*
|
48 |
-
*
|
49 |
-
*
|
50 |
-
*
|
51 |
-
*
|
52 |
-
*
|
53 |
-
*
|
54 |
-
*
|
55 |
-
*
|
56 |
-
*
|
57 |
-
*
|
58 |
-
*
|
59 |
-
*
|
60 |
-
*
|
61 |
-
*
|
62 |
-
*
|
63 |
-
*
|
64 |
-
*
|
65 |
-
*
|
66 |
-
*
|
67 |
-
*
|
68 |
-
*
|
69 |
-
*
|
70 |
-
*
|
71 |
-
*
|
72 |
-
*
|
73 |
-
*
|
74 |
-
*
|
75 |
-
*
|
76 |
-
*
|
77 |
-
*
|
78 |
-
*
|
79 |
-
*
|
80 |
-
*
|
81 |
-
*
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
[
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
*
|
119 |
-
*
|
120 |
-
*
|
121 |
-
*
|
122 |
-
*
|
123 |
-
*
|
124 |
-
*
|
125 |
-
*
|
126 |
-
*
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
* Added sanitization for $_POST['_wpcf7_unit_tag'] value for avoiding possible abuse.
|
134 |
-
* Updated jquery.form.js to 2.87.
|
135 |
-
* Translations for Tagalog, Belarusian, and Maltese have been created.
|
136 |
-
* Translations for Italian, German, Japanese, Russian, Latvian, and Afrikaans have been updated.
|
137 |
-
|
138 |
-
= 3.0 =
|
139 |
-
|
140 |
-
* Contact Form 7 3.0 utilizes Custom Post Types feature to save contact forms. It does not create its own table (contact_form_7) anymore.
|
141 |
-
* New shortcode format has been introduced. New format is like this: [contact-form-7 id="1234" title="Contact form 1"]. Note that new one starts with contact-form-7 instead of contact-form.
|
142 |
-
* Contact Form 7 3.0 works with WordPress version 3.2 or higher. This also means that you need PHP version 5.2.4 or higher and MySQL version 5.0 or higher (these are minimum requirements for WordPress 3.2).
|
143 |
-
* Translations for Japanese, German, Georgian, Italian and Spanish have been updated.
|
144 |
-
* Admin panel has been enhanced. Now it uses meta boxes.
|
145 |
-
* Bundled jquery.form.js has been updated to 2.84.
|
1 |
+
=== Contact Form 7 ===
|
2 |
+
Contributors: takayukister
|
3 |
+
Donate link: http://contactform7.com/donate/
|
4 |
+
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
|
5 |
+
Requires at least: 3.2
|
6 |
+
Tested up to: 3.3.1
|
7 |
+
Stable tag: 3.1
|
8 |
+
|
9 |
+
Just another contact form plugin. Simple but flexible.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
|
14 |
+
|
15 |
+
= Plugin's Official Site =
|
16 |
+
|
17 |
+
Contact Form 7 ([http://contactform7.com](http://contactform7.com/))
|
18 |
+
|
19 |
+
* [Docs](http://contactform7.com/docs/) - [FAQ](http://contactform7.com/faq/) - [Support](http://contactform7.com/support/)
|
20 |
+
|
21 |
+
= Contact Form 7 Needs Your Support =
|
22 |
+
|
23 |
+
It is hard to continue development and support for this plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider [__making a donation__](http://contactform7.com/donate/). Your donation will help encourage and support the plugin's continued development and better user support.
|
24 |
+
|
25 |
+
= Translators =
|
26 |
+
|
27 |
+
* Afrikaans (af) - [Schalk Burger](http://www.schalkburger.za.net/)
|
28 |
+
* Albanian (sq) - [Olgi Zenullari](http://www.olgizenullari.com/)
|
29 |
+
* Arabic (ar) - [Tarek Chaaban](http://www.chaaban.info/), Muhammed Lardi, [Yaser Maadan](http://www.englize.com/)
|
30 |
+
* Armenian (hy_AM) - [Emmanuelle Traduction](http://www.translatonline.com/)
|
31 |
+
* Azeri (az_AZ) - [Zaur Bayramov](http://bloglayaq.com/)
|
32 |
+
* Bangla (bn_BD) - [SM Mehdi Akram](http://www.shamokaldarpon.com/)
|
33 |
+
* Belarusian (be_BY) - [Igor Dubilei](http://www.iflexion.com/)
|
34 |
+
* Bosnian (bs) - [Vedran](http://www.seorabbit.com/)
|
35 |
+
* Brazilian Portuguese (pt_BR) - [Leonardo Pinheiro](http://www.eletrikabarbarella.com.br/), [Henrique Vianna](http://henriquevianna.com/), [Caciano Gabriel Batista](http://www.gn10.com.br/), [Gervásio Antônio](http://twitter.com/gervasioantonio)
|
36 |
+
* Bulgarian (bg_BG) - [Iliyan Darganov](http://www.darganov.com/)
|
37 |
+
* Catalan (ca) - [Jordi Sancho](http://www.qasolutions.net/blog), Robert Buj
|
38 |
+
* Chinese, Simplified (zh_CN) - [Soz](http://www.webtoolol.com/), [Keefe Dunn](http://dengkefu.com/)
|
39 |
+
* Chinese, Traditional (zh_TW) - [James Wu](http://jameswublog.com)
|
40 |
+
* Croatian (hr) - [tolingo Translation Services](http://www.tolingo.com)
|
41 |
+
* Czech (cs_CZ) - Korry, [Radovan Fiser](http://algymsa.cz/), [Tomas Vesely](http://www.mcmotylek.cz/)
|
42 |
+
* Danish (da_DK) - [Jens Griebel](http://www.kompas-it.dk/), [Georg S. Adamsen](http://wordpress.blogos.dk/)
|
43 |
+
* Dutch (nl_NL) - [Chris Devriese](http://www.100it.be/), [Martin Hein](http://www.split-a-pixel.nl/), [Rene](http://wpwebshop.com/)
|
44 |
+
* Esperanto (eo_EO) - Arkadiusz Zychewicz
|
45 |
+
* Estonian (et) - [Peeter Rahuvarm](http://www.kraabus.ee), Egon Elbre
|
46 |
+
* Finnish (fi) - [Miika Turunen](http://www.webwork.fi/), [Mediajalostamo](http://www.mediajalostamo.fi/)
|
47 |
+
* French (fr_FR) - [Jillij](http://www.jillij.com/), [Oncle Tom](http://case.oncle-tom.net/), [Maître Mô](http://maitremo.fr/)
|
48 |
+
* Galician (gl_ES) - [Arume Desenvolvementos Informáticos](http://www.arumeinformatica.es/)
|
49 |
+
* Georgian (ka_GE) - [Nodar Rocko Davituri](http://davituri.com/)
|
50 |
+
* German (de_DE) - [Marcel Spitau](http://blog.spitau.de), [Ivan Graf](http://blog.bildergallery.com/)
|
51 |
+
* Greek (el) - [Nick Mouratidis](http://www.kepik.gr/), [Pr. friedlich](http://friedlich.wordpress.com/)
|
52 |
+
* Hebrew (he_IL) - [Yaron Ofer](http://www.gadgetguru.co.il/)
|
53 |
+
* Hindi (hi_IN) - [Tarun Joshi](http://www.readers-cafe.net/), [Ashish](http://outshinesolutions.com/)
|
54 |
+
* Hungarian (hu_HU) - [Andras Hirschler](http://hia.itblog.hu/), [János Csárdi-Braunstein](http://blogocska.org/), [Farkas Győző](http://www.sakraft.hu/)
|
55 |
+
* Indonesian (Bahasa Indonesia; id_ID) - [Hendry Lee](http://blogbuildingu.com/), [Belajar Seo Indonesia](http://dhany.web.id/panduan-seo)
|
56 |
+
* Italian (it_IT) - [Bruno](http://www.brunosalzano.com), [Gianni Diurno](http://gidibao.net/)
|
57 |
+
* Japanese (ja) - [Takayuki Miyoshi](http://ideasilo.wordpress.com)
|
58 |
+
* Korean (ko_KR) - Seong Eun Lee, [Jong-In Kim](http://incommunity.codex.kr/wordpress/)
|
59 |
+
* Latvian (lv) - [Sandis Veinbergs](http://www.kleofass.lv/)
|
60 |
+
* Lithuanian (lt_LT) - [Ernestas Kardzys](http://www.ernestas.info/)
|
61 |
+
* Macedonian (mk_MK) - [Darko](http://www.findermind.com/)
|
62 |
+
* Malay (ms_MY) - [Zairul Azmil](http://www.zairul.com/)
|
63 |
+
* Malayalam (ml_IN) - [RAHUL.S.A](http://www.infution.co.cc/)
|
64 |
+
* Maltese (mt_MT) - [Ajoft Technologies](http://www.ajoft.com/)
|
65 |
+
* Norwegian (nb_NO) - Kjetil M. Bergem, [aanvik.net](http://www.aanvik.net), [Peter Holme](http://holme.se/nettsteder/)
|
66 |
+
* Persian (Farsi; fa_IR) - [Mohammad Musavi](http://www.musavis.com/), [Mohsen Firoozmandan](http://www.rankbazar.com/)
|
67 |
+
* Polish (pl_PL) - [Zbigniew Czernik](http://zibik.jogger.pl/), [Daniel Fruzynski](http://www.poradnik-webmastera.com), [RafalDesign](http://www.rafaldesign.pl/)
|
68 |
+
* Portuguese (pt_PT) - [Hugo Baeta](http://hugobaeta.com), [Pedro Nave](http://pedronave.com/)
|
69 |
+
* Russian (ru_RU) - Dmitry Volotovich, [kg69design](http://kg69design.com/), [Denis Voituk](http://artprima.cz/)
|
70 |
+
* Romanian (ro_RO) - [Stas Sushkov](http://stas.nerd.ro/), [Anunturi Jibo](http://www.jibo.ro/), [Marius Olar](http://webdudes.ro/)
|
71 |
+
* Serbian (sr_RS) - [Vedran](http://www.seorabbit.com/), [Aleksandar Urošević](http://blog.urosevic.net/)
|
72 |
+
* Sinhala (si_LK) - [Nitin Aggarwal](http://offshoreally.com/)
|
73 |
+
* Slovak (sk_SK) - [Patrik Bóna](http://www.mrhead.sk/)
|
74 |
+
* Slovene (sl_SI) - [Mihael Simonič](http://smihael.bplaced.net)
|
75 |
+
* Spanish (es_ES) - [Jordi Sancho](http://www.qasolutions.net/blog), [Vladimir Prieto](http://vladimir.prie.to/), [Federico Mikaelian](http://www.fedemika.com.ar/), [Matias Baldanza](http://matiasbaldanza.com/), [Carlos Agnese](http://albumdecarlitos.com.ar/)
|
76 |
+
* Swedish (sv_SE) - [Fredrik Jonsson](http://www.fredda-o-ac.se/), [the Swedish community](http://wp-support.se/)
|
77 |
+
* Tagalog (tl) - [Rupert Agnew Lanuza](http://wheretobuy.com.ph/)
|
78 |
+
* Tamil (ta) - [Nitin Aggarwal](http://offshoreally.com/)
|
79 |
+
* Thai (th) - [kazama](http://blog.wordthai.com/), [ToshiK](http://www.tuntikorn.com/)
|
80 |
+
* Turkish (tr_TR) - [Roman Neumuller](http://katpatuka.wordpress.com), [Hasan Yılmaz](http://hedefturkce.com/), [Emin Buğra Saral](http://www.rahmetli.info/)
|
81 |
+
* Ukrainian (uk) - [Andrey Kovba](http://myserver.com.ua/), [Ukrainian WordPress localization team](http://wordpress.co.ua/plugins/contact-form-7.html)
|
82 |
+
* Vietnamese (vi) - Thanh Hải, Hà, [Khang Minh](http://betterwp.net/)
|
83 |
+
|
84 |
+
If you have created your own language pack, or have an update of an existing one, you can send [gettext PO and MO files](http://codex.wordpress.org/Translating_WordPress) to [me](http://ideasilo.wordpress.com/about/) so that I can bundle it into Contact Form 7. You can download the latest [POT file](http://plugins.svn.wordpress.org/contact-form-7/trunk/languages/wpcf7.pot), and [PO files in each language](http://plugins.svn.wordpress.org/contact-form-7/branches/languages/).
|
85 |
+
|
86 |
+
= Icon Design =
|
87 |
+
|
88 |
+
* [Takao Honda](http://www.takaohonda.jp/)
|
89 |
+
|
90 |
+
== Installation ==
|
91 |
+
|
92 |
+
1. Upload the entire `contact-form-7` folder to the `/wp-content/plugins/` directory.
|
93 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
94 |
+
|
95 |
+
You will find 'Contact' menu in your WordPress admin panel.
|
96 |
+
|
97 |
+
For basic usage, you can also have a look at the [plugin homepage](http://contactform7.com/).
|
98 |
+
|
99 |
+
== Frequently Asked Questions ==
|
100 |
+
|
101 |
+
Do you have questions or issues with Contact Form 7? Use these support channels appropriately.
|
102 |
+
|
103 |
+
1. [Docs](http://contactform7.com/docs/)
|
104 |
+
1. [FAQ](http://contactform7.com/faq/)
|
105 |
+
1. [Support Forum](http://wordpress.org/tags/contact-form-7?forum_id=10)
|
106 |
+
1. [WordPress HelpCenter](http://wphelpcenter.com/)
|
107 |
+
|
108 |
+
[Support](http://contactform7.com/support/)
|
109 |
+
|
110 |
+
== Screenshots ==
|
111 |
+
|
112 |
+
1. screenshot-1.png
|
113 |
+
|
114 |
+
== Changelog ==
|
115 |
+
|
116 |
+
= 3.1 =
|
117 |
+
|
118 |
+
* Offer nonce verification for contact forms.
|
119 |
+
* Add several options to retrieve logged-in user info as default value of field.
|
120 |
+
* Introduce wpcf7_validate filter for validation independent from specific form tag type.
|
121 |
+
* Search contact form by title when failed to find by ID.
|
122 |
+
* Include all $_POST variables into $cf->posted_data and make them referable from mail.
|
123 |
+
* Add watermark option to captchar (CAPTCHA-response) field.
|
124 |
+
* Introduce wpcf7_ajax_loader() function and wpcf7_ajax_loader filter.
|
125 |
+
* Introduce wpcf7_akismet_comment_check filter.
|
126 |
+
* Introduce menu icons created by Takao Honda.
|
127 |
+
* Translation for Azeri has been created.
|
128 |
+
* Translations for Italian, Russian, Arabic, Danish, Persian, Romanian, and Portuguese have been updated.
|
129 |
+
|
130 |
+
== Upgrade Notice ==
|
131 |
+
|
132 |
+
The current version of Contact Form 7 requires WordPress 3.2 or higher. If you use older version of WordPress, you need to upgrade WordPress first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scripts.js
CHANGED
@@ -1,198 +1,219 @@
|
|
1 |
-
(function($) {
|
2 |
-
|
3 |
-
$(function() {
|
4 |
-
try {
|
5 |
-
if (typeof _wpcf7 == 'undefined' || _wpcf7 === null)
|
6 |
-
_wpcf7 = {};
|
7 |
-
|
8 |
-
_wpcf7 = $.extend({ cached: 0 }, _wpcf7);
|
9 |
-
|
10 |
-
$('div.wpcf7 > form').ajaxForm({
|
11 |
-
beforeSubmit: function(formData, jqForm, options) {
|
12 |
-
jqForm.wpcf7ClearResponseOutput();
|
13 |
-
jqForm.find('img.ajax-loader').css({ visibility: 'visible' });
|
14 |
-
return true;
|
15 |
-
},
|
16 |
-
beforeSerialize: function(jqForm, options) {
|
17 |
-
jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
|
18 |
-
$(n).val('');
|
19 |
-
});
|
20 |
-
return true;
|
21 |
-
},
|
22 |
-
data: { '_wpcf7_is_ajax_call': 1 },
|
23 |
-
dataType: 'json',
|
24 |
-
success: function(data) {
|
25 |
-
var ro = $(data.into).find('div.wpcf7-response-output');
|
26 |
-
$(data.into).wpcf7ClearResponseOutput();
|
27 |
-
|
28 |
-
if (data.invalids) {
|
29 |
-
$.each(data.invalids, function(i, n) {
|
30 |
-
$(data.into).find(n.into).wpcf7NotValidTip(n.message);
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
ro.addClass('wpcf7-mail-sent-ok');
|
47 |
-
|
48 |
-
if (data.onSentOk)
|
49 |
-
$.each(data.onSentOk, function(i, n) { eval(n) });
|
50 |
-
} else {
|
51 |
-
ro.addClass('wpcf7-mail-sent-ng');
|
52 |
-
}
|
53 |
-
|
54 |
-
if (data.onSubmit)
|
55 |
-
$.each(data.onSubmit, function(i, n) { eval(n) });
|
56 |
-
|
57 |
-
|
58 |
-
$(
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
input.
|
92 |
-
if (
|
93 |
-
$(this).val(
|
94 |
-
});
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
var
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
)
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
form.find('input
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
+
|
3 |
+
$(function() {
|
4 |
+
try {
|
5 |
+
if (typeof _wpcf7 == 'undefined' || _wpcf7 === null)
|
6 |
+
_wpcf7 = {};
|
7 |
+
|
8 |
+
_wpcf7 = $.extend({ cached: 0 }, _wpcf7);
|
9 |
+
|
10 |
+
$('div.wpcf7 > form').ajaxForm({
|
11 |
+
beforeSubmit: function(formData, jqForm, options) {
|
12 |
+
jqForm.wpcf7ClearResponseOutput();
|
13 |
+
jqForm.find('img.ajax-loader').css({ visibility: 'visible' });
|
14 |
+
return true;
|
15 |
+
},
|
16 |
+
beforeSerialize: function(jqForm, options) {
|
17 |
+
jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
|
18 |
+
$(n).val('');
|
19 |
+
});
|
20 |
+
return true;
|
21 |
+
},
|
22 |
+
data: { '_wpcf7_is_ajax_call': 1 },
|
23 |
+
dataType: 'json',
|
24 |
+
success: function(data) {
|
25 |
+
var ro = $(data.into).find('div.wpcf7-response-output');
|
26 |
+
$(data.into).wpcf7ClearResponseOutput();
|
27 |
+
|
28 |
+
if (data.invalids) {
|
29 |
+
$.each(data.invalids, function(i, n) {
|
30 |
+
$(data.into).find(n.into).wpcf7NotValidTip(n.message);
|
31 |
+
$(data.into).find(n.into).find('.wpcf7-form-control').addClass('wpcf7-not-valid');
|
32 |
+
});
|
33 |
+
ro.addClass('wpcf7-validation-errors');
|
34 |
+
}
|
35 |
+
|
36 |
+
if (data.captcha)
|
37 |
+
$(data.into).wpcf7RefillCaptcha(data.captcha);
|
38 |
+
|
39 |
+
if (data.quiz)
|
40 |
+
$(data.into).wpcf7RefillQuiz(data.quiz);
|
41 |
+
|
42 |
+
if (1 == data.spam)
|
43 |
+
ro.addClass('wpcf7-spam-blocked');
|
44 |
+
|
45 |
+
if (1 == data.mailSent) {
|
46 |
+
ro.addClass('wpcf7-mail-sent-ok');
|
47 |
+
|
48 |
+
if (data.onSentOk)
|
49 |
+
$.each(data.onSentOk, function(i, n) { eval(n) });
|
50 |
+
} else {
|
51 |
+
ro.addClass('wpcf7-mail-sent-ng');
|
52 |
+
}
|
53 |
+
|
54 |
+
if (data.onSubmit)
|
55 |
+
$.each(data.onSubmit, function(i, n) { eval(n) });
|
56 |
+
|
57 |
+
if (1 == data.mailSent)
|
58 |
+
$(data.into).find('form').resetForm().clearForm();
|
59 |
+
|
60 |
+
$(data.into).find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
|
61 |
+
$(n).val($(n).attr('title'));
|
62 |
+
});
|
63 |
+
|
64 |
+
$(data.into).wpcf7FillResponseOutput(data.message);
|
65 |
+
}
|
66 |
+
});
|
67 |
+
|
68 |
+
$('div.wpcf7 > form').each(function(i, n) {
|
69 |
+
if (_wpcf7.cached)
|
70 |
+
$(n).wpcf7OnloadRefill();
|
71 |
+
|
72 |
+
$(n).wpcf7ToggleSubmit();
|
73 |
+
|
74 |
+
$(n).find('.wpcf7-submit').wpcf7AjaxLoader();
|
75 |
+
|
76 |
+
$(n).find('.wpcf7-acceptance').click(function() {
|
77 |
+
$(n).wpcf7ToggleSubmit();
|
78 |
+
});
|
79 |
+
|
80 |
+
$(n).find('.wpcf7-exclusive-checkbox').each(function(i, n) {
|
81 |
+
$(n).find('input:checkbox').click(function() {
|
82 |
+
$(n).find('input:checkbox').not(this).removeAttr('checked');
|
83 |
+
});
|
84 |
+
});
|
85 |
+
|
86 |
+
$(n).find('.wpcf7-use-title-as-watermark').each(function(i, n) {
|
87 |
+
var input = $(n);
|
88 |
+
input.val(input.attr('title'));
|
89 |
+
input.addClass('watermark');
|
90 |
+
|
91 |
+
input.focus(function() {
|
92 |
+
if ($(this).hasClass('watermark'))
|
93 |
+
$(this).val('').removeClass('watermark');
|
94 |
+
});
|
95 |
+
|
96 |
+
input.blur(function() {
|
97 |
+
if ('' == $(this).val())
|
98 |
+
$(this).val($(this).attr('title')).addClass('watermark');
|
99 |
+
});
|
100 |
+
});
|
101 |
+
});
|
102 |
+
|
103 |
+
} catch (e) {
|
104 |
+
}
|
105 |
+
});
|
106 |
+
|
107 |
+
$.fn.wpcf7AjaxLoader = function() {
|
108 |
+
return this.each(function() {
|
109 |
+
var loader = $('<img class="ajax-loader" />')
|
110 |
+
.attr({ src: _wpcf7.loaderUrl, alt: _wpcf7.sending })
|
111 |
+
.css('visibility', 'hidden');
|
112 |
+
|
113 |
+
$(this).after(loader);
|
114 |
+
});
|
115 |
+
};
|
116 |
+
|
117 |
+
$.fn.wpcf7ToggleSubmit = function() {
|
118 |
+
return this.each(function() {
|
119 |
+
var form = $(this);
|
120 |
+
if (this.tagName.toLowerCase() != 'form')
|
121 |
+
form = $(this).find('form').first();
|
122 |
+
|
123 |
+
if (form.hasClass('wpcf7-acceptance-as-validation'))
|
124 |
+
return;
|
125 |
+
|
126 |
+
var submit = form.find('input:submit');
|
127 |
+
if (! submit.length) return;
|
128 |
+
|
129 |
+
var acceptances = form.find('input:checkbox.wpcf7-acceptance');
|
130 |
+
if (! acceptances.length) return;
|
131 |
+
|
132 |
+
submit.removeAttr('disabled');
|
133 |
+
acceptances.each(function(i, n) {
|
134 |
+
n = $(n);
|
135 |
+
if (n.hasClass('wpcf7-invert') && n.is(':checked')
|
136 |
+
|| ! n.hasClass('wpcf7-invert') && ! n.is(':checked'))
|
137 |
+
submit.attr('disabled', 'disabled');
|
138 |
+
});
|
139 |
+
});
|
140 |
+
};
|
141 |
+
|
142 |
+
$.fn.wpcf7NotValidTip = function(message) {
|
143 |
+
return this.each(function() {
|
144 |
+
var into = $(this);
|
145 |
+
into.append('<span class="wpcf7-not-valid-tip">' + message + '</span>');
|
146 |
+
$('span.wpcf7-not-valid-tip').mouseover(function() {
|
147 |
+
$(this).fadeOut('fast');
|
148 |
+
});
|
149 |
+
into.find(':input').mouseover(function() {
|
150 |
+
into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
|
151 |
+
});
|
152 |
+
into.find(':input').focus(function() {
|
153 |
+
into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
|
154 |
+
});
|
155 |
+
});
|
156 |
+
};
|
157 |
+
|
158 |
+
$.fn.wpcf7OnloadRefill = function() {
|
159 |
+
return this.each(function() {
|
160 |
+
var url = $(this).attr('action');
|
161 |
+
if (0 < url.indexOf('#'))
|
162 |
+
url = url.substr(0, url.indexOf('#'));
|
163 |
+
|
164 |
+
var id = $(this).find('input[name="_wpcf7"]').val();
|
165 |
+
var unitTag = $(this).find('input[name="_wpcf7_unit_tag"]').val();
|
166 |
+
|
167 |
+
$.getJSON(url,
|
168 |
+
{ _wpcf7_is_ajax_call: 1, _wpcf7: id },
|
169 |
+
function(data) {
|
170 |
+
if (data && data.captcha)
|
171 |
+
$('#' + unitTag).wpcf7RefillCaptcha(data.captcha);
|
172 |
+
|
173 |
+
if (data && data.quiz)
|
174 |
+
$('#' + unitTag).wpcf7RefillQuiz(data.quiz);
|
175 |
+
}
|
176 |
+
);
|
177 |
+
});
|
178 |
+
};
|
179 |
+
|
180 |
+
$.fn.wpcf7RefillCaptcha = function(captcha) {
|
181 |
+
return this.each(function() {
|
182 |
+
var form = $(this);
|
183 |
+
|
184 |
+
$.each(captcha, function(i, n) {
|
185 |
+
form.find(':input[name="' + i + '"]').clearFields();
|
186 |
+
form.find('img.wpcf7-captcha-' + i).attr('src', n);
|
187 |
+
var match = /([0-9]+)\.(png|gif|jpeg)$/.exec(n);
|
188 |
+
form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[1]);
|
189 |
+
});
|
190 |
+
});
|
191 |
+
};
|
192 |
+
|
193 |
+
$.fn.wpcf7RefillQuiz = function(quiz) {
|
194 |
+
return this.each(function() {
|
195 |
+
var form = $(this);
|
196 |
+
|
197 |
+
$.each(quiz, function(i, n) {
|
198 |
+
form.find(':input[name="' + i + '"]').clearFields();
|
199 |
+
form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[0]);
|
200 |
+
form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[1]);
|
201 |
+
});
|
202 |
+
});
|
203 |
+
};
|
204 |
+
|
205 |
+
$.fn.wpcf7ClearResponseOutput = function() {
|
206 |
+
return this.each(function() {
|
207 |
+
$(this).find('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked');
|
208 |
+
$(this).find('span.wpcf7-not-valid-tip').remove();
|
209 |
+
$(this).find('img.ajax-loader').css({ visibility: 'hidden' });
|
210 |
+
});
|
211 |
+
};
|
212 |
+
|
213 |
+
$.fn.wpcf7FillResponseOutput = function(message) {
|
214 |
+
return this.each(function() {
|
215 |
+
$(this).find('div.wpcf7-response-output').append(message).slideDown('fast');
|
216 |
+
});
|
217 |
+
};
|
218 |
+
|
219 |
})(jQuery);
|
settings.php
CHANGED
@@ -81,7 +81,7 @@ function wpcf7_register_post_types() {
|
|
81 |
|
82 |
/* Upgrading */
|
83 |
|
84 |
-
add_action( '
|
85 |
|
86 |
function wpcf7_upgrade() {
|
87 |
$opt = get_option( 'wpcf7' );
|
81 |
|
82 |
/* Upgrading */
|
83 |
|
84 |
+
add_action( 'admin_init', 'wpcf7_upgrade' );
|
85 |
|
86 |
function wpcf7_upgrade() {
|
87 |
$opt = get_option( 'wpcf7' );
|
styles-rtl.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
span.wpcf7-not-valid-tip {
|
2 |
-
left: auto;
|
3 |
-
right: 20%;
|
4 |
-
direction: rtl;
|
5 |
-
}
|
6 |
-
span.wpcf7-not-valid-tip-no-ajax {
|
7 |
-
direction: rtl;
|
8 |
-
}
|
9 |
-
span.wpcf7-list-item {
|
10 |
-
margin-left: 0;
|
11 |
-
margin-right: 0.5em;
|
12 |
-
}
|
1 |
+
span.wpcf7-not-valid-tip {
|
2 |
+
left: auto;
|
3 |
+
right: 20%;
|
4 |
+
direction: rtl;
|
5 |
+
}
|
6 |
+
span.wpcf7-not-valid-tip-no-ajax {
|
7 |
+
direction: rtl;
|
8 |
+
}
|
9 |
+
span.wpcf7-list-item {
|
10 |
+
margin-left: 0;
|
11 |
+
margin-right: 0.5em;
|
12 |
+
}
|
styles.css
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
div.wpcf7 {
|
2 |
-
margin: 0;
|
3 |
-
padding: 0;
|
4 |
-
}
|
5 |
-
|
6 |
-
div.wpcf7-response-output {
|
7 |
-
margin: 2em 0.5em 1em;
|
8 |
-
padding: 0.2em 1em;
|
9 |
-
}
|
10 |
-
|
11 |
-
div.wpcf7-mail-sent-ok {
|
12 |
-
border: 2px solid #398f14;
|
13 |
-
}
|
14 |
-
|
15 |
-
div.wpcf7-mail-sent-ng {
|
16 |
-
border: 2px solid #ff0000;
|
17 |
-
}
|
18 |
-
|
19 |
-
div.wpcf7-spam-blocked {
|
20 |
-
border: 2px solid #ffa500;
|
21 |
-
}
|
22 |
-
|
23 |
-
div.wpcf7-validation-errors {
|
24 |
-
border: 2px solid #f7e700;
|
25 |
-
}
|
26 |
-
|
27 |
-
span.wpcf7-form-control-wrap {
|
28 |
-
position: relative;
|
29 |
-
}
|
30 |
-
|
31 |
-
span.wpcf7-not-valid-tip {
|
32 |
-
position: absolute;
|
33 |
-
top: 20%;
|
34 |
-
left: 20%;
|
35 |
-
z-index: 100;
|
36 |
-
background: #fff;
|
37 |
-
border: 1px solid #ff0000;
|
38 |
-
font-size: 10pt;
|
39 |
-
width: 280px;
|
40 |
-
padding: 2px;
|
41 |
-
}
|
42 |
-
|
43 |
-
span.wpcf7-not-valid-tip-no-ajax {
|
44 |
-
color: #f00;
|
45 |
-
font-size: 10pt;
|
46 |
-
display: block;
|
47 |
-
}
|
48 |
-
|
49 |
-
span.wpcf7-list-item {
|
50 |
-
margin-left: 0.5em;
|
51 |
-
}
|
52 |
-
|
53 |
-
.wpcf7-display-none {
|
54 |
-
display: none;
|
55 |
-
}
|
56 |
-
|
57 |
-
div.wpcf7 img.ajax-loader {
|
58 |
-
border: none;
|
59 |
-
vertical-align: middle;
|
60 |
-
margin-left: 4px;
|
61 |
-
}
|
62 |
-
|
63 |
-
div.wpcf7 .watermark {
|
64 |
-
color: #888;
|
65 |
}
|
1 |
+
div.wpcf7 {
|
2 |
+
margin: 0;
|
3 |
+
padding: 0;
|
4 |
+
}
|
5 |
+
|
6 |
+
div.wpcf7-response-output {
|
7 |
+
margin: 2em 0.5em 1em;
|
8 |
+
padding: 0.2em 1em;
|
9 |
+
}
|
10 |
+
|
11 |
+
div.wpcf7-mail-sent-ok {
|
12 |
+
border: 2px solid #398f14;
|
13 |
+
}
|
14 |
+
|
15 |
+
div.wpcf7-mail-sent-ng {
|
16 |
+
border: 2px solid #ff0000;
|
17 |
+
}
|
18 |
+
|
19 |
+
div.wpcf7-spam-blocked {
|
20 |
+
border: 2px solid #ffa500;
|
21 |
+
}
|
22 |
+
|
23 |
+
div.wpcf7-validation-errors {
|
24 |
+
border: 2px solid #f7e700;
|
25 |
+
}
|
26 |
+
|
27 |
+
span.wpcf7-form-control-wrap {
|
28 |
+
position: relative;
|
29 |
+
}
|
30 |
+
|
31 |
+
span.wpcf7-not-valid-tip {
|
32 |
+
position: absolute;
|
33 |
+
top: 20%;
|
34 |
+
left: 20%;
|
35 |
+
z-index: 100;
|
36 |
+
background: #fff;
|
37 |
+
border: 1px solid #ff0000;
|
38 |
+
font-size: 10pt;
|
39 |
+
width: 280px;
|
40 |
+
padding: 2px;
|
41 |
+
}
|
42 |
+
|
43 |
+
span.wpcf7-not-valid-tip-no-ajax {
|
44 |
+
color: #f00;
|
45 |
+
font-size: 10pt;
|
46 |
+
display: block;
|
47 |
+
}
|
48 |
+
|
49 |
+
span.wpcf7-list-item {
|
50 |
+
margin-left: 0.5em;
|
51 |
+
}
|
52 |
+
|
53 |
+
.wpcf7-display-none {
|
54 |
+
display: none;
|
55 |
+
}
|
56 |
+
|
57 |
+
div.wpcf7 img.ajax-loader {
|
58 |
+
border: none;
|
59 |
+
vertical-align: middle;
|
60 |
+
margin-left: 4px;
|
61 |
+
}
|
62 |
+
|
63 |
+
div.wpcf7 .watermark {
|
64 |
+
color: #888;
|
65 |
}
|
wp-contact-form-7.php
CHANGED
@@ -1,73 +1,76 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Contact Form 7
|
4 |
-
Plugin URI: http://contactform7.com/
|
5 |
-
Description: Just another contact form plugin. Simple but flexible.
|
6 |
-
Author: Takayuki Miyoshi
|
7 |
-
Author URI: http://ideasilo.wordpress.com/
|
8 |
-
Text Domain: wpcf7
|
9 |
-
Domain Path: /languages/
|
10 |
-
Version: 3.
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Copyright 2007-
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License as published by
|
17 |
-
the Free Software Foundation; either version 2 of the License, or
|
18 |
-
(at your option) any later version.
|
19 |
-
|
20 |
-
This program is distributed in the hope that it will be useful,
|
21 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
-
GNU General Public License for more details.
|
24 |
-
|
25 |
-
You should have received a copy of the GNU General Public License
|
26 |
-
along with this program; if not, write to the Free Software
|
27 |
-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
-
*/
|
29 |
-
|
30 |
-
define( 'WPCF7_VERSION', '3.
|
31 |
-
|
32 |
-
define( 'WPCF7_REQUIRED_WP_VERSION', '3.2' );
|
33 |
-
|
34 |
-
if ( ! defined( 'WPCF7_PLUGIN_BASENAME' ) )
|
35 |
-
define( 'WPCF7_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
36 |
-
|
37 |
-
if ( ! defined( 'WPCF7_PLUGIN_NAME' ) )
|
38 |
-
define( 'WPCF7_PLUGIN_NAME', trim( dirname( WPCF7_PLUGIN_BASENAME ), '/' ) );
|
39 |
-
|
40 |
-
if ( ! defined( 'WPCF7_PLUGIN_DIR' ) )
|
41 |
-
define( 'WPCF7_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . WPCF7_PLUGIN_NAME );
|
42 |
-
|
43 |
-
if ( ! defined( 'WPCF7_PLUGIN_URL' ) )
|
44 |
-
define( 'WPCF7_PLUGIN_URL', WP_PLUGIN_URL . '/' . WPCF7_PLUGIN_NAME );
|
45 |
-
|
46 |
-
if ( ! defined( 'WPCF7_PLUGIN_MODULES_DIR' ) )
|
47 |
-
define( 'WPCF7_PLUGIN_MODULES_DIR', WPCF7_PLUGIN_DIR . '/modules' );
|
48 |
-
|
49 |
-
if ( ! defined( 'WPCF7_LOAD_JS' ) )
|
50 |
-
define( 'WPCF7_LOAD_JS', true );
|
51 |
-
|
52 |
-
if ( ! defined( 'WPCF7_LOAD_CSS' ) )
|
53 |
-
define( 'WPCF7_LOAD_CSS', true );
|
54 |
-
|
55 |
-
if ( ! defined( 'WPCF7_AUTOP' ) )
|
56 |
-
define( 'WPCF7_AUTOP', true );
|
57 |
-
|
58 |
-
if ( ! defined( 'WPCF7_USE_PIPE' ) )
|
59 |
-
define( 'WPCF7_USE_PIPE', true );
|
60 |
-
|
61 |
-
/* If you or your client hate to see about donation, set this value false. */
|
62 |
-
if ( ! defined( 'WPCF7_SHOW_DONATION_LINK' ) )
|
63 |
-
define( 'WPCF7_SHOW_DONATION_LINK', true );
|
64 |
-
|
65 |
-
if ( ! defined( 'WPCF7_ADMIN_READ_CAPABILITY' ) )
|
66 |
-
define( 'WPCF7_ADMIN_READ_CAPABILITY', 'edit_posts' );
|
67 |
-
|
68 |
-
if ( ! defined( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY' ) )
|
69 |
-
define( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY', 'publish_pages' );
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
73 |
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Contact Form 7
|
4 |
+
Plugin URI: http://contactform7.com/
|
5 |
+
Description: Just another contact form plugin. Simple but flexible.
|
6 |
+
Author: Takayuki Miyoshi
|
7 |
+
Author URI: http://ideasilo.wordpress.com/
|
8 |
+
Text Domain: wpcf7
|
9 |
+
Domain Path: /languages/
|
10 |
+
Version: 3.1
|
11 |
+
*/
|
12 |
+
|
13 |
+
/* Copyright 2007-2012 Takayuki Miyoshi (email: takayukister at gmail.com)
|
14 |
+
|
15 |
+
This program is free software; you can redistribute it and/or modify
|
16 |
+
it under the terms of the GNU General Public License as published by
|
17 |
+
the Free Software Foundation; either version 2 of the License, or
|
18 |
+
(at your option) any later version.
|
19 |
+
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
|
25 |
+
You should have received a copy of the GNU General Public License
|
26 |
+
along with this program; if not, write to the Free Software
|
27 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
+
*/
|
29 |
+
|
30 |
+
define( 'WPCF7_VERSION', '3.1' );
|
31 |
+
|
32 |
+
define( 'WPCF7_REQUIRED_WP_VERSION', '3.2' );
|
33 |
+
|
34 |
+
if ( ! defined( 'WPCF7_PLUGIN_BASENAME' ) )
|
35 |
+
define( 'WPCF7_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
36 |
+
|
37 |
+
if ( ! defined( 'WPCF7_PLUGIN_NAME' ) )
|
38 |
+
define( 'WPCF7_PLUGIN_NAME', trim( dirname( WPCF7_PLUGIN_BASENAME ), '/' ) );
|
39 |
+
|
40 |
+
if ( ! defined( 'WPCF7_PLUGIN_DIR' ) )
|
41 |
+
define( 'WPCF7_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . WPCF7_PLUGIN_NAME );
|
42 |
+
|
43 |
+
if ( ! defined( 'WPCF7_PLUGIN_URL' ) )
|
44 |
+
define( 'WPCF7_PLUGIN_URL', WP_PLUGIN_URL . '/' . WPCF7_PLUGIN_NAME );
|
45 |
+
|
46 |
+
if ( ! defined( 'WPCF7_PLUGIN_MODULES_DIR' ) )
|
47 |
+
define( 'WPCF7_PLUGIN_MODULES_DIR', WPCF7_PLUGIN_DIR . '/modules' );
|
48 |
+
|
49 |
+
if ( ! defined( 'WPCF7_LOAD_JS' ) )
|
50 |
+
define( 'WPCF7_LOAD_JS', true );
|
51 |
+
|
52 |
+
if ( ! defined( 'WPCF7_LOAD_CSS' ) )
|
53 |
+
define( 'WPCF7_LOAD_CSS', true );
|
54 |
+
|
55 |
+
if ( ! defined( 'WPCF7_AUTOP' ) )
|
56 |
+
define( 'WPCF7_AUTOP', true );
|
57 |
+
|
58 |
+
if ( ! defined( 'WPCF7_USE_PIPE' ) )
|
59 |
+
define( 'WPCF7_USE_PIPE', true );
|
60 |
+
|
61 |
+
/* If you or your client hate to see about donation, set this value false. */
|
62 |
+
if ( ! defined( 'WPCF7_SHOW_DONATION_LINK' ) )
|
63 |
+
define( 'WPCF7_SHOW_DONATION_LINK', true );
|
64 |
+
|
65 |
+
if ( ! defined( 'WPCF7_ADMIN_READ_CAPABILITY' ) )
|
66 |
+
define( 'WPCF7_ADMIN_READ_CAPABILITY', 'edit_posts' );
|
67 |
+
|
68 |
+
if ( ! defined( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY' ) )
|
69 |
+
define( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY', 'publish_pages' );
|
70 |
+
|
71 |
+
if ( ! defined( 'WPCF7_VERIFY_NONCE' ) )
|
72 |
+
define( 'WPCF7_VERIFY_NONCE', true );
|
73 |
+
|
74 |
+
require_once WPCF7_PLUGIN_DIR . '/settings.php';
|
75 |
+
|
76 |
?>
|