Plugin Directory

Changeset 3262726


Ignore:
Timestamp:
03/27/2025 10:20:43 AM (12 months ago)
Author:
munyagu
Message:

Fix determining if a form has been inserted.

Location:
contact-form-7-freebie/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • contact-form-7-freebie/trunk/contact-form-7-freebie.php

    r2515279 r3262726  
    55Plugin URI: http://munyagu.com/contact-form-7-freebie/
    66Description: Add a little functionality to the Contact Form 7
    7 Version: 1.1.6
     7Version: 1.1.7
    88Author: munyagu
    99Author URI: http://munyagu.com/
  • contact-form-7-freebie/trunk/inc/ContactForm7ReCaptcha.php

    r2450337 r3262726  
    33class ContactForm7ReCaptcha {
    44
    5     const pattern = '/form.+?id=\"wpcf7\-/';
     5    const pattern = '/input.+?name=\"_wpcf7"/';
    66
    77    public static function init() {
    88
    99        add_action( 'wp_head', array( __CLASS__, 'wp_head' ) );
    10         add_action( 'wp_footer', array( __CLASS__, 'wp_footer' ) );
     10        add_action( 'wp_footer', array( __CLASS__, 'wp_footer' ), 999 );
    1111
    1212    }
     
    4343                    var logo = mutation.addedNodes[0].firstChild;
    4444                    if( null !== logo && 'grecaptcha-badge' === logo.className ) {
    45                         logo.className = 'grecaptcha-badge grecaptcha-hide';
     45                        logo.classList.add('grecaptcha-hide');
    4646                        observer.disconnect();
    4747                    }
     
    6363        if( class_exists( 'WPCF7_RECAPTCHA' ) ) {
    6464            $service   = WPCF7_RECAPTCHA::get_instance();
    65             $recaptcha = get_option( ContactForm7Freebie::$f_field_remove_recaptcha_badge );
     65            $hide_recaptcha = get_option( ContactForm7Freebie::$f_field_remove_recaptcha_badge );
    6666
    67             return $service->is_active() && '1' === $recaptcha;
     67            return $service->is_active() && '1' === $hide_recaptcha;
    6868        } else {
    6969            return false;
    7070        }
    71 
    7271    }
    7372
  • contact-form-7-freebie/trunk/readme.txt

    r2825007 r3262726  
    11=== Freebie for Contact Form 7 ===
    22Contributors: munyagu
    3 Donate link: https://munyagu.com/donate/
    43Tags: form
    54Requires at least: 4.9
    6 Tested up to: 6.1.1
    7 Stable tag: 1.1.6
     5Tested up to: 6.7.2
     6Stable tag: 1.1.7
    87License: GPLv2 or later
    98License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    3332== Changelog ==
    3433
     34= 1.1.7 =
     35Fix determining if a form has been inserted.
     36
    3537= 1.1.6 =
    3638Change plugin name.
     
    5557Add Hide reCaptcha badge except in forms.
    5658
    57 
    5859= 1.0.0 =
    5960First release.
Note: See TracChangeset for help on using the changeset viewer.