Filename: gw-compact-recaptcha.php
gw-compact-recaptcha.php
<?php /** * Gravity Wiz // Gravity Forms // Update reCAPTCHA widget to use "compact" mode. * https://gravitywiz.com/ */ // Update "123" to your form ID and "4" to your reCAPTCHA field ID. add_filter( 'gform_field_content_123_4', function( $field_content ) { $search = 'data-theme='; $replace = sprintf( 'data-size=\'compact\' \0', $field_content ); $field_content = preg_replace( "/$search/", $replace, $field_content, 1 ); return $field_content; } );
Your email address will not be published. Required fields are marked *
Comment *
Notify me of followup comments via e-mail
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.
Δ