[wp-trac] [WordPress Trac] #18729: No HTML Classes/IDs Associated With get_the_password_form() Output
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 21 10:11:35 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 | Keywords:
-------------------------------+-----------------------------
Currently get_the_password_form() outputs a password form that offers no
HTML classes or IDs for proper styling:
{{{
/**
* Retrieve protected post password form content.
*
* @since 1.0.0
* @uses apply_filters() Calls 'the_password_form' filter on output.
*
* @return string HTML content for password form for password protected
post.
*/
function get_the_password_form() {
global $post;
$label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
$output = '<form action="' . get_option('siteurl') . '/wp-
pass.php" method="post">
<p>' . __("This post is password protected. To view it please
enter your password below:") . '</p>
<p><label for="' . $label . '">' . __("Password:") . ' <input
name="post_password" id="' . $label . '" type="password" size="20"
/></label> <input type="submit" name="Submit" value="' .
esc_attr__("Submit") . '" /></p>
</form>
';
return apply_filters('the_password_form', $output);
}
}}}
It would be quite useful to add classes to the form and input elements in
this output so that we can properly style the password form without having
to filter the output in, for example, a theme's functions.php file.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18729>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list