Return to Snippet

Revision: 50411
at August 19, 2011 23:18 by silentpro


Updated Code
/* CUSTOM PASSWORD FORM */
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">
	' . __( "CUSTOM MESAGE TO CUSTOMERS HERE" ) . '
	<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;
}

Revision: 50410
at August 19, 2011 23:11 by silentpro


Initial Code
/* CUSTOM PASSWORD FORM */
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">
	' . __( "CUSTOM MESAGE TO CUSTOMERS HERE" ) . '
	<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;
}

Initial URL

                                

Initial Description
WP Functions

Initial Title
Wordpress - Custom Password Form

Initial Tags
form, login, php, textmate, wordpress, customer

Initial Language
PHP