Just tried validating a page with WP-Members login form, and found out that the way form is being populated in wpmem_login_form_NEW() (inside wp-members-dialogs.php) messes up the markup, since piece of PHP code like this
$form = '<div id="wpmem_login"> <fieldset> <legend>' . $arr . '</legend> <form action="' . get_permalink() . '" method="POST" class="form"> <div class="signInBoxes"><label for="username">' . $arr . '</label> <div class="div_text">';
ends up looking like this in the markup:
<fieldset> <legend>Existing users Login</legend> <form action="/login" method="POST" class="form"> <div class="signInBoxes"><label for="username">Username</label></p> <div class="div_text">
See the orphan closing
</p>tag? It’s due to WordPress “wpautop”-ing all the stuff going through
the_content, and WP-Members certainly falls into that.
Has it ever been considered to make all forms template-able? As in check the template folder first, and if the file with a certain template name doesn’t exist, then fall back to the default way of form population? I’ve seen plugins do that before (wp-favorite-posts for example). Then we’d be able to easily override that behaviour and avoid the issue altogether.
Thanks for reading. =)
- The topic ‘[Plugin: WP-Members] login form population and wpautop messing with markup’ is closed to new replies.