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
- The topic ‘remove add_filter’ is closed to new replies.