Posted By

silentpro on 08/19/11


Tagged

form login php textmate password wordpress functions wp custom customer


Versions (?)

Wordpress - Custom Password Form


 / Published in: PHP
 

WP Functions

  1. /* CUSTOM PASSWORD FORM */
  2. add_filter( 'the_password_form', 'custom_password_form' );
  3. function custom_password_form() {
  4. global $post;
  5. $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
  6. $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post">
  7. ' . __( "CUSTOM MESAGE TO CUSTOMERS HERE" ) . '
  8. <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
  9. </form>
  10. ';
  11. return $o;
  12. }

Report this snippet  

You need to login to post a comment.