Created
February 7, 2012 00:00
-
-
Save adapicom/1756025 to your computer and use it in GitHub Desktop.
Add placeholder capabilities to Contact7 WP Plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add the following code into text.php and textarea.php just above the line that says | |
//if ( wpcf7_script_is() && $value && preg_grep( '%^watermark$%', $options ) ) {): | |
$ph_att = ''; | |
if ( $value && preg_grep( '%^placeholder$%', $options ) ) { | |
$ph_att .= sprintf( ' %s', $value ); | |
$value = ''; | |
} | |
if ( $ph_att ) | |
$atts .= sprintf( ' placeholder="%s"', trim( esc_attr( $ph_att ) ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks to @pryley
http://wordpress.org/support/topic/plugin-contact-form-7-placeholder-for-html5