function get_the_password_form() {}

Retrieve protected post password form content.

Return values

returns:HTML content for password form for password protected post.

Defined filters

  • the_password_form
    apply_filters('the_password_form', $output)

Source code

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>



	return apply_filters('the_password_form', $output);



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: