diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 5d8dffe..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,96 +0,0 @@
-# Netbeans
-**/nbproject/*
-
-# Windows image file caches
-Thumbs.db
-ehthumbs.db
-
-# Folder config file
-Desktop.ini
-
-# Packages #
-############
-*.7z
-*.dmg
-*.gz
-*.bz2
-*.iso
-*.jar
-*.rar
-*.tar
-*.zip
-*.tgz
-*.map
-
-# Logs and databases #
-######################
-*.log
-*.sql
-
-# OS generated files #
-######################
-**.DS_Store*
-ehthumbs.db
-Icon?
-Thumbs.db
-._*
-
-# Vim generated files #
-######################
-*.un~
-
-# SASS #
-##########
-**/.sass-cache
-**/.sass-cache/*
-**/.map
-
-# Composer #
-##########
-!resources/js/vendor/
-wpcs/
-
-# Bower #
-##########
-resources/bower_components/*
-
-# Codekit #
-##########
-/codekit-config.json
-*.codekit
-**.codekit-cache/*
-
-# NPM #
-##########
-node_modules
-
-# Compiled Files and Build Dirs #
-##########
-/README.html
-/build/
-
-# PhpStrom Project Files #
-.idea/
-library/vendors/composer
-resources/img/.DS_Store
-resources/sass/HTML
-resources/sass/Rails
-HTML
-Rails
-
-# Sublime Project Files #
-##########
-# workspace files are user-specific
-*.sublime-workspace
-
-# project files should be checked into the repository, unless a significant
-# proportion of contributors will probably not be using SublimeText
-*.sublime-project
-
-
-/vendor/
-/vendor-bin/
-/third-party/
-
-/php-scoper/vendor
-.vscode/launch.json
\ No newline at end of file
diff --git a/admin/index.php b/admin/index.php
new file mode 100644
index 0000000..e94d9a4
--- /dev/null
+++ b/admin/index.php
@@ -0,0 +1,4 @@
+' . esc_html__( 'Important:', 'advanced-nocaptcha-recaptcha' ) . '',
+ esc_html__( 'To reconfigure the failover now, once you are redirected to the plugin\'s configuration page click', 'advanced-nocaptcha-recaptcha' ),
+ '' . esc_html__( 'Reconfigure reCAPTCHA integration', 'advanced-nocaptcha-recaptcha' ) . '',
+ esc_html__( 'and click', 'advanced-nocaptcha-recaptcha' ),
+ '' . esc_html__( 'Next', 'advanced-nocaptcha-recaptcha' ) . '',
+ esc_html__( 'in the wizard until you get to the failover settings.', 'advanced-nocaptcha-recaptcha' ),
+ );
+ if ( in_array( 'administrator', (array) $user->roles ) ) {
+ echo '
+
' . esc_html__( 'In the latest version of CAPTCHA 4WP you can configure a failover action for your CAPTCHA check. This means that you can configure the plugin to show a CAPTCHA checkbox or redirect the user when the current v3 reCAPTCHA check fails. Use the buttons below to configure the failover or close this admin notice.', 'advanced-nocaptcha-recaptcha' ) . '
';
echo '';
printf(
/* translators: link to the settings page with text "Settings page" */
- esc_html__( 'Follow the 3 steps on this CAPTCHA configuration page to configure the integration with the Google reCAPTCHA service so you can use CAPTCHA checks on your website. use on your website. Once you configure the integration navigate to the %s page to configure where CAPTCHA should be added on your website, whitelist IP addresses and configure other settings', 'advanced-nocaptcha-recaptcha' ),
+ esc_html__( 'Use the CAPTCHA configuration wizard to integrate the Google reCAPTCHA service so you can add CAPTCHA checks on your website. Once you configure the integration navigate to the %s page to configure where CAPTCHA should be added on your website, whitelist IP addresses and configure other settings', 'advanced-nocaptcha-recaptcha' ),
'' . esc_html__( 'Settings & placements', 'advanced-nocaptcha-recaptcha' ) . ''
);
echo '';
+ echo wp_kses( $this->wizard_launcher_area(), c4wp_allowed_kses_args() );
},
),
);
@@ -165,15 +228,15 @@ public function get_fields() {
'type' => 'html',
'label' => sprintf(
'%1$s',
- esc_html__( 'STEP 1: Select the type of reCAPTCHA you want to use', 'advanced-nocaptcha-recaptcha' )
+ esc_html__( 'Step 1: Select the type of reCAPTCHA you want to use on your website.', 'advanced-nocaptcha-recaptcha' )
),
- 'class' => 'wrap-around-content',
+ 'class' => 'wrap-around-content c4wp-wizard-captcha-version',
),
'captcha_version' => array(
'label' => esc_html__( 'reCAPTCHA version', 'advanced-nocaptcha-recaptcha' ),
'section_id' => 'google_keys',
'type' => 'radio',
- 'class' => 'regular',
+ 'class' => 'regular c4wp-wizard-captcha-version',
'std' => 'v2_checkbox',
'options' => array(
'v2_checkbox' => esc_html__( 'Version 2 (Users have to check the "I’m not a robot” checkbox)', 'advanced-nocaptcha-recaptcha' ),
@@ -186,9 +249,9 @@ public function get_fields() {
'type' => 'html',
'label' => sprintf(
'%1$s',
- esc_html__( 'STEP 2: Specify the Site & Secret keys', 'advanced-nocaptcha-recaptcha' )
+ esc_html__( 'Step 2: Specify the Site & Secret keys', 'advanced-nocaptcha-recaptcha' )
),
- 'class' => 'wrap-around-content',
+ 'class' => 'wrap-around-content c4wp-wizard-site-keys',
),
'site_key_subtitle' => array(
'section_id' => 'google_keys',
@@ -197,21 +260,30 @@ public function get_fields() {
'
%1$s
',
sprintf(
/* translators:link to help page */
- esc_html__( 'To communicate with Google and utilize the reCAPTCHA service you need to get a Site Key and Secret Key. You can obtain these keys for free by registering for your Google reCAPTCHA. Refer to %s if you need help with the process.', 'advanced-nocaptcha-recaptcha' ),
+ esc_html__( 'To utilize the Google reCAPTCHA service on your website you need to get a Site and Secret key. If you do not have these keys yet, you can option them for free by registering to the Google reCAPTCHA service. Refer to the document %s for a step by step explanation of how to get these keys.', 'advanced-nocaptcha-recaptcha' ),
'' . esc_html__( 'how to get the Google reCAPTCHA keys', 'advanced-nocaptcha-recaptcha' ) . ''
)
),
- 'class' => 'wrap-around-content',
+ 'class' => 'wrap-around-content c4wp-wizard-site-keys',
),
'site_key' => array(
'label' => esc_html__( 'Site Key', 'advanced-nocaptcha-recaptcha' ),
'section_id' => 'google_keys',
'required' => true,
+ 'class' => 'c4wp-wizard-site-keys',
),
'secret_key' => array(
'label' => esc_html__( 'Secret Key', 'advanced-nocaptcha-recaptcha' ),
'section_id' => 'google_keys',
'required' => true,
+ 'class' => 'c4wp-wizard-site-keys',
+ ),
+ 'key_validation' => array(
+ 'section_id' => 'google_keys',
+ 'type' => 'html',
+ 'label' => esc_html__( 'Key Validation', 'advanced-nocaptcha-recaptcha' ),
+ 'std' => '
' . esc_html__( 'Once you enter the correct Site and Secret keys above, the CAPTCHA method you want to use on your website will appear below. If the keys are incorrect you will instead see an error. If you see an error make sure the CAPTCHA version, website domain and both keys match.', 'advanced-nocaptcha-recaptcha' ) . '
',
+ 'class' => 'c4wp-wizard-site-keys',
),
'key_validation' => array(
'section_id' => 'google_keys',
@@ -225,11 +297,11 @@ public function get_fields() {
'type' => 'html',
'label' => sprintf(
'%1$s',
- esc_html__( 'STEP 3 (OPTIONAL): Fine-tune reCAPTCHA to your requirements', 'advanced-nocaptcha-recaptcha' )
+ esc_html__( 'Optional settings: Fine-tune reCAPTCHA to your requirements', 'advanced-nocaptcha-recaptcha' )
),
- 'class' => 'wrap-around-content',
- ),
- 'score_subtitle' => array(
+ 'class' => 'wrap-around-content c4wp-wizard-additional-settings',
+
+ 'score_subtitle' => array(
'section_id' => 'google_keys',
'type' => 'html',
'label' => sprintf(
@@ -238,7 +310,7 @@ public function get_fields() {
esc_html__( 'Use the below settings to configure and fine-tune CAPTCHA to your requirements. All the below settings are optional and with them you can configure different aspects of the CAPTCHA checks on your website, such as look and feel and also sensitivy.', 'advanced-nocaptcha-recaptcha' )
)
),
- 'class' => 'wrap-around-content',
+ 'class' => 'wrap-around-content c4wp-wizard-additional-setting',
),
'score' => array(
'label' => esc_html__( 'Captcha Score', 'advanced-nocaptcha-recaptcha' ),
@@ -368,7 +440,7 @@ public function get_fields() {
),
'desc' => esc_html__( 'Badge shows for invisible captcha', 'advanced-nocaptcha-recaptcha' ),
),
- 'badge_v3' => array(
+ 'badge_v3' => array(
'label' => esc_html__( 'Badge', 'advanced-nocaptcha-recaptcha' ),
'section_id' => 'google_keys',
'type' => 'select',
@@ -402,6 +474,44 @@ public function get_fields() {
'desc' => __( 'This css increase login page width to adjust with Captcha width.', 'advanced-nocaptcha-recaptcha' ),
),
+ 'failure_action' => array(
+ 'label' => esc_html__( 'v3 failover action:', 'advanced-nocaptcha-recaptcha' ),
+ 'section_id' => 'google_keys',
+ 'type' => 'select',
+ 'class' => 'regular',
+ 'std' => 'nothing',
+ 'options' => array(
+ 'v2_checkbox' => esc_html__( 'Show a v2 CAPTCHA checkbox', 'advanced-nocaptcha-recaptcha' ),
+ 'redirect' => esc_html__( 'Redirect the website visitor to a URL', 'advanced-nocaptcha-recaptcha' ),
+ 'nothing' => esc_html__( 'Take no action', 'advanced-nocaptcha-recaptcha' ),
+ ),
+ ),
+ 'failure_redirect' => array(
+ 'label' => esc_html__( 'Redirect URL', 'advanced-nocaptcha-recaptcha' ),
+ 'section_id' => 'google_keys',
+ 'required' => false,
+ 'class' => 'c4wp-wizard-site-keys toggleable c4wp-show-field-for-redirect',
+ ),
+ 'failure_v2_site_key' => array(
+ 'label' => esc_html__( 'v2 Site key:', 'advanced-nocaptcha-recaptcha' ),
+ 'section_id' => 'google_keys',
+ 'required' => false,
+ 'class' => 'c4wp-wizard-site-keys toggleable c4wp-show-field-for-v2_checkbox',
+ ),
+ 'failure_v2_secret_key' => array(
+ 'label' => esc_html__( 'v2 Secret key:', 'advanced-nocaptcha-recaptcha' ),
+ 'section_id' => 'google_keys',
+ 'required' => false,
+ 'class' => 'c4wp-wizard-site-keys toggleable c4wp-show-field-for-v2_checkbox',
+ ),
+ 'failure_key_validation' => array(
+ 'section_id' => 'google_keys',
+ 'type' => 'html',
+ 'label' => esc_html__( 'Key Validation', 'advanced-nocaptcha-recaptcha' ),
+ 'std' => '
' . esc_html__( 'Once you enter the correct Site and Secret keys above, the CAPTCHA method you want to use on your website will appear below. If the keys are incorrect you will instead see an error. If you see an error make sure the CAPTCHA version, website domain and both keys match.', 'advanced-nocaptcha-recaptcha' ) . '
Add spam protection to block spam bots and allow real humans to easily interact with your WordPress website by adding CAPTCHA to any form on your website, including out of the box support for forms on third party plugins such as:
Add spam protection to block spam bots and allow real humans to easily interact with your WordPress website by adding CAPTCHA to any form on your website, including out of the box support for forms on third party plugins such as:
%5$s
%6$s
%7$s
%8$s
%1$s%2$s',
esc_html__( 'Upgrade to Premium', 'advanced-nocaptcha-recaptcha' ),
esc_html__( 'Find out more', 'advanced-nocaptcha-recaptcha' ),
esc_url( 'https://www.wpwhitesecurity.com/wordpress-plugins/captcha-plugin-wordpress/pricing/?utm_source=plugin&utm_medium=referral&utm_campaign=C4WP&utm_content=plugin+premium+button' ),
esc_url( $features_url ),
esc_html__( 'Checkout and login pages on WooCommerce stores', 'advanced-nocaptcha-recaptcha' ),
- esc_html__( 'Contact Form 7, MailChimp 4 WordPress forms', 'advanced-nocaptcha-recaptcha' ),
+ esc_html__( 'Contact Form 7, Gravity Forms, WPForms, MailChimp 4 WordPress forms', 'advanced-nocaptcha-recaptcha' ),
esc_html__( 'BuddyPress and bbPress', 'advanced-nocaptcha-recaptcha' ),
- esc_html__( 'And others', 'advanced-nocaptcha-recaptcha' )
+ esc_html__( 'And others', 'advanced-nocaptcha-recaptcha' ),
+ esc_url( $logos_url )
),
);
@@ -469,6 +581,7 @@ public function get_fields() {
'cb_label_after' => '',
'type' => 'text',
'class' => 'regular-text',
+ 'el_class' => 'regular',
'section_id' => '',
'desc' => '',
'std' => '',
@@ -484,10 +597,11 @@ public function get_fields() {
/**
* Field callback.
*
- * @param array $field - Field data.
- * @return void
+ * @param array $field - Field data.
+ * @param bool $return - To return markup or not.
+ * @return $output - HTML Markup.
*/
- public function callback( $field ) {
+ public function callback( $field, $return = false ) {
$attrib = '';
if ( ! empty( $field['required'] ) ) {
$attrib .= ' required = "required"';
@@ -507,6 +621,10 @@ public function callback( $field ) {
$value = c4wp_get_option( $field['id'], $field['std'] );
+ if ( $return ) {
+ ob_start();
+ }
+
if ( ! empty( $field['desc'] ) ) {
printf( '
%s
', esc_html( $field['desc'] ) );
}
@@ -517,14 +635,15 @@ public function callback( $field ) {
case 'url':
case 'submit':
printf(
- '',
+ '',
esc_attr( $field['type'] ),
esc_attr( $field['id'] ),
- esc_attr( $field['class'] ),
+ esc_attr( $field['el_class'] ),
esc_attr( $field['id'] ),
isset( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '',
esc_attr( $value ),
- $attrib
+ $attrib, // phpcs:ignore
+ esc_attr( $field['class'] ),
);
break;
case 'number':
@@ -536,7 +655,7 @@ public function callback( $field ) {
esc_attr( $field['id'] ),
isset( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '',
esc_attr( $value ),
- $attrib,
+ $attrib, // phpcs:ignore
esc_attr( $field['min_val'] ),
esc_attr( $field['max_val'] )
);
@@ -550,7 +669,7 @@ public function callback( $field ) {
esc_attr( $field['id'] ),
isset( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '',
esc_attr( $value ),
- $attrib,
+ $attrib, // phpcs:ignore
esc_attr( $field['cb_label'] ),
esc_attr( $field['cb_label_after'] ),
esc_attr( $field['min_val'] ),
@@ -564,7 +683,7 @@ public function callback( $field ) {
esc_attr( $field['class'] ),
esc_attr( $field['id'] ),
isset( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '',
- $attrib,
+ $attrib, // phpcs:ignore
esc_textarea( $value )
);
break;
@@ -614,7 +733,7 @@ public function callback( $field ) {
printf( '' );
break;
case 'html':
- echo $field['std'];
+ echo $field['std']; // phpcs:ignore
break;
case 'radio':
foreach ( $field['options'] as $key => $label ) {
@@ -624,7 +743,7 @@ public function callback( $field ) {
checked( $value, $key, false ),
esc_attr( $label ),
esc_attr( $field['id'] ),
- esc_attr( $field['class'] )
+ esc_attr( $field['el_class'] )
);
}
break;
@@ -634,6 +753,11 @@ public function callback( $field ) {
printf( esc_html__( 'No hook defined for %s', 'advanced-nocaptcha-recaptcha' ), esc_html( $field['type'] ) );
break;
}
+
+ if ( $return ) {
+ $output = ob_get_clean();
+ return $output;
+ }
}
/**
@@ -787,7 +911,8 @@ public function settings_save() {
current_user_can( 'manage_options' ) && isset( $_POST['c4wp_admin_options'] ) && isset( $_POST['action'] ) && 'update' === $_POST['action'] && isset( $_GET['page'] ) && 'c4wp-admin-captcha' === $_GET['page'] ) {
check_admin_referer( 'c4wp_admin_options-options' );
- $value = wp_unslash( $_POST['c4wp_admin_options'] );
+ $post_array = filter_input_array( INPUT_POST );
+ $value = isset( $post_array['c4wp_admin_options'] ) ? wp_unslash( $post_array['c4wp_admin_options'] ) : false;
if ( ! is_array( $value ) ) {
$value = array();
}
@@ -812,26 +937,30 @@ public function admin_settings() {
'c4wp-admin',
'anrScripts',
array(
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
- 'ipWarning' => esc_html__( 'Please supply a valid IP', 'advanced-nocaptcha-recaptcha' ),
- 'switchingWarning' => esc_html__( 'Switching CAPTCHA methods will require your Site Key and Secret key to be replaced, do you wish to proceed?', 'advanced-nocaptcha-recaptcha' ),
- 'switchingWarningTitle' => esc_html__( 'Confirm CAPTCHA method change', 'advanced-nocaptcha-recaptcha' ),
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
+ 'captcha_version' => c4wp_get_option( 'captcha_version', 'v2_checkbox' ),
+ 'ipWarning' => esc_html__( 'Please supply a valid IP', 'advanced-nocaptcha-recaptcha' ),
+ 'switchingWarning' => esc_html__( 'Switching CAPTCHA methods will require your Site Key and Secret key to be replaced, do you wish to proceed?', 'advanced-nocaptcha-recaptcha' ),
+ 'switchingWarningTitle' => esc_html__( 'Confirm change of reCAPTCHA integration', 'advanced-nocaptcha-recaptcha' ),
+ 'removeConfigWarningTitle' => esc_html__( 'Confirm removal of reCAPTCHA integration', 'advanced-nocaptcha-recaptcha' ),
+ 'removeConfigWarning' => esc_html__( 'This will remove the current reCAPTCHA integration, which means all the CAPTCHA checks on your website will stop working. Would you like to proceed?', 'advanced-nocaptcha-recaptcha' ),
)
);
$current_tab = 'c4wp-admin-captcha';
- if ( ! empty( $_GET['page'] ) ) {
- $current_tab = wp_unslash( $_GET['page'] );
+ if ( ! empty( $_GET['page'] ) ) { // phpcs:ignore
+ $current_tab = sanitize_text_field( wp_unslash( $_GET['page'] ) ); // phpcs:ignore
}
// Determine if a Site/Secret key has been stored.
$site_key = trim( c4wp_get_option( 'site_key' ) );
$secret_key = trim( c4wp_get_option( 'secret_key' ) );
$settings_url = function_exists( 'c4wp_same_settings_for_all_sites' ) && c4wp_same_settings_for_all_sites() ? network_admin_url( 'admin.php?page=c4wp-admin-captcha' ) : admin_url( 'admin.php?page=c4wp-admin-captcha' );
- $settings_wrapper_class = ( empty( $site_key ) || empty( $secret_key ) ) ? 'captcha_keys_required wrap fs-section': 'wrap fs-section';
+ $settings_wrapper_class = ( empty( $site_key ) || empty( $secret_key ) ) ? 'captcha_keys_required wrap fs-section' : 'wrap fs-section';
+ $show_wizard = ( empty( c4wp_get_option( 'site_key' ) ) && empty( $site_key ) && empty( $secret_key ) ) ? 'show_wizard_on_load' : '';
?>
-
+
@@ -904,7 +1033,6 @@ public function settings_form() {
?>
c4wp_settings_notice(); ?>
';
}
@@ -943,7 +1071,7 @@ public function c4wp_settings_notice() {
delete_transient( 'c4wp_admin_options_errors' );
- echo $notice;
+ echo wp_kses_post( $notice );
}
/**
@@ -967,8 +1095,7 @@ public function c4wp_admin_sidebar() {
' . esc_html__( 'Use the language that your website viewers understand', 'advanced-nocaptcha-recaptcha' ) . '
' . esc_html__( 'Spam protection for your WooCommerce stores', 'advanced-nocaptcha-recaptcha' ) . '
' . esc_html__( 'Specify where to put the CAPTCHA test on WooCommerce checkout page', 'advanced-nocaptcha-recaptcha' ) . '
-
' . esc_html__( 'One-click Contact Form 7 forms spam protection', 'advanced-nocaptcha-recaptcha' ) . '
-
' . esc_html__( 'One-click spam protection for Mailchimp for WordPress forms', 'advanced-nocaptcha-recaptcha' ) . '
+
' . esc_html__( 'One-click spam protection for forms built with Contact Form 7, Gravity Forms, WPForms & MailChimp for WordPress', 'advanced-nocaptcha-recaptcha' ) . '
' . esc_html__( 'CAPTCHA tests & spam protection for BuddyPress, bbPress & other third party plugins', 'advanced-nocaptcha-recaptcha' ) . '
' . esc_html__( 'Add CAPTCHA to any type of form, even PHP forms', 'advanced-nocaptcha-recaptcha' ) . '
+
+ ' . esc_html__( 'Getting started with the CAPTCHA 4WP plugin', 'advanced-nocaptcha-recaptcha' ) . '
+
' . esc_html__( 'Thank you for installing the CAPTCHA 4WP plugin. This wizard will help you get started with the plugin so you can configure CAPTCHA and protect your website from spam, and fake registrations and orders.', 'advanced-nocaptcha-recaptcha' ) . '
+ ' . esc_html__( 'Step 3: Configure a failover action for reCAPTCHA v3 failure', 'advanced-nocaptcha-recaptcha' ) . '
+
' . esc_html__( 'reCAPTCHA v3 is fully automated. This means that by default, if the CAPTCHA check fails the website visitor cannot proceed with what they are doing unless you configure a failover action. Use the below setting to configure the failover action.', 'advanced-nocaptcha-recaptcha' ) . '
' . esc_html__( 'Please specify the full URL, including the protocol (HTTP or HTTPS) where you would like the user to be redirected to. For example: ', 'advanced-nocaptcha-recaptcha' ) . 'https://melapress.com/blog/
+
' . esc_html__( 'To show the v2 reCAPTCHA checkbox you need to specify the Site and Secret keys. Please specify them below:', 'advanced-nocaptcha-recaptcha' ) . '
+ ' . esc_html__( ' All done - you can now add CAPTCHA checks to your website', 'advanced-nocaptcha-recaptcha' ) . '
+
' . esc_html__( "Now that the Google reCAPTCHA service is fully integrated you can use the optional settings to fine-tune CAPTCHA to your requirements. All the CAPTCHA settings are optional and with them you can configure aspects such as look and feel and CAPTCHA sensitivity. When you are ready navigate to the Settings & Placements page to configure where you'd like to add the CAPTCHA checks", 'advanced-nocaptcha-recaptcha' ) . '
1-click spam protection for forms built with Gravity FormsAdd CAPTCHA to any form built with Gravity Forms at the click of a button. No shortcodes required.
+
+
+
+
+
+
+
+
+
+
+
+
1-click spam protection for forms built with WPFormsAdd CAPTCHA to any form built with WPForms at the click of a button. No shortcodes required.
+
+
+
+
+
+
+
+
+
1-click spam protection for Mailchimp for WordPress formsAdd CAPTCHA to any MC4WP form at the click of a button. No shortcodes required.
');
}
}
@@ -158,7 +216,7 @@ jQuery(document).ready(function( $ ){
var text = $('#c4wp_admin_options_whitelisted_urls').val();
var output = text.split(',');
$( '#whitelist-urls-userfacing' ).html('
' + $.map(output, function(v) {
- return '
' + v + '
';
+ return '
' + v + '
';
}).join('') + '
');
}
}
@@ -293,10 +351,11 @@ jQuery(function() {
return true;
}
- jQuery( 'body' ).on( 'click', 'a[href="#dismiss-captcha-notice"]', function ( e ) {
+ jQuery( 'body' ).on( 'click', 'a[href="#dismiss-captcha-notice"], a[href="#c4wp-cancel-v3-failover-notice"]', function ( e ) {
e.preventDefault();
- var ourButton = jQuery( this );
+ let ourButton = jQuery( this );
var nonce = ourButton.attr( 'data-nonce' );
+ var type = ourButton.attr( 'data-notice-type' );
jQuery.ajax({
type: 'POST',
@@ -305,9 +364,10 @@ jQuery(function() {
data: {
action: 'c4wp_nocaptcha_plugin_notice_ignore',
nonce: nonce,
+ notice_type: type,
},
success: function ( result ) {
- jQuery( '#network-captcha-notice' ).slideUp();
+ jQuery( ourButton ).closest( '.notice' ).slideUp();
}
});
});
@@ -348,6 +408,136 @@ jQuery(function() {
}
jQuery( '#whitelist_ips_input' ).val( '' );
});
+
+ jQuery( 'body' ).on( 'click', 'a#launch-c4wp-wizard', function ( e ) {
+ e.preventDefault();
+
+ showWizard();
+ });
+
+ function showWizard( goToIntro = false ) {
+ if ( goToIntro ) {
+ jQuery( '#c4wp-setup-wizard-intro' ).addClass( 'active' );
+ } else {
+ jQuery( '#c4wp-setup-wizard-intro' ).remove();
+ jQuery( '#c4wp-setup-wizard-version-select' ).addClass( 'active' );
+ }
+ setTimeout(function() {
+ jQuery( '#c4wp-setup-wizard' ).addClass( 'show-wizard' );
+ }, 100);
+ }
+
+ function validateURL(string) {
+ try {
+ const newUrl = new URL(string);
+ return newUrl.protocol === 'http:' || newUrl.protocol === 'https:';
+ } catch (err) {
+ return false;
+ }
+ }
+
+ jQuery( 'body' ).on( 'click', '#c4wp-close-wizard, a[href="#c4wp-cancel-wizard"]', function ( e ) {
+ e.preventDefault();
+ jQuery( '#c4wp-setup-wizard' ).removeClass( 'show-wizard' );
+ });
+
+ jQuery( 'body' ).on( 'click', '#reset-c4wp-config', function ( e ) {
+ e.preventDefault();
+ c4wpConfirm(
+ anrScripts.removeConfigWarning,
+ function () {
+ c4wp_reset_captcha_config();
+ return true;
+ },
+ function () {
+ return false;
+ },
+ anrScripts.removeConfigWarningTitle
+ );
+ });
+
+ jQuery( 'body' ).on( 'click', 'a[data-wizard-goto]', function ( e ) {
+ e.preventDefault();
+ var targetDiv = jQuery( this ).attr( 'href' );
+ var inputsToCheck = jQuery( this ).attr( 'data-check-inputs' );
+ var current_fallback = jQuery( '#c4wp_admin_options_failure_action option:selected' ).val();
+
+ if ( ! jQuery( '#c4wp-setup-wizard-v3-fallback' ).hasClass( 'active' ) ) {
+ if ( targetDiv == '#c4wp-setup-wizard-additional-settings' ) {
+ var currVal = jQuery('input[name="c4wp_admin_options[captcha_version]"]:checked').val();
+ if ( currVal == 'v3' ) {
+ var targetDiv = '#c4wp-setup-wizard-v3-fallback';
+ }
+ c4wp_admin_show_hide_failure_fields();
+ }
+ } else {
+ if ( 'redirect' == current_fallback ) {
+ if ( ! jQuery( '#c4wp_admin_options_failure_redirect' ).val() || ! validateURL( jQuery( '#c4wp_admin_options_failure_redirect' ).val() ) ) {
+ jQuery( '#c4wp_admin_options_failure_redirect' ).css( 'border', '1px solid red' );
+ return true;
+ } else {
+ jQuery( '#c4wp_admin_options_failure_redirect' ).css( 'border', '1px solid #8c8f94' );
+ jQuery( this ).parent().removeClass('active').slideUp(200);
+ jQuery( targetDiv ).addClass('active').slideDown(200);
+ }
+ } else if ( 'nothing' == current_fallback ) {
+ jQuery( this ).parent().removeClass('active').slideUp(200);
+ jQuery( targetDiv ).addClass('active').slideDown(200);
+ }
+ }
+
+ if ( targetDiv == '#c4wp-setup-wizard-site-keys' ) {
+ var currVal = jQuery('input[name="c4wp_admin_options[captcha_version]"]:checked').val();
+ if ( typeof currVal == 'undefined' ) {
+ jQuery('input[name="c4wp_admin_options[captcha_version]"]').css( 'border', '1px solid red' );
+ return true;
+ } else {
+ jQuery('input[name="c4wp_admin_options[captcha_version]"]').css( 'border', '1px solid #8c8f94' );
+ }
+ }
+
+ if ( inputsToCheck || jQuery( 'body [data-key-invalid]' ).length ) {
+ if ( ! jQuery( inputsToCheck ).val() || jQuery( 'body [data-key-invalid]' ).length ) {
+ jQuery( inputsToCheck ).css( 'border', '1px solid red' );
+ } else {
+ jQuery( this ).parent().removeClass('active').slideUp(200);
+ jQuery( targetDiv ).addClass('active').slideDown(200);
+ }
+ } else {
+ jQuery( this ).parent().removeClass('active').slideUp(200);
+ jQuery( targetDiv ).addClass('active').slideDown(200);
+ }
+
+ if ( jQuery( '#c4wp-setup-wizard-site-keys' ).hasClass( 'active' ) ) {
+ jQuery( '#c4wp-setup-wizard-site-keys .button-primary[data-check-inputs]' ).attr( 'data-check-inputs', '#c4wp_admin_options_site_key, #c4wp_admin_options_secret_key' );
+ }
+ });
+
+ jQuery( 'body' ).on( 'click', 'a[href="#finish"]', function ( e ) {
+ e.preventDefault();
+ jQuery( '#c4wp-setup-wizard' ).removeClass( 'show-wizard' );
+ jQuery( '#c4wp-admin-wrap form #submit' ).trigger('click');
+ });
+
+ function c4wp_reset_captcha_config() {
+ var nonce = jQuery( '#reset-c4wp-config' ).attr( 'data-nonce' );
+ jQuery.ajax({
+ type: 'POST',
+ url: ajaxurl,
+ async: true,
+ data: {
+ action: 'c4wp_reset_captcha_config',
+ nonce: nonce,
+ },
+ success: function ( result ) {
+ location.reload();
+ }
+ });
+ }
+
+ if ( jQuery( '#c4wp-admin-wrap' ).hasClass( 'show_wizard_on_load' ) ) {
+ showWizard( true );
+ }
});
/**
diff --git a/assets/js/index.php b/assets/js/index.php
new file mode 100644
index 0000000..e94d9a4
--- /dev/null
+++ b/assets/js/index.php
@@ -0,0 +1,4 @@
+is_not_paying() ) || ( class_exists( 'C4WP_Pro' ) && c4wp_fs()->is_trial() ) ) ? true : false;
}
+
+/**
+ * Add a small log during testing.
+ *
+ * @param array $result - Result data.
+ * @return void
+ */
+function c4wp_log_verify_result( $result ) {
+ $stored = c4wp_get_option( 'c4wp_recent_results' );
+ if ( ! $stored || ! is_array( $stored ) ) {
+ $updated_results[] = $result;
+ c4wp_update_option( 'c4wp_recent_results', $updated_results );
+ } else {
+ $updated_results = array_unshift( $stored, $result );
+ c4wp_update_option( 'c4wp_recent_results', $updated_results );
+ }
+}
+
+/**
+ * An easy to use array of allowed HTML for use with sanitzation of our admin areas etc.
+ *
+ * @return $wp_kses_args - Our array.
+ */
+function c4wp_allowed_kses_args() {
+ $wp_kses_args = array(
+ 'input' => array(
+ 'type' => array(),
+ 'id' => array(),
+ 'name' => array(),
+ 'value' => array(),
+ 'size' => array(),
+ 'class' => array(),
+ 'min' => array(),
+ 'required' => array(),
+ 'checked' => array(),
+ ),
+ 'select' => array(
+ 'id' => array(),
+ 'name' => array(),
+ ),
+ 'option' => array(
+ 'id' => array(),
+ 'name' => array(),
+ 'value' => array(),
+ 'selected' => array(),
+ ),
+ 'tr' => array(
+ 'valign' => array(),
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'th' => array(
+ 'scope' => array(),
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'td' => array(
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'fieldset' => array(
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'legend' => array(
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'label' => array(
+ 'for' => array(),
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'p' => array(
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'span' => array(
+ 'class' => array(),
+ 'id' => array(),
+ 'style' => array(),
+ ),
+ 'li' => array(
+ 'class' => array(),
+ 'id' => array(),
+ 'data-role-key' => array(),
+ ),
+ 'a' => array(
+ 'class' => array(),
+ 'id' => array(),
+ 'style' => array(),
+ 'data-tab-target' => array(),
+ 'data-wizard-goto' => array(),
+ 'data-check-inputs' => array(),
+ 'data-nonce' => array(),
+ 'href' => array(),
+ 'target' => array(),
+ ),
+ 'h3' => array(
+ 'class' => array(),
+ ),
+ 'br' => array(),
+ 'b' => array(),
+ 'i' => array(),
+ 'div' => array(
+ 'style' => array(),
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'table' => array(
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'tbody' => array(
+ 'class' => array(),
+ 'id' => array(),
+ ),
+ 'strong' => array(
+ 'class' => array(),
+ 'data-key-invalid' => array(),
+ 'id' => array(),
+ ),
+ 'img' => array(
+ 'class' => array(),
+ 'src' => array(),
+ 'id' => array(),
+ ),
+ );
+ return $wp_kses_args;
+}
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..e94d9a4
--- /dev/null
+++ b/index.php
@@ -0,0 +1,4 @@
+ERROR: "
msgstr ""
+#: admin/settings.php:80
+msgid "Important:"
+msgstr ""
+
+#: admin/settings.php:81
+msgid "To reconfigure the failover now, once you are redirected to the plugin's configuration page click"
+msgstr ""
+
+#: admin/settings.php:82, admin/settings.php:1337
+msgid "Reconfigure reCAPTCHA integration"
+msgstr ""
+
+#: admin/settings.php:83
+msgid "and click"
+msgstr ""
+
+#: admin/settings.php:84, admin/settings.php:1257, admin/settings.php:1273, admin/settings.php:1286, admin/settings.php:1306
+msgid "Next"
+msgstr ""
+
+#: admin/settings.php:85
+msgid "in the wizard until you get to the failover settings."
+msgstr ""
+
+#: admin/settings.php:89
+msgid "In the latest version of CAPTCHA 4WP you can configure a failover action for your CAPTCHA check. This means that you can configure the plugin to show a CAPTCHA checkbox or redirect the user when the current v3 reCAPTCHA check fails. Use the buttons below to configure the failover or close this admin notice."
+msgstr ""
+
+#: admin/settings.php:91
+msgid "Configure failover action now"
+msgstr ""
+
+#: admin/settings.php:91, admin/settings.php:964
+msgid "I'll configure it later"
+msgstr ""
+
#. translators: link to the settings page with text "Settings page"
-#: admin/settings.php:99
-msgid "Follow the 3 steps on this CAPTCHA configuration page to configure the integration with the Google reCAPTCHA service so you can use CAPTCHA checks on your website. use on your website. Once you configure the integration navigate to the %s page to configure where CAPTCHA should be added on your website, whitelist IP addresses and configure other settings"
+#: admin/settings.php:161
+msgid "Use the CAPTCHA configuration wizard to integrate the Google reCAPTCHA service so you can add CAPTCHA checks on your website. Once you configure the integration navigate to the %s page to configure where CAPTCHA should be added on your website, whitelist IP addresses and configure other settings"
msgstr ""
-#: admin/settings.php:100
+#: admin/settings.php:162
msgid "Settings & placements"
msgstr ""
-#: admin/settings.php:112
+#: admin/settings.php:175
msgid "In this page you can configure where on your website you want to add the CAPTCHA check. You can also configure several other settings, such as whitelisting IP addresses, excluding logged in users from CAPTCHA checks and more."
msgstr ""
#. translators: expression "very restrictive" in bold
-#: admin/settings.php:137
+#: admin/settings.php:200
msgid "Any value above 0.5 is %s."
msgstr ""
-#: admin/settings.php:138
+#: admin/settings.php:201
msgid "very restrictive"
msgstr ""
-#: admin/settings.php:140
+#: admin/settings.php:203
msgid "This means that you might end up locked out from your website. Therefore test this on a staging website website beforehand."
msgstr ""
-#: admin/settings.php:144
+#: admin/settings.php:207
msgid "You can add a CAPTCHA check to the below list of pages on WordPress."
msgstr ""
-#: admin/settings.php:145
+#: admin/settings.php:208
msgid "Use the setting below to select the language of the text used in the CAPTCHA text."
msgstr ""
#. translators:link to upgrade page
-#: admin/settings.php:150
+#: admin/settings.php:213
msgid "To add CAPTCHA checks to WooCommerce, Contact Form 7, BuddyPress and other forms created by third party plugins you need to %s"
msgstr ""
-#: admin/settings.php:151
+#: admin/settings.php:214
msgid "upgrade to Premium"
msgstr ""
-#: admin/settings.php:153
+#: admin/settings.php:216
msgid " In the Premium edition you can configure the plugin to automatically detect the language settings of the visitor's and use that language."
msgstr ""
-#: admin/settings.php:156
+#: admin/settings.php:219
msgid "Comments form"
msgstr ""
-#: admin/settings.php:159
+#: admin/settings.php:222
msgid "(Incompatible with Jetpack comments)"
msgstr ""
-#: admin/settings.php:168
-msgid "STEP 1: Select the type of reCAPTCHA you want to use"
+#: admin/settings.php:231
+msgid "Step 1: Select the type of reCAPTCHA you want to use on your website."
msgstr ""
-#: admin/settings.php:173
+#: admin/settings.php:236
msgid "reCAPTCHA version"
msgstr ""
-#: admin/settings.php:179
+#: admin/settings.php:242
msgid "Version 2 (Users have to check the \"I’m not a robot” checkbox)"
msgstr ""
-#: admin/settings.php:180
+#: admin/settings.php:243
msgid "Version 2 (No user interaction needed, however, if traffic is suspicious, users are asked to solve a CAPTCHA)"
msgstr ""
-#: admin/settings.php:181
+#: admin/settings.php:244
msgid "Version 3 (verify request with a score without user interaction)"
msgstr ""
-#: admin/settings.php:189
-msgid "STEP 2: Specify the Site & Secret keys"
+#: admin/settings.php:252
+msgid "Step 2: Specify the Site & Secret keys"
msgstr ""
#. translators:link to help page
-#: admin/settings.php:200
-msgid "To communicate with Google and utilize the reCAPTCHA service you need to get a Site Key and Secret Key. You can obtain these keys for free by registering for your Google reCAPTCHA. Refer to %s if you need help with the process."
+#: admin/settings.php:263
+msgid "To utilize the Google reCAPTCHA service on your website you need to get a Site and Secret key. If you do not have these keys yet, you can option them for free by registering to the Google reCAPTCHA service. Refer to the document %s for a step by step explanation of how to get these keys."
msgstr ""
-#: admin/settings.php:201
+#: admin/settings.php:264
msgid "how to get the Google reCAPTCHA keys"
msgstr ""
-#: admin/settings.php:207
+#: admin/settings.php:270
msgid "Site Key"
msgstr ""
-#: admin/settings.php:212
+#: admin/settings.php:276
msgid "Secret Key"
msgstr ""
-#: admin/settings.php:219
+#: admin/settings.php:284, admin/settings.php:503
msgid "Key Validation"
msgstr ""
-#: admin/settings.php:220
-msgid "Once you enter the Site and Secret keys above the CAPTCHA method will appear below, depending on the method chosen. If the keys are incorrect, there will be an error notice. If you do see an error, check they provided keys match the method and the domain as well."
+#: admin/settings.php:285, admin/settings.php:504
+msgid "Once you enter the correct Site and Secret keys above, the CAPTCHA method you want to use on your website will appear below. If the keys are incorrect you will instead see an error. If you see an error make sure the CAPTCHA version, website domain and both keys match."
msgstr ""
-#: admin/settings.php:228
-msgid "STEP 3 (OPTIONAL): Fine-tune reCAPTCHA to your requirements"
+#: admin/settings.php:293
+msgid "Optional settings: Fine-tune reCAPTCHA to your requirements"
msgstr ""
-#: admin/settings.php:238
+#: admin/settings.php:303
msgid "Use the below settings to configure and fine-tune CAPTCHA to your requirements. All the below settings are optional and with them you can configure different aspects of the CAPTCHA checks on your website, such as look and feel and also sensitivy."
msgstr ""
-#: admin/settings.php:244
+#: admin/settings.php:309
msgid "Captcha Score"
msgstr ""
-#: admin/settings.php:250
+#: admin/settings.php:315
msgid "Use this setting to specify sensitivity of the CAPTCHA check. The closer to 1 the more sensitive the CAPTCHA check will be, which also means more traffic will be marked as spam. This option is only available for reCAPTCHA v3."
msgstr ""
-#: admin/settings.php:253
+#: admin/settings.php:318
msgid "Load CAPTCHA v3 scripts on:"
msgstr ""
-#: admin/settings.php:259
+#: admin/settings.php:324
msgid "All Pages"
msgstr ""
-#: admin/settings.php:260
+#: admin/settings.php:325
msgid "Form Pages"
msgstr ""
-#: admin/settings.php:262
+#: admin/settings.php:327
msgid "By default CAPTCHA only loads on the pages where it is required, mainly forms. However, for V3 you can configure it to load on all pages so it has a better context of the traffic and works more efficiently. The CAPTCHA test will never interrupt users on non-form pages."
msgstr ""
-#: admin/settings.php:265
+#: admin/settings.php:330
msgid "CAPTCHA language"
msgstr ""
-#: admin/settings.php:271
+#: admin/settings.php:336
msgid "Select a language"
msgstr ""
-#: admin/settings.php:282
+#: admin/settings.php:347
msgid "Arabic"
msgstr ""
-#: admin/settings.php:283
+#: admin/settings.php:348
msgid "Bulgarian"
msgstr ""
-#: admin/settings.php:284
+#: admin/settings.php:349
msgid "Catalan"
msgstr ""
-#: admin/settings.php:285
+#: admin/settings.php:350
msgid "Chinese (Simplified)"
msgstr ""
-#: admin/settings.php:286
+#: admin/settings.php:351
msgid "Chinese (Traditional)"
msgstr ""
-#: admin/settings.php:287
+#: admin/settings.php:352
msgid "Croatian"
msgstr ""
-#: admin/settings.php:288
+#: admin/settings.php:353
msgid "Czech"
msgstr ""
-#: admin/settings.php:289
+#: admin/settings.php:354
msgid "Danish"
msgstr ""
-#: admin/settings.php:290
+#: admin/settings.php:355
msgid "Dutch"
msgstr ""
-#: admin/settings.php:291
+#: admin/settings.php:356
msgid "English (UK)"
msgstr ""
-#: admin/settings.php:292
+#: admin/settings.php:357
msgid "English (US)"
msgstr ""
-#: admin/settings.php:293
+#: admin/settings.php:358
msgid "Filipino"
msgstr ""
-#: admin/settings.php:294
+#: admin/settings.php:359
msgid "Finnish"
msgstr ""
-#: admin/settings.php:295
+#: admin/settings.php:360
msgid "French"
msgstr ""
-#: admin/settings.php:296
+#: admin/settings.php:361
msgid "French (Canadian)"
msgstr ""
-#: admin/settings.php:297
+#: admin/settings.php:362
msgid "German"
msgstr ""
-#: admin/settings.php:298
+#: admin/settings.php:363
msgid "German (Austria)"
msgstr ""
-#: admin/settings.php:299
+#: admin/settings.php:364
msgid "German (Switzerland)"
msgstr ""
-#: admin/settings.php:300
+#: admin/settings.php:365
msgid "Greek"
msgstr ""
-#: admin/settings.php:301
+#: admin/settings.php:366
msgid "Hebrew"
msgstr ""
-#: admin/settings.php:302
+#: admin/settings.php:367
msgid "Hindi"
msgstr ""
-#: admin/settings.php:303
+#: admin/settings.php:368
msgid "Hungarain"
msgstr ""
-#: admin/settings.php:304
+#: admin/settings.php:369
msgid "Indonesian"
msgstr ""
-#: admin/settings.php:305
+#: admin/settings.php:370
msgid "Italian"
msgstr ""
-#: admin/settings.php:306
+#: admin/settings.php:371
msgid "Japanese"
msgstr ""
-#: admin/settings.php:307
+#: admin/settings.php:372
msgid "Korean"
msgstr ""
-#: admin/settings.php:308
+#: admin/settings.php:373
msgid "Latvian"
msgstr ""
-#: admin/settings.php:309
+#: admin/settings.php:374
msgid "Lithuanian"
msgstr ""
-#: admin/settings.php:310
+#: admin/settings.php:375
msgid "Norwegian"
msgstr ""
-#: admin/settings.php:311
+#: admin/settings.php:376
msgid "Persian"
msgstr ""
-#: admin/settings.php:312
+#: admin/settings.php:377
msgid "Polish"
msgstr ""
-#: admin/settings.php:313
+#: admin/settings.php:378
msgid "Portuguese"
msgstr ""
-#: admin/settings.php:314
+#: admin/settings.php:379
msgid "Portuguese (Brazil)"
msgstr ""
-#: admin/settings.php:315
+#: admin/settings.php:380
msgid "Portuguese (Portugal)"
msgstr ""
-#: admin/settings.php:316
+#: admin/settings.php:381
msgid "Romanian"
msgstr ""
-#: admin/settings.php:317
+#: admin/settings.php:382
msgid "Russian"
msgstr ""
-#: admin/settings.php:318
+#: admin/settings.php:383
msgid "Serbian"
msgstr ""
-#: admin/settings.php:319
+#: admin/settings.php:384
msgid "Slovak"
msgstr ""
-#: admin/settings.php:320
+#: admin/settings.php:385
msgid "Slovenian"
msgstr ""
-#: admin/settings.php:321
+#: admin/settings.php:386
msgid "Spanish"
msgstr ""
-#: admin/settings.php:322
+#: admin/settings.php:387
msgid "Spanish (Latin America)"
msgstr ""
-#: admin/settings.php:323
+#: admin/settings.php:388
msgid "Swedish"
msgstr ""
-#: admin/settings.php:324
+#: admin/settings.php:389
msgid "Thai"
msgstr ""
-#: admin/settings.php:325
+#: admin/settings.php:390
msgid "Turkish"
msgstr ""
-#: admin/settings.php:326
+#: admin/settings.php:391
msgid "Ukrainian"
msgstr ""
-#: admin/settings.php:327
+#: admin/settings.php:392
msgid "Vietnamese"
msgstr ""
-#: admin/settings.php:331
+#: admin/settings.php:396
msgid "Error message"
msgstr ""
-#: admin/settings.php:333
+#: admin/settings.php:398
msgid "Please solve the CAPTCHA to proceed"
msgstr ""
-#: admin/settings.php:334
+#: admin/settings.php:399
msgid "Specify the message you want to show users who do not complete the CAPTCHA."
msgstr ""
-#: admin/settings.php:337
+#: admin/settings.php:402
msgid "Theme"
msgstr ""
-#: admin/settings.php:343
+#: admin/settings.php:408
msgid "Light"
msgstr ""
-#: admin/settings.php:344
+#: admin/settings.php:409
msgid "Dark"
msgstr ""
-#: admin/settings.php:348
+#: admin/settings.php:413
msgid "Size"
msgstr ""
-#: admin/settings.php:354
+#: admin/settings.php:419
msgid "Normal"
msgstr ""
-#: admin/settings.php:355
+#: admin/settings.php:420
msgid "Compact"
msgstr ""
-#: admin/settings.php:359, admin/settings.php:372
+#: admin/settings.php:424, admin/settings.php:437
msgid "Badge"
msgstr ""
-#: admin/settings.php:365, admin/settings.php:378
+#: admin/settings.php:430, admin/settings.php:443
msgid "Bottom Right"
msgstr ""
-#: admin/settings.php:366, admin/settings.php:379
+#: admin/settings.php:431, admin/settings.php:444
msgid "Bottom Left"
msgstr ""
-#: admin/settings.php:367
+#: admin/settings.php:432
msgid "Inline"
msgstr ""
-#: admin/settings.php:369
+#: admin/settings.php:434
msgid "Badge shows for invisible captcha"
msgstr ""
-#: admin/settings.php:381
+#: admin/settings.php:446
msgid "Badge shows for invisible captcha v3"
msgstr ""
-#: admin/settings.php:384
+#: admin/settings.php:449
msgid "reCAPTCHA domain"
msgstr ""
-#: admin/settings.php:394
+#: admin/settings.php:459
msgid "Use this setting to change the domain if Google is not accessible or blocked."
msgstr ""
-#: admin/settings.php:397
+#: admin/settings.php:462
msgid "Remove CSS"
msgstr ""
-#: admin/settings.php:401
+#: admin/settings.php:466
msgid "Remove this plugin's css from login page?"
msgstr ""
-#: admin/settings.php:402
+#: admin/settings.php:467
msgid "This css increase login page width to adjust with Captcha width."
msgstr ""
-#: admin/settings.php:411
+#: admin/settings.php:471
+msgid "v3 failover action:"
+msgstr ""
+
+#: admin/settings.php:477
+msgid "Show a v2 CAPTCHA checkbox"
+msgstr ""
+
+#: admin/settings.php:478
+msgid "Redirect the website visitor to a URL"
+msgstr ""
+
+#: admin/settings.php:479
+msgid "Take no action"
+msgstr ""
+
+#: admin/settings.php:483
+msgid "Redirect URL"
+msgstr ""
+
+#: admin/settings.php:489
+msgid "v2 Site key:"
+msgstr ""
+
+#: admin/settings.php:495
+msgid "v2 Secret key:"
+msgstr ""
+
+#: admin/settings.php:514
msgid "Select where on your website you want to add the CAPTCHA check"
msgstr ""
-#: admin/settings.php:424
+#: admin/settings.php:527
msgid "WordPress pages"
msgstr ""
-#: admin/settings.php:429
+#: admin/settings.php:532
msgid "Login form"
msgstr ""
-#: admin/settings.php:430
+#: admin/settings.php:533
msgid "Registration form"
msgstr ""
-#: admin/settings.php:431
+#: admin/settings.php:534
msgid "Reset password form"
msgstr ""
-#: admin/settings.php:432
+#: admin/settings.php:535
msgid "Lost password form"
msgstr ""
-#: admin/settings.php:446, admin/settings.php:980
+#: admin/settings.php:550, admin/settings.php:1100
msgid "Upgrade to Premium"
msgstr ""
-#: admin/settings.php:447
+#: admin/settings.php:551
msgid "Find out more"
msgstr ""
-#: admin/settings.php:450
+#: admin/settings.php:554
msgid "Checkout and login pages on WooCommerce stores"
msgstr ""
-#: admin/settings.php:451
-msgid "Contact Form 7, MailChimp 4 WordPress forms"
+#: admin/settings.php:555
+msgid "Contact Form 7, Gravity Forms, WPForms, MailChimp 4 WordPress forms"
msgstr ""
-#: admin/settings.php:452
+#: admin/settings.php:556
msgid "BuddyPress and bbPress"
msgstr ""
-#: admin/settings.php:453
+#: admin/settings.php:557
msgid "And others"
msgstr ""
#. translators:field type
-#: admin/settings.php:634
+#: admin/settings.php:746
msgid "No hook defined for %s"
msgstr ""
-#: admin/settings.php:734, admin/settings.php:735, admin/settings.php:735, admin/settings.php:755, admin/settings.php:756, admin/settings.php:756, admin/settings.php:840
+#: admin/settings.php:851, admin/settings.php:852, admin/settings.php:852, admin/settings.php:872, admin/settings.php:873, admin/settings.php:873, admin/settings.php:962
msgid "CAPTCHA Configuration"
msgstr ""
-#: admin/settings.php:734, admin/settings.php:755
+#: admin/settings.php:851, admin/settings.php:872
msgid "CAPTCHA 4WP"
msgstr ""
-#: admin/settings.php:736, admin/settings.php:757
+#: admin/settings.php:853, admin/settings.php:874
msgid "CAPTCHA 4WP Settings"
msgstr ""
-#: admin/settings.php:736, admin/settings.php:757
+#: admin/settings.php:853, admin/settings.php:874
msgid "Settings & Placements"
msgstr ""
-#: admin/settings.php:737, admin/settings.php:737, admin/settings.php:758, admin/settings.php:758
+#: admin/settings.php:854, admin/settings.php:854, admin/settings.php:875, admin/settings.php:875
msgid "Help & Contact Us"
msgstr ""
-#: admin/settings.php:740, admin/settings.php:740, admin/settings.php:761, admin/settings.php:761
+#: admin/settings.php:857, admin/settings.php:857, admin/settings.php:878, admin/settings.php:878
msgid "Premium Features ➤"
msgstr ""
-#: admin/settings.php:816
+#: admin/settings.php:935
msgid "Please supply a valid IP"
msgstr ""
-#: admin/settings.php:817
+#: admin/settings.php:936
msgid "Switching CAPTCHA methods will require your Site Key and Secret key to be replaced, do you wish to proceed?"
msgstr ""
-#: admin/settings.php:818
-msgid "Confirm CAPTCHA method change"
+#: admin/settings.php:937
+msgid "Confirm change of reCAPTCHA integration"
msgstr ""
-#: admin/settings.php:841
-msgid "Configure it now"
+#: admin/settings.php:938
+msgid "Confirm removal of reCAPTCHA integration"
msgstr ""
-#: admin/settings.php:842
-msgid "I'll configure it later"
+#: admin/settings.php:939
+msgid "This will remove the current reCAPTCHA integration, which means all the CAPTCHA checks on your website will stop working. Would you like to proceed?"
msgstr ""
-#: admin/settings.php:854
+#: admin/settings.php:963
+msgid "Configure it now"
+msgstr ""
+
+#: admin/settings.php:976
msgid "CAPTCHA Placements"
msgstr ""
-#: admin/settings.php:852
+#: admin/settings.php:974
msgid "CAPTCHA integration & configuration"
msgstr ""
-#: admin/settings.php:930
+#: admin/settings.php:1051
msgid "The site key that you have entered is invalid. Please try again."
msgstr ""
-#: admin/settings.php:933
+#: admin/settings.php:1054
msgid "The secret key that you have entered is invalid. Please try again."
msgstr ""
-#: admin/settings.php:936
-msgid "Captcha settings"
+#: admin/settings.php:1057
+msgid "CAPTCHA settings"
msgstr ""
-#: admin/settings.php:938
-msgid "Captcha configuration"
+#: admin/settings.php:1059
+msgid "CAPTCHA configuration"
msgstr ""
-#: admin/settings.php:940
+#: admin/settings.php:1061
msgid " updated"
msgstr ""
-#: admin/settings.php:962
+#: admin/settings.php:1083
msgid "Upgrade to Premium for:"
msgstr ""
-#: admin/settings.php:967
+#: admin/settings.php:1088
msgid "Use the language that your website viewers understand"
msgstr ""
-#: admin/settings.php:968
+#: admin/settings.php:1089
msgid "Spam protection for your WooCommerce stores"
msgstr ""
-#: admin/settings.php:969
+#: admin/settings.php:1090
msgid "Specify where to put the CAPTCHA test on WooCommerce checkout page"
msgstr ""
-#: admin/settings.php:970
-msgid "One-click Contact Form 7 forms spam protection"
-msgstr ""
-
-#: admin/settings.php:971
-msgid "One-click spam protection for Mailchimp for WordPress forms"
+#: admin/settings.php:1091
+msgid "One-click spam protection for forms built with Contact Form 7, Gravity Forms, WPForms & MailChimp for WordPress"
msgstr ""
-#: admin/settings.php:972
+#: admin/settings.php:1092
msgid "CAPTCHA tests & spam protection for BuddyPress, bbPress & other third party plugins"
msgstr ""
-#: admin/settings.php:973
+#: admin/settings.php:1093
msgid "Add CAPTCHA to any type of form, even PHP forms"
msgstr ""
-#: admin/settings.php:974
+#: admin/settings.php:1094
msgid "Boost login security, add CAPTCHA tests only failed logins"
msgstr ""
-#: admin/settings.php:975
+#: admin/settings.php:1095
msgid "Remove CAPTCHA for logged in users"
msgstr ""
-#: admin/settings.php:976
+#: admin/settings.php:1096
msgid "Remove CAPTCHA for specific IP addresses"
msgstr ""
-#: admin/settings.php:977
+#: admin/settings.php:1097
msgid "Remove CAPTCHA from specific URLs"
msgstr ""
-#: admin/settings.php:978
+#: admin/settings.php:1098
msgid "No Ads!"
msgstr ""
-#: admin/settings.php:980
-msgid "Get a FREE 7-day trial"
+#: admin/settings.php:1100
+msgid "Get a FREE 14-day trial"
msgstr ""
-#: admin/settings.php:1036
+#: admin/settings.php:1156
msgid "Settings"
msgstr ""
+#: admin/settings.php:1254
+msgid "Getting started with the CAPTCHA 4WP plugin"
+msgstr ""
+
+#: admin/settings.php:1255
+msgid "Thank you for installing the CAPTCHA 4WP plugin. This wizard will help you get started with the plugin so you can configure CAPTCHA and protect your website from spam, and fake registrations and orders."
+msgstr ""
+
+#: admin/settings.php:1258, admin/settings.php:1274, admin/settings.php:1288, admin/settings.php:1308
+msgid "Cancel"
+msgstr ""
+
+#: admin/settings.php:1261, admin/settings.php:1287, admin/settings.php:1307
+msgid "Back"
+msgstr ""
+
+#: admin/settings.php:1292
+msgid "Step 3: Configure a failover action for reCAPTCHA v3 failure"
+msgstr ""
+
+#: admin/settings.php:1293
+msgid "reCAPTCHA v3 is fully automated. This means that by default, if the CAPTCHA check fails the website visitor cannot proceed with what they are doing unless you configure a failover action. Use the below setting to configure the failover action."
+msgstr ""
+
+#: admin/settings.php:1296
+msgid "Please specify the full URL, including the protocol (HTTP or HTTPS) where you would like the user to be redirected to. For example: "
+msgstr ""
+
+#: admin/settings.php:1297
+msgid "To show the v2 reCAPTCHA checkbox you need to specify the Site and Secret keys. Please specify them below:"
+msgstr ""
+
+#: admin/settings.php:1312
+msgid " All done - you can now add CAPTCHA checks to your website"
+msgstr ""
+
+#: admin/settings.php:1313
+msgid "Now that the Google reCAPTCHA service is fully integrated you can use the optional settings to fine-tune CAPTCHA to your requirements. All the CAPTCHA settings are optional and with them you can configure aspects such as look and feel and CAPTCHA sensitivity. When you are ready navigate to the Settings & Placements page to configure where you'd like to add the CAPTCHA checks"
+msgstr ""
+
+#: admin/settings.php:1315
+msgid "Finish"
+msgstr ""
+
+#: admin/settings.php:1369
+msgid "Configure Google reCAPTCHA integration"
+msgstr ""
+
+#: admin/settings.php:1337
+msgid "Remove reCAPTCHA integration"
+msgstr ""
+
+#: admin/settings.php:1347
+msgid "CAPTCHA version:"
+msgstr ""
+
+#: admin/settings.php:1348, admin/settings.php:1353
+msgid "Site key:"
+msgstr ""
+
+#: admin/settings.php:1349, admin/settings.php:1354
+msgid "Secret key:"
+msgstr ""
+
+#: admin/settings.php:1356, admin/settings.php:1352
+msgid "Failover action:"
+msgstr ""
+
+#: admin/settings.php:1356
+msgid "Redirect to a URL"
+msgstr ""
+
+#: admin/settings.php:1357
+msgid "Failover redirect URL:"
+msgstr ""
+
+#: admin/settings.php:1352
+msgid "v2 checkbox"
+msgstr ""
+
+#: admin/settings.php:1410
+msgid "Override validation response."
+msgstr ""
+
+#: admin/settings.php:1416
+msgid "Do no override"
+msgstr ""
+
+#: admin/settings.php:1417
+msgid "Return false (failure)"
+msgstr ""
+
+#: admin/settings.php:1418
+msgid "Return true (pass)"
+msgstr ""
+
#: admin/templates/help/help.php:20
msgid "Getting Started"
msgstr ""
diff --git a/languages/index.php b/languages/index.php
new file mode 100644
index 0000000..e94d9a4
--- /dev/null
+++ b/languages/index.php
@@ -0,0 +1,4 @@
+THE MOST POWERFUL & EASY TO USE CAPTCHA SOLUTION FOR WORDPRESS WEBSITES
-Add CAPTCHA to any form on your WordPress website. Protect the WordPress comments, login, lost password and user registration forms with CAPTCHA. With CAPTCHA 4WP you can also add CAPTCHA to forms created with Contact Form 7, Gravity Forms, MailChimp for WordPress, BuddyPress, WooCommerce, bbPress and many others.
+Add CAPTCHA to forms on your WordPress website. Protect the WordPress website and e-commerce store from spam comments, automated login attacks, fake registrations and fake orders with CAPTCHA.
CAPTCHA 4WP is very easy to us, allowing you to implement CAPTCHA to any built-in WordPress form easily. With the Premium edition you can also add CAPTCHA checks to WooCommerce checkout pages and other forms within just minutes.
-With the free edition you can add CAPTCHA to the built-in forms in WordPress, such as the login and comments forms. To add CAPTCHA to forms by third party plugins, such as WooCommerce, Contact Form 7 and BuddyPress [upgrade to CAPTCHA 4WP Premium](https://www.wpwhitesecurity.com/wordpress-plugins/captcha-plugin-wordpress/pricing/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=C4WP&utm_content=plugin+repos+description).
+The plugin is trusted by more than 200,000 administrators to protect their websites from spam, fake accounts, & fake orders!
+
+> With the free edition you can add CAPTCHA to the built-in WordPress forms; the login page, registration form, comments, reset and lost password forms. To add CAPTCHA to forms created with third party plugins such as WooCommerce, Contact Form 7, Gravity Forms, and BuddyPress [upgrade to CAPTCHA 4WP Premium](https://www.wpwhitesecurity.com/wordpress-plugins/captcha-plugin-wordpress/pricing/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=C4WP&utm_content=plugin+repos+description).
+>
#### Maintained & Supported by WP White Security
@@ -107,6 +110,40 @@ Simply select the WooCommerce page you want to add CAPTCHA to in the plugin's CA
== Changelog ==
+= 7.2.0 (20230427) =
+
+Release notes: [CAPTCHA 4WP 7.2.0 - Failover for V3 and much more!](https://www.wpwhitesecurity.com/c4wp-7-2-0/)
+
+* **New features & functionality**
+ * CAPTCHA failure fallback system: V3 now has a fallback option when the initial check fails: choose between redirecting to another page or show a V2 "I am not a robot checkbox".
+ * First time install wizard to guide users through setting up the Google reCAPTCHA etc.
+ * Google reCAPTCHA configuration shown in the UI / plugin settings.
+ * Wizard to assinst user changing the reCAPTCHA configuration.
+ * Google reCAPTCHA keys validation - all keys are validated within the admin area to ensure the correct details have been provided.
+ * New WPML config file for WPML support (translations).
+ * Support for WooCommerce HPOS so user can activate the feature without hinderance.
+
+* **Improvements**
+ * WooCommerce support - improved overall form handling to ensure less friction with 3rd party scripts.
+ * In WPForms editor the plugin's message is shown in the correct place when editing posts via Gutenberg.
+ * V2 Checkbox - The field now resets itself should it expire due to lack to user input.
+ * Improved performance and compatibility of custom JS in BuddyPress.
+ * Core JS is now written in plain Javascript for Improved performance and compatibility.
+ * Overall coding standards improvements
+ * UI Improvements to the ‘excluded IP’ and ‘excluded users’ fields in the plugin settings.
+ * Improved plugin's help and UI text for improved ease of use.
+ * Moved the Captcha preview within the configuration popup in the plugin settings.
+ * Removed any use of depreciated JS function ‘jQuery.fn.load’.
+
+* **Bug fixes**
+ * CF7 + V2 Invisible - Fixed issue causing mail sent confirmation to be removed on submission.
+ * BuddyPress + V3 - Fixed issue causing user registration for to return console errors
+ * WPForms + V3 - Fixed issue causing ‘please solve captcha’ message to still appear on valid submissions.
+ * Improved compatibility with WP comment systems which do not use jQuery.
+ * Multisite - Removed link to settings page where needed.
+ * Fixed bug in Settings which would cause removed IP address and users to re-appear on refresh.
+ * Fixed issue in ‘hide for IP’ setting which can occur when multiple IDs are present.
+
= 7.1.1 (20220818) =
* **New features**
@@ -157,10 +194,12 @@ Release notes: [Support for WPForms & Gravity Forms plugins](https://www.wpwhite
* Ensure correct default language is set during update in free edition.
* Ensure verification does not hinder hook requests where no CAPTCHA is posted.
-= 7.0.6 (20220315) =
+= 7.0.6 (20220304) =
-* **New features & functionality**
- * A new setting that allows you to enable CAPTCHA on WooCommerce logins whilst disabling it on the checkout login form.
+Release notes: [CAPTCHA 4WP 7.0.6 Free Edition](https://www.wpwhitesecurity.com/c4wp-free-7-0-6/)
+
+* **Breaking change**
+ * CAPTCHA on forms creatd with third party plugins available through the Premium. [Get a free 7-day trial](https://www.wpwhitesecurity.com/wordpress-plugins/captcha-plugin-wordpress/plugin-trial/).
Release notes: [CAPTCHA 4WP 7.0.6 Free Edition](https://www.wpwhitesecurity.com/c4wp-free-7-0-6/)
diff --git a/wpml-config.xml b/wpml-config.xml
new file mode 100644
index 0000000..63dad64
--- /dev/null
+++ b/wpml-config.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file