To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN
(without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 972 | * Retrieve protected post password form content. |
| 973 | * |
| 974 | * @since 1.0.0 |
| 975 | * @uses apply_filters() Calls 'the_password_form' filter on output. |
| 976 | * |
| 977 | * @return string HTML content for password form for password protected post. |
| 978 | */ |
| 979 | function get_the_password_form() { |
| 980 | global $post; |
| 981 | $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID); |
| 982 | $output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post"> |
| 983 | <p>' . __("This post is password protected. To view it please enter your password below:") . '</p> |
| 984 | <p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . __("Submit") . '" /></p> |
| 985 | </form> |
| 986 | '; |
| 987 | return apply_filters('the_password_form', $output); |
| 988 | } |
| 989 | |
| 990 | /** |
| 991 | * Whether currently in a page template. |
| 992 | * |
| 993 | * This template tag allows you to determine whether or not you are in a page |
| 994 | * template. You can optional provide a template name and then the check will be |
| 995 | * specific to that template. |
| 996 | * |
| 997 | * @since 2.5.0 |
| 998 | * @uses $wp_query |
| 999 | * |
| 1000 | * @param string $template The specific template name if specific matching is required. |
| 1001 | * @return bool False on failure, true if success. |
| 1002 | */ |