WP hooks navigation: Home/browse • Actions index • Filters index
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 |
|---|---|
| 1245 | */ |
| 1246 | function get_the_password_form( $post = 0 ) { |
| 1247 | $post = get_post( $post ); |
| 1248 | $label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID ); |
| 1249 | $output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post"> |
| 1250 | <p>' . __( 'This content is password protected. To view it please enter your password below:' ) . '</p> |
| 1251 | <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> |
| 1252 | </form> |
| 1253 | '; |
| 1254 | return apply_filters( 'the_password_form', $output ); |
| 1255 | } |
| 1256 | |
| 1257 | /** |
| 1258 | * Whether currently in a page template. |
| 1259 | * |
| 1260 | * This template tag allows you to determine if you are in a page template. |
| 1261 | * You can optionally provide a template name and then the check will be |
| 1262 | * specific to that template. |
| 1263 | * |