Better WordPress reCAPTCHA (with no CAPTCHA reCAPTCHA) - Version 1.1.1

Version Description

  • You can now choose to add captcha below comment text area without using a theme function. More info here
  • Added recaptcha shortcode tag back to Contact Form 7. Users can now choose between recaptcha and bwp-recaptcha
  • Added support for other plugins that include a slightly different version of reCAPTCHA library to avoid conflicts
  • Added Italian reCAPTCHA language (it)
  • Removed selective CSS, JS setting in Theme Options
  • Removed "Put comment in spam queue" option for Akismet integration. If you still want to use this option add this to your wp-config.php: define('BWP_CAPT_AKISMET_COMMENT_STATUS', 'spam');
  • Improved user registration and site registration form on a multi-site installation
  • Fixed an issue where a hidden iframe is adding margin to bottom of page in Google Chrome and Safari. This is merely a workaround solution so hopefully Google will fix this issue in reCAPTCHA
  • Fixed an issue where captcha is only checked after username and password is correct on login form
  • Fixed an issue where a bot can bypass recaptcha on user registration form
  • Fixed an issue where some PHP warnings are shown. Note that this fix might cause Akismet integration to fail, so users are advised to test this update first if Akismet integration is enabled
  • Updated German translation, thanks to Andreas Reitberger!
  • Updated French translation, thanks to Raoul Pierr!
  • WordPress 3.9 compatible
  • Other fixes and enhancements
Download this release

Release Info

Developer OddOneOut
Plugin Icon wp plugin Better WordPress reCAPTCHA (with no CAPTCHA reCAPTCHA)
Version 1.1.1
Comparing to
See all releases

Version 1.1.1

bwp-recaptcha-ms.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ include_once(dirname(__FILE__). '/bwp-recaptcha/bwp-recaptcha.php');
3
+ ?>
bwp-recaptcha.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Better WordPress reCAPTCHA
4
+ Plugin URI: http://betterwp.net/wordpress-plugins/bwp-recaptcha/
5
+ Description: This plugin utilizes reCAPTCHA (with support for Akismet) to help your blog stay clear of spams. This plugin, however, has a different approach from the current WP-reCAPTCHA plugin and allows you to customize how the captcha looks using CSS.
6
+ Version: 1.1.1
7
+ Text Domain: bwp-recaptcha
8
+ Domain Path: /languages/
9
+ Author: Khang Minh
10
+ Author URI: http://betterwp.net
11
+ License: GPLv3
12
+ */
13
+
14
+ // In case someone integrates this plugin in a theme or calling this directly
15
+ if (class_exists('BWP_RECAPTCHA') || !defined('ABSPATH'))
16
+ return;
17
+
18
+ // Init the plugin
19
+ require_once dirname(__FILE__) . '/includes/class-bwp-recaptcha.php';
20
+ $bwp_capt = new BWP_RECAPTCHA();
bwp-recaptcha.pot ADDED
@@ -0,0 +1,532 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: BWP reCAPTCHA\n"
4
+ "POT-Creation-Date: 2014-07-04 22:37+0700\n"
5
+ "PO-Revision-Date: 2014-07-04 22:37+0700\n"
6
+ "Last-Translator: Khang Minh <contact@betterwp.net>\n"
7
+ "Language-Team: BWP <contact@betterwp.net>\n"
8
+ "Language: en_US\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.5\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;_;gettext;gettext_noop\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:80
20
+ msgid "Plugin Configurations"
21
+ msgstr ""
22
+
23
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:503
24
+ msgid "Save Changes"
25
+ msgstr ""
26
+
27
+ #: includes/class-bwp-framework-improved.php:211
28
+ #, php-format
29
+ msgid ""
30
+ "%s requires WordPress <strong>%s</strong> or higher and PHP <strong>%s</"
31
+ "strong> or higher. The plugin will not protected function until you update "
32
+ "your software. Please deactivate this plugin."
33
+ msgstr ""
34
+
35
+ #: includes/class-bwp-framework-improved.php:228
36
+ msgid "Development Log"
37
+ msgstr ""
38
+
39
+ #: includes/class-bwp-framework-improved.php:228
40
+ msgid "Frequently Asked Questions"
41
+ msgstr ""
42
+
43
+ #: includes/class-bwp-framework-improved.php:228
44
+ msgid "FAQ"
45
+ msgstr ""
46
+
47
+ #: includes/class-bwp-framework-improved.php:228
48
+ msgid "Got a problem? Send me a feedback!"
49
+ msgstr ""
50
+
51
+ #: includes/class-bwp-framework-improved.php:228
52
+ msgid "Contact"
53
+ msgstr ""
54
+
55
+ #: includes/class-bwp-framework-improved.php:235
56
+ msgid ""
57
+ "You can buy me some special coffees if you appreciate my work, thank you!"
58
+ msgstr ""
59
+
60
+ #: includes/class-bwp-framework-improved.php:249
61
+ #, php-format
62
+ msgid "Donate to %s"
63
+ msgstr ""
64
+
65
+ #: includes/class-bwp-framework-improved.php:251
66
+ msgid "One cup $5.00"
67
+ msgstr ""
68
+
69
+ #: includes/class-bwp-framework-improved.php:252
70
+ msgid "Two cups $10.00"
71
+ msgstr ""
72
+
73
+ #: includes/class-bwp-framework-improved.php:253
74
+ msgid "Five cups! $25.00"
75
+ msgstr ""
76
+
77
+ #: includes/class-bwp-framework-improved.php:254
78
+ msgid "One LL-cup!!! $50.00"
79
+ msgstr ""
80
+
81
+ #: includes/class-bwp-framework-improved.php:255
82
+ msgid "... or any amount!"
83
+ msgstr ""
84
+
85
+ #: includes/class-bwp-framework-improved.php:270
86
+ msgid "Latest updates from BetterWP.net!"
87
+ msgstr ""
88
+
89
+ #: includes/class-bwp-framework-improved.php:271
90
+ msgid "Follow me on Twitter!"
91
+ msgstr ""
92
+
93
+ #: includes/class-bwp-framework-improved.php:281
94
+ msgid "This Plugin is Proudly Sponsored By"
95
+ msgstr ""
96
+
97
+ #: includes/class-bwp-framework-improved.php:300
98
+ #, php-format
99
+ msgid "You are using version %s!"
100
+ msgstr ""
101
+
102
+ #: includes/class-bwp-framework-improved.php:541
103
+ msgid "Settings"
104
+ msgstr ""
105
+
106
+ #: includes/class-bwp-recaptcha-cf7.php:103
107
+ msgid "This reCAPTCHA tag is provided by the BWP reCAPTCHA WordPress plugin."
108
+ msgstr ""
109
+
110
+ #: includes/class-bwp-recaptcha-cf7.php:106
111
+ #, php-format
112
+ msgid ""
113
+ "Please refer to <a target=\"_blank\" href=\"%s\">BWP reCAPTCHA's "
114
+ "documentation </a> for a quick guide on how to customize the look and feel "
115
+ "of this tag."
116
+ msgstr ""
117
+
118
+ #: includes/class-bwp-recaptcha-cf7.php:115
119
+ msgid "Name"
120
+ msgstr ""
121
+
122
+ #: includes/class-bwp-recaptcha-cf7.php:122
123
+ msgid "Copy this code and paste it into the form left."
124
+ msgstr ""
125
+
126
+ #: includes/class-bwp-recaptcha.php:101
127
+ msgid ""
128
+ "<strong>ERROR:</strong> Incorrect or empty reCAPTCHA response, please try "
129
+ "again."
130
+ msgstr ""
131
+
132
+ #: includes/class-bwp-recaptcha.php:103
133
+ #, php-format
134
+ msgid ""
135
+ "Error: Incorrect or empty reCAPTCHA response, please click the back button "
136
+ "on your browser's toolbar or click on %s to go back."
137
+ msgstr ""
138
+
139
+ #: includes/class-bwp-recaptcha.php:127 includes/class-bwp-recaptcha.php:450
140
+ msgid "General Options"
141
+ msgstr ""
142
+
143
+ #: includes/class-bwp-recaptcha.php:130 includes/class-bwp-recaptcha.php:459
144
+ msgid "Theme Options"
145
+ msgstr ""
146
+
147
+ #: includes/class-bwp-recaptcha.php:167
148
+ msgid "Get another challenge"
149
+ msgstr ""
150
+
151
+ #: includes/class-bwp-recaptcha.php:168
152
+ msgid "Get audio reCAPTCHA"
153
+ msgstr ""
154
+
155
+ #: includes/class-bwp-recaptcha.php:169
156
+ msgid "Get image reCAPTCHA"
157
+ msgstr ""
158
+
159
+ #: includes/class-bwp-recaptcha.php:170
160
+ msgid "About reCAPTCHA"
161
+ msgstr ""
162
+
163
+ #: includes/class-bwp-recaptcha.php:174
164
+ msgid "Enter the two words in the box:"
165
+ msgstr ""
166
+
167
+ #: includes/class-bwp-recaptcha.php:175
168
+ msgid "Enter the numbers you hear:"
169
+ msgstr ""
170
+
171
+ #: includes/class-bwp-recaptcha.php:236
172
+ msgid "English"
173
+ msgstr ""
174
+
175
+ #: includes/class-bwp-recaptcha.php:237
176
+ msgid "Dutch"
177
+ msgstr ""
178
+
179
+ #: includes/class-bwp-recaptcha.php:238
180
+ msgid "French"
181
+ msgstr ""
182
+
183
+ #: includes/class-bwp-recaptcha.php:239
184
+ msgid "German"
185
+ msgstr ""
186
+
187
+ #: includes/class-bwp-recaptcha.php:240
188
+ msgid "Italian"
189
+ msgstr ""
190
+
191
+ #: includes/class-bwp-recaptcha.php:241
192
+ msgid "Portuguese"
193
+ msgstr ""
194
+
195
+ #: includes/class-bwp-recaptcha.php:242
196
+ msgid "Russian"
197
+ msgstr ""
198
+
199
+ #: includes/class-bwp-recaptcha.php:243
200
+ msgid "Spanish"
201
+ msgstr ""
202
+
203
+ #: includes/class-bwp-recaptcha.php:244
204
+ msgid "Turkish"
205
+ msgstr ""
206
+
207
+ #: includes/class-bwp-recaptcha.php:248
208
+ msgid "Read Profile"
209
+ msgstr ""
210
+
211
+ #: includes/class-bwp-recaptcha.php:249
212
+ msgid "Manage Options"
213
+ msgstr ""
214
+
215
+ #: includes/class-bwp-recaptcha.php:439
216
+ msgid "Better WordPress reCAPTCHA"
217
+ msgstr ""
218
+
219
+ #: includes/class-bwp-recaptcha.php:449
220
+ msgid "BWP reCAPTCHA General Options"
221
+ msgstr ""
222
+
223
+ #: includes/class-bwp-recaptcha.php:458
224
+ msgid "BWP reCAPTCHA Theme Options"
225
+ msgstr ""
226
+
227
+ #: includes/class-bwp-recaptcha.php:496
228
+ msgid "You do not have sufficient permissions to access this page."
229
+ msgstr ""
230
+
231
+ #: includes/class-bwp-recaptcha.php:531
232
+ msgid "reCAPTCHA API Keys"
233
+ msgstr ""
234
+
235
+ #: includes/class-bwp-recaptcha.php:532
236
+ msgid "Use main site's keys"
237
+ msgstr ""
238
+
239
+ #: includes/class-bwp-recaptcha.php:533
240
+ msgid "Public Key"
241
+ msgstr ""
242
+
243
+ #: includes/class-bwp-recaptcha.php:534
244
+ msgid "Private Key"
245
+ msgstr ""
246
+
247
+ #: includes/class-bwp-recaptcha.php:535
248
+ msgid "Plugin Functionality"
249
+ msgstr ""
250
+
251
+ #: includes/class-bwp-recaptcha.php:536
252
+ msgid "Enable this plugin for"
253
+ msgstr ""
254
+
255
+ #: includes/class-bwp-recaptcha.php:537
256
+ msgid "Hide captcha for"
257
+ msgstr ""
258
+
259
+ #: includes/class-bwp-recaptcha.php:538
260
+ msgid "reCAPTCHA for comment form"
261
+ msgstr ""
262
+
263
+ #: includes/class-bwp-recaptcha.php:539
264
+ msgid "Captcha position"
265
+ msgstr ""
266
+
267
+ #: includes/class-bwp-recaptcha.php:540
268
+ msgid "If invalid captcha response"
269
+ msgstr ""
270
+
271
+ #: includes/class-bwp-recaptcha.php:541 includes/class-bwp-recaptcha.php:542
272
+ msgid "Invalid captcha error message"
273
+ msgstr ""
274
+
275
+ #: includes/class-bwp-recaptcha.php:543
276
+ msgid "Akismet Integration for comment form"
277
+ msgstr ""
278
+
279
+ #: includes/class-bwp-recaptcha.php:544
280
+ msgid "Integrate with Akismet?"
281
+ msgstr ""
282
+
283
+ #: includes/class-bwp-recaptcha.php:545
284
+ msgid "If correct captcha response"
285
+ msgstr ""
286
+
287
+ #: includes/class-bwp-recaptcha.php:546
288
+ msgid "Contact Form 7 Integration"
289
+ msgstr ""
290
+
291
+ #: includes/class-bwp-recaptcha.php:547
292
+ msgid "Captcha shortcode tag"
293
+ msgstr ""
294
+
295
+ #: includes/class-bwp-recaptcha.php:570
296
+ #, php-format
297
+ msgid ""
298
+ "For this plugin to work, you will need a pair of API keys (public and "
299
+ "private), which is available for free <a href=\"%s\" target=\"_blank\">here</"
300
+ "a>. Once you have created those two keys for this domain, simply paste them "
301
+ "below.</em>"
302
+ msgstr ""
303
+
304
+ #: includes/class-bwp-recaptcha.php:576
305
+ msgid "Control how this plugin works."
306
+ msgstr ""
307
+
308
+ #: includes/class-bwp-recaptcha.php:577
309
+ msgid "Settings that are applied to comment forms only."
310
+ msgstr ""
311
+
312
+ #: includes/class-bwp-recaptcha.php:579
313
+ msgid "Integrate with Akismet for better end-user experience."
314
+ msgstr ""
315
+
316
+ #: includes/class-bwp-recaptcha.php:580
317
+ msgid ""
318
+ "Add reCAPTCHA to Contact Form 7. This only works if you have Contact Form 7 "
319
+ "activated."
320
+ msgstr ""
321
+
322
+ #: includes/class-bwp-recaptcha.php:597
323
+ msgid "After comment field"
324
+ msgstr ""
325
+
326
+ #: includes/class-bwp-recaptcha.php:598
327
+ msgid "After form fields (name, email, website)"
328
+ msgstr ""
329
+
330
+ #: includes/class-bwp-recaptcha.php:601
331
+ msgid "Redirect commenter back to the comment form with error message"
332
+ msgstr ""
333
+
334
+ #: includes/class-bwp-recaptcha.php:602
335
+ msgid "Show an error page just like WordPress does"
336
+ msgstr ""
337
+
338
+ #: includes/class-bwp-recaptcha.php:605
339
+ msgid "Approve comment immediately"
340
+ msgstr ""
341
+
342
+ #: includes/class-bwp-recaptcha.php:606
343
+ msgid "Hold comment in moderation queue"
344
+ msgstr ""
345
+
346
+ #: includes/class-bwp-recaptcha.php:609
347
+ msgid "Use \"bwp-recaptcha\" shortcode tag"
348
+ msgstr ""
349
+
350
+ #: includes/class-bwp-recaptcha.php:610
351
+ msgid "Use \"recaptcha\" shortcode tag"
352
+ msgstr ""
353
+
354
+ #: includes/class-bwp-recaptcha.php:615
355
+ msgid "Comment form."
356
+ msgstr ""
357
+
358
+ #: includes/class-bwp-recaptcha.php:618
359
+ msgid "Registration form (user/site registration)."
360
+ msgstr ""
361
+
362
+ #: includes/class-bwp-recaptcha.php:621
363
+ msgid "Login form."
364
+ msgstr ""
365
+
366
+ #: includes/class-bwp-recaptcha.php:624
367
+ msgid "registered users <em>(even without any capabilities)</em>."
368
+ msgstr ""
369
+
370
+ #: includes/class-bwp-recaptcha.php:627
371
+ msgid "users who can"
372
+ msgstr ""
373
+
374
+ #: includes/class-bwp-recaptcha.php:630
375
+ msgid "visitors who have at least"
376
+ msgstr ""
377
+
378
+ #: includes/class-bwp-recaptcha.php:633
379
+ msgid ""
380
+ "A captcha is only shown when Akismet identifies a comment as spam. Highly "
381
+ "recommended if you do not want to force your visitors to enter a captcha "
382
+ "every time."
383
+ msgstr ""
384
+
385
+ #: includes/class-bwp-recaptcha.php:638
386
+ msgid "uncheck to use different key pairs for this site."
387
+ msgstr ""
388
+
389
+ #: includes/class-bwp-recaptcha.php:644
390
+ msgid "A public key used to request captchas from reCAPTCHA server."
391
+ msgstr ""
392
+
393
+ #: includes/class-bwp-recaptcha.php:649
394
+ msgid "A private (secret) key used to authenticate user's response."
395
+ msgstr ""
396
+
397
+ #: includes/class-bwp-recaptcha.php:662
398
+ msgid "approved comment(s)."
399
+ msgstr ""
400
+
401
+ #: includes/class-bwp-recaptcha.php:670
402
+ msgid ""
403
+ "It is best to put comments identified as spam in moderation queue so you are "
404
+ "able to review and instruct Akismet to correctly handle similar comments in "
405
+ "the future.</em>"
406
+ msgstr ""
407
+
408
+ #: includes/class-bwp-recaptcha.php:731
409
+ msgid "reCAPTCHA theme"
410
+ msgstr ""
411
+
412
+ #: includes/class-bwp-recaptcha.php:732
413
+ msgid "Use default CSS"
414
+ msgstr ""
415
+
416
+ #: includes/class-bwp-recaptcha.php:733
417
+ msgid "Language for built-in themes"
418
+ msgstr ""
419
+
420
+ #: includes/class-bwp-recaptcha.php:734
421
+ msgid "Tabindex for captcha input field"
422
+ msgstr ""
423
+
424
+ #: includes/class-bwp-recaptcha.php:735
425
+ msgid "Preview your reCAPTCHA"
426
+ msgstr ""
427
+
428
+ #: includes/class-bwp-recaptcha.php:745
429
+ msgid ""
430
+ "<em>Below you will see how your reCAPTCHA will look. Note that this might "
431
+ "differ on your actual pages.<br /></em>"
432
+ msgstr ""
433
+
434
+ #: includes/class-bwp-recaptcha.php:750
435
+ msgid "Default Theme (Red)"
436
+ msgstr ""
437
+
438
+ #: includes/class-bwp-recaptcha.php:751
439
+ msgid "White Theme"
440
+ msgstr ""
441
+
442
+ #: includes/class-bwp-recaptcha.php:752
443
+ msgid "Black Theme"
444
+ msgstr ""
445
+
446
+ #: includes/class-bwp-recaptcha.php:753
447
+ msgid "Clean Theme"
448
+ msgstr ""
449
+
450
+ #: includes/class-bwp-recaptcha.php:754
451
+ msgid "Custom Theme (use CSS)"
452
+ msgstr ""
453
+
454
+ #: includes/class-bwp-recaptcha.php:760
455
+ #, php-format
456
+ msgid ""
457
+ "This is for Custom Theme only. Disable this and add your own CSS to style "
458
+ "the Custom Theme. More info <a href=\"%s#customization\" target=\"_blank"
459
+ "\">here</a>."
460
+ msgstr ""
461
+
462
+ #: includes/class-bwp-recaptcha.php:766
463
+ msgid "This is only useful when you do not use any minify or cache plugin."
464
+ msgstr ""
465
+
466
+ #: includes/class-bwp-recaptcha.php:772
467
+ msgid ""
468
+ "This should be 4 if you place the captcha before the textarea, and 5 if you "
469
+ "put it after. Set to 0 to disable."
470
+ msgstr ""
471
+
472
+ #: includes/class-bwp-recaptcha.php:780
473
+ #, php-format
474
+ msgid ""
475
+ "If you would like to add custom translations, please read <a href=\"%s\" "
476
+ "target=\"_blank\">this dedicated tip</a>."
477
+ msgstr ""
478
+
479
+ #: includes/class-bwp-recaptcha.php:853
480
+ msgid "All options have been saved."
481
+ msgstr ""
482
+
483
+ #: includes/class-bwp-recaptcha.php:861
484
+ msgid "Warning"
485
+ msgstr ""
486
+
487
+ #: includes/class-bwp-recaptcha.php:862
488
+ #, php-format
489
+ msgid ""
490
+ "API key(s) missing. Please get an API key from <a href=\"%1$s\">%1$s</a> "
491
+ "(free!)"
492
+ msgstr ""
493
+
494
+ #: includes/class-bwp-recaptcha.php:873
495
+ msgid "Notice"
496
+ msgstr ""
497
+
498
+ #: includes/class-bwp-recaptcha.php:874
499
+ msgid ""
500
+ "You are enabling Akismet integration but Akismet is not currently active. "
501
+ "Please activate Akismet for the integration to work."
502
+ msgstr ""
503
+
504
+ #: includes/class-bwp-recaptcha.php:1040
505
+ msgid "Your comment was identified as spam, please complete the CAPTCHA below:"
506
+ msgstr ""
507
+
508
+ #: includes/class-bwp-recaptcha.php:1110
509
+ #, php-format
510
+ msgid "To use reCAPTCHA you must get an API key from <a href=\"%1$s\">%1$s</a>"
511
+ msgstr ""
512
+
513
+ #: includes/class-bwp-recaptcha.php:1211 includes/class-bwp-recaptcha.php:1278
514
+ msgid "ERROR"
515
+ msgstr ""
516
+
517
+ #: includes/class-bwp-recaptcha.php:1212 includes/class-bwp-recaptcha.php:1279
518
+ msgid "Unknown captcha error."
519
+ msgstr ""
520
+
521
+ #: includes/class-bwp-recaptcha.php:1361
522
+ msgid "this link"
523
+ msgstr ""
524
+
525
+ #: includes/class-bwp-recaptcha.php:1367
526
+ msgid ""
527
+ "There is some problem with your reCAPTCHA API keys, please double check them."
528
+ msgstr ""
529
+
530
+ #: includes/class-bwp-recaptcha.php:1372
531
+ msgid "Unknown error. Please contact an administrator for more info."
532
+ msgstr ""
css/bwp-recaptcha.css ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #recaptcha_widget, #recaptcha_widget_div {
2
+ /*margin-top: 5px;*/
3
+ margin-bottom: 15px;
4
+ /*ie fix*/ zoom: 1;
5
+ }
6
+
7
+ .bwp-option-page #recaptcha_widget, .bwp-option-page #recaptcha_widget_div
8
+ {
9
+ margin-bottom: 0px;
10
+ }
11
+
12
+ #wpbody-content .form-spam-protect {
13
+ display: none;
14
+ }
15
+
16
+ #recaptcha_widget:after { content: "."; display: block; height: 0; font-size: 0; line-height: 0; clear: both; visibility: hidden; }
17
+
18
+ .recaptcha_only_if_incorrect_sol, .bwp-capt-spam-identified {
19
+ clear: both;
20
+ }
21
+
22
+ #recaptcha_widget #recaptcha_image {
23
+ float: left;
24
+ width: 300px; height: 57px;
25
+ border: 1px solid #bbbbbb;
26
+ }
27
+
28
+ #recaptcha_widget #recaptcha_image a {
29
+ margin-left: 10px;
30
+ }
31
+
32
+ #recaptcha_widget .recaptcha_text, #recaptcha_widget .recaptcha_control {
33
+ float: left;
34
+ width: 200px;
35
+ margin-left: 10px;
36
+ }
37
+
38
+ #recaptcha_widget .recaptcha_control {
39
+ width: 20px;
40
+ margin-left: 13px;
41
+ }
42
+
43
+ #recaptcha_widget .recaptcha_text span, #recaptcha_widget .recaptcha_text input {
44
+ display: block;
45
+ }
46
+
47
+ #recaptcha_widget .recaptcha_control img {
48
+ border: none;
49
+ }
50
+
51
+ /* Registration Page */
52
+
53
+ #login #recaptcha_widget .recaptcha_text input {
54
+ background: none repeat scroll 0 0 #FBFBFB;
55
+ border: 1px solid #E5E5E5;
56
+ font-size: 13px;
57
+ margin-bottom: 16px;
58
+ margin-right: 6px;
59
+ margin-top: 2px;
60
+ padding: 3px;
61
+ width: 97%;
62
+ }
63
+
64
+ #login #recaptcha_widget #recaptcha_image {
65
+ margin-bottom: 10px;
66
+ }
images/icon_help.png ADDED
Binary file
images/icon_image.png ADDED
Binary file
images/icon_menu.png ADDED
Binary file
images/icon_menu_32.png ADDED
Binary file
images/icon_refresh.png ADDED
Binary file
images/icon_sound.png ADDED
Binary file
includes/bwp-option-page/bwp-option-page.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ if (!is_admin()) return;
3
+ require_once(dirname(__FILE__) . '/includes/class-bwp-option-page.php');
includes/bwp-option-page/css/bwp-option-page.css ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* For WordPress of older versions */
2
+ .nav-tab{
3
+ border-style:solid;
4
+ border-color:#ccc #ccc #f9f9f9;
5
+ border-width:1px 1px 0;
6
+ color:#c1c1c1;
7
+ text-shadow:rgba(255,255,255,1) 0 1px 0;
8
+ font-size:12px;
9
+ line-height:16px;
10
+ display:inline-block;
11
+ padding:4px 14px 6px;
12
+ text-decoration:none;
13
+ margin:0 3px -1px 0;
14
+ /* -moz-border-radius:5px 5px 0 0; */
15
+ /* -webkit-border-top-left-radius:5px; */
16
+ /* -webkit-border-top-right-radius:5px; */
17
+ /* -khtml-border-top-left-radius:5px; */
18
+ /* -khtml-border-top-right-radius:5px; */
19
+ /* border-top-left-radius:5px; */
20
+ /* border-top-right-radius:5px; */
21
+ }
22
+ .nav-tab-active{
23
+ border-width:1px;
24
+ border-bottom-color: transparent;
25
+ color: #000000;
26
+ }
27
+ h2.nav-tab-wrapper, h3.nav-tab-wrapper{
28
+ border-bottom:1px solid #ccc;
29
+ padding-bottom:0;
30
+ }
31
+ h2 .nav-tab{padding:6px 15px 6px;}
32
+
33
+ .bwp-option-page {
34
+ margin-top: 1em;
35
+ }
36
+
37
+ .bwp-option-page p {
38
+ margin-top: 0px;
39
+ margin-bottom: 0px;
40
+ zoom: 1;
41
+ }
42
+
43
+ .bwp-option-page li.bwp-clear, .bwp-option-page div.bwp-clear {
44
+ clear: left;
45
+ display: block;
46
+ margin: 1em 0 0 0;
47
+ zoom: 1;
48
+ }
49
+
50
+ .bwp-option-page p.submit {
51
+ clear: both;
52
+ padding-top: 1.5em;
53
+ }
54
+
55
+ .wrap .bwp-option-page-tabs {
56
+ border-bottom: 1px solid #CCCCCC;
57
+ padding-bottom: 0px;
58
+ margin-bottom: 20px;
59
+ }
60
+
61
+ .bwp-option-page-tabs a {
62
+ font-size: 18px;
63
+ line-height: 24px;
64
+ font-style: italic;
65
+ }
66
+
67
+ .bwp-option-page-tabs a.version {
68
+ font-size: 14px;
69
+ line-height: 14px;
70
+ }
71
+
72
+ .bwp-opton-page-label {
73
+ display: block;
74
+ float: left;
75
+ width: 200px;
76
+ margin: 3px 0 1em 0;
77
+ }
78
+
79
+ .type-checkbox {
80
+ margin-top: 0px;
81
+ }
82
+
83
+ p.bwp-option-page-inputs {
84
+ margin: 0 0 0 220px;
85
+ padding: 0;
86
+ }
87
+
88
+ .bwp-option-page-inputs input {
89
+ margin: 0 0 5px 0;
90
+ }
91
+
92
+ .bwp-option-page-inputs label {
93
+ margin: 0;
94
+ }
95
+
96
+ .bwp-option-page-inputs select {
97
+ margin: 1px 0 0 0;
98
+ }
99
+
100
+ .bwp-option-page-inputs input[type="checkbox"] {
101
+ margin-left: 2px;
102
+ }
103
+
104
+ #icon-betterwp-net {
105
+ background: url("betterwp.jpg") no-repeat transparent;
106
+ border: 1px solid #E3E3E3;
107
+ height: 32px;
108
+ width: 32px;
109
+ }
110
+
111
+ #icon-bwp-plugin {
112
+ background-repeat: no-repeat;
113
+ background-position: left center;
114
+ margin-top: 21px; margin-left: 5px;
115
+ width: 36px;
116
+ }
117
+
118
+ #bwp-info-place {
119
+ float: right;
120
+ margin: 0 0 10px 10px;
121
+ }
122
+
123
+ #bwp-donation, #bwp-contact, #bwp-ads {
124
+ width: 255px;
125
+ padding: 7px; padding-bottom: 0px;
126
+ background-color: #ffffff;
127
+ border: 1px solid #cccccc;
128
+ text-align: center;
129
+ }
130
+
131
+ #bwp-donation p, #bwp-ads p {
132
+ margin: 0.5em 0 1em 0;
133
+ }
134
+
135
+ #bwp-ads {
136
+ padding-bottom: 5px;
137
+ }
138
+
139
+ #bwp-ads p {
140
+ text-decoration: underline;
141
+ }
142
+
143
+ #bwp-info-place small {
144
+ font-size: 0.8em;
145
+ }
146
+
147
+ #bwp-donation .paypal-submit {
148
+ vertical-align: bottom;
149
+ display: inline-block;
150
+ margin: 0 0 1px 2px;
151
+ padding: 0px;
152
+ }
153
+
154
+ .bwp-separator {
155
+ width: 271px;
156
+ }
157
+
158
+ #bwp-contact {
159
+ text-align: left;
160
+ padding: 7px;
161
+ }
162
+
163
+ #bwp-contact a {
164
+ display: block;
165
+ height: 20px;
166
+ font-size: 0.8em;
167
+ padding-left: 25px;
168
+ }
169
+
170
+ #bwp-contact .bwp-rss {
171
+ background: transparent url("../images/icon-rss.png") no-repeat left center;
172
+ }
173
+
174
+ #bwp-contact .bwp-twitter {
175
+ background: transparent url("../images/icon-twitter.png") no-repeat left center;
176
+ }
includes/bwp-option-page/images/ad_250x250.png ADDED
Binary file
includes/bwp-option-page/images/icon-paypal.gif ADDED
Binary file
includes/bwp-option-page/images/icon-rss.png ADDED
Binary file
includes/bwp-option-page/images/icon-twitter.png ADDED
Binary file
includes/bwp-option-page/includes/class-bwp-option-page.php ADDED
@@ -0,0 +1,510 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014 Khang Minh <betterwp.net>
4
+ * @license http://www.gnu.org/licenses/gpl.html GNU GENERAL PUBLIC LICENSE VERSION 3.0 OR LATER
5
+ */
6
+
7
+ class BWP_OPTION_PAGE {
8
+
9
+ /**
10
+ * The form
11
+ */
12
+ var $form;
13
+
14
+ /**
15
+ * The form name
16
+ */
17
+ var $form_name;
18
+
19
+ /**
20
+ * Tabs to build
21
+ */
22
+ var $form_tabs;
23
+
24
+ /**
25
+ * Current tab
26
+ */
27
+ var $current_tab;
28
+
29
+ /**
30
+ * This holds the form items, determining the position
31
+ */
32
+ var $form_items = array();
33
+
34
+ /**
35
+ * This holds the name for each items (an item can have more than one fields)
36
+ */
37
+ var $form_item_names = array();
38
+
39
+ /**
40
+ * This holds the form label
41
+ */
42
+ var $form_item_labels = array();
43
+
44
+ /**
45
+ * This holds the form option aka data
46
+ */
47
+ var $form_options = array(), $site_options = array();
48
+
49
+ /**
50
+ * Other things
51
+ */
52
+ var $domain;
53
+
54
+ /**
55
+ * Constructor
56
+ */
57
+ function __construct($form_name = 'bwp_option_page', $site_options = array(), $domain = '')
58
+ {
59
+ $this->form_name = $form_name;
60
+ $this->site_options = $site_options;
61
+ $this->domain = $domain;
62
+ }
63
+
64
+ /**
65
+ * Init the class
66
+ *
67
+ * @param array $form The form array that contains everything we need to build the form
68
+ * @param array $options The data array that contains all data fetched from db or by default
69
+ * @param string $form_name The name of the form, change this if you have more than one forms on a page
70
+ */
71
+ function init($form = array(), $options = array(), $form_tabs = array())
72
+ {
73
+ $this->form_items = $form['items'];
74
+ $this->form_item_names = $form['item_names'];
75
+ $this->form_item_labels = $form['item_labels'];
76
+ $this->form = $form;
77
+ $this->form_options = $options;
78
+ $this->form_tabs = $form_tabs;
79
+ if (sizeof($this->form_tabs) == 0)
80
+ $this->form_tabs = array(__('Plugin Configurations', 'bwp-option-page'));
81
+ }
82
+
83
+ function get_form_name()
84
+ {
85
+ return $this->form_name;
86
+ }
87
+
88
+ function set_current_tab($current_tab = 0)
89
+ {
90
+ $this->current_tab = $current_tab;
91
+ }
92
+
93
+ function get_options($options = array(), $options_default = array())
94
+ {
95
+ foreach ($options_default as $key => $option)
96
+ {
97
+ if (!in_array($key, $options))
98
+ unset($options_default[$key]);
99
+ }
100
+ return $options_default;
101
+ }
102
+
103
+ function get_db_options($name = '', $options = array())
104
+ {
105
+ $db_options = get_option($name);
106
+ if (!$db_options)
107
+ update_option($name, $options);
108
+ else if (array_keys($options) != array_keys($db_options))
109
+ {
110
+ foreach ($db_options as $key => $data)
111
+ if (isset($options[$key]) && !in_array($key, $this->site_options))
112
+ $options[$key] = $data;
113
+ update_option($name, $options);
114
+ }
115
+ else
116
+ {
117
+ foreach ($db_options as $key => $data)
118
+ if (!in_array($key, $this->site_options))
119
+ $options[$key] = $data;
120
+ }
121
+
122
+ return $options;
123
+ }
124
+
125
+ function format_field($key, $option_formats)
126
+ {
127
+ if (!empty($option_formats[$key]))
128
+ {
129
+ if ('int' == $option_formats[$key])
130
+ $_POST[$key] = (int) $_POST[$key];
131
+ else if ('float' == $option_formats[$key])
132
+ $_POST[$key] = (float) $_POST[$key];
133
+ else if ('html' == $option_formats[$key])
134
+ $_POST[$key] = wp_filter_post_kses($_POST[$key]);
135
+ }
136
+ else
137
+ $_POST[$key] = strip_tags($_POST[$key]);
138
+ }
139
+
140
+ function kill_html_fields(&$form = array(), $ids)
141
+ {
142
+ $ids = (array) $ids;
143
+ $in_keys = array('items', 'item_labels', 'item_names');
144
+ foreach ($ids as $id)
145
+ {
146
+ foreach ($in_keys as $key)
147
+ unset($form[$key][$id]);
148
+ }
149
+ }
150
+
151
+ /**
152
+ * Generate HTML field
153
+ *
154
+ * @params they explain themselves
155
+ */
156
+ function generate_html_field($type = '', $data = array(), $name = '', $in_section = false)
157
+ {
158
+ $pre_html_field = '';
159
+ $post_html_field = '';
160
+ $checked = 'checked="checked" ';
161
+ $selected = 'selected="selected" ';
162
+
163
+ $value = isset($this->form_options[$name])
164
+ ? $this->form_options[$name]
165
+ : '';
166
+
167
+ $value = !empty($this->domain)
168
+ && ('textarea' == $type || 'input' == $type)
169
+ ? __($value, $this->domain)
170
+ : $value;
171
+
172
+ if (is_array($value))
173
+ {
174
+ foreach ($value as &$v)
175
+ $v = is_array($v) ? array_map('esc_attr', $v) : esc_attr($v);
176
+ }
177
+ else
178
+ {
179
+ $value = 'textarea' == $type
180
+ ? esc_html($value)
181
+ : esc_attr($value);
182
+ }
183
+
184
+ $array_replace = array();
185
+ $array_search = array('size', 'name', 'value', 'cols',
186
+ 'rows', 'label', 'disabled', 'pre', 'post');
187
+ $return_html = '';
188
+
189
+ $br = isset($this->form['inline_fields'][$name])
190
+ && is_array($this->form['inline_fields'][$name])
191
+ ? ''
192
+ : "<br />\n";
193
+
194
+ $pre = !empty($data['pre']) ? $data['pre'] : '';
195
+ $post = !empty($data['post']) ? $data['post'] : '';
196
+
197
+ $param = empty($this->form['params'][$name])
198
+ ? false : $this->form['params'][$name];
199
+
200
+ switch ($type)
201
+ {
202
+ case 'heading':
203
+ $html_field = '%s';
204
+ break;
205
+
206
+ case 'input':
207
+ $html_field = (!$in_section) ? '%pre%<input%disabled% size="%size%" type="text" id="' . $name . '" name="' . $name . '" value="' . $value . '" /> <em>%label%</em>' : '<label for="' . $name . '">%pre%<input%disabled% size="%size%" type="text" id="' . $name . '" name="' . $name . '" value="' . $value . '" /> <em>%label%</em></label>';
208
+ break;
209
+
210
+ case 'select':
211
+ case 'select_multi':
212
+ $pre_html_field = 'select_multi' == $type
213
+ ? '%pre%<select id="' . $name . '" name="' . $name . '[]" multiple>' . "\n"
214
+ : '%pre%<select id="' . $name . '" name="' . $name . '">' . "\n";
215
+ $html_field = '<option %selected%value="%value%" />%option%</option>';
216
+ $post_html_field = '</select>%post%' . $br;
217
+ break;
218
+
219
+ case 'checkbox':
220
+ $html_field = '<label for="%name%">' . '<input %checked%type="checkbox" id="%name%" name="%name%" value="yes" /> %label%</label>';
221
+ break;
222
+
223
+ case 'checkbox_multi':
224
+ $html_field = '<label for="%name%-%value%">' . '<input %checked%type="checkbox" id="%name%-%value%" name="%name%[]" value="%value%" /> %label%</label>';
225
+ break;
226
+
227
+ case 'radio':
228
+ $html_field = '<label>' . '<input %checked%type="radio" name="' . $name . '" value="%value%" /> %label%</label>'; break;
229
+
230
+ case 'textarea':
231
+ $html_field = '%pre%<textarea%disabled% id="' . $name . '" name="' . $name . '" cols="%cols%" rows="%rows%">' . $value . '</textarea>%post%';
232
+ break;
233
+ }
234
+
235
+ if (!isset($data))
236
+ return;
237
+
238
+ if ($type == 'heading' && !is_array($data))
239
+ {
240
+ $return_html .= sprintf($html_field, $data) . $br;
241
+ }
242
+ else if ($type == 'radio'
243
+ || $type == 'checkbox' || $type == 'checkbox_multi'
244
+ || $type == 'select' || $type == 'select_multi'
245
+ ) {
246
+ foreach ($data as $key => $value)
247
+ {
248
+ if ($type == 'checkbox')
249
+ {
250
+ // handle checkbox a little bit differently
251
+ if ($this->form_options[$value] == 'yes')
252
+ {
253
+ $return_html .= str_replace(
254
+ array('%value%', '%name%', '%label%', '%checked%'),
255
+ array($value, $value, $key, $checked),
256
+ $html_field
257
+ );
258
+
259
+ $return_html .= apply_filters('bwp_option_after_' . $type . '_' . $name . '_checked', '', $value, $param);
260
+ $return_html .= $br;
261
+ }
262
+ else
263
+ {
264
+ $return_html .= str_replace(
265
+ array('%value%', '%name%', '%label%', '%checked%'),
266
+ array($value, $value, $key, ''),
267
+ $html_field
268
+ );
269
+
270
+ $return_html .= apply_filters('bwp_option_after_' . $type . '_' . $name, '', $value, $param);
271
+ $return_html .= $br;
272
+ }
273
+ }
274
+ else if ($type == 'checkbox_multi')
275
+ {
276
+ // handle a multi checkbox differently
277
+ if (isset($this->form_options[$name])
278
+ && is_array($this->form_options[$name])
279
+ && (in_array($value, $this->form_options[$name])
280
+ || array_key_exists($value, $this->form_options[$name]))
281
+ ) {
282
+ $return_html .= str_replace(
283
+ array('%value%', '%name%', '%label%', '%checked%'),
284
+ array($value, $name, $key, $checked),
285
+ $html_field
286
+ );
287
+
288
+ $return_html .= apply_filters('bwp_option_after_' . $type . '_' . $name . '_checked', '', $value, $param);
289
+ $return_html .= $br;
290
+ }
291
+ else
292
+ {
293
+ $return_html .= str_replace(
294
+ array('%value%', '%name%', '%label%', '%checked%'),
295
+ array($value, $name, $key, ''),
296
+ $html_field
297
+ );
298
+
299
+ $return_html .= apply_filters('bwp_option_after_' . $type . '_' . $name, '', $value, $param);
300
+ $return_html .= $br;
301
+ }
302
+ }
303
+ else if (isset($this->form_options[$name])
304
+ && ($this->form_options[$name] == $value
305
+ || (is_array($this->form_options[$name])
306
+ && (in_array($value, $this->form_options[$name])
307
+ || array_key_exists($value, $this->form_options[$name]))))
308
+ ) {
309
+ $return_html .= str_replace(
310
+ array('%value%', '%name%', '%label%', '%option%', '%checked%', '%selected%', '%pre%', '%post%'),
311
+ array($value, $value, $key, $key, $checked, $selected, $pre, $post),
312
+ $html_field
313
+ ) . $br;
314
+ }
315
+ else
316
+ $return_html .= str_replace(
317
+ array('%value%', '%name%', '%label%', '%option%', '%checked%', '%selected%', '%pre%', '%post%'),
318
+ array($value, $value, $key, $key, '', '', $pre, $post),
319
+ $html_field
320
+ ) . $br;
321
+ }
322
+ }
323
+ else
324
+ {
325
+ foreach ($array_search as &$keyword)
326
+ {
327
+ $array_replace[$keyword] = '';
328
+ if (!empty($data[$keyword]))
329
+ {
330
+ $array_replace[$keyword] = $data[$keyword];
331
+ }
332
+ $keyword = '%' . $keyword . '%';
333
+ }
334
+ $return_html = str_replace($array_search, $array_replace, $html_field) . $br;
335
+ }
336
+
337
+ // inline fields
338
+ $inline_html = '';
339
+ if (isset($this->form['inline_fields'][$name]) && is_array($this->form['inline_fields'][$name]))
340
+ {
341
+ foreach ($this->form['inline_fields'][$name] as $field => $field_type)
342
+ {
343
+ if (isset($this->form[$field_type][$field]))
344
+ $inline_html = ' ' . $this->generate_html_field($field_type, $this->form[$field_type][$field], $field, $in_section);
345
+ }
346
+ }
347
+
348
+ // Post
349
+ $post = (!empty($this->form['post'][$name])) ? ' ' . $this->form['post'][$name] : $post;
350
+
351
+ return str_replace('%pre%', $pre, $pre_html_field) . $return_html . str_replace('%post%', $post, $post_html_field) . $inline_html;
352
+ }
353
+
354
+ /**
355
+ * Generate HTML fields
356
+ *
357
+ * @params they explain themselves
358
+ */
359
+ function generate_html_fields($type, $name)
360
+ {
361
+ $item_label = '';
362
+ $return_html = '';
363
+
364
+ $item_key = array_keys($this->form_item_names, $name);
365
+
366
+ $input_class = ($type == 'heading') ? 'bwp-option-page-heading-desc' : 'bwp-option-page-inputs';
367
+
368
+ // An inline item can hold any HTML markup
369
+ // An example is to display some kinds of button right be low the label
370
+ $inline = '';
371
+ if (isset($this->form['inline']) && is_array($this->form['inline']) && array_key_exists($name, $this->form['inline']))
372
+ {
373
+ $inline = (empty($this->form['inline'][$name])) ? '' : $this->form['inline'][$name];
374
+ }
375
+ $inline .= "\n";
376
+
377
+ switch ($type)
378
+ {
379
+ case 'section':
380
+ if (!isset($this->form[$name]) || !is_array($this->form[$name]))
381
+ return;
382
+
383
+ $item_label = '<span class="bwp-opton-page-label">' . $this->form_item_labels[$item_key[0]] . $inline . '</span>';
384
+
385
+ foreach ($this->form[$name] as $section_field)
386
+ {
387
+ $type = $section_field[0];
388
+ $name = $section_field['name'];
389
+
390
+ if (isset($this->form[$section_field[0]]))
391
+ {
392
+ $return_html .= $this->generate_html_field($section_field[0], $this->form[$type][$name], $name, true);
393
+ }
394
+ }
395
+ break;
396
+
397
+ default:
398
+ if (!isset($this->form[$type][$name])
399
+ || ($type != 'heading' && !is_array($this->form[$type][$name])))
400
+ return;
401
+
402
+ $item_label = $type != 'checkbox' && $type != 'checkbox_multi' && $type != 'radio'
403
+ ? '<label class="bwp-opton-page-label" for="' . $name . '">'
404
+ . $this->form_item_labels[$item_key[0]] . $inline
405
+ . '</label>'
406
+ : '<span class="bwp-opton-page-label type-' . $type . '">'
407
+ . $this->form_item_labels[$item_key[0]] . $inline
408
+ . '</span>';
409
+ $item_label = $type == 'heading'
410
+ ? '<h3>' . $this->form_item_labels[$item_key[0]] . '</h3>' . $inline
411
+ : $item_label;
412
+
413
+ if (isset($this->form[$type]))
414
+ $return_html = $this->generate_html_field($type, $this->form[$type][$name], $name);
415
+ break;
416
+ }
417
+
418
+ // A container can hold some result executed by customized script,
419
+ // such as displaying something when user press the submit button
420
+ $containers = '';
421
+ if (isset($this->form['container'])
422
+ && is_array($this->form['container'])
423
+ && array_key_exists($name, $this->form['container'])
424
+ ) {
425
+ $container_array = (array) $this->form['container'][$name];
426
+ foreach ($container_array as $container)
427
+ $containers .= empty($container)
428
+ ? '<div style="display: none;"><!-- --></div>'
429
+ : '<div class="bwp-clear">' . $container . '</div>' . "\n";
430
+ }
431
+
432
+ $pure_return = trim(strip_tags($return_html));
433
+ if (empty($pure_return) && $type == 'heading')
434
+ return $item_label . $containers;
435
+ else
436
+ return $item_label . '<p class="' . $input_class . '">'
437
+ . $return_html . '</p>'
438
+ . $containers;
439
+ }
440
+
441
+ /**
442
+ * Generate HTML form
443
+ *
444
+ * @see Constructor
445
+ */
446
+ function generate_html_form()
447
+ {
448
+ $return_str = '<div class="wrap" style="padding-bottom: 20px;">' . "\n";
449
+ if (sizeof($this->form_tabs) >= 2)
450
+ $return_str .= apply_filters('bwp-admin-form-icon', '<div class="icon32" id="icon-options-general"><br></div>' . "\n");
451
+ else
452
+ $return_str .= '<div class="icon32" id="icon-options-general"><br></div>';
453
+
454
+ if (sizeof($this->form_tabs) >= 2)
455
+ {
456
+ $count = 0;
457
+ $return_str .= '<h2 class="bwp-option-page-tabs">' . "\n";
458
+ $return_str .= apply_filters('bwp-admin-plugin-version', '') . "\n";
459
+ foreach ($this->form_tabs as $title => $link)
460
+ {
461
+ $count++;
462
+ $active = ($count == $this->current_tab) ? ' nav-tab-active' : '';
463
+ $return_str .= '<a class="nav-tab' . $active . '" href="' . $link . '">' . $title . '</a>' . "\n";
464
+ }
465
+ $return_str .= '</h2>' . "\n";
466
+ }
467
+ else if (!isset($this->form_tabs[0]))
468
+ {
469
+ $title = array_keys($this->form_tabs);
470
+ $return_str .= '<h2>' . $title[0] . '</h2>' . "\n";
471
+ }
472
+ else
473
+ $return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . "\n";
474
+
475
+ $return_str .= apply_filters('bwp_option_before_form', '');
476
+ echo $return_str;
477
+ do_action('bwp_option_action_before_form');
478
+ $return_str = '';
479
+ $return_str .= '<form class="bwp-option-page" name="' . $this->form_name . '" method="post" action="">' . "\n";
480
+ if (function_exists('wp_nonce_field'))
481
+ {
482
+ echo $return_str;
483
+ wp_nonce_field($this->form_name);
484
+ $return_str = '';
485
+ }
486
+ $return_str .= '<ul>' . "\n";
487
+
488
+ // generate filled form
489
+ if (isset($this->form_items) && is_array($this->form_items))
490
+ foreach ($this->form_items as $key => $type)
491
+ {
492
+ if (!empty($this->form_item_names[$key]) && !empty($this->form_item_labels[$key]))
493
+ {
494
+ $return_str .= '<li class="bwp-clear">' . $this->generate_html_fields($type, $this->form_item_names[$key]) . '</li>' . "\n";
495
+ }
496
+ }
497
+
498
+ $return_str .= '</ul>' . "\n";
499
+ $return_str .= apply_filters('bwp_option_before_submit_button', '');
500
+ echo $return_str;
501
+ do_action('bwp_option_action_before_submit_button');
502
+ $return_str = '';
503
+ $return_str .= apply_filters('bwp_option_submit_button', '<p class="submit"><input type="submit" class="button-primary" name="submit_' . $this->form_name . '" value="' . __('Save Changes') . '" /></p>') . "\n";
504
+ $return_str .= '</form>' . "\n";
505
+ $return_str .= '</div>' . "\n";
506
+
507
+ echo $return_str;
508
+ }
509
+
510
+ }
includes/bwp-option-page/includes/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ // White page
3
+ ?>
includes/bwp-option-page/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ // White page
3
+ ?>
includes/bwp-option-page/js/paypal.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){
2
+ /* Paypal form */
3
+ jQuery('.paypal-form select[name="amount"]').change(function() {
4
+ if (jQuery(this).val() == '100.00')
5
+ {
6
+ jQuery(this).hide();
7
+ jQuery('.paypal-alternate-input').append('<input type="text" style="padding: 3px; width: 70px; text-align: right; line-height: 1;" name="amount" value="15.00" /> <code>$</code>');
8
+ jQuery('.paypal-alternate-input').show();
9
+ }
10
+ });
11
+ });
includes/class-bwp-framework-improved.php ADDED
@@ -0,0 +1,727 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014 Khang Minh <betterwp.net>
4
+ * @license http://www.gnu.org/licenses/gpl.html GNU GENERAL PUBLIC LICENSE VERSION 3.0 OR LATER
5
+ */
6
+
7
+ class BWP_FRAMEWORK_IMPROVED {
8
+
9
+ /**
10
+ * Database related data
11
+ */
12
+ var $options = array();
13
+
14
+ /**
15
+ * Default data
16
+ */
17
+ var $options_default = array(), $site_options = array();
18
+
19
+ /**
20
+ * Hold db option keys
21
+ */
22
+ var $option_keys = array();
23
+
24
+ /**
25
+ * Hold extra option keys
26
+ */
27
+ var $extra_option_keys = array();
28
+
29
+ /**
30
+ * Hold old option pages
31
+ */
32
+ var $option_pages = array();
33
+
34
+ /**
35
+ * Key to identify plugin
36
+ */
37
+ var $plugin_key;
38
+
39
+ /**
40
+ * Constant Key to identify plugin
41
+ */
42
+ var $plugin_ckey;
43
+
44
+ /**
45
+ * Domain Key to identify plugin
46
+ */
47
+ var $plugin_dkey;
48
+
49
+ /**
50
+ * Title of the plugin
51
+ */
52
+ var $plugin_title;
53
+
54
+ /**
55
+ * Homepage of the plugin
56
+ */
57
+ var $plugin_url;
58
+
59
+ /**
60
+ * Urls to various parts of homepage or other places
61
+ *
62
+ * Expect to have a format of array('relative' => bool, 'url' => url)
63
+ */
64
+ var $urls = array();
65
+
66
+ /**
67
+ * Plugin file
68
+ */
69
+ var $plugin_file;
70
+
71
+ /**
72
+ * Plugin folder
73
+ */
74
+ var $plugin_folder;
75
+
76
+ /**
77
+ * Plugin WP url
78
+ */
79
+ var $plugin_wp_url;
80
+
81
+ /**
82
+ * Version of the plugin
83
+ */
84
+ var $plugin_ver = '';
85
+
86
+ /**
87
+ * Message shown to user (Warning, Notes, etc.)
88
+ */
89
+ var $notices = array(), $notice_shown = false;
90
+
91
+ /**
92
+ * Error shown to user
93
+ */
94
+ var $errors = array(), $error_shown = false;
95
+
96
+ /**
97
+ * Capabilities to manage this plugin
98
+ */
99
+ var $plugin_cap = 'manage_options';
100
+
101
+ /**
102
+ * Whether or not to create filter for media paths
103
+ */
104
+ var $need_media_filters;
105
+
106
+ /**
107
+ * Form tabs to build
108
+ */
109
+ var $form_tabs = array();
110
+
111
+ /**
112
+ * Other things
113
+ */
114
+ var $wp_ver = '3.0';
115
+ var $php_ver = '5';
116
+ var $domain = '';
117
+
118
+ /**
119
+ * Other special variables
120
+ */
121
+ protected $_menu_under_settings = false;
122
+ protected $_simple_menu = false;
123
+
124
+ /**
125
+ * Build base properties
126
+ */
127
+ protected function build_properties($key, $dkey, $options, $plugin_title = '',
128
+ $plugin_file = '', $plugin_url = '', $need_media_filters = true)
129
+ {
130
+ $this->plugin_key = strtolower($key);
131
+ $this->plugin_ckey = strtoupper($key);
132
+ $this->plugin_dkey = $dkey;
133
+ $this->plugin_title = $plugin_title;
134
+ $this->plugin_url = $plugin_url;
135
+
136
+ $this->options_default = $options;
137
+ $this->need_media_filters = (boolean) $need_media_filters;
138
+
139
+ $this->plugin_file = $plugin_file;
140
+ $this->plugin_folder = basename(dirname($plugin_file));
141
+
142
+ $this->pre_init_actions();
143
+ $this->init_actions();
144
+
145
+ // Load locale
146
+ load_plugin_textdomain($dkey, false, $this->plugin_folder . '/languages');
147
+ }
148
+
149
+ protected function add_option_key($key, $option, $title)
150
+ {
151
+ $this->option_keys[$key] = $option;
152
+ $this->option_pages[$key] = $title;
153
+ }
154
+
155
+ protected function add_extra_option_key($key, $option, $title)
156
+ {
157
+ $this->extra_option_keys[$key] = $option;
158
+ $this->option_pages[$key] = $title;
159
+ }
160
+
161
+ public function add_icon()
162
+ {
163
+ return '<div class="icon32" id="icon-bwp-plugin" '
164
+ . 'style=\'background-image: url("'
165
+ . constant($this->plugin_ckey . '_IMAGES')
166
+ . '/icon_menu_32.png");\'><br></div>' . "\n";
167
+ }
168
+
169
+ protected function set_version($ver = '', $type = '')
170
+ {
171
+ switch ($type)
172
+ {
173
+ case '': $this->plugin_ver = $ver;
174
+ break;
175
+ case 'php': $this->php_ver = $ver;
176
+ break;
177
+ case 'wp': $this->wp_ver = $ver;
178
+ break;
179
+ }
180
+ }
181
+
182
+ protected function get_version($type = '')
183
+ {
184
+ switch ($type)
185
+ {
186
+ case '': return $this->plugin_ver;
187
+ break;
188
+ case 'php': return $this->php_ver;
189
+ break;
190
+ case 'wp': return $this->wp_ver;
191
+ break;
192
+ }
193
+ }
194
+
195
+ protected function check_required_versions()
196
+ {
197
+ if (version_compare(PHP_VERSION, $this->php_ver, '<')
198
+ || version_compare(get_bloginfo('version'), $this->wp_ver, '<')
199
+ ) {
200
+ add_action('admin_notices', array($this, 'warn_required_versions'));
201
+ add_action('network_admin_notices', array($this, 'warn_required_versions'));
202
+ return false;
203
+ }
204
+ else
205
+ return true;
206
+ }
207
+
208
+ public function warn_required_versions()
209
+ {
210
+ echo '<div class="error"><p>' . sprintf(
211
+ __('%s requires WordPress <strong>%s</strong> or higher '
212
+ . 'and PHP <strong>%s</strong> or higher. '
213
+ . 'The plugin will not protected function until you update your software. '
214
+ . 'Please deactivate this plugin.', $this->plugin_dkey),
215
+ $this->plugin_title, $this->wp_ver, $this->php_ver)
216
+ . '</p></div>';
217
+ }
218
+
219
+ public function show_donation()
220
+ {
221
+ $showable = apply_filters('bwp_donation_showable', true);
222
+ $ad_showable = apply_filters('bwp_ad_showable', true);
223
+ ?>
224
+ <div id="bwp-info-place">
225
+ <div id="bwp-donation" style="margin-bottom: 0px;">
226
+ <a href="<?php echo $this->plugin_url; ?>"><?php echo $this->plugin_title; ?></a> <small>v<?php echo $this->plugin_ver; ?></small><br />
227
+ <small>
228
+ <a href="<?php echo str_replace('/wordpress-plugins/', '/topic/', $this->plugin_url); ?>"><?php _e('Development Log', $this->plugin_dkey); ?></a> &ndash; <a href="<?php echo $this->plugin_url . 'faq/'; ?>" title="<?php _e('Frequently Asked Questions', $this->plugin_dkey) ?>"><?php _e('FAQ', $this->plugin_dkey); ?></a> &ndash; <a href="http://betterwp.net/contact/" title="<?php _e('Got a problem? Send me a feedback!', $this->plugin_dkey) ?>"><?php _e('Contact', $this->plugin_dkey); ?></a>
229
+ </small>
230
+ <br />
231
+ <?php
232
+ if (true == $showable || ($this->is_multisite() && is_super_admin()))
233
+ {
234
+ ?>
235
+ <small><?php _e('You can buy me some special coffees if you appreciate my work, thank you!', $this->plugin_dkey); ?></small>
236
+ <form class="paypal-form" action="https://www.paypal.com/cgi-bin/webscr" method="post">
237
+ <p>
238
+ <input type="hidden" name="cmd" value="_xclick">
239
+ <input type="hidden" name="business" value="NWBB8JUDW5VSY">
240
+ <input type="hidden" name="lc" value="VN">
241
+ <input type="hidden" name="button_subtype" value="services">
242
+ <input type="hidden" name="no_note" value="0">
243
+ <input type="hidden" name="cn" value="Would you like to say anything to me?">
244
+ <input type="hidden" name="no_shipping" value="1">
245
+ <input type="hidden" name="rm" value="1">
246
+ <input type="hidden" name="return" value="http://betterwp.net">
247
+ <input type="hidden" name="currency_code" value="USD">
248
+ <input type="hidden" name="bn" value="PP-BuyNowBF:icon-paypal.gif:NonHosted">
249
+ <input type="hidden" name="item_name" value="<?php printf(__('Donate to %s', $this->plugin_dkey), $this->plugin_title); ?>" />
250
+ <select name="amount">
251
+ <option value="5.00"><?php _e('One cup $5.00', $this->plugin_dkey); ?></option>
252
+ <option value="10.00"><?php _e('Two cups $10.00', $this->plugin_dkey); ?></option>
253
+ <option value="25.00"><?php _e('Five cups! $25.00', $this->plugin_dkey); ?></option>
254
+ <option value="50.00"><?php _e('One LL-cup!!! $50.00', $this->plugin_dkey); ?></option>
255
+ <option value="100.00"><?php _e('... or any amount!', $this->plugin_dkey); ?></option>
256
+ </select>
257
+ <span class="paypal-alternate-input" style="display: none;"><!-- --></span>
258
+ <input class="paypal-submit" type="image" src="<?php echo $this->plugin_wp_url . 'includes/bwp-option-page/images/icon-paypal.gif'; ?>" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
259
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
260
+ </p>
261
+ </form>
262
+ <?php
263
+ }
264
+ ?>
265
+ </div>
266
+ <div class="bwp-separator">
267
+ <div style="height: 10px; width: 5px; background-color: #cccccc; margin: 0 auto;"><!-- --></div>
268
+ </div>
269
+ <div id="bwp-contact">
270
+ <a class="bwp-rss" href="http://feeds.feedburner.com/BetterWPnet"><?php _e('Latest updates from BetterWP.net!', $this->plugin_dkey); ?></a>
271
+ <a class="bwp-twitter" href="http://twitter.com/0dd0ne0ut"><?php _e('Follow me on Twitter!', $this->plugin_dkey); ?></a>
272
+ </div>
273
+ <?php
274
+ if (true == $ad_showable)
275
+ {
276
+ ?>
277
+ <div class="bwp-separator">
278
+ <div style="height: 10px; width: 5px; background-color: #cccccc; margin: 0 auto;"><!-- --></div>
279
+ </div>
280
+ <div id="bwp-ads">
281
+ <p><strong><?php _e('This Plugin is Proudly Sponsored By', $this->plugin_dkey); ?></strong></p>
282
+ <div style="width: 250px; margin: 0 auto;">
283
+ <a href="http://managewp.com/?utm_source=<?php echo $this->plugin_key; ?>&amp;utm_medium=Banner&amp;utm_content=mwp250_2&amp;utm_campaign=Plugins">
284
+ <img src="<?php echo $this->plugin_wp_url . 'includes/bwp-option-page/images/ad_250x250.png'; ?>" />
285
+ </a>
286
+ </div>
287
+ </div>
288
+ <?php
289
+ }
290
+ ?>
291
+ </div>
292
+ <?php
293
+ }
294
+
295
+ public function show_version()
296
+ {
297
+ if (empty($this->plugin_ver)) return '';
298
+
299
+ return '<a class="nav-tab version" title="'
300
+ . sprintf(esc_attr(__('You are using version %s!', $this->plugin_dkey)), $this->plugin_ver)
301
+ . '">' . $this->plugin_ver . '</a>';
302
+ }
303
+
304
+ protected function pre_init_actions()
305
+ {
306
+ $this->pre_init_build_constants();
307
+ $this->pre_init_build_options();
308
+ $this->pre_init_properties();
309
+ $this->load_libraries();
310
+ $this->pre_init_hooks();
311
+ $this->pre_init_update_plugin();
312
+
313
+ // Support installation and uninstallation
314
+ register_activation_hook($this->plugin_file, array($this, 'install'));
315
+ register_deactivation_hook($this->plugin_file, array($this, 'uninstall'));
316
+ }
317
+
318
+ protected function init_actions()
319
+ {
320
+ add_action('init', array($this, 'build_wp_properties'));
321
+ add_action('init', array($this, 'init'));
322
+
323
+ // register backend hooks
324
+ add_action('admin_menu', array($this, 'init_admin'), 1);
325
+ }
326
+
327
+ public function init()
328
+ {
329
+ do_action($this->plugin_key . '_pre_init');
330
+
331
+ $this->init_update_plugin();
332
+ $this->build_constants();
333
+ $this->build_options();
334
+ $this->init_properties();
335
+ $this->init_hooks();
336
+ $this->enqueue_media();
337
+
338
+ do_action($this->plugin_key . '_loaded');
339
+
340
+ // icon 32px
341
+ if ($this->is_admin_page())
342
+ {
343
+ add_filter('bwp-admin-form-icon', array($this, 'add_icon'));
344
+ add_filter('bwp-admin-plugin-version', array($this, 'show_version'));
345
+ add_action('bwp_option_action_before_form', array($this, 'show_donation'), 12);
346
+ }
347
+ }
348
+
349
+ protected function add_cap($cap)
350
+ {
351
+ $this->plugin_cap = $cap;
352
+ }
353
+
354
+ public function build_wp_properties()
355
+ {
356
+ // set the plugin WP url here so it can be filtered
357
+ if (defined('BWP_USE_SYMLINKS'))
358
+ // make use of symlinks on development environment
359
+ $this->plugin_wp_url = trailingslashit(plugins_url($this->plugin_folder));
360
+ else
361
+ // this should allow other package to include BWP plugins while
362
+ // retaining correct URLs pointing to assets
363
+ $this->plugin_wp_url = trailingslashit(plugin_dir_url($this->plugin_file));
364
+ }
365
+
366
+ protected function pre_init_build_constants()
367
+ {
368
+ // url to plugin bwp website
369
+ define($this->plugin_ckey . '_PLUGIN_URL', $this->plugin_url);
370
+ // the capability needed to configure this plugin
371
+ define($this->plugin_ckey . '_CAPABILITY', $this->plugin_cap);
372
+
373
+ // define registered option keys, to be used when building option pages
374
+ // and build options
375
+ foreach ($this->option_keys as $key => $option)
376
+ {
377
+ define(strtoupper($key), $option);
378
+ }
379
+ foreach ($this->extra_option_keys as $key => $option)
380
+ {
381
+ define(strtoupper($key), $option);
382
+ }
383
+ }
384
+
385
+ protected function build_constants()
386
+ {
387
+ // these constants are only available once plugin_wp_url is available
388
+ if (true == $this->need_media_filters)
389
+ {
390
+ define($this->plugin_ckey . '_IMAGES',
391
+ apply_filters($this->plugin_key . '_image_path',
392
+ $this->plugin_wp_url . 'images'));
393
+ define($this->plugin_ckey . '_CSS',
394
+ apply_filters($this->plugin_key . '_css_path',
395
+ $this->plugin_wp_url . 'css'));
396
+ define($this->plugin_ckey . '_JS',
397
+ apply_filters($this->plugin_key . '_js_path',
398
+ $this->plugin_wp_url . 'js'));
399
+ }
400
+ else
401
+ {
402
+ define($this->plugin_ckey . '_IMAGES', $this->plugin_wp_url . 'images');
403
+ define($this->plugin_ckey . '_CSS', $this->plugin_wp_url . 'css');
404
+ define($this->plugin_ckey . '_JS', $this->plugin_wp_url . 'js');
405
+ }
406
+ }
407
+
408
+ protected function pre_init_build_options()
409
+ {
410
+ $this->build_options();
411
+ }
412
+
413
+ protected function build_options()
414
+ {
415
+ // Get all options and merge them
416
+ $options = $this->options_default;
417
+ foreach ($this->option_keys as $option)
418
+ {
419
+ $db_option = get_option($option);
420
+ if ($db_option && is_array($db_option))
421
+ $options = array_merge($options, $db_option);
422
+ unset($db_option);
423
+ // Also check for global options if in Multi-site
424
+ if ($this->is_multisite())
425
+ {
426
+ $db_option = get_site_option($option);
427
+ if ($db_option && is_array($db_option))
428
+ {
429
+ $temp = array();
430
+ foreach ($db_option as $k => $o)
431
+ {
432
+ if (in_array($k, $this->site_options))
433
+ $temp[$k] = $o;
434
+ }
435
+ $options = array_merge($options, $temp);
436
+ }
437
+ }
438
+ }
439
+ $this->options = $options;
440
+ }
441
+
442
+ protected function pre_init_properties()
443
+ {
444
+ /* intentionally left blank */
445
+ }
446
+
447
+ protected function init_properties()
448
+ {
449
+ /* intentionally left blank */
450
+ }
451
+
452
+ protected function load_libraries()
453
+ {
454
+ /* intentionally left blank */
455
+ }
456
+
457
+ protected function update_plugin($when = '')
458
+ {
459
+ if (!is_admin())
460
+ return;
461
+
462
+ $current_version = $this->plugin_ver;
463
+ $db_version = get_option($this->plugin_key . '_version');
464
+
465
+ $action_hook = 'pre_init' == $when
466
+ ? $this->plugin_key . '_upgrade'
467
+ : $this->plugin_key . '_init_upgrade';
468
+
469
+ if (!$db_version || version_compare($db_version, $current_version, '<'))
470
+ {
471
+ do_action($action_hook, $db_version, $current_version);
472
+ // only mark as upgraded when this is init update
473
+ if ('init' == $when)
474
+ update_option($this->plugin_key . '_version', $current_version);
475
+ }
476
+ }
477
+
478
+ protected function pre_init_update_plugin()
479
+ {
480
+ $this->update_plugin('pre_init');
481
+ }
482
+
483
+ protected function init_update_plugin()
484
+ {
485
+ $this->update_plugin('init');
486
+ }
487
+
488
+ protected function pre_init_hooks()
489
+ {
490
+ /* intentionally left blank */
491
+ }
492
+
493
+ protected function init_hooks()
494
+ {
495
+ /* intentionally left blank */
496
+ }
497
+
498
+ protected function enqueue_media()
499
+ {
500
+ /* intentionally left blank */
501
+ }
502
+
503
+ public function install()
504
+ {
505
+ /* intentionally left blank */
506
+ }
507
+
508
+ public function uninstall()
509
+ {
510
+ /* intentionally left blank */
511
+ }
512
+
513
+ protected function is_admin_page($page = '')
514
+ {
515
+ if (is_admin() && !empty($_GET['page'])
516
+ && (in_array($_GET['page'], $this->option_keys)
517
+ || in_array($_GET['page'], $this->extra_option_keys))
518
+ && (empty($page)
519
+ || (!empty($page) && $page == $_GET['page']))
520
+ ) {
521
+ return true;
522
+ }
523
+ }
524
+
525
+ public function get_admin_page($page)
526
+ {
527
+ $option_script = !$this->_menu_under_settings && !$this->_simple_menu
528
+ ? 'admin.php'
529
+ : 'options-general.php';
530
+
531
+ return add_query_arg(array('page' => $page), admin_url($option_script));
532
+ }
533
+
534
+ public function plugin_action_links($links, $file)
535
+ {
536
+ $option_keys = array_values($this->option_keys);
537
+
538
+ if (false !== strpos(plugin_basename($this->plugin_file), $file))
539
+ {
540
+ $links[] = '<a href="' . $this->get_admin_page($option_keys[0]) . '">'
541
+ . __('Settings') . '</a>';
542
+ }
543
+
544
+ return $links;
545
+ }
546
+
547
+ public function init_admin()
548
+ {
549
+ $this->_menu_under_settings = apply_filters('bwp_menus_under_settings', false);
550
+
551
+ add_filter('plugin_action_links', array($this, 'plugin_action_links'), 10, 2);
552
+
553
+ if ($this->is_admin_page())
554
+ {
555
+ // Build tabs
556
+ $this->build_tabs();
557
+
558
+ // Load option page builder
559
+ if (!class_exists('BWP_OPTION_PAGE'))
560
+ require_once dirname(__FILE__) . '/bwp-option-page/bwp-option-page.php';
561
+
562
+ // Enqueue style sheets and scripts for the option page
563
+ wp_enqueue_style(
564
+ 'bwp-option-page',
565
+ $this->plugin_wp_url . 'includes/bwp-option-page/css/bwp-option-page.css',
566
+ self::is_multisite() ? array('wp-admin') : array(),
567
+ '1.1.0'
568
+ );
569
+
570
+ wp_enqueue_script(
571
+ 'bwp-paypal-js',
572
+ $this->plugin_wp_url . 'includes/bwp-option-page/js/paypal.js',
573
+ array('jquery')
574
+ );
575
+ }
576
+
577
+ $this->build_menus();
578
+ }
579
+
580
+ /**
581
+ * Build the Menus
582
+ */
583
+ protected function build_menus()
584
+ {
585
+ /* intentionally left blank */
586
+ }
587
+
588
+ protected function build_tabs()
589
+ {
590
+ $option_script = !$this->_menu_under_settings
591
+ ? 'admin.php'
592
+ : 'options-general.php';
593
+
594
+ foreach ($this->option_pages as $key => $page)
595
+ {
596
+ $pagelink = !empty($this->option_keys[$key])
597
+ ? $this->option_keys[$key]
598
+ : $this->extra_option_keys[$key];
599
+
600
+ $this->form_tabs[$page] = admin_url($option_script)
601
+ . '?page=' . $pagelink;
602
+ }
603
+ }
604
+
605
+ /**
606
+ * Build the option pages
607
+ *
608
+ * Utilizes BWP Option Page Builder (@see BWP_OPTION_PAGE)
609
+ */
610
+ protected function build_option_pages()
611
+ {
612
+ /* intentionally left blank */
613
+ }
614
+
615
+ protected function add_notice($notice)
616
+ {
617
+ if (!in_array($notice, $this->notices))
618
+ {
619
+ $this->notices[] = $notice;
620
+ add_action('bwp_option_action_before_form', array($this, 'show_notices'));
621
+ }
622
+ }
623
+
624
+ public function show_notices()
625
+ {
626
+ if (false == $this->notice_shown)
627
+ {
628
+ foreach ($this->notices as $notice)
629
+ {
630
+ echo '<div class="updated fade"><p>' . $notice . '</p></div>';
631
+ }
632
+ $this->notice_shown = true;
633
+ }
634
+ }
635
+
636
+ protected function add_error($error)
637
+ {
638
+ if (!in_array($error, $this->errors))
639
+ {
640
+ $this->errors[] = $error;
641
+ add_action('bwp_option_action_before_form', array($this, 'show_errors'));
642
+ }
643
+ }
644
+
645
+ public function show_errors()
646
+ {
647
+ if (false == $this->error_shown)
648
+ {
649
+ foreach ($this->errors as $error)
650
+ {
651
+ echo '<div class="error"><p>' . $error . '</p></div>';
652
+ }
653
+ $this->error_shown = true;
654
+ }
655
+ }
656
+
657
+ public function add_url($key, $url, $relative = true)
658
+ {
659
+ $this->urls[$key] = array(
660
+ 'relative' => $relative,
661
+ 'url' => $url
662
+ );
663
+ }
664
+
665
+ public function get_url($key)
666
+ {
667
+ if (isset($this->urls[$key]))
668
+ {
669
+ $url = $this->urls[$key];
670
+ if ($url['relative'])
671
+ return trailingslashit($this->plugin_url) . $url['url'];
672
+
673
+ return $url['url'];
674
+ }
675
+
676
+ return '';
677
+ }
678
+
679
+ public static function is_multisite()
680
+ {
681
+ if (function_exists('is_multisite') && is_multisite())
682
+ return true;
683
+
684
+ if (defined('MULTISITE'))
685
+ return MULTISITE;
686
+
687
+ if (defined('SUBDOMAIN_INSTALL') || defined('VHOST') || defined('SUNRISE'))
688
+ return true;
689
+
690
+ return false;
691
+ }
692
+
693
+ public static function is_subdomain_install()
694
+ {
695
+ if (defined('SUBDOMAIN_INSTALL') && SUBDOMAIN_INSTALL)
696
+ return true;
697
+
698
+ return false;
699
+ }
700
+
701
+ protected static function is_normal_admin()
702
+ {
703
+ if (self::is_multisite() && !is_super_admin())
704
+ return true;
705
+ return false;
706
+ }
707
+
708
+ protected static function is_apache()
709
+ {
710
+ if (isset($_SERVER['SERVER_SOFTWARE'])
711
+ && false !== stripos($_SERVER['SERVER_SOFTWARE'], 'apache')
712
+ ) {
713
+ return true;
714
+ }
715
+ return false;
716
+ }
717
+
718
+ protected static function is_nginx()
719
+ {
720
+ if (isset($_SERVER['SERVER_SOFTWARE'])
721
+ && false !== stripos($_SERVER['SERVER_SOFTWARE'], 'nginx')
722
+ ) {
723
+ return true;
724
+ }
725
+ return false;
726
+ }
727
+ }
includes/class-bwp-recaptcha-cf7.php ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014 Khang Minh <betterwp.net>
4
+ * @license http://www.gnu.org/licenses/gpl.html GNU GENERAL PUBLIC LICENSE VERSION 3.0 OR LATER
5
+ */
6
+
7
+ /**
8
+ * This class provides integration between Contact Form 7 and BWP reCAPTCHA
9
+ * @since 1.1.0
10
+ */
11
+ class BWP_RECAPTCHA_CF7
12
+ {
13
+ /**
14
+ * Hold BWP reCAPTCHA instance
15
+ *
16
+ * @access private
17
+ */
18
+ private static $_bwpRcInstance;
19
+
20
+ /**
21
+ * Hold BWP reCAPTCHA options
22
+ *
23
+ * @access private
24
+ */
25
+ private static $_options;
26
+
27
+ /**
28
+ * Text domain
29
+ *
30
+ * @access private
31
+ */
32
+ private static $_domain;
33
+
34
+ /**
35
+ * Private constructor
36
+ *
37
+ * @access private
38
+ */
39
+ private function __construct() {}
40
+
41
+ /**
42
+ * Init the integration
43
+ *
44
+ * @access public
45
+ */
46
+ public static function init($bwpRcInstance)
47
+ {
48
+ // make use of BWP reCAPTCHA's options and domain
49
+ self::$_bwpRcInstance = $bwpRcInstance;
50
+ self::$_options = $bwpRcInstance->options;
51
+ self::$_domain = $bwpRcInstance->plugin_dkey;
52
+
53
+ // register our main hooks to CF7
54
+ self::_registerHooks();
55
+ }
56
+
57
+ /**
58
+ * Adds recaptcha to Contact Form 7
59
+ *
60
+ * Register necessary hooks so that admin can add recaptcha to forms and
61
+ * validate captcha properly
62
+ *
63
+ * @return void
64
+ * @access private
65
+ */
66
+ private static function _registerHooks()
67
+ {
68
+ // admin hooks
69
+ add_action('admin_init', array(__CLASS__, 'registerCf7Tag'), 45);
70
+
71
+ // front-end hooks
72
+ add_action('wpcf7_init', array(__CLASS__, 'registerCf7Shortcode'));
73
+
74
+ if (self::$_options['select_cf7_tag'] == 'bwp-recaptcha') {
75
+ add_filter('wpcf7_validate_bwp-recaptcha', array(__CLASS__, 'validateCaptcha'), 10, 2);
76
+ } else {
77
+ add_filter('wpcf7_validate_recaptcha', array(__CLASS__, 'validateCaptcha'), 10, 2);
78
+ }
79
+
80
+ add_filter('wpcf7_ajax_json_echo', array(__CLASS__, 'refreshCaptcha'));
81
+
82
+ // other hooks
83
+ //self::_enqueueMedia();
84
+ }
85
+
86
+ private static function _enqueueMedia()
87
+ {
88
+ wp_enqueue_script('recaptcha-ajax', 'http://www.google.com/recaptcha/api/js/recaptcha_ajax.js');
89
+ }
90
+
91
+ private static function _renderCf7TagPane($for)
92
+ {
93
+ $id = 'wpcf7-tg-pane-' . $for;
94
+ ?>
95
+ <div id="<?php echo $id; ?>" class="hidden">
96
+
97
+ <form action="">
98
+
99
+ <table>
100
+ <tr>
101
+ <td colspan="2">
102
+ <strong style="color: #e6255b"><?php echo esc_html(
103
+ __('This reCAPTCHA tag is provided by the BWP reCAPTCHA WordPress plugin.', self::$_domain)
104
+ ); ?></strong><br />
105
+ <a href="<?php echo self::$_bwpRcInstance->plugin_url; ?>"><?php echo self::$_bwpRcInstance->plugin_url; ?></a><br />
106
+ <?php printf(__('Please refer to <a target="_blank" href="%s">'
107
+ . 'BWP reCAPTCHA\'s documentation </a> for '
108
+ . 'a quick guide on how to customize the look and feel '
109
+ . 'of this tag.', self::$_domain),
110
+ 'http://betterwp.net/wordpress-plugins/bwp-recaptcha/#customization'); ?>
111
+ </td>
112
+ </tr>
113
+
114
+ <tr>
115
+ <td><?php echo esc_html(__('Name', 'contact-form-7')); ?><br />
116
+ <input type="text" name="name" class="tg-name oneline" /></td>
117
+ <td></td>
118
+ </tr>
119
+ </table>
120
+
121
+ <div class="tg-tag">
122
+ <?php echo esc_html(__( "Copy this code and paste it into the form left.", 'contact-form-7')); ?><br />
123
+ <input type="text" name="<?php echo $for; ?>" class="tag" readonly="readonly" onfocus="this.select()" />
124
+ </div>
125
+
126
+ </form>
127
+
128
+ </div>
129
+ <?php
130
+ }
131
+
132
+ /**
133
+ * Add BWP reCAPTCHA tag to CF7's tag selection pane
134
+ *
135
+ * @return void
136
+ * @access public
137
+ */
138
+ public static function registerCf7Tag()
139
+ {
140
+ if (!function_exists('wpcf7_add_tag_generator')) {
141
+ return false;
142
+ }
143
+
144
+ if (self::$_options['select_cf7_tag'] == 'bwp-recaptcha') {
145
+ wpcf7_add_tag_generator(
146
+ 'bwp-recaptcha',
147
+ 'BWP reCAPTCHA', // this string needs no translation
148
+ 'wpcf7-tg-pane-bwp-recaptcha',
149
+ array(__CLASS__, 'renderCf7BWPRecaptchaTagPane')
150
+ );
151
+ } else {
152
+ wpcf7_add_tag_generator(
153
+ 'recaptcha',
154
+ 'BWP reCAPTCHA', // this string needs no translation
155
+ 'wpcf7-tg-pane-recaptcha',
156
+ array(__CLASS__, 'renderCf7RecaptchaTagPane')
157
+ );
158
+ }
159
+ }
160
+
161
+ /**
162
+ * Render BWP reCAPTCHA tag pane for `bwp-recaptcha` shortcode
163
+ *
164
+ * @return void
165
+ * @access public
166
+ */
167
+ public static function renderCf7BWPRecaptchaTagPane(&$contactForm)
168
+ {
169
+ self::_renderCf7TagPane('bwp-recaptcha');
170
+ }
171
+
172
+ /**
173
+ * Render BWP reCAPTCHA tag pane for `recaptcha` shortcode
174
+ *
175
+ * @return void
176
+ * @access public
177
+ */
178
+ public static function renderCf7RecaptchaTagPane(&$contactForm)
179
+ {
180
+ self::_renderCf7TagPane('recaptcha');
181
+ }
182
+
183
+ /**
184
+ * Register the BWP reCAPTCHA shortcode to CF7
185
+ *
186
+ * @return void
187
+ * @access public
188
+ */
189
+ public static function registerCf7Shortcode()
190
+ {
191
+ if (!function_exists('wpcf7_add_shortcode')) {
192
+ return false;
193
+ }
194
+
195
+ if (self::$_options['select_cf7_tag'] == 'bwp-recaptcha') {
196
+ wpcf7_add_shortcode('bwp-recaptcha', array(__CLASS__, 'renderCf7Shortcode'), true);
197
+ } else {
198
+ wpcf7_add_shortcode('recaptcha', array(__CLASS__, 'renderCf7Shortcode'), true);
199
+ }
200
+ }
201
+
202
+ /**
203
+ * Render the actual CF7 reCAPTCHA shortcode
204
+ *
205
+ * @access public
206
+ * @uses WPCF7_Shortcode class
207
+ */
208
+ public static function renderCf7Shortcode($tag)
209
+ {
210
+ $rc = self::$_bwpRcInstance;
211
+
212
+ // some CF7-specific codes
213
+ $tag = new WPCF7_Shortcode($tag);
214
+ $name = $tag->name;
215
+
216
+ // if current user can bypass the captcha, no need to render anything
217
+ if ($rc->user_can_bypass()) {
218
+ return '';
219
+ }
220
+
221
+ // get validation error, if any
222
+ $error = function_exists('wpcf7_get_validation_error')
223
+ ? wpcf7_get_validation_error($name) : '';
224
+
225
+ ob_start();
226
+
227
+ do_action('bwp_recaptcha_add_markups');
228
+ $rcOutput = ob_get_contents();
229
+
230
+ ob_end_clean();
231
+
232
+ // we use ajax to populate recaptcha
233
+ /*$rcOutput = ''
234
+ . "\n" . '<script type="text/javascript">'
235
+ . "\n" . 'jQuery(document).ready(function() {'
236
+ . "\n\t" . 'Recaptcha.create("' . $rc->options['input_pubkey'] . '", "' . $tag->name . '", {'
237
+ . "\n\t\t" . 'theme: "' . $rc->options['select_theme'] . '",'
238
+ . "\n\t\t" . 'lang: "' . $rc->options['select_lang'] . '"'
239
+ . "\n\t" . '});'
240
+ . "\n" . '});'
241
+ . "\n" . '</script>';
242
+ $rcOutput .= '<div id="' . esc_attr($tag->name) . '"></div>';*/
243
+
244
+ // add a dummy input so that CF7's JS script can later display the error message (for ajax submit only)
245
+ $cf7Input = sprintf(
246
+ '<span class="wpcf7-form-control-wrap %1$s"><input type="hidden" name="%1$s-dummy" /></span>',
247
+ $tag->name
248
+ );
249
+
250
+ return $rcOutput . $cf7Input . $error;
251
+ }
252
+
253
+ /**
254
+ * Validate captcha returned by the Contact Form
255
+ *
256
+ * @access public
257
+ * @uses WPCF7_Shortcode class
258
+ * @uses reCAPTCHA PHP library
259
+ */
260
+ public static function validateCaptcha($result, $tag)
261
+ {
262
+ $rc = self::$_bwpRcInstance;
263
+
264
+ // some CF7-specific codes
265
+ $tag = new WPCF7_Shortcode($tag);
266
+ $type = $tag->type;
267
+ $name = $tag->name;
268
+
269
+ // if current user can bypass the captcha, no need to validate anything
270
+ if ($rc->user_can_bypass()) {
271
+ return $result;
272
+ }
273
+
274
+ // if the captcha challenge and response are not found, return error
275
+ if (!isset($_POST['recaptcha_challenge_field'])
276
+ || !isset($_POST['recaptcha_response_field'])
277
+ ) {
278
+ $result['valid'] = false;
279
+ $result['reason'][$name] = $rc->options['input_error'];
280
+ }
281
+
282
+ // load the recaptcha PHP library just in case
283
+ $rc->load_captcha_library();
284
+
285
+ $response = recaptcha_check_answer(
286
+ $rc->options['input_prikey'],
287
+ $_SERVER['REMOTE_ADDR'],
288
+ $_POST['recaptcha_challenge_field'],
289
+ $_POST['recaptcha_response_field']
290
+ );
291
+
292
+ if (!$response->is_valid) {
293
+ // invalid captcha response, show an error message
294
+ $result['valid'] = false;
295
+ $result['reason'][$name] = $rc->options['input_error'];
296
+ }
297
+
298
+ return $result;
299
+ }
300
+
301
+ /**
302
+ * Refresh the captcha when needed
303
+ *
304
+ * @access public
305
+ * @return array
306
+ */
307
+ public static function refreshCaptcha($items)
308
+ {
309
+ if (!isset($items['onSubmit']) || !is_array($items['onSubmit'])) {
310
+ $items['onSubmit'] = array();
311
+ }
312
+
313
+ $items['onSubmit'][] = 'if (typeof Recaptcha != "undefined") { Recaptcha.reload(); }';
314
+
315
+ return $items;
316
+ }
317
+ }
includes/class-bwp-recaptcha.php ADDED
@@ -0,0 +1,1439 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright (c) 2014 Khang Minh <betterwp.net>
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+
19
+ /**
20
+ * Helper function to display the captcha below the comment input field in themes using comment_form() function
21
+ *
22
+ * Copyright (c) 2011 Jono Bruni <jbruni.com.br> - Free software, in the terms of the GNU General Public License.
23
+ */
24
+ function bwp_capt_comment_form($args = array(), $post_id = null)
25
+ {
26
+ global $bwp_capt;
27
+
28
+ remove_action('comment_form_after_fields', array($bwp_capt, 'add_recaptcha'));
29
+ remove_action('comment_form_logged_in_after', array($bwp_capt, 'add_recaptcha'));
30
+ remove_filter('comment_form_defaults', array($bwp_capt, 'add_recaptcha_after_comment_field'));
31
+
32
+ ob_start();
33
+
34
+ do_action('bwp_recaptcha_add_markups');
35
+ $recaptcha_html = ob_get_contents();
36
+
37
+ ob_end_clean();
38
+
39
+ if (isset($args['comment_notes_after']))
40
+ $args['comment_notes_after'] .= $recaptcha_html;
41
+ else
42
+ $args['comment_notes_after'] = $recaptcha_html;
43
+
44
+ comment_form($args, $post_id);
45
+ }
46
+
47
+ if (!class_exists('BWP_FRAMEWORK_IMPROVED'))
48
+ require_once('class-bwp-framework-improved.php');
49
+
50
+ class BWP_RECAPTCHA extends BWP_FRAMEWORK_IMPROVED
51
+ {
52
+ /**
53
+ * reCAPTCHA built-in languages
54
+ */
55
+ var $lang;
56
+
57
+ /**
58
+ * User capabilities to bypass captcha
59
+ */
60
+ var $caps;
61
+
62
+ /**
63
+ * Is registering via wp-login.php
64
+ */
65
+ var $is_reg = false;
66
+
67
+ /**
68
+ * Captcha error message when registering via wp-login.php
69
+ */
70
+ var $reg_errors = false;
71
+
72
+ /**
73
+ * Is signing up (multi-site only)
74
+ */
75
+ var $is_signup = false;
76
+
77
+ /**
78
+ * Is logging in via wp-login.php
79
+ */
80
+ var $is_login = false;
81
+
82
+ /**
83
+ * Constructor
84
+ */
85
+ public function __construct($version = '1.1.1')
86
+ {
87
+ // Plugin's title
88
+ $this->plugin_title = 'Better WordPress reCAPTCHA';
89
+ // Plugin's version
90
+ $this->set_version($version);
91
+ // Plugin's language domain
92
+ $this->domain = 'bwp-recaptcha';
93
+ // Basic version checking
94
+ if (!$this->check_required_versions())
95
+ return;
96
+
97
+ // Default options
98
+ $options = array(
99
+ 'input_pubkey' => '',
100
+ 'input_prikey' => '',
101
+ 'input_error' => __('<strong>ERROR:</strong> Incorrect or '
102
+ . 'empty reCAPTCHA response, please try again.', $this->domain),
103
+ 'input_back' => __('Error: Incorrect or empty reCAPTCHA response, '
104
+ . 'please click the back button on your browser\'s toolbar or '
105
+ . 'click on %s to go back.', $this->domain),
106
+ 'input_approved' => 1,
107
+ 'input_tab' => 0,
108
+ 'enable_comment' => 'yes',
109
+ 'enable_registration' => 'yes',
110
+ 'enable_login' => '',
111
+ 'enable_akismet' => '',
112
+ 'enable_css' => 'yes',
113
+ 'use_global_keys' => 'yes',
114
+ 'select_lang' => 'en',
115
+ 'select_theme' => 'red',
116
+ 'select_cap' => 'manage_options',
117
+ 'select_cf7_tag' => 'bwp-recaptcha',
118
+ 'select_response' => 'redirect',
119
+ 'select_position' => 'after_comment_field',
120
+ 'select_akismet_react' => 'hold',
121
+ 'hide_registered' => 'yes',
122
+ 'hide_cap' => '',
123
+ 'hide_approved' => 'yes'
124
+ );
125
+
126
+ $this->add_option_key('BWP_CAPT_OPTION_GENERAL', 'bwp_capt_general',
127
+ __('General Options', $this->domain)
128
+ );
129
+ $this->add_option_key('BWP_CAPT_OPTION_THEME', 'bwp_capt_theme',
130
+ __('Theme Options', $this->domain)
131
+ );
132
+
133
+ $this->build_properties('BWP_CAPT', $this->domain, $options,
134
+ 'BetterWP reCAPTCHA', dirname(dirname(__FILE__)) . '/bwp-recaptcha.php',
135
+ 'http://betterwp.net/wordpress-plugins/bwp-recaptcha/', false);
136
+ }
137
+
138
+ private function _load_template_functions()
139
+ {
140
+ if (!function_exists('bwp_capt_custom_theme_widget')) :
141
+
142
+ /**
143
+ * Output custom reCAPTCHA theme
144
+ *
145
+ * By defining this function in your theme/plugin, you can override this
146
+ * and thus changing the html codes to suit your needs.
147
+ *
148
+ * @return void
149
+ */
150
+ function bwp_capt_custom_theme_widget()
151
+ {
152
+ global $bwp_capt;
153
+ ?>
154
+ <script type="text/javascript">
155
+ var RecaptchaOptions = {
156
+ theme : 'custom',
157
+ custom_theme_widget: 'recaptcha_widget',
158
+ tabindex: <?php echo (int) $bwp_capt->options['input_tab']; echo "\n"; ?>
159
+ };
160
+ </script>
161
+ <div id="recaptcha_widget" style="display: none;">
162
+ <p class="recaptcha_only_if_incorrect_sol">
163
+ <?php echo $bwp_capt->options['input_error']; ?>
164
+ </p>
165
+ <div id="recaptcha_image"></div>
166
+ <div class="recaptcha_control">
167
+ <a href="javascript:Recaptcha.reload()" title="<?php _e('Get another challenge', $bwp_capt->domain); ?>"><img src="<?php echo BWP_CAPT_IMAGES . '/icon_refresh.png'; ?>" alt="<?php _e('Get another challenge', $bwp_capt->domain); ?>" /></a>
168
+ <span class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')" title="<?php _e('Get audio reCAPTCHA', $bwp_capt->domain); ?>"><img src="<?php echo BWP_CAPT_IMAGES . '/icon_sound.png'; ?>" alt="<?php _e('Get audio reCAPTCHA', $bwp_capt->domain); ?>" /></a></span>
169
+ <span class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')" title="<?php _e('Get image reCAPTCHA', $bwp_capt->domain); ?>"><img src="<?php echo BWP_CAPT_IMAGES . '/icon_image.png'; ?>" alt="<?php _e('Get image reCAPTCHA', $bwp_capt->domain); ?>" /></a></span>
170
+ <span><a href="javascript:Recaptcha.showhelp()" title="<?php _e('About reCAPTCHA', $bwp_capt->domain); ?>"><img src="<?php echo BWP_CAPT_IMAGES . '/icon_help.png'; ?>" alt="<?php _e('About reCAPTCHA', $bwp_capt->domain); ?>" /></a></span>
171
+ </div>
172
+
173
+ <div class="recaptcha_text">
174
+ <span class="recaptcha_only_if_image"><label for="recaptcha_response_field"><em><small><?php _e('Enter the two words in the box:', $bwp_capt->domain); ?></small></em></label></span>
175
+ <span class="recaptcha_only_if_audio"><label for="recaptcha_response_field"><em><small><?php _e('Enter the numbers you hear:', $bwp_capt->domain); ?></small></em></label></span>
176
+ <input type="text" id="recaptcha_response_field" tabindex="<?php echo (int) $bwp_capt->options['input_tab']; ?>" class="input" name="recaptcha_response_field" />
177
+ </div>
178
+ </div>
179
+ <?php
180
+ }
181
+
182
+ endif;
183
+ }
184
+
185
+ private function _set_session_data($key, $value)
186
+ {
187
+ // use $_SESSION, if $_SESSION isn't available there's no alternative
188
+ // for now
189
+ if (!isset($_SESSION))
190
+ {
191
+ return;
192
+ }
193
+
194
+ $_SESSION[$key] = trim($value);
195
+ }
196
+
197
+ private function _unset_session_data($key)
198
+ {
199
+ if (isset($_SESSION[$key]))
200
+ {
201
+ unset($_SESSION[$key]);
202
+ }
203
+ }
204
+
205
+ /**
206
+ * Checks if captcha is required based on akismet integration
207
+ *
208
+ * @since 1.1.1
209
+ * @return bool
210
+ */
211
+ private function _is_captcha_required()
212
+ {
213
+ if (!defined('AKISMET_VERSION') || 'yes' != $this->options['enable_akismet'])
214
+ return true;
215
+
216
+ if ($this->_is_comment_spam())
217
+ return true;
218
+
219
+ return false;
220
+ }
221
+
222
+ private function _is_comment_spam()
223
+ {
224
+ if (isset($_SESSION['bwp_capt_comment_is_spam'])
225
+ && 'yes' == $_SESSION['bwp_capt_comment_is_spam']
226
+ ) {
227
+ return true;
228
+ }
229
+
230
+ return false;
231
+ }
232
+
233
+ protected function pre_init_properties()
234
+ {
235
+ $this->lang = array(
236
+ __('English', $this->domain) => 'en',
237
+ __('Dutch', $this->domain) => 'nl',
238
+ __('French', $this->domain) => 'fr',
239
+ __('German', $this->domain) => 'de',
240
+ __('Italian', $this->domain) => 'it',
241
+ __('Portuguese', $this->domain) => 'pt',
242
+ __('Russian', $this->domain) => 'ru',
243
+ __('Spanish', $this->domain) => 'es',
244
+ __('Turkish', $this->domain) => 'tr'
245
+ );
246
+
247
+ $this->caps = apply_filters('bwp_capt_bypass_caps', array(
248
+ __('Read Profile', $this->domain) => 'read',
249
+ __('Manage Options', $this->domain) => 'manage_options'
250
+ ));
251
+
252
+ // @since 1.1.0 init public and private keys based on multi-site setting
253
+ $this->init_captcha_keys();
254
+
255
+ if (strpos($_SERVER['REQUEST_URI'], 'wp-login.php') !== false
256
+ && !empty($_REQUEST['action']) && 'register' == $_REQUEST['action']
257
+ ) {
258
+ // whether user is requesting regular user registration page
259
+ $this->is_reg = true;
260
+ }
261
+
262
+ if (strpos($_SERVER['REQUEST_URI'], 'wp-signup.php') !== false)
263
+ {
264
+ // whether user is requesting wp-signup page (multi-site page for
265
+ // user/site registration)
266
+ $this->is_signup = true;
267
+ }
268
+
269
+ if (strpos($_SERVER['REQUEST_URI'], 'wp-login.php') !== false
270
+ && empty($_REQUEST['action'])
271
+ ) {
272
+ // whether user is requesting the wp-login page
273
+ $this->is_login = true;
274
+ }
275
+ }
276
+
277
+ protected function pre_init_hooks()
278
+ {
279
+ if (!is_admin() && !isset($_SESSION))
280
+ {
281
+ // start a session to store Akismet and comment data between
282
+ // requests, only on front end and when applicable
283
+ if (headers_sent() && (!defined('WP_DEBUG') || !WP_DEBUG))
284
+ return;
285
+
286
+ session_start();
287
+ }
288
+ }
289
+
290
+ protected function init_hooks()
291
+ {
292
+ // load custom template function at this stage to make it pluggable
293
+ $this->_load_template_functions();
294
+
295
+ if (defined('WPCF7_VERSION'))
296
+ {
297
+ // add support for Contact Form 7 (CF7) automatically if CF7 is
298
+ // installed and activated
299
+ include_once dirname(__FILE__) . '/class-bwp-recaptcha-cf7.php';
300
+ BWP_RECAPTCHA_CF7::init($this);
301
+ }
302
+
303
+ if (!empty($this->options['input_pubkey']) && !empty($this->options['input_prikey']))
304
+ {
305
+ if ('yes' == $this->options['enable_comment'])
306
+ {
307
+ if (!$this->_is_captcha_required())
308
+ {
309
+ // if user chooses to integrate with akismet, only show
310
+ // recaptcha when comment is marked as spam
311
+ add_action('akismet_spam_caught', array($this, 'add_recaptcha_after_akismet'));
312
+ }
313
+ else if (!$this->user_can_bypass())
314
+ {
315
+ // this action needs to be added manually into your theme file, i.e. comments.php
316
+ add_action('bwp_recaptcha_add_markups', array($this, 'add_recaptcha'));
317
+
318
+ if ($this->options['select_position'] == 'after_fields')
319
+ {
320
+ // show captcha after website field
321
+ add_action('comment_form_after_fields', array($this, 'add_recaptcha'));
322
+ add_action('comment_form_logged_in_after', array($this, 'add_recaptcha'));
323
+ }
324
+ elseif ($this->options['select_position'] == 'after_comment_field')
325
+ {
326
+ // show captcha after comment field (default @since 1.1.1)
327
+ add_filter('comment_form_defaults', array($this, 'add_recaptcha_after_comment_field'));
328
+ }
329
+
330
+ // fill the comment textarea
331
+ add_filter('comment_form_field_comment', array($this, 'fill_comment_content'));
332
+
333
+ // check entered captcha for comment form
334
+ add_action('pre_comment_on_post', array($this, 'check_recaptcha'));
335
+ }
336
+ }
337
+
338
+ if ('yes' == $this->options['enable_registration'] && $this->is_reg)
339
+ {
340
+ // normal user registration page
341
+ add_action('register_form', array($this, 'add_recaptcha'));
342
+ add_filter('registration_errors', array($this, 'check_reg_recaptcha'));
343
+ }
344
+
345
+ if ('yes' == $this->options['enable_registration'] && $this->is_signup)
346
+ {
347
+ // wpms user/site registration page
348
+ add_action('signup_extra_fields', array($this, 'add_recaptcha'));
349
+ add_action('signup_blogform', array($this, 'add_blog_reg_recaptcha'));
350
+ add_filter('wpmu_validate_user_signup', array($this, 'check_user_reg_recaptcha'));
351
+ add_filter('wpmu_validate_blog_signup', array($this, 'check_blog_reg_recaptcha'));
352
+ }
353
+
354
+ if ('yes' == $this->options['enable_login'] && $this->is_login)
355
+ {
356
+ // @since 1.1.0 add captcha to login form
357
+ add_action('login_form', array($this, 'add_recaptcha'));
358
+
359
+ // the priority of 15 is to ensure that we run the filter before
360
+ // WordPress authenticates the user.
361
+ add_filter('authenticate', array($this, 'authenticate_with_recaptcha'), 15);
362
+ }
363
+ }
364
+ }
365
+
366
+ protected function init_captcha_keys()
367
+ {
368
+ if (self::is_multisite())
369
+ {
370
+ if ('yes' == $this->options['use_global_keys'])
371
+ {
372
+ $site_options = get_site_option(BWP_CAPT_OPTION_GENERAL);
373
+ $this->options['input_pubkey'] = $site_options['input_pubkey'];
374
+ $this->options['input_prikey'] = $site_options['input_prikey'];
375
+ }
376
+ }
377
+ }
378
+
379
+ protected function enqueue_media()
380
+ {
381
+ if ($this->is_admin_page(BWP_CAPT_OPTION_GENERAL))
382
+ {
383
+ // some JS to toggle fields' visibility in General Options page
384
+ wp_enqueue_script('bwp-recaptcha', BWP_CAPT_JS . '/bwp-recaptcha.js', array('jquery'));
385
+ }
386
+
387
+ if ('yes' == $this->options['enable_css'])
388
+ {
389
+ // load default CSS if needed
390
+ $theme = $this->options['select_theme'];
391
+ $bwp_capt_css = apply_filters('bwp_capt_css', BWP_CAPT_CSS . '/bwp-recaptcha.css');
392
+
393
+ if ('custom' == $this->options['select_theme']
394
+ && ($this->is_admin_page(BWP_CAPT_OPTION_THEME) || !is_admin())
395
+ ) {
396
+ // load default CSS for custom theme
397
+ wp_enqueue_style('bwp-capt', $bwp_capt_css);
398
+ }
399
+
400
+ if (('yes' == $this->options['enable_registration'] && $this->is_reg)
401
+ || ('yes' == $this->options['enable_login'] && $this->is_login)
402
+ ) {
403
+ add_action('login_head', array($this, 'print_inline_styles_for_login'), 11); // make sure this is late enough
404
+ }
405
+ }
406
+ }
407
+
408
+ public function load_captcha_library()
409
+ {
410
+ if (!function_exists('recaptcha_get_html')
411
+ || !function_exists('recaptcha_check_answer')
412
+ ) {
413
+ require_once(dirname(__FILE__) . '/recaptcha/recaptchalib.php');
414
+ }
415
+ }
416
+
417
+ public function print_inline_styles_for_login()
418
+ {
419
+ $login_width = 'clean' == $this->options['select_theme'] ? 482 : 362;
420
+ ?>
421
+ <style type="text/css">
422
+ #login {
423
+ width: <?php echo $login_width; ?>px;
424
+ }
425
+ #recaptcha_widget_div {
426
+ margin-bottom: 15px;
427
+ zoom: 1;
428
+ }
429
+ </style>
430
+ <?php
431
+ }
432
+
433
+ /**
434
+ * Build the Menus
435
+ */
436
+ protected function build_menus()
437
+ {
438
+ add_menu_page(
439
+ __('Better WordPress reCAPTCHA', $this->domain),
440
+ 'BWP reCAPT',
441
+ BWP_CAPT_CAPABILITY,
442
+ BWP_CAPT_OPTION_GENERAL,
443
+ array($this, 'build_option_pages'),
444
+ BWP_CAPT_IMAGES . '/icon_menu.png'
445
+ );
446
+
447
+ add_submenu_page(
448
+ BWP_CAPT_OPTION_GENERAL,
449
+ __('BWP reCAPTCHA General Options', $this->domain),
450
+ __('General Options', $this->domain),
451
+ BWP_CAPT_CAPABILITY,
452
+ BWP_CAPT_OPTION_GENERAL,
453
+ array($this, 'build_option_pages')
454
+ );
455
+
456
+ add_submenu_page(
457
+ BWP_CAPT_OPTION_GENERAL,
458
+ __('BWP reCAPTCHA Theme Options', $this->domain),
459
+ __('Theme Options', $this->domain),
460
+ BWP_CAPT_CAPABILITY,
461
+ BWP_CAPT_OPTION_THEME,
462
+ array($this, 'build_option_pages')
463
+ );
464
+ }
465
+
466
+ public function modify_option_page()
467
+ {
468
+ global $blog_id;
469
+ ?>
470
+ <script type="text/javascript">
471
+ <?php if (self::is_multisite() && 1 < $blog_id) { ?>
472
+ var rc_readonly = <?php echo 'yes' == $this->options['use_global_keys'] ? 'true' : 'false'; ?>;
473
+ jQuery('input[name="input_pubkey"], input[name="input_prikey"]').prop('readOnly', rc_readonly);
474
+ jQuery('input[name="use_global_keys"]').on('click', function() {
475
+ if (jQuery(this).prop('checked')) {
476
+ jQuery('input[name="input_pubkey"], input[name="input_prikey"]').prop('readOnly', true);
477
+ } else {
478
+ jQuery('input[name="input_pubkey"], input[name="input_prikey"]').prop('readOnly', false);
479
+ }
480
+ });
481
+ <?php } else { ?>
482
+ jQuery('input[name="use_global_keys"]').parents('li.bwp-clear').hide();
483
+ <?php } ?>
484
+ </script>
485
+ <?php
486
+ }
487
+
488
+ /**
489
+ * Build the option pages
490
+ *
491
+ * Utilizes BWP Option Page Builder (@see BWP_OPTION_PAGE)
492
+ */
493
+ public function build_option_pages()
494
+ {
495
+ if (!current_user_can(BWP_CAPT_CAPABILITY))
496
+ wp_die(__('You do not have sufficient permissions to access this page.'));
497
+
498
+ $page = $_GET['page'];
499
+ $bwp_option_page = new BWP_OPTION_PAGE($page, $this->site_options, $this->domain);
500
+
501
+ $options = array();
502
+
503
+ if (!empty($page))
504
+ {
505
+ if ($page == BWP_CAPT_OPTION_GENERAL)
506
+ {
507
+ $bwp_option_page->set_current_tab(1);
508
+
509
+ // Option Structures - Form
510
+ $form = array(
511
+ 'items' => array(
512
+ 'heading',
513
+ 'checkbox',
514
+ 'input',
515
+ 'input',
516
+ 'heading',
517
+ 'section',
518
+ 'section',
519
+ 'heading',
520
+ 'select',
521
+ 'select',
522
+ 'input',
523
+ 'input',
524
+ 'heading',
525
+ 'checkbox',
526
+ 'select',
527
+ 'heading',
528
+ 'select'
529
+ ),
530
+ 'item_labels' => array(
531
+ __('reCAPTCHA API Keys', $this->domain),
532
+ __('Use main site\'s keys', $this->domain),
533
+ __('Public Key', $this->domain),
534
+ __('Private Key', $this->domain),
535
+ __('Plugin Functionality', $this->domain),
536
+ __('Enable this plugin for', $this->domain),
537
+ __('Hide captcha for', $this->domain),
538
+ __('reCAPTCHA for comment form', $this->domain),
539
+ __('Captcha position', $this->domain),
540
+ __('If invalid captcha response', $this->domain),
541
+ __('Invalid captcha error message', $this->domain),
542
+ __('Invalid captcha error message', $this->domain),
543
+ __('Akismet Integration for comment form', $this->domain),
544
+ __('Integrate with Akismet?', $this->domain),
545
+ __('If correct captcha response', $this->domain),
546
+ __('Contact Form 7 Integration', $this->domain),
547
+ __('Captcha shortcode tag', $this->domain)
548
+ ),
549
+ 'item_names' => array(
550
+ 'h1',
551
+ 'cb7',
552
+ 'input_pubkey',
553
+ 'input_prikey',
554
+ 'heading_func',
555
+ 'sec1',
556
+ 'sec2',
557
+ 'h2',
558
+ 'select_position',
559
+ 'select_response',
560
+ 'input_error',
561
+ 'input_back',
562
+ 'h3',
563
+ 'cb6',
564
+ 'select_akismet_react',
565
+ 'heading_cf7',
566
+ 'select_cf7_tag'
567
+ ),
568
+ 'heading' => array(
569
+ 'h1' => '<em>' . sprintf(
570
+ __('For this plugin to work, you will need '
571
+ . 'a pair of API keys (public and private), '
572
+ . 'which is available for free <a href="%s" target="_blank">here</a>. '
573
+ . 'Once you have created those two keys for this domain, '
574
+ . 'simply paste them below.</em>', $this->domain),
575
+ 'https://www.google.com/recaptcha/admin/create'),
576
+ 'heading_func' => '<em>' . __('Control how this plugin works.', $this->domain) . '</em>',
577
+ 'h2' => '<em>' . __('Settings that are applied to '
578
+ . 'comment forms only.', $this->domain) . '</em>',
579
+ 'h3' => '<em>' . __('Integrate with Akismet for better end-user experience.', $this->domain) . '</em>',
580
+ 'heading_cf7' => '<em>' . __('Add reCAPTCHA to Contact Form 7. '
581
+ . 'This only works if you have Contact Form 7 activated.', $this->domain) . '</em>'
582
+ ),
583
+ 'sec1' => array(
584
+ array('checkbox', 'name' => 'cb1'),
585
+ array('checkbox', 'name' => 'cb2'),
586
+ array('checkbox', 'name' => 'cb8')
587
+ ),
588
+ 'sec2' => array(
589
+ array('checkbox', 'name' => 'cb3'),
590
+ array('checkbox', 'name' => 'cb4'),
591
+ array('checkbox', 'name' => 'cb5')
592
+ ),
593
+ 'select' => array(
594
+ 'select_lang' => $this->lang,
595
+ 'select_cap' => $this->caps,
596
+ 'select_position' => array(
597
+ __('After comment field', $this->domain) => 'after_comment_field',
598
+ __('After form fields (name, email, website)', $this->domain) => 'after_fields'
599
+ ),
600
+ 'select_response' => array(
601
+ __('Redirect commenter back to the comment form with error message', $this->domain) => 'redirect',
602
+ __('Show an error page just like WordPress does', $this->domain) => 'back'
603
+ ),
604
+ 'select_akismet_react' => array(
605
+ __('Approve comment immediately', $this->domain) => '1',
606
+ __('Hold comment in moderation queue', $this->domain) => 'hold'
607
+ ),
608
+ 'select_cf7_tag' => array(
609
+ __('Use "bwp-recaptcha" shortcode tag', $this->domain) => 'bwp-recaptcha',
610
+ __('Use "recaptcha" shortcode tag', $this->domain) => 'recaptcha'
611
+ )
612
+ ),
613
+ 'checkbox' => array(
614
+ 'cb1' => array(
615
+ __('Comment form.', $this->domain) => 'enable_comment'
616
+ ),
617
+ 'cb2' => array(
618
+ __('Registration form (user/site registration).', $this->domain) => 'enable_registration'
619
+ ),
620
+ 'cb8' => array(
621
+ __('Login form.', $this->domain) => 'enable_login'
622
+ ),
623
+ 'cb3' => array(
624
+ __('registered users <em>(even without any capabilities)</em>.', $this->domain) => 'hide_registered'
625
+ ),
626
+ 'cb4' => array(
627
+ __('users who can', $this->domain) => 'hide_cap'
628
+ ),
629
+ 'cb5' => array(
630
+ __('visitors who have at least', $this->domain) => 'hide_approved'
631
+ ),
632
+ 'cb6' => array(
633
+ __('A captcha is only shown when Akismet identifies a comment as spam. '
634
+ . 'Highly recommended if you do not want to '
635
+ . 'force your visitors to enter a captcha every time.', $this->domain) => 'enable_akismet'
636
+ ),
637
+ 'cb7' => array(
638
+ __('uncheck to use different key pairs for this site.', $this->domain) => 'use_global_keys'
639
+ )
640
+ ),
641
+ 'input' => array(
642
+ 'input_pubkey' => array(
643
+ 'size' => 50,
644
+ 'label' => '<br />' . __('A public key used to '
645
+ . 'request captchas from reCAPTCHA server.', $this->domain)
646
+ ),
647
+ 'input_prikey' => array(
648
+ 'size' => 50,
649
+ 'label' => '<br />' . __('A private (secret) key used to '
650
+ . 'authenticate user\'s response.', $this->domain)
651
+ ),
652
+ 'input_error' => array(
653
+ 'size' => 90,
654
+ /* 'label' => '<br />' . __('when redirect commenter back to the comment form.', $this->domain) */
655
+ ),
656
+ 'input_back' => array(
657
+ 'size' => 90,
658
+ /* 'label' => '<br />' . __('when show the normal error page with no redirection.', $this->domain) */
659
+ ),
660
+ 'input_approved' => array(
661
+ 'size' => 3,
662
+ 'label' => __('approved comment(s).', $this->domain)
663
+ ),
664
+ ),
665
+ 'container' => array(
666
+ 'cb8' => ''
667
+ ),
668
+ 'post' => array(
669
+ 'select_akismet_react' => '<br /><span style="display:inline-block;margin-top:5px;">'
670
+ . __('It is best to put comments identified as spam in moderation queue '
671
+ . 'so you are able to review and instruct '
672
+ . 'Akismet to correctly handle similar comments in the future.</em>', $this->domain)
673
+ . '</span>'
674
+ ),
675
+ 'inline_fields' => array(
676
+ 'cb4' => array('select_cap' => 'select'),
677
+ 'cb5' => array('input_approved' => 'input')
678
+ )
679
+ );
680
+
681
+ // Get the default options
682
+ $options = $bwp_option_page->get_options(array(
683
+ 'use_global_keys',
684
+ 'input_pubkey',
685
+ 'input_prikey',
686
+ 'input_error',
687
+ 'input_approved',
688
+ 'select_cap',
689
+ 'hide_registered',
690
+ 'hide_cap',
691
+ 'hide_approved',
692
+ 'enable_registration',
693
+ 'enable_login',
694
+ 'enable_comment',
695
+ 'input_back',
696
+ 'select_position',
697
+ 'select_cf7_tag',
698
+ 'select_response',
699
+ 'enable_akismet',
700
+ 'select_akismet_react'
701
+ ), $this->options);
702
+
703
+ // Get option from the database
704
+ $options = $bwp_option_page->get_db_options($page, $options);
705
+
706
+ $option_formats = array(
707
+ 'input_approved' => 'int',
708
+ 'input_error' => 'html',
709
+ 'input_back' => 'html'
710
+ );
711
+
712
+ $option_super_admin = array();
713
+
714
+ // show appropriate fields based on multi-site setting
715
+ add_action('bwp_option_action_before_submit_button', array($this, 'modify_option_page'));
716
+ }
717
+ else if ($page == BWP_CAPT_OPTION_THEME)
718
+ {
719
+ $bwp_option_page->set_current_tab(2);
720
+
721
+ // Option Structures - Form
722
+ $form = array(
723
+ 'items' => array(
724
+ 'select',
725
+ 'checkbox',
726
+ 'select',
727
+ 'input',
728
+ 'heading'
729
+ ),
730
+ 'item_labels' => array(
731
+ __('reCAPTCHA theme', $this->domain),
732
+ __('Use default CSS', $this->domain),
733
+ __('Language for built-in themes', $this->domain),
734
+ __('Tabindex for captcha input field', $this->domain),
735
+ __('Preview your reCAPTCHA', $this->domain)
736
+ ),
737
+ 'item_names' => array(
738
+ 'select_theme',
739
+ 'cb1',
740
+ 'select_lang',
741
+ 'input_tab',
742
+ 'h1'
743
+ ),
744
+ 'heading' => array(
745
+ 'h1' => __('<em>Below you will see how your reCAPTCHA will look. '
746
+ . 'Note that this might differ on your actual pages.<br /></em>', $this->domain)
747
+ ),
748
+ 'select' => array(
749
+ 'select_theme' => array(
750
+ __('Default Theme (Red)', $this->domain) => 'red',
751
+ __('White Theme', $this->domain) => 'white',
752
+ __('Black Theme', $this->domain) => 'blackglass',
753
+ __('Clean Theme', $this->domain) => 'clean',
754
+ __('Custom Theme (use CSS)', $this->domain) => 'custom'
755
+ ),
756
+ 'select_lang' => $this->lang
757
+ ),
758
+ 'checkbox' => array(
759
+ 'cb1' => array(
760
+ sprintf(__('This is for Custom Theme only. '
761
+ . 'Disable this and add your own CSS to style the Custom Theme. '
762
+ . 'More info <a href="%s#customization" target="_blank">here</a>.', $this->domain),
763
+ BWP_CAPT_PLUGIN_URL) => 'enable_css'
764
+ ),
765
+ 'cb2' => array(
766
+ __('This is only useful when you do not use any minify or cache plugin.', $this->domain) => 'enable_selective'
767
+ )
768
+ ),
769
+ 'input' => array(
770
+ 'input_tab' => array(
771
+ 'size' => 3,
772
+ 'label' => '<br />' . __('This should be 4 if you '
773
+ . 'place the captcha before the textarea, '
774
+ . 'and 5 if you put it after. Set to 0 to disable.', $this->domain)
775
+ )
776
+ ),
777
+ 'container' => array(
778
+ ),
779
+ 'post' => array(
780
+ 'select_lang' => sprintf(__('If you would like to add custom translations, '
781
+ . 'please read <a href="%s" target="_blank">this dedicated tip</a>.', $this->domain),
782
+ 'http://betterwp.net/wordpress-tips/how-to-add-custom-translations-to-bwp-recaptcha/')
783
+ )
784
+ );
785
+
786
+ // Get the default options
787
+ $options = $bwp_option_page->get_options(array(
788
+ 'select_lang',
789
+ 'select_theme',
790
+ 'input_tab',
791
+ 'enable_css',
792
+ ), $this->options);
793
+
794
+ // Get option from the database
795
+ $options = $bwp_option_page->get_db_options($page, $options);
796
+
797
+ $option_formats = array(
798
+ 'input_tab' => 'int'
799
+ );
800
+
801
+ $option_super_admin = array();
802
+
803
+ // preview reCAPTCHA
804
+ add_action('bwp_option_action_before_submit_button', array($this, 'add_recaptcha'));
805
+ }
806
+ }
807
+
808
+ // Get option from user input
809
+ if (isset($_POST['submit_' . $bwp_option_page->get_form_name()])
810
+ && isset($options) && is_array($options))
811
+ {
812
+ // basic security check
813
+ check_admin_referer($page);
814
+
815
+ foreach ($options as $key => &$option)
816
+ {
817
+ if (isset($_POST[$key]))
818
+ {
819
+ $bwp_option_page->format_field($key, $option_formats);
820
+ $option = trim(stripslashes($_POST[$key]));
821
+ }
822
+ else
823
+ {
824
+ if (!isset($_POST[$key]))
825
+ {
826
+ // for checkboxes that are not checked
827
+ $option = '';
828
+ }
829
+ else if (isset($option_formats[$key])
830
+ && 'int' == $option_formats[$key]
831
+ && ('' === $_POST[$key] || 0 > $_POST[$key])
832
+ ) {
833
+ // expect integer but received empty string or negative integer
834
+ $option = $this->options_default[$key];
835
+ }
836
+ }
837
+ }
838
+
839
+ // update per-blog options
840
+ update_option($page, $options);
841
+
842
+ global $blog_id;
843
+ if (!$this->is_normal_admin() && $blog_id == 1)
844
+ {
845
+ // Update site options if is super admin and is on main site
846
+ update_site_option($page, $options);
847
+ }
848
+
849
+ // refresh the options property to include updated options
850
+ $this->options = array_merge($this->options, $options);
851
+
852
+ // Update options successfully
853
+ $this->add_notice(__('All options have been saved.', $this->domain));
854
+ }
855
+
856
+ if (empty($this->options['input_pubkey'])
857
+ || empty($this->options['input_prikey'])
858
+ ) {
859
+ // add notices if recaptcha API keys are missing
860
+ $this->add_notice(
861
+ '<strong>' . __('Warning') . ':</strong> '
862
+ . sprintf(__('API key(s) missing. Please get an API key from '
863
+ . '<a href="%1$s">%1$s</a> (free!)', $this->domain),
864
+ 'https://www.google.com/recaptcha/admin/create')
865
+ );
866
+ }
867
+
868
+ if ('yes' == $this->options['enable_akismet'] && !defined('AKISMET_VERSION'))
869
+ {
870
+ // add a notice if Akismet integration is enabled but Akismet
871
+ // plugin is not installed
872
+ $this->add_notice(
873
+ '<strong>' . __('Notice') . ':</strong> '
874
+ . __('You are enabling Akismet integration but Akismet is not currently active. '
875
+ . 'Please activate Akismet for the integration to work.', $this->domain)
876
+ );
877
+ }
878
+
879
+ // Assign the form and option array
880
+ $bwp_option_page->init($form, $options, $this->form_tabs);
881
+
882
+ // Build the option page
883
+ $bwp_option_page->generate_html_form();
884
+ }
885
+
886
+ /**
887
+ * Get the link to the current comment page
888
+ */
889
+ protected function get_current_comment_page_link()
890
+ {
891
+ global $wp_rewrite;
892
+
893
+ if (!is_singular() || !get_option('page_comments'))
894
+ return;
895
+
896
+ $page = get_query_var('cpage');
897
+ if (empty($page))
898
+ $page = 1;
899
+
900
+ $redirect_to = '';
901
+
902
+ if ($wp_rewrite->using_permalinks())
903
+ $redirect_to = user_trailingslashit(trailingslashit(get_permalink()) . 'comment-page-%#%');
904
+ else
905
+ $redirect_to = add_query_arg('cpage','%#%', get_permalink());
906
+
907
+ $redirect_to .= '#respond';
908
+
909
+ return str_replace('%#%', $page, $redirect_to);
910
+ }
911
+
912
+ /**
913
+ * Check to see whether the current user can post without captcha
914
+ *
915
+ * @return bool
916
+ */
917
+ public function user_can_bypass()
918
+ {
919
+ global $wpdb;
920
+
921
+ if ('yes' == $this->options['hide_registered'] && is_user_logged_in())
922
+ // do not show captcha to logged in users
923
+ return true;
924
+
925
+ if ('yes' == $this->options['hide_cap']
926
+ && !empty($this->options['select_cap'])
927
+ && current_user_can($this->options['select_cap']))
928
+ {
929
+ // user must have certain capabilities in order to bypass captcha
930
+ return true;
931
+ }
932
+
933
+ if ('yes' == $this->options['hide_approved'])
934
+ {
935
+ $commenter = wp_get_current_commenter();
936
+ foreach ($commenter as $key => &$commenter_field)
937
+ {
938
+ $commenter_field = trim(strip_tags($commenter_field));
939
+
940
+ // if one of the fields (except url) is empty return false
941
+ if ($key != 'comment_author_url' && empty($commenter_field))
942
+ return false;
943
+ }
944
+
945
+ // take into account comment author url as well
946
+ $bwp_query =
947
+ 'SELECT COUNT(comment_ID)
948
+ FROM ' . $wpdb->comments . '
949
+ WHERE comment_approved = 1' . "
950
+ AND comment_author = %s
951
+ AND comment_author_email = %s
952
+ AND comment_author_url = %s
953
+ AND comment_type = ''
954
+ ";
955
+
956
+ $approved_count = $wpdb->get_var($wpdb->prepare($bwp_query,
957
+ $commenter['comment_author'],
958
+ $commenter['comment_author_email'],
959
+ $commenter['comment_author_url']));
960
+
961
+ // has more approved comments than required?
962
+ if ($approved_count >= $this->options['input_approved'])
963
+ return true;
964
+ }
965
+
966
+ return false;
967
+ }
968
+
969
+ /**
970
+ * Make text safe to edit inside textarea
971
+ *
972
+ * This function will be removed once requirement is moved to WP 3.1.
973
+ *
974
+ * @since 1.1.1
975
+ * @return string
976
+ */
977
+ private function _esc_textarea($text)
978
+ {
979
+ return htmlspecialchars($text, ENT_QUOTES, get_option('blog_charset'));
980
+ }
981
+
982
+ public function fill_comment_content($comment_field)
983
+ {
984
+ if ('back' == $this->options['select_response'])
985
+ {
986
+ // no need to refill the comment contents if no redirection is involved
987
+ return $comment_field;
988
+ }
989
+
990
+ if (!empty($_SESSION['bwp_capt_comment']))
991
+ {
992
+ // put the comment content back if possible
993
+ $comment_text = stripslashes($_SESSION['bwp_capt_comment']);
994
+ $comment_field = preg_replace('#(<textarea\s[^>]*>)(.*?)(</textarea>)#uis',
995
+ '$1' . $this->_esc_textarea($comment_text) . '$3',
996
+ $comment_field
997
+ );
998
+
999
+ $this->_unset_session_data('bwp_capt_comment');
1000
+ }
1001
+
1002
+ return $comment_field;
1003
+ }
1004
+
1005
+ /**
1006
+ * Output the reCAPTCHA HTML, use theme if specified
1007
+ *
1008
+ * @param $errors @since 1.1.0
1009
+ * @return void
1010
+ */
1011
+ public function add_recaptcha($errors = false)
1012
+ {
1013
+ $this->load_captcha_library();
1014
+
1015
+ if (!defined('BWP_CAPT_ADDED'))
1016
+ {
1017
+ // make sure we add only one recaptcha instance
1018
+ define('BWP_CAPT_ADDED', true);
1019
+
1020
+ // captcha error can comes from $_GET variable or passed via
1021
+ // hooks' parameters.
1022
+ $captcha_error = '';
1023
+ $extra_class = '';
1024
+
1025
+ if (!empty($_GET['cerror']) && 'incorrect-captcha-sol' == $_GET['cerror'])
1026
+ {
1027
+ $captcha_error = $_GET['cerror'];
1028
+ }
1029
+ else if (is_wp_error($errors))
1030
+ {
1031
+ // right now only registration errors are passed this way
1032
+ $captcha_error = $errors->get_error_message('reg-recaptcha-error');
1033
+ $extra_class = ' error';
1034
+ }
1035
+
1036
+ if ($this->_is_comment_spam())
1037
+ {
1038
+ ?>
1039
+ <p class="bwp-capt-spam-identified">
1040
+ <?php _e('Your comment was identified as spam, '
1041
+ . 'please complete the CAPTCHA below:', $this->domain); ?>
1042
+ </p>
1043
+ <?php
1044
+ }
1045
+
1046
+ do_action('bwp_capt_before_add_captcha');
1047
+
1048
+ ?>
1049
+ <style type="text/css">
1050
+ /* this is to prevent the iframe from showing up in Chrome */
1051
+ iframe[src="about:blank"] {
1052
+ display: none;
1053
+ }
1054
+ </style>
1055
+ <?php
1056
+ if ($this->options['select_theme'] != 'custom')
1057
+ {
1058
+
1059
+ if (!empty($captcha_error))
1060
+ {
1061
+ ?>
1062
+ <p class="recaptcha_only_if_incorrect_sol<?php echo $extra_class; ?>">
1063
+ <?php echo $this->options['input_error']; ?>
1064
+ </p>
1065
+ <?php
1066
+ }
1067
+ ?>
1068
+ <script type="text/javascript">
1069
+ var RecaptchaOptions = (typeof CustomRecaptchaOptions === 'undefined') ? {
1070
+ theme: '<?php echo $this->options['select_theme']; ?>',
1071
+ lang: '<?php echo $this->options['select_lang']; ?>',
1072
+ <?php
1073
+ if (!empty($this->options['input_tab'])) {
1074
+ ?>
1075
+ tabindex: <?php echo (int) $this->options['input_tab']; echo "\n"; ?>
1076
+ <?php
1077
+ }
1078
+ ?>
1079
+ } : CustomRecaptchaOptions;
1080
+ </script>
1081
+ <?php
1082
+ }
1083
+ else
1084
+ {
1085
+ bwp_capt_custom_theme_widget();
1086
+ }
1087
+
1088
+ if ('redirect' == $this->options['select_response'] && !is_admin())
1089
+ {
1090
+ ?>
1091
+ <input type="hidden" name="error_redirect_to"
1092
+ value="<?php esc_attr_e($this->get_current_comment_page_link()); ?>" />
1093
+ <?php
1094
+ }
1095
+
1096
+ $use_ssl = is_ssl() ? true : false;
1097
+
1098
+ if (!empty($this->options['input_pubkey']))
1099
+ {
1100
+ echo recaptcha_get_html(
1101
+ $this->options['input_pubkey'],
1102
+ $captcha_error,
1103
+ $use_ssl,
1104
+ $this->options['select_lang']
1105
+ );
1106
+ }
1107
+ else if (current_user_can('manage_options'))
1108
+ {
1109
+ // if user is an admin show the actual error
1110
+ printf(__('To use reCAPTCHA you must get an API key from '
1111
+ . '<a href="%1$s">%1$s</a>', $this->domain),
1112
+ 'https://www.google.com/recaptcha/admin/create');
1113
+ }
1114
+ else
1115
+ echo '';
1116
+ }
1117
+ }
1118
+
1119
+ /**
1120
+ * Adds captcha to below comment field
1121
+ *
1122
+ * @since 1.1.1
1123
+ * @return string
1124
+ */
1125
+ public function add_recaptcha_after_comment_field($form_defaults)
1126
+ {
1127
+ ob_start();
1128
+
1129
+ do_action('bwp_recaptcha_add_markups');
1130
+ $recaptcha_html = ob_get_contents();
1131
+
1132
+ ob_end_clean();
1133
+
1134
+ $form_defaults['comment_notes_after'] = !isset($form_defaults['comment_notes_after'])
1135
+ ? $recaptcha_html : $form_defaults['comment_notes_after'] . $recaptcha_html;
1136
+
1137
+ return $form_defaults;
1138
+ }
1139
+
1140
+ /**
1141
+ * Adds a captcha to blog registration page
1142
+ *
1143
+ * @since 1.1.0
1144
+ * @return void
1145
+ */
1146
+ public function add_blog_reg_recaptcha($errors)
1147
+ {
1148
+ // if user is not logged in, they can choose between signup for account
1149
+ // or sign up for blog after account creation.
1150
+ if (!is_user_logged_in())
1151
+ {
1152
+ // if user chooses to signup for blog also, we don't show recaptcha
1153
+ // again because they have already provided the captcha once.
1154
+ }
1155
+ elseif (!$this->user_can_bypass())
1156
+ {
1157
+ // user is logged in and wants to add a new blog, show captcha if
1158
+ // user can not bypass
1159
+ $this->add_recaptcha($errors);
1160
+ }
1161
+ }
1162
+
1163
+ /**
1164
+ * Authenticates the user using captcha when logging in
1165
+ *
1166
+ * @filter authenticate, @see ::wp-signon in package WordPress/pluggable.php
1167
+ * @since 1.1.0
1168
+ * @return WP_User
1169
+ */
1170
+ public function authenticate_with_recaptcha($user)
1171
+ {
1172
+ if (empty($_POST['log']) && empty($_POST['pwd']))
1173
+ {
1174
+ return $user;
1175
+ }
1176
+
1177
+ // if the $user object itself is a WP_Error object, we simply append
1178
+ // errors to it, otherwise we create a new one.
1179
+ $errors = is_wp_error($user) ? $user : new WP_Error();
1180
+
1181
+ if (!isset($_POST['recaptcha_challenge_field'])
1182
+ || !isset($_POST["recaptcha_response_field"])
1183
+ ) {
1184
+ // captcha response is empty, show error message
1185
+ $errors->add('login-recaptcha-error', $this->options['input_error']);
1186
+ }
1187
+ else
1188
+ {
1189
+ $this->load_captcha_library();
1190
+
1191
+ if (function_exists('recaptcha_check_answer'))
1192
+ {
1193
+ // check catpcha response error using recaptcha's PHP library
1194
+ $response = recaptcha_check_answer(
1195
+ $this->options['input_prikey'],
1196
+ $_SERVER['REMOTE_ADDR'],
1197
+ $_POST['recaptcha_challenge_field'],
1198
+ $_POST['recaptcha_response_field']
1199
+ );
1200
+
1201
+ if (!$response->is_valid)
1202
+ {
1203
+ // incorrect captcha response show error message
1204
+ if ($response->error == 'incorrect-captcha-sol')
1205
+ {
1206
+ $errors->add('login-recaptcha-error', $this->options['input_error']);
1207
+ }
1208
+ else
1209
+ {
1210
+ $errors->add('login-recaptcha-error', '<strong>'
1211
+ . __('ERROR', $this->domain) . '</strong>: '
1212
+ . __('Unknown captcha error.', $this->domain));
1213
+ }
1214
+ }
1215
+ }
1216
+ }
1217
+
1218
+ $errorCodes = $errors->get_error_codes();
1219
+ if (in_array('login-recaptcha-error', $errorCodes))
1220
+ {
1221
+ // invalid recaptcha detected, exit the login process and
1222
+ $user = is_wp_error($user) ? $user : $errors;
1223
+
1224
+ // do not allow WordPress to try authenticating the user, either
1225
+ // using cookie or username/password pair
1226
+ remove_filter('authenticate', 'wp_authenticate_username_password', 20, 3);
1227
+ remove_filter('authenticate', 'wp_authenticate_cookie', 30, 3);
1228
+ }
1229
+
1230
+ return $user;
1231
+ }
1232
+
1233
+ /**
1234
+ * Check captcha response on registration page
1235
+ *
1236
+ * This function should be used on both user registration page (single or
1237
+ * multisite) and blog registration page (multisite).
1238
+ *
1239
+ * @since 1.1.0
1240
+ * @return WP_Error
1241
+ */
1242
+ public function check_reg_recaptcha($errors)
1243
+ {
1244
+ $this->load_captcha_library();
1245
+
1246
+ if (is_array($errors) && isset($errors['errors']))
1247
+ {
1248
+ // if $errors is an array, we're probably checking recaptcha for Multi-Site WP
1249
+ $temp = $errors;
1250
+ $errors = $errors['errors'];
1251
+ }
1252
+
1253
+ if (!isset($_POST['recaptcha_challenge_field'])
1254
+ || !isset($_POST["recaptcha_response_field"])
1255
+ ) {
1256
+ $errors->add('reg-recaptcha-error', $this->options['input_error']);
1257
+ $stop = true;
1258
+ }
1259
+
1260
+ if (empty($stop) && function_exists('recaptcha_check_answer'))
1261
+ {
1262
+ $response = recaptcha_check_answer(
1263
+ $this->options['input_prikey'],
1264
+ $_SERVER['REMOTE_ADDR'],
1265
+ $_POST['recaptcha_challenge_field'],
1266
+ $_POST['recaptcha_response_field']
1267
+ );
1268
+
1269
+ if (!$response->is_valid)
1270
+ {
1271
+ if ($response->error == 'incorrect-captcha-sol')
1272
+ {
1273
+ $errors->add('reg-recaptcha-error', $this->options['input_error']);
1274
+ }
1275
+ else
1276
+ {
1277
+ $errors->add('reg-recaptcha-error', '<strong>'
1278
+ . __('ERROR', $this->domain) . '</strong>: '
1279
+ . __('Unknown captcha error.', $this->domain));
1280
+ }
1281
+ }
1282
+ }
1283
+
1284
+ if (isset($temp))
1285
+ {
1286
+ $temp['errors'] = $errors;
1287
+ $errors = $temp;
1288
+ }
1289
+
1290
+ return $errors;
1291
+ }
1292
+
1293
+ public function check_user_reg_recaptcha($errors)
1294
+ {
1295
+ if (isset($_POST['stage']) && 'validate-blog-signup' == $_POST['stage'])
1296
+ {
1297
+ // user is registering a new blog, we don't need to check anything
1298
+ // because captcha is not required at this stage
1299
+ return $errors;
1300
+ }
1301
+ else
1302
+ {
1303
+ return $this->check_reg_recaptcha($errors);
1304
+ }
1305
+ }
1306
+
1307
+ public function check_blog_reg_recaptcha($errors)
1308
+ {
1309
+ if (!is_user_logged_in())
1310
+ {
1311
+ return $errors;
1312
+ }
1313
+ elseif (!$this->user_can_bypass())
1314
+ {
1315
+ // check captcha response if needed
1316
+ return $this->check_reg_recaptcha($errors);
1317
+ }
1318
+
1319
+ return $errors;
1320
+ }
1321
+
1322
+ /**
1323
+ * Check captcha response for comment forms
1324
+ *
1325
+ * @return void
1326
+ */
1327
+ public function check_recaptcha($comment_post_ID)
1328
+ {
1329
+ $this->load_captcha_library();
1330
+
1331
+ $response = recaptcha_check_answer(
1332
+ $this->options['input_prikey'],
1333
+ $_SERVER['REMOTE_ADDR'],
1334
+ $_POST['recaptcha_challenge_field'],
1335
+ $_POST['recaptcha_response_field']
1336
+ );
1337
+
1338
+ if (!$response->is_valid)
1339
+ {
1340
+ if (isset($_POST['comment']))
1341
+ $this->_set_session_data('bwp_capt_comment', $_POST['comment']);
1342
+
1343
+ if ('redirect' == $this->options['select_response'])
1344
+ {
1345
+ // since we haven't added the comment yet, we need to find
1346
+ // the link to the current comment page the visitor is on
1347
+ $location = !empty($_POST['error_redirect_to'])
1348
+ ? $_POST['error_redirect_to']
1349
+ : get_permalink($comment_post_ID) . '#respond';
1350
+ $location = add_query_arg('cerror', $response->error, $location);
1351
+
1352
+ wp_safe_redirect($location);
1353
+ exit;
1354
+ }
1355
+ else if ('back' == $this->options['select_response'])
1356
+ {
1357
+ if ('incorrect-captcha-sol' == $response->error)
1358
+ {
1359
+ wp_die(sprintf($this->options['input_back'],
1360
+ ' <a href="javascript:history.go(-1);">'
1361
+ . __('this link', $this->domain)
1362
+ . '</a>'));
1363
+ }
1364
+ else if (current_user_can('manage_options'))
1365
+ {
1366
+ // show actual error only to admin
1367
+ wp_die(__('There is some problem with your reCAPTCHA API keys, '
1368
+ . 'please double check them.', $this->domain));
1369
+ }
1370
+ else
1371
+ {
1372
+ wp_die(__('Unknown error. Please contact an administrator '
1373
+ . 'for more info.', $this->domain));
1374
+ }
1375
+ }
1376
+ }
1377
+ else
1378
+ {
1379
+ if ($this->_is_comment_spam())
1380
+ {
1381
+ // spam comments are handled by recaptcha so we do not increase
1382
+ // Akismet spam counter
1383
+ add_filter('akismet_spam_count_incr', create_function('', 'return 0;'), 11);
1384
+
1385
+ // workaround for remove_filter function
1386
+ add_filter('pre_comment_approved', array($this, 'akismet_comment_status'), 10);
1387
+ add_filter('pre_comment_approved', array($this, 'akismet_comment_status'), 11);
1388
+ }
1389
+
1390
+ // reset Akistmet-related data, next comment should be checked
1391
+ // again from the beginning
1392
+ $this->_unset_session_data('bwp_capt_comment');
1393
+ $this->_unset_session_data('bwp_capt_comment_is_spam');
1394
+ }
1395
+ }
1396
+
1397
+ public function akismet_comment_status()
1398
+ {
1399
+ $bwp_capt_cs = $this->options['select_akismet_react'];
1400
+ $bwp_capt_cs = 'hold' == $bwp_capt_cs ? '0' : $bwp_capt_cs;
1401
+
1402
+ if (defined('BWP_CAPT_AKISMET_COMMENT_STATUS')
1403
+ && BWP_CAPT_AKISMET_COMMENT_STATUS == 'spam'
1404
+ ) {
1405
+ // @since 1.1.1 put comment into spam queue is no longer an option
1406
+ // but can still be forced
1407
+ return 'spam';
1408
+ }
1409
+
1410
+ return $bwp_capt_cs;
1411
+ }
1412
+
1413
+ /**
1414
+ * Adds recaptcha to comment form if akismet marks a comment as spam
1415
+ *
1416
+ * @return void
1417
+ */
1418
+ public function add_recaptcha_after_akismet()
1419
+ {
1420
+ $comment_post_ID = isset($_POST['comment_post_ID'])
1421
+ ? (int) $_POST['comment_post_ID']
1422
+ : 0;
1423
+
1424
+ $this->_set_session_data('bwp_capt_comment_is_spam', 'yes');
1425
+
1426
+ if (isset($_POST['comment']))
1427
+ $this->_set_session_data('bwp_capt_comment', $_POST['comment']);
1428
+
1429
+ $location_hash = $this->options['select_position'] == 'after_comment_field'
1430
+ ? 'comment' : 'respond';
1431
+
1432
+ $location = !empty($_POST['error_redirect_to'])
1433
+ ? $_POST['error_redirect_to']
1434
+ : get_permalink($comment_post_ID) . '#' . $location_hash;
1435
+
1436
+ wp_safe_redirect($location);
1437
+ exit;
1438
+ }
1439
+ }
includes/recaptcha/recaptchalib.php ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This is a PHP library that handles calling reCAPTCHA.
4
+ * - Documentation and latest version
5
+ * http://recaptcha.net/plugins/php/
6
+ * - Get a reCAPTCHA API Key
7
+ * https://www.google.com/recaptcha/admin/create
8
+ * - Discussion group
9
+ * http://groups.google.com/group/recaptcha
10
+ *
11
+ * Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
12
+ * AUTHORS:
13
+ * Mike Crawford
14
+ * Ben Maurer
15
+ *
16
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ * of this software and associated documentation files (the "Software"), to deal
18
+ * in the Software without restriction, including without limitation the rights
19
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ * copies of the Software, and to permit persons to whom the Software is
21
+ * furnished to do so, subject to the following conditions:
22
+ *
23
+ * The above copyright notice and this permission notice shall be included in
24
+ * all copies or substantial portions of the Software.
25
+ *
26
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32
+ * THE SOFTWARE.
33
+ */
34
+
35
+ /**
36
+ * The reCAPTCHA server URL's
37
+ */
38
+ define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
39
+ define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
40
+ define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
41
+
42
+ /**
43
+ * Encodes the given data into a query string format
44
+ * @param $data - array of string elements to be encoded
45
+ * @return string - encoded request
46
+ */
47
+ function _recaptcha_qsencode ($data) {
48
+ $req = "";
49
+ foreach ( $data as $key => $value )
50
+ $req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
51
+
52
+ // Cut the last '&'
53
+ $req=substr($req,0,strlen($req)-1);
54
+ return $req;
55
+ }
56
+
57
+
58
+
59
+ /**
60
+ * Submits an HTTP POST to a reCAPTCHA server
61
+ * @param string $host
62
+ * @param string $path
63
+ * @param array $data
64
+ * @param int port
65
+ * @return array response
66
+ */
67
+ function _recaptcha_http_post($host, $path, $data, $port = 80) {
68
+
69
+ $req = _recaptcha_qsencode ($data);
70
+
71
+ $http_request = "POST $path HTTP/1.0\r\n";
72
+ $http_request .= "Host: $host\r\n";
73
+ $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
74
+ $http_request .= "Content-Length: " . strlen($req) . "\r\n";
75
+ $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
76
+ $http_request .= "\r\n";
77
+ $http_request .= $req;
78
+
79
+ $response = '';
80
+ if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
81
+ die ('Could not open socket');
82
+ }
83
+
84
+ fwrite($fs, $http_request);
85
+
86
+ while ( !feof($fs) )
87
+ $response .= fgets($fs, 1160); // One TCP-IP packet
88
+ fclose($fs);
89
+ $response = explode("\r\n\r\n", $response, 2);
90
+
91
+ return $response;
92
+ }
93
+
94
+
95
+
96
+ /**
97
+ * Gets the challenge HTML (javascript and non-javascript version).
98
+ * This is called from the browser, and the resulting reCAPTCHA HTML widget
99
+ * is embedded within the HTML form it was called from.
100
+ * @param string $pubkey A public key for reCAPTCHA
101
+ * @param string $error The error given by reCAPTCHA (optional, default is null)
102
+ * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
103
+ * @param string $lang language used for recaptcha
104
+ * @return string - The HTML to be embedded in the user's form.
105
+ */
106
+ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false, $lang = 'en')
107
+ {
108
+ if ($pubkey == null || $pubkey == '') {
109
+ die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
110
+ }
111
+
112
+ if ($use_ssl) {
113
+ $server = RECAPTCHA_API_SECURE_SERVER;
114
+ } else {
115
+ $server = RECAPTCHA_API_SERVER;
116
+ }
117
+
118
+ $errorpart = "";
119
+ if ($error) {
120
+ $errorpart = "&amp;error=" . $error;
121
+ }
122
+ // BWP recaptcha update note, @since 1.1.0
123
+ // added a hl query var to correctly localize the recaptcha text for
124
+ // pre-defined themes
125
+ //return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
126
+ return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '&amp;hl=' . $lang . '"></script>
127
+
128
+ <noscript>
129
+ <iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '&amp;hl=' . $lang . '" height="300" width="500"></iframe><br/>
130
+ <textarea style="display:none" name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
131
+ <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
132
+ </noscript>';
133
+ }
134
+
135
+
136
+
137
+
138
+ /**
139
+ * A ReCaptchaResponse is returned from recaptcha_check_answer()
140
+ */
141
+ if (!class_exists('ReCaptchaResponse')) :
142
+ class ReCaptchaResponse {
143
+ var $is_valid;
144
+ var $error;
145
+ }
146
+ endif;
147
+
148
+
149
+ /**
150
+ * Calls an HTTP POST function to verify if the user's guess was correct
151
+ * @param string $privkey
152
+ * @param string $remoteip
153
+ * @param string $challenge
154
+ * @param string $response
155
+ * @param array $extra_params an array of extra variables to post to the server
156
+ * @return ReCaptchaResponse
157
+ */
158
+ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
159
+ {
160
+ if ($privkey == null || $privkey == '') {
161
+ die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
162
+ }
163
+
164
+ if ($remoteip == null || $remoteip == '') {
165
+ die ("For security reasons, you must pass the remote ip to reCAPTCHA");
166
+ }
167
+
168
+
169
+
170
+ //discard spam submissions
171
+ if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
172
+ $recaptcha_response = new ReCaptchaResponse();
173
+ $recaptcha_response->is_valid = false;
174
+ $recaptcha_response->error = 'incorrect-captcha-sol';
175
+ return $recaptcha_response;
176
+ }
177
+
178
+ $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
179
+ array (
180
+ 'privatekey' => $privkey,
181
+ 'remoteip' => $remoteip,
182
+ 'challenge' => $challenge,
183
+ 'response' => $response
184
+ ) + $extra_params
185
+ );
186
+
187
+ $answers = explode ("\n", $response [1]);
188
+ $recaptcha_response = new ReCaptchaResponse();
189
+
190
+ if (trim ($answers [0]) == 'true') {
191
+ $recaptcha_response->is_valid = true;
192
+ }
193
+ else {
194
+ $recaptcha_response->is_valid = false;
195
+ $recaptcha_response->error = $answers [1];
196
+ }
197
+ return $recaptcha_response;
198
+
199
+ }
200
+
201
+ /**
202
+ * gets a URL where the user can sign up for reCAPTCHA. If your application
203
+ * has a configuration page where you enter a key, you should provide a link
204
+ * using this function.
205
+ * @param string $domain The domain where the page is hosted
206
+ * @param string $appname The name of your application
207
+ */
208
+ function recaptcha_get_signup_url ($domain = null, $appname = null) {
209
+ return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
210
+ }
211
+
212
+ function _recaptcha_aes_pad($val) {
213
+ $block_size = 16;
214
+ $numpad = $block_size - (strlen ($val) % $block_size);
215
+ return str_pad($val, strlen ($val) + $numpad, chr($numpad));
216
+ }
217
+
218
+ /* Mailhide related code */
219
+
220
+ function _recaptcha_aes_encrypt($val,$ky) {
221
+ if (! function_exists ("mcrypt_encrypt")) {
222
+ die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
223
+ }
224
+ $mode=MCRYPT_MODE_CBC;
225
+ $enc=MCRYPT_RIJNDAEL_128;
226
+ $val=_recaptcha_aes_pad($val);
227
+ return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
228
+ }
229
+
230
+
231
+ function _recaptcha_mailhide_urlbase64 ($x) {
232
+ return strtr(base64_encode ($x), '+/', '-_');
233
+ }
234
+
235
+ /* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
236
+ function recaptcha_mailhide_url($pubkey, $privkey, $email) {
237
+ if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
238
+ die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
239
+ "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
240
+ }
241
+
242
+
243
+ $ky = pack('H*', $privkey);
244
+ $cryptmail = _recaptcha_aes_encrypt ($email, $ky);
245
+
246
+ return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
247
+ }
248
+
249
+ /**
250
+ * gets the parts of the email to expose to the user.
251
+ * eg, given johndoe@example,com return ["john", "example.com"].
252
+ * the email is then displayed as john...@example.com
253
+ */
254
+ function _recaptcha_mailhide_email_parts ($email) {
255
+ $arr = preg_split("/@/", $email );
256
+
257
+ if (strlen ($arr[0]) <= 4) {
258
+ $arr[0] = substr ($arr[0], 0, 1);
259
+ } else if (strlen ($arr[0]) <= 6) {
260
+ $arr[0] = substr ($arr[0], 0, 3);
261
+ } else {
262
+ $arr[0] = substr ($arr[0], 0, 4);
263
+ }
264
+ return $arr;
265
+ }
266
+
267
+ /**
268
+ * Gets html to display an email address given a public an private key.
269
+ * to get a key, go to:
270
+ *
271
+ * http://www.google.com/recaptcha/mailhide/apikey
272
+ */
273
+ function recaptcha_mailhide_html($pubkey, $privkey, $email) {
274
+ $emailparts = _recaptcha_mailhide_email_parts ($email);
275
+ $url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
276
+
277
+ return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
278
+ "' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
279
+
280
+ }
281
+
282
+
283
+ ?>
js/bwp-recaptcha.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($) {
2
+ function toggle_comment_form_message() {
3
+ var redirect = $('#select_response').val();
4
+
5
+ redirect = redirect == 'redirect' ? true : false;
6
+
7
+ if (redirect) {
8
+ $('#input_error').parents('.bwp-clear').show();
9
+ $('#input_back').parents('.bwp-clear').hide();
10
+ } else {
11
+ $('#input_error').parents('.bwp-clear').hide();
12
+ $('#input_back').parents('.bwp-clear').show();
13
+ }
14
+ }
15
+
16
+ toggle_comment_form_message();
17
+
18
+ $('#select_response').on('change', function() {
19
+ toggle_comment_form_message();
20
+ });
21
+ });
languages/bwp-recaptcha-de_DE.mo ADDED
Binary file
languages/bwp-recaptcha-de_DE.po ADDED
@@ -0,0 +1,604 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: BWP reCAPTCHA\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2014-01-08 17:11+0700\n"
6
+ "PO-Revision-Date: 2014-01-11 16:18+0100\n"
7
+ "Last-Translator: Andreas Reitberger <andy.reitberger@gmail.com>\n"
8
+ "Language-Team: wdbase.de <kontakt@wdbase.de>\n"
9
+ "Language: de_DE\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Generator: Poedit 1.6.3\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+
20
+ #: includes/class-bwp-framework.php:178
21
+ #, php-format
22
+ msgid ""
23
+ "%s requires WordPress <strong>%s</strong> or higher and PHP <strong>%s</"
24
+ "strong> or higher. The plugin will not function until you update your "
25
+ "software. Please deactivate this plugin."
26
+ msgstr ""
27
+ "%s benötigt WordPress <strong>%s</strong> oder höher und PHP <strong>%s</"
28
+ "strong> oder höher. Das Plugin wird erst funktionieren, wenn Sie Ihre "
29
+ "Software aktualisiert haben. Bitte deaktivieren Sie bis dahin das Plugin."
30
+
31
+ #: includes/class-bwp-framework.php:190
32
+ msgid "Development Log"
33
+ msgstr "Entwicklungslog"
34
+
35
+ #: includes/class-bwp-framework.php:190
36
+ msgid "Frequently Asked Questions"
37
+ msgstr "Häufig gestellte Fragen"
38
+
39
+ #: includes/class-bwp-framework.php:190
40
+ msgid "FAQ"
41
+ msgstr "FAQ"
42
+
43
+ #: includes/class-bwp-framework.php:190
44
+ msgid "Got a problem? Send me a feedback!"
45
+ msgstr "Sie haben ein Problem? Senden Sie mir eine Rückmeldung!"
46
+
47
+ #: includes/class-bwp-framework.php:190
48
+ msgid "Contact"
49
+ msgstr "Kontakt"
50
+
51
+ #: includes/class-bwp-framework.php:197
52
+ msgid ""
53
+ "You can buy me some special coffees if you appreciate my work, thank you!"
54
+ msgstr ""
55
+ "Sie können mir einen speziellen Kaffe spendieren, wenn Ihnen meine Arbeit "
56
+ "gefällt. Vielen Dank!"
57
+
58
+ #: includes/class-bwp-framework.php:211
59
+ msgid "Donate to "
60
+ msgstr "Spende an"
61
+
62
+ #: includes/class-bwp-framework.php:213
63
+ msgid "One cup $5.00"
64
+ msgstr "Eine Tasse $5.00"
65
+
66
+ #: includes/class-bwp-framework.php:214
67
+ msgid "Two cups $10.00"
68
+ msgstr "Zwei Tassen $10.00"
69
+
70
+ #: includes/class-bwp-framework.php:215
71
+ msgid "Five cups! $25.00"
72
+ msgstr "Fünf Tassen! $25.00"
73
+
74
+ #: includes/class-bwp-framework.php:216
75
+ msgid "One LL-cup!!! $50.00"
76
+ msgstr "Eine riesen Tasse!!! $50.00"
77
+
78
+ #: includes/class-bwp-framework.php:217
79
+ msgid "... or any amount!"
80
+ msgstr "... oder selbst Betrag wählen!"
81
+
82
+ #: includes/class-bwp-framework.php:232
83
+ msgid "Latest updates from BetterWP.net!"
84
+ msgstr "Neusten Beiträge von BetterWP.net!"
85
+
86
+ #: includes/class-bwp-framework.php:233
87
+ msgid "Follow me on Twitter!"
88
+ msgstr "Folgen Sie mir auf Twitter!"
89
+
90
+ #: includes/class-bwp-framework.php:243
91
+ msgid "This Plugin is Proudly Sponsored By"
92
+ msgstr "Dieses Plugin wird stolz gesponsert von"
93
+
94
+ #: includes/class-bwp-framework.php:260
95
+ #, php-format
96
+ msgid "You are using version %s!"
97
+ msgstr "Sie benutzen aktuell die Version %s!"
98
+
99
+ #: includes/class-bwp-framework.php:396
100
+ msgid "Settings"
101
+ msgstr "Einstellungen"
102
+
103
+ #: includes/class-bwp-recaptcha.php:44
104
+ msgid "Get another challenge"
105
+ msgstr "Neues reCAPTACHA abrufen"
106
+
107
+ #: includes/class-bwp-recaptcha.php:45
108
+ msgid "Get audio reCAPTCHA"
109
+ msgstr "Audio-reCAPTCHA abrufen"
110
+
111
+ #: includes/class-bwp-recaptcha.php:46
112
+ msgid "Get image reCAPTCHA"
113
+ msgstr "Bild-reCPATCHA abrufen"
114
+
115
+ #: includes/class-bwp-recaptcha.php:47
116
+ msgid "About reCAPTCHA"
117
+ msgstr "Über reCAPTCHA"
118
+
119
+ #: includes/class-bwp-recaptcha.php:51
120
+ msgid "Enter the two words in the box:"
121
+ msgstr "Geben Sie die zwei Wörter hier ein:"
122
+
123
+ #: includes/class-bwp-recaptcha.php:52
124
+ msgid "Enter the numbers you hear:"
125
+ msgstr "Geben Sie die Nummer ein, die Sie hören:"
126
+
127
+ #: includes/class-bwp-recaptcha.php:132
128
+ msgid ""
129
+ "<strong>ERROR:</strong> Incorrect or empty reCAPTCHA response, please try "
130
+ "again."
131
+ msgstr ""
132
+ "<strong>FEHLER:</strong> Falsche oder leere Antwort, bitte versuchen Sie es "
133
+ "nochmals."
134
+
135
+ #: includes/class-bwp-recaptcha.php:133
136
+ #, php-format
137
+ msgid ""
138
+ "Error: Incorrect or empty reCAPTCHA response, please click the back button "
139
+ "on your browser's toolbar or click on %s to go back."
140
+ msgstr ""
141
+ "Fehler: Falsche oder leere Antwort, bitte klicken Sie auf den Zurück-Button "
142
+ "in Ihrem Browser oder klicken Sie %s um zurück zu gehen."
143
+
144
+ #: includes/class-bwp-recaptcha.php:155 includes/class-bwp-recaptcha.php:313
145
+ msgid "General Options"
146
+ msgstr "Allgemeine Einstellungen"
147
+
148
+ #: includes/class-bwp-recaptcha.php:156 includes/class-bwp-recaptcha.php:314
149
+ msgid "Theme Options"
150
+ msgstr "Designeinstellungen"
151
+
152
+ #: includes/class-bwp-recaptcha.php:159
153
+ msgid "English"
154
+ msgstr "Englisch"
155
+
156
+ #: includes/class-bwp-recaptcha.php:160
157
+ msgid "Dutch"
158
+ msgstr "Holländisch"
159
+
160
+ #: includes/class-bwp-recaptcha.php:161
161
+ msgid "French"
162
+ msgstr "Holländisch"
163
+
164
+ #: includes/class-bwp-recaptcha.php:162
165
+ msgid "German"
166
+ msgstr "Deutsch"
167
+
168
+ #: includes/class-bwp-recaptcha.php:163
169
+ msgid "Portuguese"
170
+ msgstr "Portugiesisch"
171
+
172
+ #: includes/class-bwp-recaptcha.php:164
173
+ msgid "Russian"
174
+ msgstr "Russisch"
175
+
176
+ #: includes/class-bwp-recaptcha.php:165
177
+ msgid "Spanish"
178
+ msgstr "Spanisch"
179
+
180
+ #: includes/class-bwp-recaptcha.php:166
181
+ msgid "Turkish"
182
+ msgstr "Türkisch"
183
+
184
+ #: includes/class-bwp-recaptcha.php:170
185
+ msgid "Read Profile"
186
+ msgstr "Profil lesen"
187
+
188
+ #: includes/class-bwp-recaptcha.php:171
189
+ msgid "Manage Options"
190
+ msgstr "Einstellungen bearbeiten"
191
+
192
+ #: includes/class-bwp-recaptcha.php:311
193
+ msgid "Better WordPress reCAPTCHA"
194
+ msgstr "Better WordPress reCAPTCHA"
195
+
196
+ #: includes/class-bwp-recaptcha.php:313
197
+ msgid "BWP reCAPTCHA General Options"
198
+ msgstr "BWP reCAPTCHA Designeinstellungen"
199
+
200
+ #: includes/class-bwp-recaptcha.php:314
201
+ msgid "BWP reCAPTCHA Theme Options"
202
+ msgstr "BWP reCAPTCHA Designeinstellungen"
203
+
204
+ #: includes/class-bwp-recaptcha.php:347
205
+ msgid "You do not have sufficient permissions to access this page."
206
+ msgstr "Sie haben nicht ausreichend Berechtigungen um diese Seite zu öffnen."
207
+
208
+ #: includes/class-bwp-recaptcha.php:366
209
+ msgid "What is reCAPTCHA?"
210
+ msgstr "Was ist reCAPTACHA?"
211
+
212
+ #: includes/class-bwp-recaptcha.php:367
213
+ msgid "This plugin will be"
214
+ msgstr "Dieses Plugin wird"
215
+
216
+ #: includes/class-bwp-recaptcha.php:368
217
+ msgid "Use main site's keys"
218
+ msgstr "Nutze die Schlüssel der Hauptseite"
219
+
220
+ #: includes/class-bwp-recaptcha.php:369
221
+ msgid "Public Key"
222
+ msgstr "Public Key"
223
+
224
+ #: includes/class-bwp-recaptcha.php:370
225
+ msgid "Private Key"
226
+ msgstr "Private Key"
227
+
228
+ #: includes/class-bwp-recaptcha.php:371
229
+ msgid "Visibility Options (applied to comment forms)"
230
+ msgstr "Sichtbarkeits-Einstellung (betrifft nur den Kommentarbereich)"
231
+
232
+ #: includes/class-bwp-recaptcha.php:372
233
+ msgid "Hide the CAPTCHA for"
234
+ msgstr "Verstecke das CAPTCHA für"
235
+
236
+ #: includes/class-bwp-recaptcha.php:373
237
+ msgid "If wrong or empty response"
238
+ msgstr "Bei falscher oder leerer Antwort"
239
+
240
+ #: includes/class-bwp-recaptcha.php:374 includes/class-bwp-recaptcha.php:375
241
+ msgid "Show the error message"
242
+ msgstr "Zeige diese Fehlernachricht,"
243
+
244
+ #: includes/class-bwp-recaptcha.php:376
245
+ msgid "Akismet Integration (applied to comment forms)"
246
+ msgstr "Akisment Integration (betrifft nur den Kommentarbereich)"
247
+
248
+ #: includes/class-bwp-recaptcha.php:377
249
+ msgid "Integrate with Akismet?"
250
+ msgstr "Soll Akisment integriert werden?"
251
+
252
+ #: includes/class-bwp-recaptcha.php:378
253
+ msgid "If correct CAPTCHA response"
254
+ msgstr "Bei richtiger CAPTCHA Antwort"
255
+
256
+ #: includes/class-bwp-recaptcha.php:382
257
+ msgid ""
258
+ "reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers "
259
+ "and old time radio shows. You can read more about reCAPTCHA <a href=\"http://"
260
+ "www.google.com/recaptcha/learnmore\" target=\"_blank\">here</a>."
261
+ msgstr ""
262
+ "reCAPTCHA ist ein kostenloser CAPTCHA Service von Google, welcher hilft "
263
+ "Bücher, Zeitungen und alte Radioshows zu digitalisieren. Mehr über reCAPTCHA "
264
+ "könnt Ihr <a href=\"http://www.google.com/recaptcha/learnmore\" target="
265
+ "\"_blank\">hier</a> nachlesen."
266
+
267
+ #: includes/class-bwp-recaptcha.php:383
268
+ msgid ""
269
+ "<em>This section allows you to determine when to show reCAPTCHA and how this "
270
+ "plugin reacts to errors.</em>"
271
+ msgstr ""
272
+ "<em>Dieser Bereich erlaubt es Ihnen zu bestimmen, wo eine reCPATCHA Form "
273
+ "angezeigt werden soll und wie deise bei einer falschen Eingabe reagieren "
274
+ "soll.</em>"
275
+
276
+ #: includes/class-bwp-recaptcha.php:384
277
+ msgid ""
278
+ "<em>Integrate with Akismet for better end-user experience. reCAPTCHA is "
279
+ "optional and <strong>NO</strong> spam comment will be added to the spam/"
280
+ "moderation queue, except likely legitimate comments. This makes the task of "
281
+ "identifying sincere comments much easier. This integration is currently in "
282
+ "beta stage.</em>"
283
+ msgstr ""
284
+ "<em>Eine Integration mit Akismet verbessert die Endnutzer-Erfahrung. "
285
+ "reCAPTCHA ist optional und <strong>kein</strong> Spam Kommentar wird zur "
286
+ "Spam/Moderationswarteschlange, ausgenommen Kommentaren von echten Nutzern, "
287
+ "hinzugefügt. Das erleichtert das identifizieren von richtigen Kommentaren "
288
+ "viel einfacher. Diese Integration ist aktuell noch in der Beta-Phase.</em>"
289
+
290
+ #: includes/class-bwp-recaptcha.php:400
291
+ msgid "Redirect commenter back to the comment form"
292
+ msgstr "Leite den Kommentator zurück zum Kommentar Bereich"
293
+
294
+ #: includes/class-bwp-recaptcha.php:401
295
+ msgid "Show an error page just like WordPress does"
296
+ msgstr "Zeige eine Fehlerseite, so wie es WordPress tut"
297
+
298
+ #: includes/class-bwp-recaptcha.php:404
299
+ msgid "Approve comment immediately"
300
+ msgstr "Kommentar unverzüglich freischalten"
301
+
302
+ #: includes/class-bwp-recaptcha.php:405
303
+ msgid "Hold comment in moderation queue"
304
+ msgstr "Verschiebe den Kommentar in die Moderationswarteschlange"
305
+
306
+ #: includes/class-bwp-recaptcha.php:406
307
+ msgid "Put comment in spam queue"
308
+ msgstr "Verschiebe den Kommentar in die Spam-Warteschlange"
309
+
310
+ #: includes/class-bwp-recaptcha.php:410
311
+ msgid "enabled for comment forms."
312
+ msgstr "für Kommentare aktiviert."
313
+
314
+ #: includes/class-bwp-recaptcha.php:411
315
+ msgid "enabled for registration form (user/site registration)."
316
+ msgstr "für die Registrierung aktiviert (Mitglied/Seiten Registrierung)."
317
+
318
+ #: includes/class-bwp-recaptcha.php:412
319
+ msgid "enabled for login form."
320
+ msgstr "für die Anmeldung (Login) aktiviert."
321
+
322
+ #: includes/class-bwp-recaptcha.php:413
323
+ msgid "registered users <em>(even without any capabilities)</em>."
324
+ msgstr "Registrierte Mitglieder <em>(für alle, ohne Ausnahme)</em>."
325
+
326
+ #: includes/class-bwp-recaptcha.php:414
327
+ msgid "users who can"
328
+ msgstr "Mitglieder mit foglenden Rechten"
329
+
330
+ #: includes/class-bwp-recaptcha.php:415
331
+ msgid "visitors who have at least"
332
+ msgstr "Besucher, die mindestens"
333
+
334
+ #: includes/class-bwp-recaptcha.php:416
335
+ msgid ""
336
+ "reCAPTCHA will only show when Akismet identifies a comment as spam. Highly "
337
+ "recommended if you do not want to force your visitors to type the captcha "
338
+ "every time."
339
+ msgstr ""
340
+ "reCAPTCHA wird nur angezeigt, wenn Akismet einen Kommentar als Spam "
341
+ "identifiziert. Höchstens empfohlen, wenn Sie ihre echten Besucher nicht "
342
+ "immer mit einer CAPTCHA Eingabe nerven wollen."
343
+
344
+ #: includes/class-bwp-recaptcha.php:417
345
+ msgid "uncheck to use different key pairs for this site."
346
+ msgstr ""
347
+ "abwählen, wenn Sie verschiedene Schlüsselpaare für diese Seite nutzen wollen."
348
+
349
+ #: includes/class-bwp-recaptcha.php:420
350
+ msgid "A public key used to request captchas from reCAPTCHA server."
351
+ msgstr "Der Public Key wird genutzt, um CAPTCHAS vom Server zu laden."
352
+
353
+ #: includes/class-bwp-recaptcha.php:421
354
+ msgid "A private (secret) key used to authenticate user's response."
355
+ msgstr ""
356
+ "Der Private Key (Secret) wird genutzt, um die Antwort der Besucher zu "
357
+ "authentifizieren."
358
+
359
+ #: includes/class-bwp-recaptcha.php:422
360
+ msgid ""
361
+ "when redirect commenter back to the comment form (or when used in other "
362
+ "forms such as contact forms)."
363
+ msgstr ""
364
+ "wenn der Kommentator zum Kommentarfeld weitergeleitet wird (oder wenn das "
365
+ "reCAPTCHA Modul in andern Beriechen, wie Kontaktformen genutzt wird)."
366
+
367
+ #: includes/class-bwp-recaptcha.php:423
368
+ msgid "when show the normal error page with no redirection."
369
+ msgstr "wenn die normale Fehlerseite (ohne Weiterleitung) angezeigt wird."
370
+
371
+ #: includes/class-bwp-recaptcha.php:424
372
+ msgid "approved comment(s)."
373
+ msgstr "genehmigte(n) Kommentar(e) aufweisen."
374
+
375
+ #: includes/class-bwp-recaptcha.php:427
376
+ msgid ""
377
+ "<em><strong>Note:</strong> For this plugin to work, you will need a pair of "
378
+ "API keys (public and private), which is available for free <a href=\"https://"
379
+ "www.google.com/recaptcha/admin/create\" target=\"_blank\">here</a>. Once you "
380
+ "have created those two keys for this domain, simply paste them below.</em>"
381
+ msgstr ""
382
+ "<em><strong>Beachte:</strong> Damit dieses Plugin funktioniert, werden zwei "
383
+ "API Schlüssel (Public und Private), welche Sie kostenlos <a href=\"https://"
384
+ "www.google.com/recaptcha/admin/create\" target=\"_blank\">hier</a> "
385
+ "erhältlich sind. Nachdem Sie diese zwei Schlüssel generiert haben, fügen Sie "
386
+ "diese in die zwei folgenden Felder ein.</em>"
387
+
388
+ #: includes/class-bwp-recaptcha.php:428
389
+ msgid ""
390
+ "<em><strong>Note:</strong> Now you may wonder, why put the comment in the "
391
+ "spam queue? The benefit is Akismet will be able to mark the comment as False "
392
+ "Positive, and thus will not possibly block that comment in the future. "
393
+ "However, it is best to just put the comment in moderation queue as next time "
394
+ "Akismet will put such comment in moderation queue immediately without the "
395
+ "need of a CAPTCHA.</em>"
396
+ msgstr ""
397
+ "<em><strong>Beachte:</strong> Jetzt fragen Sie sich vielleicht, wieso die "
398
+ "Kommentar in den Spam-Warteschlange verschoben werden solln? Der Vorteil von "
399
+ "Akismet ist, dass es in der Lage ist, Kommentar als kein Spam zu markieren "
400
+ "und folgende Kommentare werden nicht mehr geblockt. Jedoch ist es das beste, "
401
+ "Kommentare in die Moderationswarteschlange zu verschieben, da Akisment beim "
402
+ "nächstmal dies automtisch erledigt, ohne das wieder ein CAPTCHA ausgefüllt "
403
+ "werden muss.</em>"
404
+
405
+ #: includes/class-bwp-recaptcha.php:457
406
+ msgid "Choose a theme"
407
+ msgstr "Wähle ein Design"
408
+
409
+ #: includes/class-bwp-recaptcha.php:458
410
+ msgid "Use CSS provided by this plugin?"
411
+ msgstr "Nutze den vom Plugin zu Verfügung gestellten CSS Style?"
412
+
413
+ #: includes/class-bwp-recaptcha.php:459
414
+ msgid "Load CSS, JS selectively?"
415
+ msgstr "Lade CSS, JavaScript selektiv?"
416
+
417
+ #: includes/class-bwp-recaptcha.php:460
418
+ msgid "Choose a language for built-in themes"
419
+ msgstr "Wählen Sie eine Sprache für die Standard Designs"
420
+
421
+ #: includes/class-bwp-recaptcha.php:461
422
+ msgid "Tabindex for captcha input field"
423
+ msgstr "Tabindex für Captcha-Eingabefeld"
424
+
425
+ #: includes/class-bwp-recaptcha.php:462
426
+ msgid "Preview your reCAPTCHA"
427
+ msgstr "Vorschau Ihre reCAPTCHA Form"
428
+
429
+ #: includes/class-bwp-recaptcha.php:466
430
+ msgid ""
431
+ "<em>Below you will see how your reCAPTCHA will look. Note that this might "
432
+ "differ on your actual pages.<br /></em>"
433
+ msgstr ""
434
+ "<em>Unterhalb sehen Sie, wie Ihre reCAPCHTA Form aussehen wird. Beachten Sie "
435
+ "jedoch, dass das Aussehen auf Ihrer eigentlichen Seite abweichen kann.<br /"
436
+ "></em>"
437
+
438
+ #: includes/class-bwp-recaptcha.php:470
439
+ msgid "Default Theme (Red)"
440
+ msgstr "Standard (rot)"
441
+
442
+ #: includes/class-bwp-recaptcha.php:471
443
+ msgid "White Theme"
444
+ msgstr "Weiß"
445
+
446
+ #: includes/class-bwp-recaptcha.php:472
447
+ msgid "Black Theme"
448
+ msgstr "Schwarz"
449
+
450
+ #: includes/class-bwp-recaptcha.php:473
451
+ msgid "Clean Theme"
452
+ msgstr "Schlicht"
453
+
454
+ #: includes/class-bwp-recaptcha.php:474
455
+ msgid "Custom Theme (use CSS)"
456
+ msgstr "Eigenes Design (mit CSS)"
457
+
458
+ #: includes/class-bwp-recaptcha.php:479
459
+ msgid ""
460
+ "This stylesheet is used to style the custom theme as well as the "
461
+ "registration page. You can disable this or add appropriate filters to use "
462
+ "your own."
463
+ msgstr ""
464
+ "Dieses Stylesheet wird dazu genutzt, dass eigen erstellte Design und die "
465
+ "Registrierungsseite zu stylen. Sie können diese deaktivieren oder einen "
466
+ "Verweis auf Ihr eigenes Stylesheet festlegen."
467
+
468
+ #: includes/class-bwp-recaptcha.php:480
469
+ msgid "This is only useful when you do not use any minify or cache plugin."
470
+ msgstr ""
471
+ "Das ist nur nützlich, wenn Sie keine Cache oder Code-Minify Plugins nutzen."
472
+
473
+ #: includes/class-bwp-recaptcha.php:483
474
+ msgid ""
475
+ "Basically, this should be 4 if you place the captcha before the textarea, "
476
+ "and 5 if you put it after. Set to 0 to disable."
477
+ msgstr ""
478
+ "Grundsätzlich sollte dies bei 4 belassen werden, wenn Sie das Captcha vor "
479
+ "dem Textbereich setzen wollen, und 5, sollten Sie es danach setzen wollen. "
480
+ "Der Wert 0 deaktiviert dies."
481
+
482
+ #: includes/class-bwp-recaptcha.php:486
483
+ #, php-format
484
+ msgid ""
485
+ "<em><strong>Note:</strong> The four built-in captcha themes will look OK in "
486
+ "most WordPress themes; However, some times it is better to control how "
487
+ "reCAPTCHA looks using CSS. Please read <a href=\"%s#customization\" target="
488
+ "\"_blank\">this guide</a> if you would like to do so.</em>"
489
+ msgstr ""
490
+ "<em><strong>Beachte:</strong> Die vier eingebauten reCAPTCHA Designs passen "
491
+ "in den meisten WordPress Themes. Jedoch ist es manchmal besser, das Aussehen "
492
+ "per CSS zu ändern. Lesen Sie dazu diese <a href=\"%s#customization\" target="
493
+ "\"_blank\">Anleitung</a>, wenn Sie das Design individuell anpassen wollen.</"
494
+ "em>"
495
+
496
+ #: includes/class-bwp-recaptcha.php:487
497
+ #, php-format
498
+ msgid ""
499
+ "<em><strong>Note:</strong> Above you can select some built-in languages. If "
500
+ "you would like to add your own language, please read <a href="
501
+ "\"%s#customization\" target=\"_blank\">this guide</a>.</em>"
502
+ msgstr ""
503
+ "<em><strong>Beachte:</strong> Oben können Sie einige eingebaute Sprachen "
504
+ "wählen. Wenn Sie Ihre eigene Sprache hinzufügen wollen lesen Sie bitte diese "
505
+ "<a href=\"%s#customization\" target=\"_blank\">Anleitung</a>.</em>"
506
+
507
+ #: includes/class-bwp-recaptcha.php:540
508
+ msgid "All options have been saved."
509
+ msgstr "Alle Optionen wurden erfolgreich gespeichert."
510
+
511
+ #: includes/class-bwp-recaptcha.php:546
512
+ msgid "Warning"
513
+ msgstr "Warnung"
514
+
515
+ #: includes/class-bwp-recaptcha.php:546
516
+ msgid ""
517
+ "API key(s) missing. Please get an API key from <a href='https://www.google."
518
+ "com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</"
519
+ "a> (free!)"
520
+ msgstr ""
521
+ "API Schlüssel(s) fehlen. Bitte generieren Sie einen API Schlüssel von <a "
522
+ "href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/"
523
+ "recaptcha/admin/create</a> (Kostenlos!)"
524
+
525
+ #: includes/class-bwp-recaptcha.php:548
526
+ msgid "Notice"
527
+ msgstr "Beachte"
528
+
529
+ #: includes/class-bwp-recaptcha.php:548
530
+ msgid ""
531
+ "You are enabling Akismet integration but Akismet is not currently active. "
532
+ "Please activate Akismet for the integration to work."
533
+ msgstr ""
534
+ "Sie wollten die Akisment Integration aktivieren, ohne das Plugin selbst "
535
+ "installiert oder aktiviert zu haben. Bitte installieren oder aktivieren Sie "
536
+ "Akisment zuerst."
537
+
538
+ #: includes/class-bwp-recaptcha.php:671
539
+ msgid "Your comment was identified as spam, please complete the CAPTCHA below:"
540
+ msgstr ""
541
+ "Ihr Kommentar wurde als Spam identifiziert, sollte das falsch sein, füllen "
542
+ "Sie biete folgendes CAPTCHA richtig aus:"
543
+
544
+ #: includes/class-bwp-recaptcha.php:714
545
+ msgid ""
546
+ "To use reCAPTCHA you must get an API key from <a href='https://www.google."
547
+ "com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>"
548
+ msgstr ""
549
+ "Um reCAPTCHA nutzen zu können, benötigen Sie zwei API Schlüssel von <a "
550
+ "href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/"
551
+ "recaptcha/admin/create</a>"
552
+
553
+ #: includes/class-bwp-recaptcha.php:763 includes/class-bwp-recaptcha.php:808
554
+ msgid "<strong>ERROR</strong>: Unknown captcha error."
555
+ msgstr "<strong>FEHLER</strong>: Unbekannter reCAPTCHA fehler."
556
+
557
+ #: includes/class-bwp-recaptcha.php:878
558
+ msgid "this link"
559
+ msgstr "dieser Link"
560
+
561
+ #: includes/class-bwp-recaptcha.php:880
562
+ msgid ""
563
+ "There is some problem with your reCAPTCHA API keys, please double check them."
564
+ msgstr ""
565
+ "Es gibt ein Problem mit Ihrem reCAPTCHA API-Schlüssel, bitte überprüfen Sie "
566
+ "diese nochmals."
567
+
568
+ #: includes/class-bwp-recaptcha.php:882
569
+ msgid "Unknown error. Please contact the administrator for more info."
570
+ msgstr ""
571
+ "Unbekannter Fehler. Kontaktieren Sie bitte den Admin um mehr Informationen "
572
+ "zu erhalten."
573
+
574
+ #: includes/class-bwp-recaptcha-cf7.php:107
575
+ msgid "This reCAPTCHA tag is provided by the BWP reCAPTCHA WordPress plugin."
576
+ msgstr ""
577
+ "Diese reCPATCHA Form wird von BWP reCAPTCHA WordPress Plugins bereitgestellt."
578
+
579
+ #: includes/class-bwp-recaptcha-cf7.php:110
580
+ msgid ""
581
+ "Please refer to <a target=\"_blank\" href=\"http://betterwp.net/wordpress-"
582
+ "plugins/bwp-recaptcha/#customization\">BWP reCAPTCHA's documentation </a> "
583
+ "for a quick guide on how to customize the look and feel of this tag."
584
+ msgstr ""
585
+ "Bitte besuchen Sie <a target=\"_blank\" href=\"http://betterwp.net/wordpress-"
586
+ "plugins/bwp-recaptcha/#customization\">BWP reCAPTCHA's Dokumentationen </a> "
587
+ "für eine kurze Anleitung, wie Sie das Aussehen und Verhalten bearbeiten "
588
+ "können."
589
+
590
+ #: includes/class-bwp-recaptcha-cf7.php:116
591
+ msgid "Name"
592
+ msgstr "Name"
593
+
594
+ #: includes/class-bwp-recaptcha-cf7.php:123
595
+ msgid "Copy this code and paste it into the form left."
596
+ msgstr "Kopieren Sie diesen Code und fügen Sie diesen in der Form links ein."
597
+
598
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:80
599
+ msgid "Plugin Configurations"
600
+ msgstr "Plugin Konfiguration"
601
+
602
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:398
603
+ msgid "Save Changes"
604
+ msgstr "Speichere Änderungen"
languages/bwp-recaptcha-es_ES.mo ADDED
Binary file
languages/bwp-recaptcha-es_ES.po ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: BWP reCAPTCHA\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-09-25 13:43+0700\n"
6
+ "PO-Revision-Date: 2011-09-25 14:48+0700\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-Language: Spanish\n"
16
+ "X-Poedit-Country: SPAIN\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: includes/class-bwp-framework.php:172
20
+ #, php-format
21
+ msgid "%s requires WordPress <strong>%s</strong> or higher and PHP <strong>%s</strong> or higher. The plugin will not function until you update your software. Please deactivate this plugin."
22
+ msgstr "%s requiere WordPress <strong>%s</strong> o mayor y PHP <strong>%s</strong> o mayor. El plugin no funcionará hasta que actualice su software. Por favor desactive este plugin."
23
+
24
+ #: includes/class-bwp-framework.php:183
25
+ msgid "Development Log"
26
+ msgstr "Desarrollo Entrar"
27
+
28
+ #: includes/class-bwp-framework.php:183
29
+ msgid "Frequently Asked Questions"
30
+ msgstr "Preguntas más frecuentes"
31
+
32
+ #: includes/class-bwp-framework.php:183
33
+ msgid "FAQ"
34
+ msgstr "FAQ"
35
+
36
+ #: includes/class-bwp-framework.php:183
37
+ msgid "Got a problem? Send me a feedback!"
38
+ msgstr "Tienes un problema? Envíame un feedback!"
39
+
40
+ #: includes/class-bwp-framework.php:183
41
+ msgid "Contact"
42
+ msgstr "contacto"
43
+
44
+ #: includes/class-bwp-framework.php:190
45
+ msgid "You can buy me some special coffees if you appreciate my work, thank you!"
46
+ msgstr "Me puedes comprar una tazas de café si te gusta mi trabajo, gracias!"
47
+
48
+ #: includes/class-bwp-framework.php:204
49
+ msgid "Donate to "
50
+ msgstr "donar a"
51
+
52
+ #: includes/class-bwp-framework.php:206
53
+ msgid "One cup $5.00"
54
+ msgstr "Una taza de $ 5,00"
55
+
56
+ #: includes/class-bwp-framework.php:207
57
+ msgid "Two cups $10.00"
58
+ msgstr "Dos tazas de $ 10.00"
59
+
60
+ #: includes/class-bwp-framework.php:208
61
+ msgid "Five cups! $25.00"
62
+ msgstr "Cinco tazas! $ 25.00"
63
+
64
+ #: includes/class-bwp-framework.php:209
65
+ msgid "One LL-cup!!! $50.00"
66
+ msgstr "Una taza de LL-! $ 50.00"
67
+
68
+ #: includes/class-bwp-framework.php:210
69
+ msgid "... or any amount!"
70
+ msgstr "... o cualquier cantidad!"
71
+
72
+ #: includes/class-bwp-framework.php:225
73
+ msgid "Latest updates from BetterWP.net!"
74
+ msgstr "Actualizaciones más recientes de BetterWP.net!"
75
+
76
+ #: includes/class-bwp-framework.php:226
77
+ msgid "Follow me on Twitter!"
78
+ msgstr "Sígueme en Twitter!"
79
+
80
+ #: includes/class-bwp-framework.php:235
81
+ #, php-format
82
+ msgid "You are using version %s!"
83
+ msgstr "Usted esta usando la versión %s!"
84
+
85
+ #: includes/class-bwp-framework.php:372
86
+ msgid "Settings"
87
+ msgstr "Configuraciones"
88
+
89
+ #: includes/class-bwp-recaptcha.php:45
90
+ msgid "Get another challenge"
91
+ msgstr "Obtén un nuevo reto"
92
+
93
+ #: includes/class-bwp-recaptcha.php:46
94
+ msgid "Get audio reCAPTCHA"
95
+ msgstr "Obtén un audio reCAPTCHA"
96
+
97
+ #: includes/class-bwp-recaptcha.php:47
98
+ msgid "Get image reCAPTCHA"
99
+ msgstr "Obtén una imagen reCAPTCHA"
100
+
101
+ #: includes/class-bwp-recaptcha.php:48
102
+ msgid "About reCAPTCHA"
103
+ msgstr "Acerca de reCAPTCHA"
104
+
105
+ #: includes/class-bwp-recaptcha.php:52
106
+ msgid "Enter the two words in the box:"
107
+ msgstr "Escribe las 2 palabras:"
108
+
109
+ #: includes/class-bwp-recaptcha.php:53
110
+ msgid "Enter the numbers you hear:"
111
+ msgstr "Ingrese los números que escuche:"
112
+
113
+ #: includes/class-bwp-recaptcha.php:98
114
+ msgid "<strong>ERROR:</strong> Incorrect or empty reCAPTCHA response, please try again."
115
+ msgstr "<strong>ERROR:</strong> Respuesta incorrecta o vacía de reCAPTCHA, por favor intente de nuevo."
116
+
117
+ #: includes/class-bwp-recaptcha.php:99
118
+ #, php-format
119
+ msgid "Error: Incorrect or empty reCAPTCHA response, please click the back button on your browser's toolbar or click on %s to go back."
120
+ msgstr "Error: la respuesta de reCAPTCHA esta vacía o es incorrecta, por favor haga clic en el botón Volver de la barra de herramientas de su navegador o haga clic en %s para volver."
121
+
122
+ #: includes/class-bwp-recaptcha.php:119
123
+ #: includes/class-bwp-recaptcha.php:250
124
+ msgid "General Options"
125
+ msgstr "Opciones Generales"
126
+
127
+ #: includes/class-bwp-recaptcha.php:120
128
+ #: includes/class-bwp-recaptcha.php:251
129
+ msgid "Theme Options"
130
+ msgstr "Opciones de Tema"
131
+
132
+ #: includes/class-bwp-recaptcha.php:123
133
+ msgid "English"
134
+ msgstr "Inglés"
135
+
136
+ #: includes/class-bwp-recaptcha.php:124
137
+ msgid "Dutch"
138
+ msgstr "Holandés"
139
+
140
+ #: includes/class-bwp-recaptcha.php:125
141
+ msgid "French"
142
+ msgstr "Francés"
143
+
144
+ #: includes/class-bwp-recaptcha.php:126
145
+ msgid "German"
146
+ msgstr "Alemán"
147
+
148
+ #: includes/class-bwp-recaptcha.php:127
149
+ msgid "Portuguese"
150
+ msgstr "Portugués"
151
+
152
+ #: includes/class-bwp-recaptcha.php:128
153
+ msgid "Russian"
154
+ msgstr "Ruso"
155
+
156
+ #: includes/class-bwp-recaptcha.php:129
157
+ msgid "Spanish"
158
+ msgstr "Español"
159
+
160
+ #: includes/class-bwp-recaptcha.php:130
161
+ msgid "Turkish"
162
+ msgstr "Turco"
163
+
164
+ #: includes/class-bwp-recaptcha.php:134
165
+ msgid "Read Profile"
166
+ msgstr "Leer Perfil"
167
+
168
+ #: includes/class-bwp-recaptcha.php:135
169
+ msgid "Manage Options"
170
+ msgstr "Gestionar Opciones"
171
+
172
+ #: includes/class-bwp-recaptcha.php:248
173
+ msgid "Better WordPress reCAPTCHA"
174
+ msgstr "Better WordPress reCAPTCHA"
175
+
176
+ #: includes/class-bwp-recaptcha.php:250
177
+ msgid "BWP reCAPTCHA General Options"
178
+ msgstr "BWP reCAPTCHA Opciones Generales"
179
+
180
+ #: includes/class-bwp-recaptcha.php:251
181
+ msgid "BWP reCAPTCHA Theme Options"
182
+ msgstr "BWP reCAPTCHA Opciones de Tema"
183
+
184
+ #: includes/class-bwp-recaptcha.php:262
185
+ msgid "You do not have sufficient permissions to access this page."
186
+ msgstr "Usted no tiene permisos suficientes para acceder a esta página."
187
+
188
+ #: includes/class-bwp-recaptcha.php:281
189
+ msgid "What is reCAPTCHA?"
190
+ msgstr "¿Qué es re CAPTCHA?"
191
+
192
+ #: includes/class-bwp-recaptcha.php:282
193
+ msgid "This plugin will be"
194
+ msgstr "Este plugin estará"
195
+
196
+ #: includes/class-bwp-recaptcha.php:283
197
+ msgid "Public Key"
198
+ msgstr "Clave Pública"
199
+
200
+ #: includes/class-bwp-recaptcha.php:284
201
+ msgid "Private Key"
202
+ msgstr "Clave Privada"
203
+
204
+ #: includes/class-bwp-recaptcha.php:285
205
+ msgid "Visibility Options (only applied to comment forms)"
206
+ msgstr "Opciones de Visibilidad (sólo aplica para los formularios de comentarios)"
207
+
208
+ #: includes/class-bwp-recaptcha.php:286
209
+ msgid "Hide the CAPTCHA for"
210
+ msgstr "Ocultar el CAPTCHA para"
211
+
212
+ #: includes/class-bwp-recaptcha.php:287
213
+ msgid "If wrong or empty response"
214
+ msgstr "Si la respuesta es equivocada o vacía"
215
+
216
+ #: includes/class-bwp-recaptcha.php:288
217
+ #: includes/class-bwp-recaptcha.php:289
218
+ msgid "Show the error message"
219
+ msgstr "Mostrar el mensaje de error"
220
+
221
+ #: includes/class-bwp-recaptcha.php:290
222
+ msgid "Akismet Integration"
223
+ msgstr "Integración con Akismet"
224
+
225
+ #: includes/class-bwp-recaptcha.php:291
226
+ msgid "Integrate with Akismet?"
227
+ msgstr "Integrar con Akismet?"
228
+
229
+ #: includes/class-bwp-recaptcha.php:292
230
+ msgid "If correct CAPTCHA response"
231
+ msgstr "Si la respuesta de CAPTCHA es correcta"
232
+
233
+ #: includes/class-bwp-recaptcha.php:296
234
+ msgid "reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. You can read more about reCAPTCHA <a href=\"http://www.google.com/recaptcha/learnmore\" target=\"_blank\">here</a>."
235
+ msgstr "reCAPTCHA es un servicio gratuito de CAPTCHA que ayuda a digitalizar libros, periódicos y viejos programas de radio. Puedes leer más acerca de reCAPTCHA <a href=\"http://www.google.com/recaptcha/learnmore\" target=\"_blank\">aquí</a>."
236
+
237
+ #: includes/class-bwp-recaptcha.php:297
238
+ msgid "<em>This section allows you to determine when to show reCAPTCHA and how this plugin reacts to errors.</em>"
239
+ msgstr "<em>Esta sección le permite a usted determinar cuando mostrar reCAPTCHA y cómo este plugin reacciona a los errores.</em>"
240
+
241
+ #: includes/class-bwp-recaptcha.php:298
242
+ msgid "<em>Integrate with Akismet for better end-user experience. reCAPTCHA is optional and <strong>NO</strong> spam comment will be added to the spam/moderation queue, except likely legitimate comments. This makes the task of identifying sincere comments much easier. This integration is currently in beta stage.</em>"
243
+ msgstr "<em>La integración con Akismet mejora la experiencia del usuario final. reCAPTCHA es opcional y <strong>NINGÚN</strong> comentario de spam será añadido a la cola de spam/moderación, excepto los comentarios legítimos. Esto hace que la tarea de identificar los comentarios sinceros sea mucho más fácil. Esta integración se encuentra actualmente en fase beta.</em>"
244
+
245
+ #: includes/class-bwp-recaptcha.php:313
246
+ msgid "Redirect commenter back to the comment form"
247
+ msgstr "Redireccione al comentarista de vuelta al formulario de comentarios"
248
+
249
+ #: includes/class-bwp-recaptcha.php:314
250
+ msgid "Show an error page just like WordPress does"
251
+ msgstr "Mostrar una página de error al igual que lo hace WordPress."
252
+
253
+ #: includes/class-bwp-recaptcha.php:317
254
+ msgid "Approve comment immediately"
255
+ msgstr "Aprobar comentario inmediatamente"
256
+
257
+ #: includes/class-bwp-recaptcha.php:318
258
+ msgid "Hold comment in moderation queue"
259
+ msgstr "Mantener el comentario en la cola de moderación"
260
+
261
+ #: includes/class-bwp-recaptcha.php:319
262
+ msgid "Put comment in spam queue"
263
+ msgstr "Poner el comentario en la cola de spam"
264
+
265
+ #: includes/class-bwp-recaptcha.php:323
266
+ msgid "enabled for comment forms."
267
+ msgstr "habilitado para formularios de comentarios."
268
+
269
+ #: includes/class-bwp-recaptcha.php:324
270
+ msgid "enabled for registration page."
271
+ msgstr "habilitado para la página de registro."
272
+
273
+ #: includes/class-bwp-recaptcha.php:325
274
+ msgid "registered users <em>(even without any capabilities)</em>."
275
+ msgstr "usuarios registrados <em>(incluso sin ninguna capacidad)</em>."
276
+
277
+ #: includes/class-bwp-recaptcha.php:326
278
+ msgid "users who can"
279
+ msgstr "usuarios que puedan"
280
+
281
+ #: includes/class-bwp-recaptcha.php:327
282
+ msgid "visitors who have at least"
283
+ msgstr "visitantes que tengan al menos"
284
+
285
+ #: includes/class-bwp-recaptcha.php:328
286
+ msgid "reCAPTCHA will only show when Akismet identifies a comment as spam. Highly recommended if you do not want to force your visitors to type the captcha every time."
287
+ msgstr "reCAPTCHA sólo se muestrará cuando Akismet identifica un comentario como spam. Muy recomendable si usted no quiere forzar a sus visitantes a escribir el captcha cada vez."
288
+
289
+ #: includes/class-bwp-recaptcha.php:331
290
+ msgid "A public key used to request captchas from reCAPTCHA server."
291
+ msgstr "Una clave pública se utiliza para solicitar captchas del servidor reCAPTCHA."
292
+
293
+ #: includes/class-bwp-recaptcha.php:332
294
+ msgid "A private (secret) key used to authenticate user's response."
295
+ msgstr "Una clave privada (secreta) se utiliza para autenticar la respuesta del usuario."
296
+
297
+ #: includes/class-bwp-recaptcha.php:333
298
+ msgid "when redirect commenter back to the comment form."
299
+ msgstr "cuando redireccione al comentarista de vuelta al formulario de comentarios."
300
+
301
+ #: includes/class-bwp-recaptcha.php:334
302
+ msgid "when show the normal error page with no redirection."
303
+ msgstr "cuando muestra la página de error normal sin redirección."
304
+
305
+ #: includes/class-bwp-recaptcha.php:335
306
+ msgid "approved comment(s)."
307
+ msgstr "comentario(s) aprobado(s)."
308
+
309
+ #: includes/class-bwp-recaptcha.php:338
310
+ msgid "<em><strong>Note:</strong> For this plugin to work, you will need a pair of API keys (public and private), which is available for free <a href=\"https://www.google.com/recaptcha/admin/create\" target=\"_blank\">here</a>. Once you have created those two keys for this domain, simply paste them below.</em>"
311
+ msgstr "<em><strong>Nota:</strong> Para que este plugin funcione, usted necesitará de un par de claves API (pública y privada), que están disponibles de forma gratuita <a href=\"https://www.google.com/recaptcha/admin/create\" target=\"_blank\">aquí</a>. Una vez que haya creado las dos claves para este dominio, sólo tiene que pegarlas a continuación.</em>"
312
+
313
+ #: includes/class-bwp-recaptcha.php:339
314
+ msgid "<em><strong>Note:</strong> Now you may wonder, why put the comment in the spam queue? The benefit is Akismet will be able to mark the comment as False Positive, and thus will not possibly block that comment in the future. However, it is best to just put the comment in moderation queue as next time Akismet will put such comment in moderation queue immediately without the need of a CAPTCHA.</em>"
315
+ msgstr "<em><strong>Nota:</strong> Ahora usted puede preguntarse, ¿por qué poner el comentario en la cola de spam? El beneficio de esto es que Akismet será capaz de marcar el comentario como Falso Positivo, y por lo tanto no será posible que bloqueé el comentario en el futuro. Sin embargo, es mejor sólo poner el comentario en la cola de moderación ya que la próxima vez Akismet pondrá esos comentarios en la cola de moderación inmediatamente sin la necesidad de un CAPTCHA.</em>"
316
+
317
+ #: includes/class-bwp-recaptcha.php:364
318
+ msgid "Choose a theme"
319
+ msgstr "Elija un tema"
320
+
321
+ #: includes/class-bwp-recaptcha.php:365
322
+ msgid "Use CSS provided by this plugin?"
323
+ msgstr "¿Usar los CSS proporcionados por este plugin?"
324
+
325
+ #: includes/class-bwp-recaptcha.php:366
326
+ msgid "Load CSS, JS selectively?"
327
+ msgstr "¿Leer CSS, JS selectivamente?"
328
+
329
+ #: includes/class-bwp-recaptcha.php:367
330
+ msgid "Choose a language for built-in themes"
331
+ msgstr "Elija un idioma para los temas integrados."
332
+
333
+ #: includes/class-bwp-recaptcha.php:368
334
+ msgid "Tabindex for captcha input field"
335
+ msgstr "Tabindex para el campo de entrada de captcha"
336
+
337
+ #: includes/class-bwp-recaptcha.php:369
338
+ msgid "Preview your reCAPTCHA"
339
+ msgstr "Vista previa de su reCAPTCHA"
340
+
341
+ #: includes/class-bwp-recaptcha.php:373
342
+ msgid "<em>Below you will see how your reCAPTCHA will look. Note that this might differ on your actual pages.<br /></em>"
343
+ msgstr "<em>A continuación podrás apreciar cómo tu reCAPTCHA se verá. Tener en cuenta que esto puede variar en sus páginas reales.<br /></em>"
344
+
345
+ #: includes/class-bwp-recaptcha.php:377
346
+ msgid "Default Theme (Red)"
347
+ msgstr "Tema por defecto (Rojo)"
348
+
349
+ #: includes/class-bwp-recaptcha.php:378
350
+ msgid "White Theme"
351
+ msgstr "Tema Blanco"
352
+
353
+ #: includes/class-bwp-recaptcha.php:379
354
+ msgid "Black Theme"
355
+ msgstr "Tema Negro"
356
+
357
+ #: includes/class-bwp-recaptcha.php:380
358
+ msgid "Clean Theme"
359
+ msgstr "Tema Limpio"
360
+
361
+ #: includes/class-bwp-recaptcha.php:381
362
+ msgid "Custom Theme (use CSS)"
363
+ msgstr "Tema Personalizado (usa CSS)"
364
+
365
+ #: includes/class-bwp-recaptcha.php:386
366
+ msgid "This stylesheet is used to style the custom theme as well as the registration page. You can disable this or add appropriate filters to use your own."
367
+ msgstr "Esta hoja de estilos se usa para personalizar el tema así como la página de registro. Usted puede desactivar esto o añadir los filtros apropiados para utilizar los suyos propios."
368
+
369
+ #: includes/class-bwp-recaptcha.php:387
370
+ msgid "This is only useful when you do not use any minify or cache plugin."
371
+ msgstr "Esto es útil solamente cuando usted no usa ningún plugin de minify o cache."
372
+
373
+ #: includes/class-bwp-recaptcha.php:390
374
+ msgid "Basically, this should be 4 if you place the captcha before the textarea, and 5 if you put it after."
375
+ msgstr "Básicamente, este debe ser de 4 si se coloca el antes del área de texto, y 5 si lo pone después."
376
+
377
+ #: includes/class-bwp-recaptcha.php:393
378
+ #, php-format
379
+ msgid "<em><strong>Note:</strong> The four built-in captcha themes will look OK in most WordPress themes; However, some times it is better to control how reCAPTCHA looks using CSS. Please read <a href=\"%s#customization\" target=\"_blank\">this guide</a> if you would like to do so.</em>"
380
+ msgstr "<em><strong>Nota:</strong> Los cuatro temas integrados de captcha se verán bien en la mayoría de temas de WordPress, sin embargo, a veces es mejor controlar la forma en reCAPTCHA se luce haciendo uso de CSS. Por favor lea <a href=\"%s#customization\" target=\"_blank\">esta guía</a> si desea hacerlo."
381
+
382
+ #: includes/class-bwp-recaptcha.php:394
383
+ #, php-format
384
+ msgid "<em><strong>Note:</strong> Above you can select some built-in languages. If you would like to add your own language, please read <a href=\"%s#customization\" target=\"_blank\">this guide</a>.</em>"
385
+ msgstr "<em><strong>Nota:</strong> Arriba usted puede seleccionar algunos de los idiomas integrados. Si desea agregar su propio idioma, por favor lea <a href=\"%s#customization\" target=\"_blank\">esta guía</a>.</em>"
386
+
387
+ #: includes/class-bwp-recaptcha.php:438
388
+ msgid "Warning"
389
+ msgstr "Advertencia"
390
+
391
+ #: includes/class-bwp-recaptcha.php:438
392
+ msgid "API key(s) missing. Please get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a> (free!)"
393
+ msgstr "Faltan las claves de la API. Por favor obtenga una clave de la API de <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a> (es gratuito!)"
394
+
395
+ #: includes/class-bwp-recaptcha.php:440
396
+ msgid "Notice"
397
+ msgstr "Nota"
398
+
399
+ #: includes/class-bwp-recaptcha.php:440
400
+ msgid "You are enabling Akismet integration but Akismet is not currently active. Please activate Akismet for the integration to work."
401
+ msgstr "Usted está permitiendo la integración con Akismet, pero Akismet actualmente no está activo Por favor active Akismet para que funcione la integración."
402
+
403
+ #: includes/class-bwp-recaptcha.php:548
404
+ msgid "Your comment was identified as spam, please complete the CAPTCHA below:"
405
+ msgstr "Su comentario fue identificado como spam, por favor complete el CAPTCHA a continuación:"
406
+
407
+ #: includes/class-bwp-recaptcha.php:580
408
+ msgid "To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>"
409
+ msgstr "Para usar reCAPTCHA debe obtener una clave de API de <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>"
410
+
411
+ #: includes/class-bwp-recaptcha.php:609
412
+ msgid "<strong>ERROR</strong>: Captcha response is either empty or incorrect."
413
+ msgstr "<strong>ERROR</strong>: La respuesta de captcha está vacía o es incorrecta."
414
+
415
+ #: includes/class-bwp-recaptcha.php:611
416
+ msgid "<strong>ERROR</strong>: Unknown captcha error."
417
+ msgstr "<strong>ERROR</strong>: Error de captcha desconocido."
418
+
419
+ #: includes/class-bwp-recaptcha.php:661
420
+ msgid "this link"
421
+ msgstr "este enlace"
422
+
423
+ #: includes/class-bwp-recaptcha.php:663
424
+ msgid "There is some problem with your reCAPTCHA API keys, please double check them."
425
+ msgstr "Hay algún problema con sus claves de la API de reCAPTCHA, por favor, vuelva a comprobarlas."
426
+
427
+ #: includes/class-bwp-recaptcha.php:665
428
+ msgid "Unknown error. Please contact the administrator for more info."
429
+ msgstr "Error desconocido. Póngase en contacto con el administrador para más información."
430
+
431
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:80
432
+ msgid "Plugin Configurations"
433
+ msgstr "Configuraciones de Plugin"
434
+
435
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:398
436
+ msgid "Save Changes"
437
+ msgstr "Guardar Cambios"
438
+
439
+ #~ msgid "log"
440
+ #~ msgstr "blog"
languages/bwp-recaptcha-fr_FR.mo ADDED
Binary file
languages/bwp-recaptcha-fr_FR.po ADDED
@@ -0,0 +1,713 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: BWP reCAPTCHA\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2014-01-08 17:11+0700\n"
6
+ "PO-Revision-Date: 2014-06-30 11:00+0700\n"
7
+ "Last-Translator: Khang Minh <contact@betterwp.net>\n"
8
+ "Language-Team: \n"
9
+ "Language: en\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
+ "X-Poedit-Basepath: .\n"
18
+ "X-Textdomain-Support: yes\n"
19
+ "X-Generator: Poedit 1.6.5\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ # @ bwp-recaptcha
23
+ #: includes/class-bwp-framework.php:178
24
+ #, php-format
25
+ msgid ""
26
+ "%s requires WordPress <strong>%s</strong> or higher and PHP <strong>%s</"
27
+ "strong> or higher. The plugin will not function until you update your "
28
+ "software. Please deactivate this plugin."
29
+ msgstr ""
30
+ "%s nécessite WordPress <strong>%s</strong> ou plus et PHP <strong>%s</"
31
+ "strong> ou plus. L'extension ne fonctionnera pas jusqu'à ce que vous mettiez "
32
+ "à jour votre logiciel. Veuillez désactiver cette extension."
33
+
34
+ # @ bwp-recaptcha
35
+ #: includes/class-bwp-framework.php:190
36
+ msgid "Development Log"
37
+ msgstr "Historique des développements"
38
+
39
+ # @ bwp-recaptcha
40
+ #: includes/class-bwp-framework.php:190
41
+ msgid "Frequently Asked Questions"
42
+ msgstr "Questions fréquemment posées"
43
+
44
+ # @ bwp-recaptcha
45
+ #: includes/class-bwp-framework.php:190
46
+ msgid "FAQ"
47
+ msgstr "FAQ"
48
+
49
+ # @ bwp-recaptcha
50
+ #: includes/class-bwp-framework.php:190
51
+ msgid "Got a problem? Send me a feedback!"
52
+ msgstr "Un problème ? Envoyez-moi un retour !"
53
+
54
+ # @ bwp-recaptcha
55
+ #: includes/class-bwp-framework.php:190
56
+ msgid "Contact"
57
+ msgstr "Contact"
58
+
59
+ # @ bwp-recaptcha
60
+ #: includes/class-bwp-framework.php:197
61
+ msgid ""
62
+ "You can buy me some special coffees if you appreciate my work, thank you!"
63
+ msgstr ""
64
+ "Vous pouvez m'acheter des cafés spéciaux si vous appréciez mon travail, je "
65
+ "vous remercie !"
66
+
67
+ #: includes/class-bwp-framework.php:211
68
+ msgid "Donate to "
69
+ msgstr "Faire un don à"
70
+
71
+ # @ bwp-recaptcha
72
+ #: includes/class-bwp-framework.php:213
73
+ msgid "One cup $5.00"
74
+ msgstr "Une tasse $5.00"
75
+
76
+ # @ bwp-recaptcha
77
+ #: includes/class-bwp-framework.php:214
78
+ msgid "Two cups $10.00"
79
+ msgstr "Deux tasses $10.00"
80
+
81
+ # @ bwp-recaptcha
82
+ #: includes/class-bwp-framework.php:215
83
+ msgid "Five cups! $25.00"
84
+ msgstr "Cinq tasses ! $25.00"
85
+
86
+ # @ bwp-recaptcha
87
+ #: includes/class-bwp-framework.php:216
88
+ msgid "One LL-cup!!! $50.00"
89
+ msgstr "Une grande tasse !!! $50.00"
90
+
91
+ # @ bwp-recaptcha
92
+ #: includes/class-bwp-framework.php:217
93
+ msgid "... or any amount!"
94
+ msgstr "... ou tout montant !"
95
+
96
+ # @ bwp-recaptcha
97
+ #: includes/class-bwp-framework.php:232
98
+ msgid "Latest updates from BetterWP.net!"
99
+ msgstr "Dernières mises à jour de BetterWP.net !"
100
+
101
+ # @ bwp-recaptcha
102
+ #: includes/class-bwp-framework.php:233
103
+ msgid "Follow me on Twitter!"
104
+ msgstr "Suivez-moi sur Twitter !"
105
+
106
+ #: includes/class-bwp-framework.php:243
107
+ msgid "This Plugin is Proudly Sponsored By"
108
+ msgstr "Cette extension est fièrement soutenue par "
109
+
110
+ # @ bwp-recaptcha
111
+ #: includes/class-bwp-framework.php:260
112
+ #, php-format
113
+ msgid "You are using version %s!"
114
+ msgstr "Vous utilisez la version %s !"
115
+
116
+ # @ default
117
+ #: includes/class-bwp-framework.php:396
118
+ msgid "Settings"
119
+ msgstr "Réglages"
120
+
121
+ # @ bwp-recaptcha
122
+ #: includes/class-bwp-recaptcha.php:44
123
+ msgid "Get another challenge"
124
+ msgstr "Obtenir un autre défi"
125
+
126
+ # @ bwp-recaptcha
127
+ #: includes/class-bwp-recaptcha.php:45
128
+ msgid "Get audio reCAPTCHA"
129
+ msgstr "Obtenir un reCAPTCHA audio"
130
+
131
+ # @ bwp-recaptcha
132
+ #: includes/class-bwp-recaptcha.php:46
133
+ msgid "Get image reCAPTCHA"
134
+ msgstr "Obtenir une image reCAPTCHA"
135
+
136
+ # @ bwp-recaptcha
137
+ #: includes/class-bwp-recaptcha.php:47
138
+ msgid "About reCAPTCHA"
139
+ msgstr "Au sujet de reCAPTCHA"
140
+
141
+ # @ bwp-recaptcha
142
+ #: includes/class-bwp-recaptcha.php:51
143
+ msgid "Enter the two words in the box:"
144
+ msgstr "Entrez les deux mots dans la boîte :"
145
+
146
+ # @ bwp-recaptcha
147
+ #: includes/class-bwp-recaptcha.php:52
148
+ msgid "Enter the numbers you hear:"
149
+ msgstr "Entrez les chiffres que vous entendez :"
150
+
151
+ # @ bwp-recaptcha
152
+ #: includes/class-bwp-recaptcha.php:132
153
+ msgid ""
154
+ "<strong>ERROR:</strong> Incorrect or empty reCAPTCHA response, please try "
155
+ "again."
156
+ msgstr ""
157
+ "<strong>ERREUR :</strong> réponse reCAPTCHA incorrecte ou vide. Veuillez ré-"
158
+ "essayer."
159
+
160
+ # @ bwp-recaptcha
161
+ #: includes/class-bwp-recaptcha.php:133
162
+ #, php-format
163
+ msgid ""
164
+ "Error: Incorrect or empty reCAPTCHA response, please click the back button "
165
+ "on your browser's toolbar or click on %s to go back."
166
+ msgstr ""
167
+ "Erreur : la réponse reCAPTCHA est incorrecte ou vide. Veuillez cliquer sur "
168
+ "le bouton de retour sur la barre d'outils de votre navigateur ou cliquez sur "
169
+ "%s pour revenir en arrière."
170
+
171
+ # @ bwp-recaptcha
172
+ #: includes/class-bwp-recaptcha.php:155 includes/class-bwp-recaptcha.php:313
173
+ msgid "General Options"
174
+ msgstr "Options générales"
175
+
176
+ # @ bwp-recaptcha
177
+ #: includes/class-bwp-recaptcha.php:156 includes/class-bwp-recaptcha.php:314
178
+ msgid "Theme Options"
179
+ msgstr "Options du thème"
180
+
181
+ # @ bwp-recaptcha
182
+ #: includes/class-bwp-recaptcha.php:159
183
+ msgid "English"
184
+ msgstr "Anglais"
185
+
186
+ # @ bwp-recaptcha
187
+ #: includes/class-bwp-recaptcha.php:160
188
+ msgid "Dutch"
189
+ msgstr "Hollandais"
190
+
191
+ # @ bwp-recaptcha
192
+ #: includes/class-bwp-recaptcha.php:161
193
+ msgid "French"
194
+ msgstr "Français"
195
+
196
+ # @ bwp-recaptcha
197
+ #: includes/class-bwp-recaptcha.php:162
198
+ msgid "German"
199
+ msgstr "Allemand"
200
+
201
+ # @ bwp-recaptcha
202
+ #: includes/class-bwp-recaptcha.php:163
203
+ msgid "Portuguese"
204
+ msgstr "Portugais"
205
+
206
+ # @ bwp-recaptcha
207
+ #: includes/class-bwp-recaptcha.php:164
208
+ msgid "Russian"
209
+ msgstr "Russe"
210
+
211
+ # @ bwp-recaptcha
212
+ #: includes/class-bwp-recaptcha.php:165
213
+ msgid "Spanish"
214
+ msgstr "Espagnol"
215
+
216
+ # @ bwp-recaptcha
217
+ #: includes/class-bwp-recaptcha.php:166
218
+ msgid "Turkish"
219
+ msgstr "Turque"
220
+
221
+ # @ bwp-recaptcha
222
+ #: includes/class-bwp-recaptcha.php:170
223
+ msgid "Read Profile"
224
+ msgstr "Lire le profil"
225
+
226
+ # @ bwp-recaptcha
227
+ #: includes/class-bwp-recaptcha.php:171
228
+ msgid "Manage Options"
229
+ msgstr "Gérer les options"
230
+
231
+ # @ bwp-recaptcha
232
+ #: includes/class-bwp-recaptcha.php:311
233
+ msgid "Better WordPress reCAPTCHA"
234
+ msgstr "Better WordPress reCAPTCHA"
235
+
236
+ # @ bwp-recaptcha
237
+ #: includes/class-bwp-recaptcha.php:313
238
+ msgid "BWP reCAPTCHA General Options"
239
+ msgstr "Options générales de BWP reCAPTCHA"
240
+
241
+ # @ bwp-recaptcha
242
+ #: includes/class-bwp-recaptcha.php:314
243
+ msgid "BWP reCAPTCHA Theme Options"
244
+ msgstr "Options du thème de BWP reCAPTCHA"
245
+
246
+ # @ default
247
+ #: includes/class-bwp-recaptcha.php:347
248
+ msgid "You do not have sufficient permissions to access this page."
249
+ msgstr ""
250
+ "Vous ne disposez pas des autorisations requises pour accéder à cette page."
251
+
252
+ # @ bwp-recaptcha
253
+ #: includes/class-bwp-recaptcha.php:366
254
+ msgid "What is reCAPTCHA?"
255
+ msgstr "Qu'est-ce que reCAPTCHA ?"
256
+
257
+ # @ bwp-recaptcha
258
+ #: includes/class-bwp-recaptcha.php:367
259
+ msgid "This plugin will be"
260
+ msgstr "Cette extension sera"
261
+
262
+ #: includes/class-bwp-recaptcha.php:368
263
+ msgid "Use main site's keys"
264
+ msgstr "Utiliser les clés du site principal"
265
+
266
+ # @ bwp-recaptcha
267
+ #: includes/class-bwp-recaptcha.php:369
268
+ msgid "Public Key"
269
+ msgstr "Clé publique"
270
+
271
+ # @ bwp-recaptcha
272
+ #: includes/class-bwp-recaptcha.php:370
273
+ msgid "Private Key"
274
+ msgstr "Clé privée"
275
+
276
+ # @ bwp-recaptcha
277
+ #: includes/class-bwp-recaptcha.php:371
278
+ msgid "Visibility Options (applied to comment forms)"
279
+ msgstr "Options de visibilité (appliquées aux formulaires de commentaire)"
280
+
281
+ # @ bwp-recaptcha
282
+ #: includes/class-bwp-recaptcha.php:372
283
+ msgid "Hide the CAPTCHA for"
284
+ msgstr "Cacher le CAPTCHA pour"
285
+
286
+ # @ bwp-recaptcha
287
+ #: includes/class-bwp-recaptcha.php:373
288
+ msgid "If wrong or empty response"
289
+ msgstr "En cas de réponse erronée ou vide"
290
+
291
+ # @ bwp-recaptcha
292
+ #: includes/class-bwp-recaptcha.php:374 includes/class-bwp-recaptcha.php:375
293
+ msgid "Show the error message"
294
+ msgstr "Montrer le message d'erreur"
295
+
296
+ # @ bwp-recaptcha
297
+ #: includes/class-bwp-recaptcha.php:376
298
+ msgid "Akismet Integration (applied to comment forms)"
299
+ msgstr "Intégration Akismet (appliquée aux formulaires de commentaire)"
300
+
301
+ # @ bwp-recaptcha
302
+ #: includes/class-bwp-recaptcha.php:377
303
+ msgid "Integrate with Akismet?"
304
+ msgstr "Intégrer avec Akismet ?"
305
+
306
+ # @ bwp-recaptcha
307
+ #: includes/class-bwp-recaptcha.php:378
308
+ msgid "If correct CAPTCHA response"
309
+ msgstr "En cas de réponse correcte du CAPTCHA"
310
+
311
+ # @ bwp-recaptcha
312
+ #: includes/class-bwp-recaptcha.php:382
313
+ msgid ""
314
+ "reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers "
315
+ "and old time radio shows. You can read more about reCAPTCHA <a href=\"http://"
316
+ "www.google.com/recaptcha/learnmore\" target=\"_blank\">here</a>."
317
+ msgstr ""
318
+ "reCAPTCHA est un service gratuit de CAPTCHA qui permet de numériser des "
319
+ "livres, des journaux et de vieilles émissions de radio. Vous pouvez en "
320
+ "savoir plus au sujet de reCAPTCHA <a href=\"http://www.google.com/recaptcha/"
321
+ "learnmore\" target=\"_blank\">ici</a>."
322
+
323
+ # @ bwp-recaptcha
324
+ #: includes/class-bwp-recaptcha.php:383
325
+ msgid ""
326
+ "<em>This section allows you to determine when to show reCAPTCHA and how this "
327
+ "plugin reacts to errors.</em>"
328
+ msgstr ""
329
+ "<em>Cette section vous permet de déterminer quand montrer reCAPTCHA et "
330
+ "comment cette extension doit réagir aux erreurs.</em>"
331
+
332
+ # @ bwp-recaptcha
333
+ #: includes/class-bwp-recaptcha.php:384
334
+ msgid ""
335
+ "<em>Integrate with Akismet for better end-user experience. reCAPTCHA is "
336
+ "optional and <strong>NO</strong> spam comment will be added to the spam/"
337
+ "moderation queue, except likely legitimate comments. This makes the task of "
338
+ "identifying sincere comments much easier. This integration is currently in "
339
+ "beta stage.</em>"
340
+ msgstr ""
341
+ "<em>À intégrer avec Akismet pour une meilleure expérience utilisateur : "
342
+ "reCAPTCHA est facultatif et <strong>AUCUN</strong> commentaire de type spam "
343
+ "ne sera ajouté à la file de modération des spam, sauf les commentaires "
344
+ "susceptibles d'être légitimes. Cela rend la tâche d'identification des "
345
+ "commentaires sincères beaucoup plus facile. Cette intégration est "
346
+ "actuellement en phase bêta.</em>"
347
+
348
+ # @ bwp-recaptcha
349
+ #: includes/class-bwp-recaptcha.php:400
350
+ msgid "Redirect commenter back to the comment form"
351
+ msgstr "Faire revenir le rédacteur du commentaire au formulaire de commentaire"
352
+
353
+ # @ bwp-recaptcha
354
+ #: includes/class-bwp-recaptcha.php:401
355
+ msgid "Show an error page just like WordPress does"
356
+ msgstr "Afficher une page d'erreur, de la même façon que WordPress"
357
+
358
+ # @ bwp-recaptcha
359
+ #: includes/class-bwp-recaptcha.php:404
360
+ msgid "Approve comment immediately"
361
+ msgstr "Approuver le commentaire immédiatement"
362
+
363
+ # @ bwp-recaptcha
364
+ #: includes/class-bwp-recaptcha.php:405
365
+ msgid "Hold comment in moderation queue"
366
+ msgstr "Retenir le commentaire en file d'attente de modération"
367
+
368
+ # @ bwp-recaptcha
369
+ #: includes/class-bwp-recaptcha.php:406
370
+ msgid "Put comment in spam queue"
371
+ msgstr "Mettre le commentaire dans la file de spam"
372
+
373
+ # @ bwp-recaptcha
374
+ #: includes/class-bwp-recaptcha.php:410
375
+ msgid "enabled for comment forms."
376
+ msgstr "activée pour les formulaires de commentaire."
377
+
378
+ # @ bwp-recaptcha
379
+ #: includes/class-bwp-recaptcha.php:411
380
+ msgid "enabled for registration form (user/site registration)."
381
+ msgstr ""
382
+ "activée pour le formulaire d'inscription (inscription site/utilisateur)."
383
+
384
+ # @ bwp-recaptcha
385
+ #: includes/class-bwp-recaptcha.php:412
386
+ msgid "enabled for login form."
387
+ msgstr "activée pour le formulaire de connexion."
388
+
389
+ # @ bwp-recaptcha
390
+ #: includes/class-bwp-recaptcha.php:413
391
+ msgid "registered users <em>(even without any capabilities)</em>."
392
+ msgstr "les utilisateurs enregistrés <em>(même sans aucun droit)</em>."
393
+
394
+ # @ bwp-recaptcha
395
+ #: includes/class-bwp-recaptcha.php:414
396
+ msgid "users who can"
397
+ msgstr "les utilisateurs qui peuvent"
398
+
399
+ # @ bwp-recaptcha
400
+ #: includes/class-bwp-recaptcha.php:415
401
+ msgid "visitors who have at least"
402
+ msgstr "les visiteurs qui ont au moins"
403
+
404
+ # @ bwp-recaptcha
405
+ #: includes/class-bwp-recaptcha.php:416
406
+ msgid ""
407
+ "reCAPTCHA will only show when Akismet identifies a comment as spam. Highly "
408
+ "recommended if you do not want to force your visitors to type the captcha "
409
+ "every time."
410
+ msgstr ""
411
+ "reCAPTCHA s'affichera seulement lorsque Akismet identifiera un commentaire "
412
+ "comme spam. Vivement recommandé si vous ne voulez pas forcer vos visiteurs à "
413
+ "taper le captcha à chaque fois."
414
+
415
+ #: includes/class-bwp-recaptcha.php:417
416
+ msgid "uncheck to use different key pairs for this site."
417
+ msgstr "décocher pour utiliser des paires de clés différentes pour ce site."
418
+
419
+ # @ bwp-recaptcha
420
+ #: includes/class-bwp-recaptcha.php:420
421
+ msgid "A public key used to request captchas from reCAPTCHA server."
422
+ msgstr ""
423
+ "Une clé publique utilisée pour demander des captchas à partir du serveur "
424
+ "reCAPTCHA."
425
+
426
+ # @ bwp-recaptcha
427
+ #: includes/class-bwp-recaptcha.php:421
428
+ msgid "A private (secret) key used to authenticate user's response."
429
+ msgstr ""
430
+ "Une clé privée (secrète) utilisée pour authentifier la réponse de "
431
+ "l'utilisateur."
432
+
433
+ # @ bwp-recaptcha
434
+ #: includes/class-bwp-recaptcha.php:422
435
+ msgid ""
436
+ "when redirect commenter back to the comment form (or when used in other "
437
+ "forms such as contact forms)."
438
+ msgstr ""
439
+ "lorsque le rédacteur du commentaire est redirigé vers le formulaire de "
440
+ "commentaire (ou pour une utilisation dans d'autres formulaires tels que ceux "
441
+ "de contact)."
442
+
443
+ # @ bwp-recaptcha
444
+ #: includes/class-bwp-recaptcha.php:423
445
+ msgid "when show the normal error page with no redirection."
446
+ msgstr "lorsque la page d'erreur normale est affichée sans redirection."
447
+
448
+ # @ bwp-recaptcha
449
+ #: includes/class-bwp-recaptcha.php:424
450
+ msgid "approved comment(s)."
451
+ msgstr "commentaire(s) approuvé(s)."
452
+
453
+ # @ bwp-recaptcha
454
+ #: includes/class-bwp-recaptcha.php:427
455
+ msgid ""
456
+ "<em><strong>Note:</strong> For this plugin to work, you will need a pair of "
457
+ "API keys (public and private), which is available for free <a href=\"https://"
458
+ "www.google.com/recaptcha/admin/create\" target=\"_blank\">here</a>. Once you "
459
+ "have created those two keys for this domain, simply paste them below.</em>"
460
+ msgstr ""
461
+ "<em><strong>Remarque :</strong> Pour que cette extension fonctionne, vous "
462
+ "aurez besoin d'une paire de clés API (publique et privée), qui sont "
463
+ "disponibles gratuitement <a href=\"https://www.google.com/recaptcha/admin/"
464
+ "create\" target=\"_blank\">ici</a>. Une fois que vous aurez créé ces deux "
465
+ "clés pour ce domaine, copiez-les simplement ci-dessous.</em>"
466
+
467
+ # @ bwp-recaptcha
468
+ #: includes/class-bwp-recaptcha.php:428
469
+ msgid ""
470
+ "<em><strong>Note:</strong> Now you may wonder, why put the comment in the "
471
+ "spam queue? The benefit is Akismet will be able to mark the comment as False "
472
+ "Positive, and thus will not possibly block that comment in the future. "
473
+ "However, it is best to just put the comment in moderation queue as next time "
474
+ "Akismet will put such comment in moderation queue immediately without the "
475
+ "need of a CAPTCHA.</em>"
476
+ msgstr ""
477
+ "<em><strong>Remarque :</strong> Maintenant, vous vous demander peut-être "
478
+ "pourquoi mettre le commentaire dans la file d'attente de spam ? L'avantage "
479
+ "est qu'Akismet sera en mesure de marquer le commentaire comme faux positif, "
480
+ "et donc évitera que ce commentaire soit bloqué par la suite. Cependant, il "
481
+ "est préférable de mettre simplement le commentaire dans la file d'attente de "
482
+ "modération pour que la prochaine fois Akismet mette immédiatement de tels "
483
+ "commentaires en file d'attente de modération sans avoir besoin d'un CAPTCHA."
484
+ "</em>"
485
+
486
+ # @ bwp-recaptcha
487
+ #: includes/class-bwp-recaptcha.php:457
488
+ msgid "Choose a theme"
489
+ msgstr "Choisissez un thème"
490
+
491
+ # @ bwp-recaptcha
492
+ #: includes/class-bwp-recaptcha.php:458
493
+ msgid "Use CSS provided by this plugin?"
494
+ msgstr "Utiliser une feuille de style CSS fournie par cette extension ?"
495
+
496
+ # @ bwp-recaptcha
497
+ #: includes/class-bwp-recaptcha.php:459
498
+ msgid "Load CSS, JS selectively?"
499
+ msgstr "Charger sélectivement une CSS ou un JS ?"
500
+
501
+ # @ bwp-recaptcha
502
+ #: includes/class-bwp-recaptcha.php:460
503
+ msgid "Choose a language for built-in themes"
504
+ msgstr "Choisissez une langue pour les thèmes intégrés"
505
+
506
+ # @ bwp-recaptcha
507
+ #: includes/class-bwp-recaptcha.php:461
508
+ msgid "Tabindex for captcha input field"
509
+ msgstr "Indice de position pour le champ d'entrée du captcha"
510
+
511
+ # @ bwp-recaptcha
512
+ #: includes/class-bwp-recaptcha.php:462
513
+ msgid "Preview your reCAPTCHA"
514
+ msgstr "Aperçu de votre reCAPTCHA"
515
+
516
+ # @ bwp-recaptcha
517
+ #: includes/class-bwp-recaptcha.php:466
518
+ msgid ""
519
+ "<em>Below you will see how your reCAPTCHA will look. Note that this might "
520
+ "differ on your actual pages.<br /></em>"
521
+ msgstr ""
522
+ "<em>Ci-dessous vous verrez à quoi votre reCAPTCHA ressemblera. Notez que ce "
523
+ "pourrait être un peu différent sur vos pages réelles.<br /></em>"
524
+
525
+ # @ bwp-recaptcha
526
+ #: includes/class-bwp-recaptcha.php:470
527
+ msgid "Default Theme (Red)"
528
+ msgstr "Thème par défaut (rouge)"
529
+
530
+ # @ bwp-recaptcha
531
+ #: includes/class-bwp-recaptcha.php:471
532
+ msgid "White Theme"
533
+ msgstr "Thème blanc"
534
+
535
+ # @ bwp-recaptcha
536
+ #: includes/class-bwp-recaptcha.php:472
537
+ msgid "Black Theme"
538
+ msgstr "Thème noir"
539
+
540
+ # @ bwp-recaptcha
541
+ #: includes/class-bwp-recaptcha.php:473
542
+ msgid "Clean Theme"
543
+ msgstr "Thème transparent"
544
+
545
+ # @ bwp-recaptcha
546
+ #: includes/class-bwp-recaptcha.php:474
547
+ msgid "Custom Theme (use CSS)"
548
+ msgstr "Thème particulier (utiliser les CSS)"
549
+
550
+ # @ bwp-recaptcha
551
+ #: includes/class-bwp-recaptcha.php:479
552
+ msgid ""
553
+ "This stylesheet is used to style the custom theme as well as the "
554
+ "registration page. You can disable this or add appropriate filters to use "
555
+ "your own."
556
+ msgstr ""
557
+ "Cette feuille de style est utilisée pour le style du thème personnalisé "
558
+ "ainsi que pour la page d'inscription. Vous pouvez la désactiver ou ajouter "
559
+ "des filtres appropriés pour utiliser la vôtre."
560
+
561
+ # @ bwp-recaptcha
562
+ #: includes/class-bwp-recaptcha.php:480
563
+ msgid "This is only useful when you do not use any minify or cache plugin."
564
+ msgstr ""
565
+ "Ce n'est utile que lorsque vous n'utilisez aucune extension de réduction "
566
+ "(minify) ou de cache."
567
+
568
+ # @ bwp-recaptcha
569
+ #: includes/class-bwp-recaptcha.php:483
570
+ msgid ""
571
+ "Basically, this should be 4 if you place the captcha before the textarea, "
572
+ "and 5 if you put it after. Set to 0 to disable."
573
+ msgstr ""
574
+ "Fondamentalement, cela devrait être 4 si vous placez le captcha avant la "
575
+ "zone de saisie du texte, et 5 si vous le mettez après. Indiquer 0 pour "
576
+ "désactiver."
577
+
578
+ # @ bwp-recaptcha
579
+ #: includes/class-bwp-recaptcha.php:486
580
+ #, php-format
581
+ msgid ""
582
+ "<em><strong>Note:</strong> The four built-in captcha themes will look OK in "
583
+ "most WordPress themes; However, some times it is better to control how "
584
+ "reCAPTCHA looks using CSS. Please read <a href=\"%s#customization\" target="
585
+ "\"_blank\">this guide</a> if you would like to do so.</em>"
586
+ msgstr ""
587
+ "<em><strong>Remarque :</strong> Les quatre thèmes captcha intégrés auront "
588
+ "une apparence satisfaisante avec la plupart des thèmes WordPress. Cependant, "
589
+ "parfois il est préférable de contrôler l'apparence du reCAPTCHA à l'aide de "
590
+ "feuilles de style CSS. Veuillez lire <a href=\"%s#customization\" target="
591
+ "\"_blank\">ce quide</a> si vous souhaitez le faire.</em>"
592
+
593
+ # @ bwp-recaptcha
594
+ #: includes/class-bwp-recaptcha.php:487
595
+ #, php-format
596
+ msgid ""
597
+ "<em><strong>Note:</strong> Above you can select some built-in languages. If "
598
+ "you would like to add your own language, please read <a href="
599
+ "\"%s#customization\" target=\"_blank\">this guide</a>.</em>"
600
+ msgstr ""
601
+ "<em><strong>Remarque :</strong> Ci-dessus vous pouvez sélectionner certaines "
602
+ "langues intégrées. Si vous souhaitez ajouter votre propre langue, veuillez "
603
+ "lire <a href=\"%s#customization\" target=\"_blank\">ce guide</a>.</em>"
604
+
605
+ #: includes/class-bwp-recaptcha.php:540
606
+ msgid "All options have been saved."
607
+ msgstr "Toutes les options ont été sauvegardées."
608
+
609
+ # @ default
610
+ #: includes/class-bwp-recaptcha.php:546
611
+ msgid "Warning"
612
+ msgstr "Avertissement"
613
+
614
+ # @ bwp-recaptcha
615
+ #: includes/class-bwp-recaptcha.php:546
616
+ msgid ""
617
+ "API key(s) missing. Please get an API key from <a href='https://www.google."
618
+ "com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</"
619
+ "a> (free!)"
620
+ msgstr ""
621
+ "Clé(s) API manquante(s). Veuillez obtenir une clé API à partir de <a "
622
+ "href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/"
623
+ "recaptcha/admin/create</a> (Gratuit !)"
624
+
625
+ # @ default
626
+ #: includes/class-bwp-recaptcha.php:548
627
+ msgid "Notice"
628
+ msgstr "Avis"
629
+
630
+ # @ bwp-recaptcha
631
+ #: includes/class-bwp-recaptcha.php:548
632
+ msgid ""
633
+ "You are enabling Akismet integration but Akismet is not currently active. "
634
+ "Please activate Akismet for the integration to work."
635
+ msgstr ""
636
+ "Vous essayez d'activer l'intégration d'Akismet mais Akismet n'est pas actif "
637
+ "actuellement. Veuillez activer Akismet pour que l'intégration fonctionne."
638
+
639
+ # @ bwp-recaptcha
640
+ #: includes/class-bwp-recaptcha.php:671
641
+ msgid "Your comment was identified as spam, please complete the CAPTCHA below:"
642
+ msgstr ""
643
+ "Votre commentaire a été identifié comme spam. Veuillez compléter le CAPTCHA "
644
+ "ci-dessous :"
645
+
646
+ # @ bwp-recaptcha
647
+ #: includes/class-bwp-recaptcha.php:714
648
+ msgid ""
649
+ "To use reCAPTCHA you must get an API key from <a href='https://www.google."
650
+ "com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>"
651
+ msgstr ""
652
+ "Pour utiliser reCAPTCHA, vous devez obtenir une clé API depuis <a "
653
+ "href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/"
654
+ "recaptcha/admin/create</a>"
655
+
656
+ # @ default
657
+ #: includes/class-bwp-recaptcha.php:763 includes/class-bwp-recaptcha.php:808
658
+ msgid "<strong>ERROR</strong>: Unknown captcha error."
659
+ msgstr "<strong>ERREUR</strong> : erreur captcha inconnue."
660
+
661
+ # @ bwp-recaptcha
662
+ #: includes/class-bwp-recaptcha.php:878
663
+ msgid "this link"
664
+ msgstr "ce lien"
665
+
666
+ # @ bwp-recaptcha
667
+ #: includes/class-bwp-recaptcha.php:880
668
+ msgid ""
669
+ "There is some problem with your reCAPTCHA API keys, please double check them."
670
+ msgstr ""
671
+ "Il ya un problème avec vos clés API pour reCAPTCHA. Veuillez les re-vérifier."
672
+
673
+ # @ bwp-recaptcha
674
+ #: includes/class-bwp-recaptcha.php:882
675
+ msgid "Unknown error. Please contact the administrator for more info."
676
+ msgstr ""
677
+ "Erreur inconnue. Veuillez contacter l'administrateur pour plus "
678
+ "d'informations."
679
+
680
+ #: includes/class-bwp-recaptcha-cf7.php:107
681
+ msgid "This reCAPTCHA tag is provided by the BWP reCAPTCHA WordPress plugin."
682
+ msgstr ""
683
+ "Cette balise reCAPTCHA est fournie par l'extension BWP reCAPTCHA pour "
684
+ "Wordpress."
685
+
686
+ #: includes/class-bwp-recaptcha-cf7.php:110
687
+ msgid ""
688
+ "Please refer to <a target=\"_blank\" href=\"http://betterwp.net/wordpress-"
689
+ "plugins/bwp-recaptcha/#customization\">BWP reCAPTCHA's documentation </a> "
690
+ "for a quick guide on how to customize the look and feel of this tag."
691
+ msgstr ""
692
+ "Veuillez consulter <a target=\"_blank\" href=\"http://betterwp.net/wordpress-"
693
+ "plugins/bwp-recaptcha/#customization\"> la documentation de BWP reCAPTCHA </"
694
+ "a> pour une présentation rapide sur comment personnaliser l'apparence de "
695
+ "cette balise."
696
+
697
+ #: includes/class-bwp-recaptcha-cf7.php:116
698
+ msgid "Name"
699
+ msgstr "Nom"
700
+
701
+ #: includes/class-bwp-recaptcha-cf7.php:123
702
+ msgid "Copy this code and paste it into the form left."
703
+ msgstr "Copier ce code et le coller dans le formulaire restant."
704
+
705
+ # @ bwp-option-page
706
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:80
707
+ msgid "Plugin Configurations"
708
+ msgstr "Configurations de l'extension"
709
+
710
+ # @ default
711
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:398
712
+ msgid "Save Changes"
713
+ msgstr "Enregistrer les modifications"
languages/bwp-recaptcha-hu_HU.mo ADDED
Binary file
languages/bwp-recaptcha-hu_HU.po ADDED
@@ -0,0 +1,438 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: BWP reCAPTCHA\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-09-25 13:43+0700\n"
6
+ "PO-Revision-Date: 2012-02-05 13:17+0100\n"
7
+ "Last-Translator: Brandon <brandon@helloftranslations.net>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=utf-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-Language: Hungarian\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-Country: HUNGARY\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: includes/class-bwp-framework.php:172
20
+ #, php-format
21
+ msgid "%s requires WordPress <strong>%s</strong> or higher and PHP <strong>%s</strong> or higher. The plugin will not function until you update your software. Please deactivate this plugin."
22
+ msgstr "%s legalább %s WordPresst és legalább %s PHP-t igényel. A plugin nem fog működni, amíg nem frissíted a szoftvert. Kérlek kapcsold ki ezt a plugint."
23
+
24
+ #: includes/class-bwp-framework.php:183
25
+ msgid "Development Log"
26
+ msgstr "Fejlesztési napló"
27
+
28
+ #: includes/class-bwp-framework.php:183
29
+ msgid "Frequently Asked Questions"
30
+ msgstr "Gyakran Ismételt Kérdések"
31
+
32
+ #: includes/class-bwp-framework.php:183
33
+ msgid "FAQ"
34
+ msgstr "GyIK"
35
+
36
+ #: includes/class-bwp-framework.php:183
37
+ msgid "Got a problem? Send me a feedback!"
38
+ msgstr "Hibát találtál? Küldj visszajelzést!"
39
+
40
+ #: includes/class-bwp-framework.php:183
41
+ msgid "Contact"
42
+ msgstr "Kapcsolat"
43
+
44
+ #: includes/class-bwp-framework.php:190
45
+ msgid "You can buy me some special coffees if you appreciate my work, thank you!"
46
+ msgstr "Vehetsz nekem pár különleges kávét, ha elégedett vagy a munkámmal, köszi!"
47
+
48
+ #: includes/class-bwp-framework.php:204
49
+ msgid "Donate to "
50
+ msgstr "Támogatom"
51
+
52
+ #: includes/class-bwp-framework.php:206
53
+ msgid "One cup $5.00"
54
+ msgstr "Egy csésze $5,00"
55
+
56
+ #: includes/class-bwp-framework.php:207
57
+ msgid "Two cups $10.00"
58
+ msgstr "Két csésze $10,00"
59
+
60
+ #: includes/class-bwp-framework.php:208
61
+ msgid "Five cups! $25.00"
62
+ msgstr "Öt csésze! $25,00"
63
+
64
+ #: includes/class-bwp-framework.php:209
65
+ msgid "One LL-cup!!! $50.00"
66
+ msgstr "Egy extranagy bögre!!! $50,00"
67
+
68
+ #: includes/class-bwp-framework.php:210
69
+ msgid "... or any amount!"
70
+ msgstr "... vagy akármennyit!"
71
+
72
+ #: includes/class-bwp-framework.php:225
73
+ msgid "Latest updates from BetterWP.net!"
74
+ msgstr "Legújabb hírek a BetterWP.net-től!"
75
+
76
+ #: includes/class-bwp-framework.php:226
77
+ msgid "Follow me on Twitter!"
78
+ msgstr "Kövess Twitteren!"
79
+
80
+ #: includes/class-bwp-framework.php:235
81
+ #, php-format
82
+ msgid "You are using version %s!"
83
+ msgstr "Te a %s verziót használod!"
84
+
85
+ #: includes/class-bwp-framework.php:372
86
+ msgid "Settings"
87
+ msgstr "Beállítások"
88
+
89
+ #: includes/class-bwp-recaptcha.php:45
90
+ msgid "Get another challenge"
91
+ msgstr "Új kihívás kérése"
92
+
93
+ #: includes/class-bwp-recaptcha.php:46
94
+ msgid "Get audio reCAPTCHA"
95
+ msgstr "Hangkihívás kérése"
96
+
97
+ #: includes/class-bwp-recaptcha.php:47
98
+ msgid "Get image reCAPTCHA"
99
+ msgstr "Képkihívás kérése"
100
+
101
+ #: includes/class-bwp-recaptcha.php:48
102
+ msgid "About reCAPTCHA"
103
+ msgstr "Súgó"
104
+
105
+ #: includes/class-bwp-recaptcha.php:52
106
+ msgid "Enter the two words in the box:"
107
+ msgstr "Írd ide a két szót:"
108
+
109
+ #: includes/class-bwp-recaptcha.php:53
110
+ msgid "Enter the numbers you hear:"
111
+ msgstr "Írd be a hallott számokat:"
112
+
113
+ #: includes/class-bwp-recaptcha.php:98
114
+ msgid "<strong>ERROR:</strong> Incorrect or empty reCAPTCHA response, please try again."
115
+ msgstr "<strong>HIBA:</strong> Helytelen vagy üres reCAPTCHA válasz, kérlek próbáld újra."
116
+
117
+ #: includes/class-bwp-recaptcha.php:99
118
+ #, php-format
119
+ msgid "Error: Incorrect or empty reCAPTCHA response, please click the back button on your browser's toolbar or click on %s to go back."
120
+ msgstr "Hiba: Helytelen vagy üres reCAPTCHA válasz,, kérlek kattints a böngésző vissza gombjára vagy nyomd meg a %s gombot a visszatéréshez."
121
+
122
+ #: includes/class-bwp-recaptcha.php:119
123
+ #: includes/class-bwp-recaptcha.php:250
124
+ msgid "General Options"
125
+ msgstr "Alapbeállítások"
126
+
127
+ #: includes/class-bwp-recaptcha.php:120
128
+ #: includes/class-bwp-recaptcha.php:251
129
+ msgid "Theme Options"
130
+ msgstr "Témabeállítások"
131
+
132
+ #: includes/class-bwp-recaptcha.php:123
133
+ msgid "English"
134
+ msgstr "Angol"
135
+
136
+ #: includes/class-bwp-recaptcha.php:124
137
+ msgid "Dutch"
138
+ msgstr "Holland"
139
+
140
+ #: includes/class-bwp-recaptcha.php:125
141
+ msgid "French"
142
+ msgstr "Francia"
143
+
144
+ #: includes/class-bwp-recaptcha.php:126
145
+ msgid "German"
146
+ msgstr "Német"
147
+
148
+ #: includes/class-bwp-recaptcha.php:127
149
+ msgid "Portuguese"
150
+ msgstr "Portugál"
151
+
152
+ #: includes/class-bwp-recaptcha.php:128
153
+ msgid "Russian"
154
+ msgstr "Orosz"
155
+
156
+ #: includes/class-bwp-recaptcha.php:129
157
+ msgid "Spanish"
158
+ msgstr "Spanyol"
159
+
160
+ #: includes/class-bwp-recaptcha.php:130
161
+ msgid "Turkish"
162
+ msgstr "Török"
163
+
164
+ #: includes/class-bwp-recaptcha.php:134
165
+ msgid "Read Profile"
166
+ msgstr "Profil Megtekintésére"
167
+
168
+ #: includes/class-bwp-recaptcha.php:135
169
+ msgid "Manage Options"
170
+ msgstr "Beállítások Kezelésére"
171
+
172
+ #: includes/class-bwp-recaptcha.php:248
173
+ msgid "Better WordPress reCAPTCHA"
174
+ msgstr "Fejlettebb Wordpress reCAPTCHA"
175
+
176
+ #: includes/class-bwp-recaptcha.php:250
177
+ msgid "BWP reCAPTCHA General Options"
178
+ msgstr "BWP reCAPTCHA Alapbeállítások"
179
+
180
+ #: includes/class-bwp-recaptcha.php:251
181
+ msgid "BWP reCAPTCHA Theme Options"
182
+ msgstr "BWP reCAPTCHA Témabeállítások"
183
+
184
+ #: includes/class-bwp-recaptcha.php:262
185
+ msgid "You do not have sufficient permissions to access this page."
186
+ msgstr "Nincs engedélyed a lap megtekintéséhez."
187
+
188
+ #: includes/class-bwp-recaptcha.php:281
189
+ msgid "What is reCAPTCHA?"
190
+ msgstr "Mi a reCAPTCHA?"
191
+
192
+ #: includes/class-bwp-recaptcha.php:282
193
+ msgid "This plugin will be"
194
+ msgstr "Ez a plugin"
195
+
196
+ #: includes/class-bwp-recaptcha.php:283
197
+ msgid "Public Key"
198
+ msgstr "Nyilvános Kulcs"
199
+
200
+ #: includes/class-bwp-recaptcha.php:284
201
+ msgid "Private Key"
202
+ msgstr "Privát Kulcs"
203
+
204
+ #: includes/class-bwp-recaptcha.php:285
205
+ msgid "Visibility Options (only applied to comment forms)"
206
+ msgstr "Láthatósági beállítások"
207
+
208
+ #: includes/class-bwp-recaptcha.php:286
209
+ msgid "Hide the CAPTCHA for"
210
+ msgstr "CAPTCHA elrejtése a következők esetén:"
211
+
212
+ #: includes/class-bwp-recaptcha.php:287
213
+ msgid "If wrong or empty response"
214
+ msgstr "Ha hibás vagy üres a válasz"
215
+
216
+ #: includes/class-bwp-recaptcha.php:288
217
+ #: includes/class-bwp-recaptcha.php:289
218
+ msgid "Show the error message"
219
+ msgstr "Mutasd ezt a hibaüzenetet"
220
+
221
+ #: includes/class-bwp-recaptcha.php:290
222
+ msgid "Akismet Integration"
223
+ msgstr "Akismet Integráció"
224
+
225
+ #: includes/class-bwp-recaptcha.php:291
226
+ msgid "Integrate with Akismet?"
227
+ msgstr "Integrálni szeretnéd az Akismet-el?"
228
+
229
+ #: includes/class-bwp-recaptcha.php:292
230
+ msgid "If correct CAPTCHA response"
231
+ msgstr "Ha helyes a CAPTCHA válasz"
232
+
233
+ #: includes/class-bwp-recaptcha.php:296
234
+ msgid "reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. You can read more about reCAPTCHA <a href=\"http://www.google.com/recaptcha/learnmore\" target=\"_blank\">here</a>."
235
+ msgstr "reCAPTCHA egy ingyenes CAPTCHA egy ingyenes rendszer, ami CAPTCHA technológiát használ, hogy segítsen digitalizálni régi könyvek és rádióműsorok szövegét, miközben megvédi a weblapokat az automatikus szoftverektől, amelyek korlátozott területekhez akarnak hozzáférni, magukat embernek kiadva (pl. regisztráció). További információ a reCAPTCHA-ról <a href=\"http://www.google.com/recaptcha/learnmore\" target=\"_blank\">itt</a>."
236
+
237
+ #: includes/class-bwp-recaptcha.php:297
238
+ msgid "<em>This section allows you to determine when to show reCAPTCHA and how this plugin reacts to errors.</em>"
239
+ msgstr "<em>Itt tudod beállítani mikor mutassa a reCAPTCHA-t, és hogy reagáljon a plugin a hibákra.</em>"
240
+
241
+ #: includes/class-bwp-recaptcha.php:298
242
+ msgid "<em>Integrate with Akismet for better end-user experience. reCAPTCHA is optional and <strong>NO</strong> spam comment will be added to the spam/moderation queue, except likely legitimate comments. This makes the task of identifying sincere comments much easier. This integration is currently in beta stage.</em>"
243
+ msgstr "<em>Akismet-tel való integráció a jobb felhasználói élmény elérése érdekében. A reCAPTCHA nem kötelező és <strong>SEMMILYEN</strong> spam hozzászólás nem fog a szemétszűrési/moderációs listára kerülni, csak a valószínűleg létező személy által írt hozzászólások. Ez nagyban megkönnyíti a valós hozzászólások azonosítását. Az integráció jelenleg béta állapotban van.</em>"
244
+
245
+ #: includes/class-bwp-recaptcha.php:313
246
+ msgid "Redirect commenter back to the comment form"
247
+ msgstr "Hozzászóló átirányítása a hozzászólási űrlaphoz."
248
+
249
+ #: includes/class-bwp-recaptcha.php:314
250
+ msgid "Show an error page just like WordPress does"
251
+ msgstr "Egy hibajelző lap mutatása a WordPress-hez hasonlóan."
252
+
253
+ #: includes/class-bwp-recaptcha.php:317
254
+ msgid "Approve comment immediately"
255
+ msgstr "Hozzászólások automatikus elfogadása"
256
+
257
+ #: includes/class-bwp-recaptcha.php:318
258
+ msgid "Hold comment in moderation queue"
259
+ msgstr "Hozzászólások moderációs listára tétele"
260
+
261
+ #: includes/class-bwp-recaptcha.php:319
262
+ msgid "Put comment in spam queue"
263
+ msgstr "Hozzászólások spam listára tétele"
264
+
265
+ #: includes/class-bwp-recaptcha.php:323
266
+ msgid "enabled for comment forms."
267
+ msgstr "aktiválva a hozzászólások esetén."
268
+
269
+ #: includes/class-bwp-recaptcha.php:324
270
+ msgid "enabled for registration page."
271
+ msgstr "aktiválva a regisztrációs űrlap esetén."
272
+
273
+ #: includes/class-bwp-recaptcha.php:325
274
+ msgid "registered users <em>(even without any capabilities)</em>."
275
+ msgstr "regisztrált felhasználók <em>(még jogok nélkül is)</em>."
276
+
277
+ #: includes/class-bwp-recaptcha.php:326
278
+ msgid "users who can"
279
+ msgstr "Felhasználók, akik képesek"
280
+
281
+ #: includes/class-bwp-recaptcha.php:327
282
+ msgid "visitors who have at least"
283
+ msgstr "látogatók, akiknek minimum"
284
+
285
+ #: includes/class-bwp-recaptcha.php:328
286
+ msgid "reCAPTCHA will only show when Akismet identifies a comment as spam. Highly recommended if you do not want to force your visitors to type the captcha every time."
287
+ msgstr "A reCAPTCHA csak akkor jelenik meg, ha az Akismet a hozzászólást spam-nek érzékeli. Nagyon ajánlott, ha nem akarod a látogatókra kényszeríteni a captcha beírását minden hozzászólásuknál."
288
+
289
+ #: includes/class-bwp-recaptcha.php:331
290
+ msgid "A public key used to request captchas from reCAPTCHA server."
291
+ msgstr "Egy nyilvános kulcs ami captcha-k a reCAPTCHA szerverről való lekérésére szükséges."
292
+
293
+ #: includes/class-bwp-recaptcha.php:332
294
+ msgid "A private (secret) key used to authenticate user's response."
295
+ msgstr "Egy privát (titkos) kulcs ami a felhasználó válaszát hitelesíti."
296
+
297
+ #: includes/class-bwp-recaptcha.php:333
298
+ msgid "when redirect commenter back to the comment form."
299
+ msgstr "amikor a hozzászólót a hozzászóláshoz irányítjuk vissza."
300
+
301
+ #: includes/class-bwp-recaptcha.php:334
302
+ msgid "when show the normal error page with no redirection."
303
+ msgstr "amikor a hibajelentő lapot mutatjuk átirányítás nélkül."
304
+
305
+ #: includes/class-bwp-recaptcha.php:335
306
+ msgid "approved comment(s)."
307
+ msgstr "elfogadott hozzászólásuk van."
308
+
309
+ #: includes/class-bwp-recaptcha.php:338
310
+ msgid "<em><strong>Note:</strong> For this plugin to work, you will need a pair of API keys (public and private), which is available for free <a href=\"https://www.google.com/recaptcha/admin/create\" target=\"_blank\">here</a>. Once you have created those two keys for this domain, simply paste them below.</em>"
311
+ msgstr "<em><strong>Megjegyzés:</strong> Ahhoz, hogy ez a plugin működjön, szükséged van két API kulcsra (nyilvános és privát), melyek ingyenesen elérhetők <a href=\"https://www.google.com/recaptcha/admin/create\" target=\"_blank\">innen</a>. Amint hozzájutottál a két kulcshoz, egyszerűen másold be alább.</em>"
312
+
313
+ #: includes/class-bwp-recaptcha.php:339
314
+ msgid "<em><strong>Note:</strong> Now you may wonder, why put the comment in the spam queue? The benefit is Akismet will be able to mark the comment as False Positive, and thus will not possibly block that comment in the future. However, it is best to just put the comment in moderation queue as next time Akismet will put such comment in moderation queue immediately without the need of a CAPTCHA.</em>"
315
+ msgstr "<em><strong>Megjegyzés:</strong> Most azt kérdezhetnéd, mi értelme a hozzászólást a spam listára tenni? Ez azért lehet előnyös, mert az Akismet így képes a hozzászólást hibás találatnak jelölni, és így elkerülni, hogy következőleg blokkolja a hozzászólást. Ennek ellenére a legjobb, ha a hozzászólást a moderációs listára küldjük, mivel következőleg az Akismet automatikusan a moderációs listára fogja tenni az ilyen hozzászólásokat CAPTCHA használata nélkül.</em>"
316
+
317
+ #: includes/class-bwp-recaptcha.php:364
318
+ msgid "Choose a theme"
319
+ msgstr "Válassz témát"
320
+
321
+ #: includes/class-bwp-recaptcha.php:365
322
+ msgid "Use CSS provided by this plugin?"
323
+ msgstr "Használod a plugin beépített CSS-ét?"
324
+
325
+ #: includes/class-bwp-recaptcha.php:366
326
+ msgid "Load CSS, JS selectively?"
327
+ msgstr "CSS és JS szelektív betöltése"
328
+
329
+ #: includes/class-bwp-recaptcha.php:367
330
+ msgid "Choose a language for built-in themes"
331
+ msgstr "Nyelv választása a beépített témákhoz"
332
+
333
+ #: includes/class-bwp-recaptcha.php:368
334
+ msgid "Tabindex for captcha input field"
335
+ msgstr "Tabindex a captcha beviteli mezőhöz"
336
+
337
+ #: includes/class-bwp-recaptcha.php:369
338
+ msgid "Preview your reCAPTCHA"
339
+ msgstr "reCAPTCHA előnézete"
340
+
341
+ #: includes/class-bwp-recaptcha.php:373
342
+ msgid "<em>Below you will see how your reCAPTCHA will look. Note that this might differ on your actual pages.<br /></em>"
343
+ msgstr "<em>Alább megtekintheted, hogy fog a reCAPTCHA kinézni. Ez különbözhet a tényleges oldalaidon.<br /></em>"
344
+
345
+ #: includes/class-bwp-recaptcha.php:377
346
+ msgid "Default Theme (Red)"
347
+ msgstr "Alapértelmezett Téma (Piros)"
348
+
349
+ #: includes/class-bwp-recaptcha.php:378
350
+ msgid "White Theme"
351
+ msgstr "Fehér Téma"
352
+
353
+ #: includes/class-bwp-recaptcha.php:379
354
+ msgid "Black Theme"
355
+ msgstr "Fekete Téma"
356
+
357
+ #: includes/class-bwp-recaptcha.php:380
358
+ msgid "Clean Theme"
359
+ msgstr "Letisztult Téma"
360
+
361
+ #: includes/class-bwp-recaptcha.php:381
362
+ msgid "Custom Theme (use CSS)"
363
+ msgstr "Egyéni Téma (CSS használata)"
364
+
365
+ #: includes/class-bwp-recaptcha.php:386
366
+ msgid "This stylesheet is used to style the custom theme as well as the registration page. You can disable this or add appropriate filters to use your own."
367
+ msgstr "Ezt a stíluslapot használja a testre szabott téma és a regisztrációs oldal is. Kikapcsolhatod ezt, vagy magad is hozzáathatsz megfelelő szűrőket."
368
+
369
+ #: includes/class-bwp-recaptcha.php:387
370
+ msgid "This is only useful when you do not use any minify or cache plugin."
371
+ msgstr "Ez csak akkor hasznos, ha nem használsz semmilyen minify vagy gyorsítótár plugint."
372
+
373
+ #: includes/class-bwp-recaptcha.php:390
374
+ msgid "Basically, this should be 4 if you place the captcha before the textarea, and 5 if you put it after."
375
+ msgstr "Gyakorlatilag itt 4-nek kell lennie, ha a captcha-t a szövegbeviteli mező elé szeretnéd helyezni és 5-nek, ha utána."
376
+
377
+ #: includes/class-bwp-recaptcha.php:393
378
+ #, php-format
379
+ msgid "<em><strong>Note:</strong> The four built-in captcha themes will look OK in most WordPress themes; However, some times it is better to control how reCAPTCHA looks using CSS. Please read <a href=\"%s#customization\" target=\"_blank\">this guide</a> if you would like to do so.</em>"
380
+ msgstr "<em><strong>Megjegyzés:</strong> A négy beépített captcha téma megfelelő a legtöbb WordPress témához; Mindazonáltal néha jobb a reCAPTCHA kinézetét CSS segítségével testre szabni. Ha érdekel, kérlek olvasd el <a href=\"%s#customization\" target=\"_blank\">ezt az útmutatót</a>.</em>"
381
+
382
+ #: includes/class-bwp-recaptcha.php:394
383
+ #, php-format
384
+ msgid "<em><strong>Note:</strong> Above you can select some built-in languages. If you would like to add your own language, please read <a href=\"%s#customization\" target=\"_blank\">this guide</a>.</em>"
385
+ msgstr "<em><strong>Megjegyzés:</strong> Fent választhatsz pár beépített nyelv közül. Ha hozzá szeretnéd adni a saját nyelvedet, kérlek olvasd el <a href=\"%s#customization\" target=\"_blank\">ezt az útmutatót</a>.</em>"
386
+
387
+ #: includes/class-bwp-recaptcha.php:438
388
+ msgid "Warning"
389
+ msgstr "Figyelmeztetés"
390
+
391
+ #: includes/class-bwp-recaptcha.php:438
392
+ msgid "API key(s) missing. Please get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a> (free!)"
393
+ msgstr "Az API kulcs(ok) hiányoznak. Kérlek szerezz be egy API kulcsot innen: <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a> (ingyenes!)"
394
+
395
+ #: includes/class-bwp-recaptcha.php:440
396
+ msgid "Notice"
397
+ msgstr "Értesítés"
398
+
399
+ #: includes/class-bwp-recaptcha.php:440
400
+ msgid "You are enabling Akismet integration but Akismet is not currently active. Please activate Akismet for the integration to work."
401
+ msgstr "Engedélyezed az Akismet integrációt, de az Akismet jelenleg nem aktív. Kérlek aktiváld az Akismet-et előbb."
402
+
403
+ #: includes/class-bwp-recaptcha.php:548
404
+ msgid "Your comment was identified as spam, please complete the CAPTCHA below:"
405
+ msgstr "A hozzászólásod spam-ként lett azonosítva, kérlek válaszolj az alábbi CAPTCHA feladványra:"
406
+
407
+ #: includes/class-bwp-recaptcha.php:580
408
+ msgid "To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>"
409
+ msgstr "A reCAPTCHA használatához API kulcsot kell szerezned innen: <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>"
410
+
411
+ #: includes/class-bwp-recaptcha.php:609
412
+ msgid "<strong>ERROR</strong>: Captcha response is either empty or incorrect."
413
+ msgstr "<strong>HIBA</strong>: A captcha válasz hibás vagy üres."
414
+
415
+ #: includes/class-bwp-recaptcha.php:611
416
+ msgid "<strong>ERROR</strong>: Unknown captcha error."
417
+ msgstr "<strong>HIBA</strong>: Ismeretlen captcha hiba."
418
+
419
+ #: includes/class-bwp-recaptcha.php:661
420
+ msgid "this link"
421
+ msgstr "erre a címre"
422
+
423
+ #: includes/class-bwp-recaptcha.php:663
424
+ msgid "There is some problem with your reCAPTCHA API keys, please double check them."
425
+ msgstr "Valami hiba van a reCAPTCHA API kulcsaiddal, kérlek ellenőrizd őket."
426
+
427
+ #: includes/class-bwp-recaptcha.php:665
428
+ msgid "Unknown error. Please contact the administrator for more info."
429
+ msgstr "Ismeretlen hiba. További információért kérlek lépj kapcsolatba az adminisztrátorral."
430
+
431
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:80
432
+ msgid "Plugin Configurations"
433
+ msgstr "Plugin beállítások"
434
+
435
+ #: includes/bwp-option-page/includes/class-bwp-option-page.php:398
436
+ msgid "Save Changes"
437
+ msgstr "Változások mentése"
438
+
readme.txt ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Better WordPress reCAPTCHA (support Akismet and Contact Form 7) ===
2
+ Contributors: OddOneOut
3
+ Donate link: http://betterwp.net/wordpress-plugins/bwp-recaptcha/
4
+ Tags: recaptcha, captcha, comment captcha, login captcha, user registration captcha, blog registration captcha, contact form, contact form 7, akismet, akismet integration, akismet captcha, anti-spam, antispam
5
+ Requires at least: 3.0
6
+ Tested up to: 3.9
7
+ Stable tag: 1.1.1
8
+ License: GPLv3 or later
9
+
10
+ This plugin utilizes Google reCAPTCHA to help your blog stay clear of spams. You can use this plugin with Akismet and Contact Form 7.
11
+
12
+ == Description ==
13
+
14
+ In the 21th century, spamming could be one of the most annoying problems for a website. Especially if you use some publishing platforms like WordPress, your blog WILL be spammed and no default methods will save you from such nightmare. This plugin utilizes the popular anti-spam library, Google reCAPTCHA, to help your blog stay clear of spams.
15
+
16
+ Akismet and Contact Form 7 are supported out of the box.
17
+
18
+ **Useful resources:**
19
+
20
+ [How-to: Add BWP reCAPTCHA to Contact Form 7](http://betterwp.net/wordpress-tips/how-to-add-bwp-recaptcha-to-contact-form-7/).
21
+
22
+ [How-to: Add custom translations to reCAPTCHA](http://betterwp.net/wordpress-tips/how-to-add-custom-translations-to-bwp-recaptcha/).
23
+
24
+ [Official Documentation](http://betterwp.net/wordpress-plugins/bwp-recaptcha/).
25
+
26
+ **Some Features**
27
+
28
+ * You can add captcha to comment form, user registration form, site registration form and login form
29
+ * You can add captcha to form generated by Contact Form 7 plugin: use `recaptcha` or `bwp-recaptcha` shortcode tag
30
+ * Hide reCAPTCHA for qualified visitors
31
+ * Registered Users (even with no capabilities needed)
32
+ * Authorized Users (users who have some capabilities, you can extend the default list)
33
+ * Visitors who have at least a required number of approved comments
34
+ * Comment Form:
35
+ * You can position captcha before or after the comment field (new in 1.1.1)
36
+ * Control how the plugin reacts when captcha response is invalid
37
+ * Set error message when captcha response is invalid
38
+ * Theme Features:
39
+ * Choose between 4 default themes or create your own (sample CSS and images provided)
40
+ * Use built-in languages or [add custom translations](http://betterwp.net/wordpress-tips/how-to-add-custom-translations-to-bwp-recaptcha/).
41
+ * Integrate with Akismet for better end-users experience, i.e. "only force a CAPTCHA when a comment looks like spam".
42
+ * WordPress Multi-site compatible: you can set different key pair for each site or use a single key pair for all sites
43
+ * And more...
44
+
45
+ Please don't forget to rate this plugin [5 shining stars](http://wordpress.org/support/view/plugin-reviews/bwp-recaptcha?filter=5) if you like it, thanks!
46
+
47
+ **Get in touch**
48
+
49
+ * Support is provided via [BetterWP.net Community](http://betterwp.net/community/).
50
+ * Follow and contribute to development via [Github](http://betterwp.net/redirect-to?https://github.com/OddOneOut/Better-WordPress-reCAPTCHA).
51
+ * You can also follow me on [Twitter](http://twitter.com/0dd0ne0ut).
52
+ * Check out [latest WordPress Tips and Ideas](http://feeds.feedburner.com/BetterWPnet) from BetterWP.net.
53
+
54
+ **Languages**
55
+
56
+ * English (default)
57
+ * Spanish - Espanol (es_ES) - Thanks to Ivan Leomuro!
58
+ * Hungarian (hu_HU). Thanks to [Attila Porvay](http://helloftranslations.net)
59
+ * French (fr_FR). Thansk to [Christophe GUILLOUX](http://christophe.guilloux.info) and **Raoul Pierre**!
60
+ * German (de_DE). Thanks to [Andreas Reitberger](http://wdbase.de/?p=585)
61
+
62
+ Please [help translate](http://betterwp.net/wordpress-tips/create-pot-file-using-poedit/) this plugin!
63
+
64
+ == Installation ==
65
+
66
+ 1. Upload the `bwp-recaptcha` folder to the `/wp-content/plugins/` directory
67
+ 2. Activate the plugin through the Plugins menu in WordPress. After activation, you should see a menu of this plugin on your left. If you can not locate it, click on Settings under the plugin's name.
68
+ 3. Follow steps described in [plugin usage documentation](http://betterwp.net/wordpress-plugins/bwp-recaptcha/#usage) to properly add reCAPTCHA to your desired forms.
69
+ 4. Configure the plugin, and add your API keys. You must have API keys for the current domain for this plugin to work.
70
+ 5. Say goodbye to spam!
71
+
72
+ [View instructions with images](http://betterwp.net/wordpress-plugins/bwp-recaptcha/installation/).
73
+
74
+ == Frequently Asked Questions ==
75
+
76
+ [Check plugin news and ask questions](http://betterwp.net/topic/bwp-recaptcha/).
77
+
78
+ == Screenshots ==
79
+
80
+ 1. reCAPTCHA added to Comment Form (default reCAPTCHA theme, Twenty Fourteen theme).
81
+ 2. reCAPTCHA added to Contact Form 7 (custom reCAPTCHA theme, Twenty Fourteen theme).
82
+ 3. reCAPTCHA added to WordPress Login Form (custom reCAPTCHA theme).
83
+ 4. reCAPTCHA added to Blog Registration Form (multi-site enabled, 'clean' reCAPTCHA theme, Twenty Fourteen theme).
84
+
85
+ == Changelog ==
86
+
87
+ = 1.1.1 =
88
+ * You can now choose to add captcha below comment text area without using a theme function. More info [here](http://betterwp.net/wordpress-plugins/bwp-recaptcha/#usage)
89
+ * Added `recaptcha` shortcode tag back to Contact Form 7. Users can now choose between `recaptcha` and `bwp-recaptcha`
90
+ * Added support for other plugins that include a slightly different version of reCAPTCHA library to avoid conflicts
91
+ * Added Italian reCAPTCHA language (`it`)
92
+ * Removed selective CSS, JS setting in Theme Options
93
+ * Removed "Put comment in spam queue" option for Akismet integration. If you still want to use this option add this to your `wp-config.php`: `define('BWP_CAPT_AKISMET_COMMENT_STATUS', 'spam');`
94
+ * Improved user registration and site registration form on a multi-site installation
95
+ * Fixed an issue where a hidden iframe is adding margin to bottom of page in Google Chrome and Safari. This is merely a workaround solution so hopefully Google will fix this issue in reCAPTCHA
96
+ * Fixed an issue where captcha is only checked after username and password is correct on login form
97
+ * Fixed an issue where a bot can bypass recaptcha on user registration form
98
+ * Fixed an issue where some PHP warnings are shown. Note that this fix might cause Akismet integration to fail, so users are advised to test this update first if Akismet integration is enabled
99
+ * Updated German translation, thanks to Andreas Reitberger!
100
+ * Updated French translation, thanks to Raoul Pierr!
101
+ * WordPress 3.9 compatible
102
+ * Other fixes and enhancements
103
+
104
+ = 1.1.0 =
105
+ * Marked as WordPress 3.8 compatible.
106
+ * Added official support for Contact Form 7, users no longer have to install third-party plugins to integrate BWP reCAPTCHA and Contact Form 7. More info [here](http://betterwp.net/wordpress-tips/how-to-add-bwp-recaptcha-to-contact-form-7/).
107
+ * Added an option to enable reCAPTCHA for login form (`wp-login.php`). This option is disabled by default.
108
+ * Added better support for Multi-site installation. Admin can choose to use main site's key pair or different key pair for a specific site.
109
+ * Added a German translation. Thanks to Andreas Reitberger!
110
+ * Changed the default tabindex for recaptcha input field to 0 (disable).
111
+ * Fixed localization issue (captcha was not translated correctly.)
112
+ * Other fixes and improvements.
113
+
114
+ **Note to translators:** several new strings are added so please update your translations.
115
+
116
+ = 1.0.2 =
117
+ * Marked as WordPress 3.7 compatible.
118
+ * Added a Hungarian translation. Thanks to Attila Porvay!
119
+ * Added a French translation. Thanks to Christophe GUILLOUX!
120
+ * Updated BWP Framework to fix a possible bug that caues BWP setting pages to go blank.
121
+ * Removed the `frameborder` attribute within the noscript tag of the PHP reCAPTCHA library for W3C compliance, thanks to Jools!
122
+ * **Good news**: ManageWP.com has become the official sponsor for BWP reCAPTCHA - [Read more](http://betterwp.net/319-better-wordpress-plugins-updates-2013/).
123
+
124
+ = 1.0.1 =
125
+ * Added a template function that allows you to display reCAPTCHA below the textarea in a comment form. Check the installation tab out if you would like to know how to use the new template function. Thanks to Joo Bruni!
126
+ * Made the public key and private key site-wide options. If you use BWP reCAPTCHA on a multi-site installation, you will only need to input this once.
127
+ * Added Spanish - Espanol translation, thanks to Ivan Leomuro!
128
+ * Marked this plugin as compatible with WordPress 3.2.x.
129
+ * Other minor bugfixes and improvements.
130
+
131
+ = 1.0.0 =
132
+ * Initial Release.
133
+
134
+ == Upgrade Notice ==
135
+
136
+ = 1.0.0 =
137
+ * Enjoy the plugin!
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file