Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling 4.2 Support outputs invalid html #74

Open
Patabugen opened this issue Jan 16, 2017 · 0 comments
Open

Enabling 4.2 Support outputs invalid html #74

Patabugen opened this issue Jan 16, 2017 · 0 comments

Comments

@Patabugen
Copy link

If I enable WP 4.2 support in the comments the plugin outputs a <div class="g-recaptcha"> inside a <p class="form-submit"> - which isn't valid code and breaks styles when the browser pops it out.

I'm working around it by replacing the comments_form defaults and making .form-submit a div instead of a p

/* The Recaptcha plugin injects a div into the form-submit <p> - but a div cannot be inside a P
 so it all falls apart style wise. Make the form-submit into a div instead of a p */
function wpdocs_comment_form_defaults( $defaults ) {
  $defaults['submit_field'] = '<div class="form-submit">%1$s %2$s</div>';
  return $defaults;
}
add_filter( 'comment_form_defaults', 'wpdocs_comment_form_defaults' );

it's be better if we could output the recaptcha as it's own field - rather than injecting it inside the wrapper for the submit field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant