Created
November 30, 2012 14:43
-
-
Save claudiosanches/4176176 to your computer and use it in GitHub Desktop.
Wordpress - Custom mail settings
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
<?php | |
/** | |
* Custom Mail from name | |
* | |
* @param string $name Old from name. | |
* | |
* @return string New from name. | |
*/ | |
function cs_custom_mail_from_name( $name ) { | |
return 'Nome do jovem ou do blog'; | |
} | |
add_filter(' wp_mail_from_name', 'cs_custom_mail_from_name' ); | |
/** | |
* Custom mail from | |
* | |
* @param string $email Old mail from. | |
* | |
* @return string New mail from. | |
*/ | |
function cs_custom_mail_from( $email ) { | |
// É extretamente importante usar um e-mail que use o seu domínio! | |
// Com certeza se não tiver o seu domínio vai cair em spam antes de chegar na sua caixa postal! | |
return '[email protected]'; | |
} | |
add_filter( 'wp_mail_from', 'cs_custom_mail_from' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment