Introduced in Version 11, this filter allows adjustments to be made to the display of the ReCaptcha form element if needed.
function align_captcha_left( $element, $site_key, $shortcode_args ) {
// Below code amends badge to compact size of form is from Widget
if ( 'true' === $shortcode_args['widget'] ) {
$element = str_replace( 'data-sitekey=', 'data-size="compact" data-sitekey=', $element );
}
return $element;
}
add_filter( 's2_captcha_element', 'align_captcha_left', 10, 3 );