Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_password_form

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1221  */
1222 function get_the_password_form() {
1223      $post = get_post();
1224      $label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID );
1225      $output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
1226      <p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
1227      <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>
1228 </form>
1229      ';
1230      return apply_filters('the_password_form', $output);
1231 }
1232
1233 /**
1234  * Whether currently in a page template.
1235  *
1236  * This template tag allows you to determine if you are in a page template.
1237  * You can optionally provide a template name and then the check will be
1238  * specific to that template.
1239  *