Skip to content

Instantly share code, notes, and snippets.

@taija
Created October 28, 2015 22:16
Show Gist options
  • Save taija/51fdb6f1afc279398dc6 to your computer and use it in GitHub Desktop.
Save taija/51fdb6f1afc279398dc6 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Email Fixes
Plugin URI: http://www.bellevuecollege.edu
Description: This plugin prevents 'password changed' emails in response to CAS updating data. Workaround for bug introduced in WP 4.3.
Author: Bellevue College Information Technology Services
Version: 1.1
Author URI: http://www.bellevuecollege.edu
*/
add_filter('send_password_change_email', '__return_false');
/**
* Since the install of WP-Mail-SMTP we need to make sure the FROM is the same as the one specified in the plugin
* These filters will overwrite any FROM send by other plugins.
*/
add_filter('wp_mail_from','custom_wp_mail_from');
function custom_wp_mail_from($email) {
return 'wp-admin@bellevuecollege.edu';
}
add_filter('wp_mail_from_name','custom_wp_mail_from_name');
function custom_wp_mail_from_name($name) {
return 'Bellevue College';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment