Captcha no longer displayed because it supports a name attribute
-
Seems like the shortcode for this plugin supports having a name attribute (see code below).
Apparently, from the newest CF7 version onwards (5.7.3), which included some “fixes”, if you support a name, it has to be given. So you would have to use this:
[cf7ic some-dumb-name-here]
instead of[cf7ic]
The solution in my mind is to stop supporting a name because why would you? It apparently only breaks stuff, there comes no good from it, right?
contact-form-7-image-captcha/cf7-image-captcha.php
line 57function add_shortcode_cf7ic() { wpcf7_add_form_tag( 'cf7ic', 'call_cf7ic', true ); <-------- Here, remove the third parameter. }
contact-form-7/includes/form-tags-manager.php
line 105public function add( $tag_types, $callback, $features = '' ) { if ( ! is_callable( $callback ) ) { return; } if ( true === $features ) { // for back-compat $features = array( 'name-attr' => true ); } $features = wp_parse_args( $features, array() ); $tag_types = array_filter( array_unique( (array) $tag_types ) ); foreach ( $tag_types as $tag_type ) { $tag_type = $this->sanitize_tag_type( $tag_type ); if ( ! $this->tag_type_exists( $tag_type ) ) { $this->tag_types[$tag_type] = array( 'function' => $callback, 'features' => $features, ); } } }
- The topic ‘Captcha no longer displayed because it supports a name attribute’ is closed to new replies.