Customizing the Subject Field in WordPress’ Notification Emails?

You can change them using a filter. The filter hooks you want to use are: For the first email message (confirming they really want to reset the password): ‘retrieve_password_title’ ‘retrieve_password_message’ For the follow-up email message (sending the new username and password): ‘password_reset_title’ ‘password_reset_message’ Update: To create and use these filters, put the following or similar … Read more

Overriding the default WP Multisite notification e-mail

I was able to override the multi-site notification email by adding these: remove_filter(‘wpmu_signup_user_notification_email’,’admin_created_user_email’); add_filter(‘wpmu_signup_user_notification_email’,<function_name_here>); add_filter(‘wpmu_signup_user_notification’,<function_name_here>); add_filter(‘wpmu_signup_user_notification_subject’,<function_name_here>); Adding the three filters at bottom i.e. email,notification and subject allows you to override the content and the subject of the email.

New post notification in wp_nav_menu

I would store a transient with a life-time of 24 hours when a post (in some category, I’m using category with ID 333 as an example) is published. Whenever subsequent posts are published, the transient is either updated or recreated if 24 hours has elapsed and the transient has been deleted. Logic Whenever a post … Read more

Disable WP core updates but send email notification

It looks like after switching code to check get_site_transient(‘update_core’) I have got what I need just action must be executed in a proper priority or a hook (thoughts/suggestions?). Working code below: function core_update_notification(){ global $wp_version; $installed_version = $wp_version; $uc_transient = get_site_transient(‘update_core’); if ( empty($uc_transient->updates) ) return; $updates = $uc_transient->updates; $current_version = $updates[0]->current; if (version_compare($installed_version, $current_version, … Read more

How to change the email notification recipient (user) for new comments?

There’s a great article explaining how to hook into 2 filters for this at https://web.archive.org/web/20200216075253/http://www.sourcexpress.com/customize-wordpress-comment-notification-emails/ To send your notifications to a particular user and not the site admin, try this for a user with ID 123: function se_comment_moderation_recipients( $emails, $comment_id ) { $comment = get_comment( $comment_id ); $post = get_post( $comment->comment_post_ID ); $user = get_user_by( … Read more