Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'the_password_form', 'custom_password_form' );
- function custom_password_form() {
- global $post;
- $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
- $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post">
- ' . __( "This post is password protected. More than likely it is password protected because it is a free gift for people who subscribe to my newsletter. <a href=\"#newslettersubscribe\">newsletter</a>") . '
- <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
- </form>
- ';
- return $o;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement