Title: remove add_filter
Last modified: August 22, 2016

---

# remove add_filter

 *  [lisa2342](https://wordpress.org/support/users/lisa2342/)
 * (@lisa2342)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/remove-add_filter/)
 * Hey there,
 * my users told me that they were not receiving a password reset link in their 
   password reset mail. I investigated, and I saw that you are using add_filter 
   for the mail content type in the npn_plugin.php file. I also learned that this
   sets a global vaiable and might interfere with other plugins. Thus, I commented
   that one and instead changed the relevant section to include a header array, 
   like this:
 *     ```
       // send Mail if User activated Notification and there was no notification before.
   
       $headers = array('Content-Type: text/html; charset=UTF-8');
   
             if ($access==true AND $cat_chosen==true AND get_the_author_meta( 'npn_mailnotify', $user->ID )=='1' AND get_post_meta( $post_ID, 'npn_notified', true) != '1') wp_mail($user->data->user_email, '['.get_option('blogname').'] '.__('New Post','npn_plugin').': '.$postobject->post_title, npn_generate_mail_content($postobject,$postcontent,$postthumb,$user->ID), $headers);
            }
       ```
   
 * This allows the password reset to work as expected and still have the notification
   mail in HTML format.
 * Thanks for this awesome plugin!
 * best
    Lisa
 * [https://wordpress.org/plugins/new-post-notification/](https://wordpress.org/plugins/new-post-notification/)

The topic ‘remove add_filter’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/new-post-notification.svg)
 * [New Post Notification](https://wordpress.org/plugins/new-post-notification/)
 * [Support Threads](https://wordpress.org/support/plugin/new-post-notification/)
 * [Active Topics](https://wordpress.org/support/plugin/new-post-notification/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/new-post-notification/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/new-post-notification/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [format](https://wordpress.org/support/topic-tag/format/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [password reset](https://wordpress.org/support/topic-tag/password-reset/)

 * 0 replies
 * 1 participant
 * Last reply from: [lisa2342](https://wordpress.org/support/users/lisa2342/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/remove-add_filter/)
 * Status: not resolved