Last active
August 29, 2015 14:22
-
-
Save nmedia82/2875ca133caab3c90ddd to your computer and use it in GitHub Desktop.
N-Media Website Contact Form Filters
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
/** | |
** Following filter can be used to change FROM Email When Form is Submitted | |
** Plugin URL: http://najeebmedia.com/wordpress-plugin/wp-contact-form-file-upload/ | |
**/ | |
add_filter('webcontact_from_email', 'set_my_email', 10, 2); | |
/** | |
** @param: | |
** $email - default email | |
** $data - data being submitted by user in associative array | |
**/ | |
function set_my_email( $email, $data ){ | |
return '[email protected]'; | |
} | |
/** | |
** Following filter can be used to change FROM Name When Form is Submitted | |
**/ | |
add_filter('webcontact_from_name', 'set_my_name', 10, 2); | |
/** | |
** @param: | |
** $name - default name | |
** $data - data being submitted by user in associative array | |
**/ | |
function set_my_name( $name, $data ){ | |
return 'Welcome To Arena ' . $data['firstname']; | |
} | |
/** | |
** Following filter can be used to change Email Subject | |
**/ | |
add_filter('webcontact_subject', 'set_subject', 10, 2); | |
/** | |
** @param: | |
** $subject - default subject | |
** $data - data being submitted by user in associative array | |
**/ | |
function set_subject( $subject, $data ){ | |
return 'Hello, ' . $data['firstname']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment