14341 shaares
207 liens privés
207 liens privés
312 résultats
taggé
wordpress
pour supprimer le mouchard
stats.wp.com
Just add the following filter to your plugin or child theme:
/**
- Filter CF7 form.
- @param string $form CF7 form.
-
@return string
*/
function my_wpcf7_form_elements( $form ) {
if ( false === strpos( $form, 'some unique string' ) ) {
$form = preg_replace( '#<span class="wpcf7-form-control-wrap hcap_cf7-h-captcha-invalid">.+?<input type="hidden" name="_wp_http_referer".+?/>#s', '', $form );
}return $form;
}
add_filter( 'wpcf7_form_elements', 'my_wpcf7_form_elements', 20 );`
It removes hCaptcha from any form in which cannot be found some unique string (‘some unique string’ in the example).