diff --git a/admin/settings.php b/admin/settings.php index 290923a..8c8891e 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -324,8 +324,26 @@ public function get_fields() { 'all_pages' => esc_html__( 'All Pages', 'advanced-nocaptcha-recaptcha' ), 'form_pages' => esc_html__( 'Form Pages', 'advanced-nocaptcha-recaptcha' ), ), - 'desc' => esc_html__( '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.', 'advanced-nocaptcha-recaptcha' ), + 'desc' => sprintf( + __( 'By default the CAPTCHA service only learns about how users interact with your website via the scripts loaded on the form pages. However, for V3 you can configure it to load on all pages so it can learn and has a better context of the traffic so it can better determine what is spam and not. When CAPTCHA is configured to load on all pages will never interrupt users on non-form pages. Note that the CAPTCHA check still has to be included in the form(s). Refer to the %1$s for more information on how to add the CAPTCHA checks to your forms.', 'advanced-nocaptcha-recaptcha' ), + sprintf( + '' . esc_html__( 'CAPTCHA 4WP knowledge base', 'advanced-nocaptcha-recaptcha' ) . '' + ) + ) ), + // 'v3_script_async' => array( + // 'label' => esc_html__( 'Load 3 scripts asynchronously:', 'advanced-nocaptcha-recaptcha' ), + // 'section_id' => 'google_keys', + // 'type' => 'select', + // 'class' => 'regular toggleable disabled c4wp-show-field-for-v3', + // 'std' => 'all_pages', + // 'options' => array( + // 'no' => esc_html__( 'No', 'advanced-nocaptcha-recaptcha' ), + // 'yes' => esc_html__( 'Yes', 'advanced-nocaptcha-recaptcha' ), + // ), + // 'desc' => esc_html__( 'Use this setting to load v3 scripts asynchronously (default no).', 'advanced-nocaptcha-recaptcha' ), + + // ), 'language_handling' => array( 'label' => esc_html__( 'CAPTCHA language', 'advanced-nocaptcha-recaptcha' ), 'section_id' => 'google_keys', @@ -619,7 +637,7 @@ public function callback( $field, $return = false ) { } if ( ! empty( $field['desc'] ) ) { - printf( '
%s
', esc_html( $field['desc'] ) ); + printf( '%s
', wp_kses_post( $field['desc'] ) ); } switch ( $field['type'] ) { @@ -933,7 +951,7 @@ public function admin_settings() { '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' ), + 'switchingWarning' => esc_html__( 'To switch the reCAPTCHA method you need to replace the current Site and Secret keys. Do you want 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' ), diff --git a/admin/templates/help/system-info.php b/admin/templates/help/system-info.php index c196991..b922653 100644 --- a/admin/templates/help/system-info.php +++ b/admin/templates/help/system-info.php @@ -25,4 +25,30 @@ + diff --git a/advanced-nocaptcha-recaptcha.php b/advanced-nocaptcha-recaptcha.php index 127a094..e135e8b 100644 --- a/advanced-nocaptcha-recaptcha.php +++ b/advanced-nocaptcha-recaptcha.php @@ -8,7 +8,7 @@ * * @wordpress-plugin * Plugin Name: CAPTCHA 4WP - * Version: 7.2.1 + * Version: 7.2.2 * Plugin URI: https://www.wpwhitesecurity.com/wordpress-plugins/captcha-plugin-wordpress/ * Description: Easily add any type of CAPTCHA (such as noCaptcha or invisible Captcha) on any website form, including login pages, comments and password reset forms, and also forms by third party plugins such as Contact Form 7, WooCommerce & BuddyPress. * Author: WP White Security @@ -89,7 +89,7 @@ public static function init() { * @return void */ private function constants() { - define( 'C4WP_PLUGIN_VERSION', '7.2.1' ); + define( 'C4WP_PLUGIN_VERSION', '7.2.2' ); define( 'C4WP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'C4WP_PLUGIN_URL', plugins_url( '/', __FILE__ ) ); define( 'C4WP_PLUGIN_FILE', __FILE__ ); diff --git a/anr-captcha-class.php b/anr-captcha-class.php index 19ec6af..d97d561 100644 --- a/anr-captcha-class.php +++ b/anr-captcha-class.php @@ -487,8 +487,9 @@ public function v3_script() { $position = c4wp_get_option( 'badge_v3', 'bottomright' ); $google_url = apply_filters( 'c4wp_v3_script_api_src', sprintf( 'https://www.%s/recaptcha/api.js?render=' . $site_key . $lang, c4wp_recaptcha_domain() ), $site_key, $lang ); + $asyng_tag = ( 'yes' === c4wp_get_option( 'v3_script_async', 'no' ) ) ? 'async' : ''; ?> - +