Created
January 11, 2016 04:47
-
-
Save dboutote/e4da16e6041510b9b6f4 to your computer and use it in GitHub Desktop.
Filtering the WordPress email address
This file contains 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 | |
function site_mail_from(){ | |
$admin_email = get_option('admin_email'); | |
return $admin_email; | |
}; | |
add_filter('wp_mail_from', 'site_mail_from'); | |
function site_mail_from_name(){ | |
$site_name = get_bloginfo( 'name' ); | |
return $site_name; | |
}; | |
add_filter('wp_mail_from_name ', 'site_mail_from_name '); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment