Return to Snippet

Revision: 47275
at June 4, 2011 02:07 by uteman23


Initial Code
if ( !class_exists('wp_mail_from') ) {
	class wp_mail_from {
		function wp_mail_from() {
			add_filter( 'wp_mail_from', array(&$this, 'fb_mail_from') );
			add_filter( 'wp_mail_from_name', array(&$this, 'fb_mail_from_name') );
		}
		// new name
		function fb_mail_from_name() {
			$name = 'Put the Name Here';
			// alternative the name of the blog
			// $name = get_option('blogname');
			$name = esc_attr($name);
			return $name;
		}
		// new email-adress
		function fb_mail_from() {
			$email = '[email protected]';
			$email = is_email($email);
			return $email;
		}
	}
	$wp_mail_from = new wp_mail_from();
	}

Initial URL

                                

Initial Description

                                

Initial Title
Change Default WordPress 'From' Field in Emails

Initial Tags
email, wordpress

Initial Language
PHP