419functiontwenty_twenty_one_password_form($output,$post=0){420$post=get_post($post);421$label='pwbox-'.(empty($post->ID)?wp_rand():$post->ID);422$output='<p class="post-password-message">'.esc_html__('This content is password protected. Please enter a password to view.','twentytwentyone').'</p>423 <form action="'.esc_url(site_url('wp-login.php?action=postpass','login_post')).'" class="post-password-form" method="post">424 <label class="post-password-form__label" for="'.esc_attr($label).'">'.esc_html_x('Password','Post password form','twentytwentyone').'</label><input class="post-password-form__input" name="post_password" id="'.esc_attr($label).'" type="password" spellcheck="false" size="20" /><input type="submit" class="post-password-form__submit" name="'.esc_attr_x('Submit','Post password form','twentytwentyone').'" value="'.esc_attr_x('Enter','Post password form','twentytwentyone').'" /></form>425 ';426return$output;427}
History
Introduced in Twenty Twenty-One 1.4 Corrected parameter name for <code>$output</code>, added the <code>$post</code> parameter.. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
Twenty Twenty-One 1.4 Corrected parameter name for <code>$output</code>, added the <code>$post</code> parameter.
Twenty Twenty-One 1.4 Corrected parameter name for $output, added the $post parameter.from the docblock
Twenty Twenty-One 1.0
Twenty Twenty-One 1.0from the docblock
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-content/themes/twentytwentyone/inc/template-functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.