[wp-trac] [WordPress Trac] #18729: No HTML Classes/IDs Associated With get_the_password_form() Output
WordPress Trac
wp-trac at lists.automattic.com
Sat Sep 24 17:51:51 UTC 2011
#18729: No HTML Classes/IDs Associated With get_the_password_form() Output
-----------------------------------+------------------------------
Reporter: philiparthurmoore | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.2.1
Severity: normal | Resolution:
Keywords: westi-likes has-patch |
-----------------------------------+------------------------------
Comment (by azaozz):
Looking at get_the_password_form.patch we won't need 3 classes to style 3
elements. A `post-password-form` class on the <form> is enough. Also we
don't need a randomized ID for both <label> and <input type="password" />
as the label surrounds the input field.
So it would look like this:
{{{
$output = '<form action="' . get_option('siteurl') . '/wp-pass.php" class
="post-password-form" method="post">
<p>' . __("This post is password protected. To view it please enter your
password below:") . '</p>
<p><label>' . __("Password:") . ' <input name="post_password"
type="password" size="20" /></label>
<input type="submit" name="Submit" value="' . esc_attr__("Submit") . '"
/></p>';
}}}
All of the above HTML can be styled with `.post-password-form p`, `.post-
password-form label input` and even `.post-password-form
input[type="submit"]` if needed.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18729#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list