Version Description
- Plugin created!
Here's a link to author's page https://www.novami.cz.
Download this release
Release Info
Developer | Minor |
Plugin | Simple Google reCAPTCHA |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- languages/simple-google-recaptcha-cs_CZ.mo +0 -0
- languages/simple-google-recaptcha-cs_CZ.po +78 -0
- languages/simple-google-recaptcha.pot +76 -0
- readme.txt +55 -0
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.jpg +0 -0
- screenshot-4.jpg +0 -0
- screenshot-5.jpg +0 -0
- simple-google-recaptcha.php +103 -0
- style.css +8 -0
languages/simple-google-recaptcha-cs_CZ.mo
ADDED
Binary file
|
languages/simple-google-recaptcha-cs_CZ.po
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Simple Google reCAPTCHA\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: Thu Jul 28 2016 03:31:39 GMT+0200\n"
|
6 |
+
"PO-Revision-Date: Thu Jul 28 2016 03:34:24 GMT+0200\n"
|
7 |
+
"Last-Translator: Minor <blog@novami.cz>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: Czech\n"
|
10 |
+
"Plural-Forms: nplurals=3; plural=( n == 1 ) ? 0 : ( n >= 2 && n <= 4 ) ? 1 : "
|
11 |
+
"2\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-Basepath: .\n"
|
17 |
+
"X-Poedit-SearchPath-0: ..\n"
|
18 |
+
"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
|
19 |
+
"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
20 |
+
"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
|
21 |
+
"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
|
22 |
+
"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
|
23 |
+
"X-Generator: Loco - https://localise.biz/\n"
|
24 |
+
"X-Loco-Target-Locale: cs_CZ"
|
25 |
+
|
26 |
+
#. Name of the plugin
|
27 |
+
msgid "Simple Google reCAPTCHA"
|
28 |
+
msgstr "Simple Google reCAPTCHA"
|
29 |
+
|
30 |
+
#. Description of the plugin
|
31 |
+
msgid "Simply protect your Wordpress from spam, thanks to Google reCAPTCHA!"
|
32 |
+
msgstr "Jednoduše ochraňte svůj Wordpress před spamem, díky Google reCAPTCHA!"
|
33 |
+
|
34 |
+
#. Author of the plugin
|
35 |
+
msgid "Michal Novák"
|
36 |
+
msgstr "Michal Novák"
|
37 |
+
|
38 |
+
#. Author URI of the plugin
|
39 |
+
msgid "https://www.novami.cz"
|
40 |
+
msgstr "https://www.novami.cz"
|
41 |
+
|
42 |
+
#: ../simple-google-recaptcha.php:18
|
43 |
+
msgid "reCAPTCHA Options"
|
44 |
+
msgstr "Nastavení reCAPTCHA"
|
45 |
+
|
46 |
+
#: ../simple-google-recaptcha.php:29
|
47 |
+
msgid "Keys"
|
48 |
+
msgstr "Klíče"
|
49 |
+
|
50 |
+
#: ../simple-google-recaptcha.php:31
|
51 |
+
msgid "Site Key"
|
52 |
+
msgstr "Klíč stránky"
|
53 |
+
|
54 |
+
#: ../simple-google-recaptcha.php:32
|
55 |
+
msgid "Secret Key"
|
56 |
+
msgstr "Tajný klíč"
|
57 |
+
|
58 |
+
#: ../simple-google-recaptcha.php:39
|
59 |
+
msgid ""
|
60 |
+
"<p>You have to <a href=\"https://www.google.com/recaptcha/admin\" "
|
61 |
+
"rel=\"external\">register your domain</a> first and get required keys from "
|
62 |
+
"Google.</p>"
|
63 |
+
msgstr ""
|
64 |
+
"<p>Nejprve musíte <a href=\"https://www.google.com/recaptcha/admin\" "
|
65 |
+
"rel=\"external\">zaregistrovat svou doménu</a> a získat tak potřebné klíče od "
|
66 |
+
"Googlu.</p>"
|
67 |
+
|
68 |
+
#: ../simple-google-recaptcha.php:40
|
69 |
+
msgid "<p>Enter your keys below:</p>"
|
70 |
+
msgstr "<p>Níže vložte získané klíče:</p>"
|
71 |
+
|
72 |
+
#: ../simple-google-recaptcha.php:83
|
73 |
+
msgid "<p><strong>ERROR</strong>: You are a bot.</p>"
|
74 |
+
msgstr "<p><strong>CHYBA</strong>: Nezaškrtli jste, že nejste robot.</p>"
|
75 |
+
|
76 |
+
#: ../simple-google-recaptcha.php:87
|
77 |
+
msgid "<p><strong>ERROR</strong>: You are a bot. If not then enable JavaScript.</p>"
|
78 |
+
msgstr "<p><strong>CHYBA</strong>: Aktivujte si JavaScript, prosím.</p>"
|
languages/simple-google-recaptcha.pot
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Loco Gettext template
|
2 |
+
#, fuzzy
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Simple Google reCAPTCHA\n"
|
6 |
+
"Report-Msgid-Bugs-To: \n"
|
7 |
+
"POT-Creation-Date: Thu Jul 28 2016 03:31:39 GMT+0200\n"
|
8 |
+
"POT-Revision-Date: Thu Jul 28 2016 03:31:44 GMT+0200\n"
|
9 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
10 |
+
"Last-Translator: \n"
|
11 |
+
"Language-Team: \n"
|
12 |
+
"Language: \n"
|
13 |
+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Poedit-Basepath: .\n"
|
19 |
+
"X-Poedit-SearchPath-0: ..\n"
|
20 |
+
"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
|
21 |
+
"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
22 |
+
"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
|
23 |
+
"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
|
24 |
+
"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
|
25 |
+
"X-Generator: Loco - https://localise.biz/"
|
26 |
+
|
27 |
+
#. Name of the plugin
|
28 |
+
msgid "Simple Google reCAPTCHA"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#. Description of the plugin
|
32 |
+
msgid "Simply protect your Wordpress from spam, thanks to Google reCAPTCHA!"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#. Author of the plugin
|
36 |
+
msgid "Michal Novák"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#. Author URI of the plugin
|
40 |
+
msgid "https://www.novami.cz"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: ../simple-google-recaptcha.php:18
|
44 |
+
msgid "reCAPTCHA Options"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: ../simple-google-recaptcha.php:29
|
48 |
+
msgid "Keys"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: ../simple-google-recaptcha.php:31
|
52 |
+
msgid "Site Key"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: ../simple-google-recaptcha.php:32
|
56 |
+
msgid "Secret Key"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: ../simple-google-recaptcha.php:39
|
60 |
+
msgid ""
|
61 |
+
"<p>You have to <a href=\"https://www.google.com/recaptcha/admin\" "
|
62 |
+
"rel=\"external\">register your domain</a> first and get required keys from "
|
63 |
+
"Google.</p>"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: ../simple-google-recaptcha.php:40
|
67 |
+
msgid "<p>Enter your keys below:</p>"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: ../simple-google-recaptcha.php:83
|
71 |
+
msgid "<p><strong>ERROR</strong>: You are a bot.</p>"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: ../simple-google-recaptcha.php:87
|
75 |
+
msgid "<p><strong>ERROR</strong>: You are a bot. If not then enable JavaScript.</p>"
|
76 |
+
msgstr ""
|
readme.txt
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Simple Google reCAPTCHA ===
|
2 |
+
|
3 |
+
Contributors: Minor
|
4 |
+
Tags: recaptcha, spam protect, block spam
|
5 |
+
Requires at least: 4.3.0
|
6 |
+
Tested up to: 4.5.3
|
7 |
+
Stable tag: 1.0
|
8 |
+
License: GPLv3
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
+
|
11 |
+
Simply protect your Wordpress from spam, thanks to Google reCAPTCHA!
|
12 |
+
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
Are you bored from removing spam comments and users from your Wordpress? Simple Google reCAPTCHA will protect you and save your time (and server load)! It's the best solution today.
|
17 |
+
|
18 |
+
What is protected with Google reCAPTCHA?
|
19 |
+
|
20 |
+
1. Comments
|
21 |
+
2. New password form
|
22 |
+
3. Registration form
|
23 |
+
4. Login form
|
24 |
+
|
25 |
+
|
26 |
+
== Installation ==
|
27 |
+
|
28 |
+
1. Upload the plugin files to the "/wp-content/plugins/simple-google-recaptcha" directory, or install the plugin through the WordPress plugins screen directly.
|
29 |
+
2. Activate the plugin through the "Plugins" screen in WordPress
|
30 |
+
3. Use the Settings->reCAPTCHA screen to configure the plugin
|
31 |
+
|
32 |
+
|
33 |
+
== Frequently Asked Questions ==
|
34 |
+
|
35 |
+
= No more qustions yet =
|
36 |
+
|
37 |
+
No more answers yet.
|
38 |
+
|
39 |
+
|
40 |
+
== Screenshots ==
|
41 |
+
|
42 |
+
1. Google reCAPTCHA - Add new comment form
|
43 |
+
2. Google reCAPTCHA - New password form
|
44 |
+
3. Google reCAPTCHA - Registration form
|
45 |
+
4. Google reCAPTCHA - Login form
|
46 |
+
5. Settings
|
47 |
+
|
48 |
+
|
49 |
+
== Changelog ==
|
50 |
+
|
51 |
+
= 1.0 =
|
52 |
+
* Plugin created!
|
53 |
+
|
54 |
+
|
55 |
+
Here's a link to author's page https://www.novami.cz.
|
screenshot-1.jpg
ADDED
Binary file
|
screenshot-2.jpg
ADDED
Binary file
|
screenshot-3.jpg
ADDED
Binary file
|
screenshot-4.jpg
ADDED
Binary file
|
screenshot-5.jpg
ADDED
Binary file
|
simple-google-recaptcha.php
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Plugin Name: Simple Google reCAPTCHA
|
4 |
+
* Description: Simply protect your Wordpress from spam, thanks to Google reCAPTCHA!
|
5 |
+
* Version: 1.0
|
6 |
+
* Author: Michal Novák
|
7 |
+
* Author URI: https://www.novami.cz
|
8 |
+
* License: GPL3
|
9 |
+
* Text Domain: simple-google-recaptcha
|
10 |
+
*/
|
11 |
+
|
12 |
+
function simple_google_recaptcha_menu() {
|
13 |
+
add_submenu_page("options-general.php", "reCAPTCHA", "reCAPTCHA", "manage_options", "simple-google-recaptcha-options", "simple_google_recaptcha_options_page");
|
14 |
+
}
|
15 |
+
|
16 |
+
function simple_google_recaptcha_options_page() {
|
17 |
+
echo "<div class=\"wrap\">
|
18 |
+
<h1>".__("reCAPTCHA Options", "simple-google-recaptcha")."</h1>
|
19 |
+
<form method=\"post\" action=\"options.php\">";
|
20 |
+
settings_fields("header_section");
|
21 |
+
do_settings_sections("simple-google-recaptcha-options");
|
22 |
+
submit_button();
|
23 |
+
echo "</form>
|
24 |
+
</div>";
|
25 |
+
}
|
26 |
+
add_action("admin_menu", "simple_google_recaptcha_menu");
|
27 |
+
|
28 |
+
function display_simple_google_recaptcha_options() {
|
29 |
+
add_settings_section("header_section", __("Keys", "simple-google-recaptcha"), "display_simple_google_recaptcha_content", "simple-google-recaptcha-options");
|
30 |
+
|
31 |
+
add_settings_field("simple_google_recaptcha_site_key", __("Site Key", "simple-google-recaptcha"), "display_simple_google_recaptcha_site_key_element", "simple-google-recaptcha-options", "header_section");
|
32 |
+
add_settings_field("simple_google_recaptcha_secret_key", __("Secret Key", "simple-google-recaptcha"), "display_simple_google_recaptcha_secret_key_element", "simple-google-recaptcha-options", "header_section");
|
33 |
+
|
34 |
+
register_setting("header_section", "simple_google_recaptcha_site_key");
|
35 |
+
register_setting("header_section", "simple_google_recaptcha_secret_key");
|
36 |
+
}
|
37 |
+
|
38 |
+
function display_simple_google_recaptcha_content() {
|
39 |
+
echo __("<p>You have to <a href=\"https://www.google.com/recaptcha/admin\" rel=\"external\">register your domain</a> first and get required keys from Google.</p>", "simple-google-recaptcha");
|
40 |
+
echo __("<p>Enter your keys below:</p>", "simple-google-recaptcha");
|
41 |
+
}
|
42 |
+
|
43 |
+
function display_simple_google_recaptcha_site_key_element() {
|
44 |
+
echo "<input type=\"text\" name=\"simple_google_recaptcha_site_key\" class=\"regular-text\" id=\"simple_google_recaptcha_site_key\" value=\"".get_option("simple_google_recaptcha_site_key")."\" />";
|
45 |
+
}
|
46 |
+
|
47 |
+
function display_simple_google_recaptcha_secret_key_element() {
|
48 |
+
echo "<input type=\"text\" name=\"simple_google_recaptcha_secret_key\" class=\"regular-text\" id=\"simple_google_recaptcha_secret_key\" value=\"".get_option("simple_google_recaptcha_secret_key")."\" />";
|
49 |
+
}
|
50 |
+
add_action("admin_init", "display_simple_google_recaptcha_options");
|
51 |
+
|
52 |
+
function frontend_simple_google_recaptcha_script() {
|
53 |
+
wp_register_script("recaptcha", "https://www.google.com/recaptcha/api.js");
|
54 |
+
wp_enqueue_script("recaptcha");
|
55 |
+
$plugin_url = plugin_dir_url(__FILE__);
|
56 |
+
wp_enqueue_style("style", $plugin_url ."style.css");
|
57 |
+
}
|
58 |
+
add_action("wp_enqueue_scripts", "frontend_simple_google_recaptcha_script");
|
59 |
+
add_action("login_enqueue_scripts", "frontend_simple_google_recaptcha_script");
|
60 |
+
|
61 |
+
function load_language_simple_google_recaptcha() {
|
62 |
+
load_plugin_textdomain("simple-google-recaptcha", false, dirname(plugin_basename(__FILE__)) . "/languages/");
|
63 |
+
}
|
64 |
+
add_action("plugins_loaded", "load_language_simple_google_recaptcha");
|
65 |
+
|
66 |
+
function display_simple_google_recaptcha() {
|
67 |
+
echo "<div class=\"g-recaptcha\" data-sitekey=\"".get_option("simple_google_recaptcha_site_key")."\"></div>";
|
68 |
+
}
|
69 |
+
|
70 |
+
add_action("comment_form_after_fields", "display_simple_google_recaptcha");
|
71 |
+
add_action("login_form", "display_simple_google_recaptcha" );
|
72 |
+
add_action("register_form", "display_simple_google_recaptcha");
|
73 |
+
add_action("lostpassword_form", "display_simple_google_recaptcha");
|
74 |
+
|
75 |
+
function verify_simple_google_recaptcha($input) {
|
76 |
+
if (isset($_POST["g-recaptcha-response"])) {
|
77 |
+
$recaptcha_response = sanitize_text_field($_POST["g-recaptcha-response"]);
|
78 |
+
$recaptcha_secret = get_option("simple_google_recaptcha_secret_key");
|
79 |
+
$response = wp_remote_get("https://www.google.com/recaptcha/api/siteverify?secret=".$recaptcha_secret."&response=".$recaptcha_response);
|
80 |
+
$response = json_decode($response["body"], true);
|
81 |
+
if (true == $response["success"]) {
|
82 |
+
return $input;
|
83 |
+
} else {
|
84 |
+
wp_die(__("<p><strong>ERROR</strong>: You are a bot.</p>", "simple-google-recaptcha")."</p>\n\n<p><a href=".wp_get_referer().">« Zpět</a>");
|
85 |
+
return null;
|
86 |
+
}
|
87 |
+
} else {
|
88 |
+
wp_die(__("<p><strong>ERROR</strong>: You are a bot. If not then enable JavaScript.</p>", "simple-google-recaptcha")."</p>\n\n<p><a href=".wp_get_referer().">« Zpět</a>");
|
89 |
+
return null;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
do_action("preprocess_comment", $commentdata);
|
94 |
+
add_action("preprocess_comment", "verify_simple_google_recaptcha");
|
95 |
+
|
96 |
+
do_action("wp_authenticate_user", $user);
|
97 |
+
add_action("wp_authenticate_user", "verify_simple_google_recaptcha");
|
98 |
+
|
99 |
+
do_action("registration_errors", $errors);
|
100 |
+
add_action("registration_errors", "verify_simple_google_recaptcha");
|
101 |
+
|
102 |
+
do_action("lostpassword_post", $errors);
|
103 |
+
add_action("lostpassword_post", "verify_simple_google_recaptcha");
|
style.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.g-recaptcha {
|
2 |
+
transform: scale(0.90);
|
3 |
+
transform-origin: 0 0;
|
4 |
+
}
|
5 |
+
|
6 |
+
.login form {
|
7 |
+
padding-bottom: 26px;
|
8 |
+
}
|