Skip to content

Commit

Permalink
7.2.2 Release (#117)
Browse files Browse the repository at this point in the history
* [create-pull-request] automated changes sync

* Correcting readme

* [create-pull-request] automated changes sync

* Update readme.txt

* [create-pull-request] automated changes sync

* Update readme.txt

* [create-pull-request] automated changes sync

* Update readme.txt

* [create-pull-request] automated changes sync

* Update readme.txt

* [create-pull-request] automated changes sync

* Update readme.txt

* [create-pull-request] automated changes sync (#83)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* Correcting readme

* Automated sync from the premium version of the plugin (#84)

* [create-pull-request] automated changes sync

* Correcting readme (removing premium notes)

* Updare readme

* Correct readme

* Update readme from master

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* Automated sync from the premium version of the plugin (#86)

* [create-pull-request] automated changes sync

* Update readme

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* Automated sync from the premium version of the plugin (#88)

* [create-pull-request] automated changes sync

* Correcting readme

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* Automated sync from the premium version of the plugin (#90)

* [create-pull-request] automated changes sync

* Update readme

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* Automated sync from the premium version of the plugin (#92)

* [create-pull-request] automated changes sync

* Correcting readme

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* Automated sync from the premium version of the plugin (#96)

* [create-pull-request] automated changes sync

* Update readme.txt

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#97)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#99)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#100)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#101)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#103)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#104)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#105)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* PHP 7.2

* [create-pull-request] automated changes sync (#108)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* Removing unwanted files

* [create-pull-request] automated changes sync (#113)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#115)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

* [create-pull-request] automated changes sync (#116)

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>

---------

Co-authored-by: DannyWPWS <DannyWPWS@users.noreply.github.com>
Co-authored-by: Robert Abela <robert@wpwhitesecurity.com>
  • Loading branch information
3 people authored Jun 6, 2023
1 parent 75f1e22 commit 22783fc
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 161 deletions.
24 changes: 21 additions & 3 deletions admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'<a href="https://www.wpwhitesecurity.com/support/kb/category/captcha-4wp-plugin-documentation/" target="_blank">' . esc_html__( 'CAPTCHA 4WP knowledge base', 'advanced-nocaptcha-recaptcha' ) . '</a>'
)
)
),
// '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',
Expand Down Expand Up @@ -619,7 +637,7 @@ public function callback( $field, $return = false ) {
}

if ( ! empty( $field['desc'] ) ) {
printf( '<p class="description mb-10">%s</p>', esc_html( $field['desc'] ) );
printf( '<p class="description mb-10">%s</p>', wp_kses_post( $field['desc'] ) );
}

switch ( $field['type'] ) {
Expand Down Expand Up @@ -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' ),
Expand Down
26 changes: 26 additions & 0 deletions admin/templates/help/system-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,30 @@
<?php submit_button( 'Download System Info File', 'primary', 'ppmwp-download-sysinfo', false ); ?>
</p>
</form>
<script>

function download(filename, text) {
// Create temporary element.
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', filename);

// Set the element to not display.
element.style.display = 'none';
document.body.appendChild(element);

// Simlate click on the element.
element.click();

// Remove temporary element.
document.body.removeChild(element);
}
jQuery( document ).ready( function() {
var download_btn = jQuery( '#ppmwp-download-sysinfo' );
download_btn.click( function( event ) {
event.preventDefault();
download( 'mls-system-info.txt', jQuery( '#system-info-textarea' ).val() );
} );
} );
</script>
</div>
4 changes: 2 additions & 2 deletions advanced-nocaptcha-recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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__ );
Expand Down
5 changes: 3 additions & 2 deletions anr-captcha-class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' : '';
?>
<script id="c4wp-recaptcha-js" src="<?php echo esc_url( $google_url ); ?>"></script>
<script <?php echo esc_url( $asyng_tag ); ?> id="c4wp-recaptcha-js" src="<?php echo esc_url( $google_url ); ?>"></script>
<script id="c4wp-inline-js" type="text/javascript">

( function( grecaptcha ) {
Expand Down Expand Up @@ -613,7 +614,7 @@ public function v3_script() {
// We take over the submit event, so fill this hiddne field.
const pass1 = document.querySelector( '#pass1' );
const pass2 = document.querySelector( '#pass2' );
pass2.setAttribute( 'value', pass1.getAttribute('id') );
pass2.setAttribute( 'value', pass1.value );
logSubmit( event, 'reset_pw_form', form );
});
} else if ( form.getAttribute('id') == 'signup-form' && form.parentElement.parentElement.getAttribute('id') == 'buddypress' || form.getAttribute('id') == 'create-group-form' ) {
Expand Down
5 changes: 5 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,9 @@ ul.c4wp-pro-features-ul li.dashicons-yes-alt:before {
max-width: 240px;
display: block;
margin: 0 0 34px;
}

.captcha_keys_required tr:not(disabled) {
opacity: 0.6;
pointer-events: none;
}
Loading

0 comments on commit 22783fc

Please sign in to comment.