New answers tagged

0

Try auto_core_update_email. E.g: add_filter('auto_core_update_email', function($email, $type, $core_update, $result) { if ('success' === $type) $email['body'] = sprintf( __('Congratulation! Your site at %1$s has been updated automatically to WordPress %2$s.', 'textdomain'), home_url(), $core_update->current ) . "\n\n"; return $email; }, ...


0

For comment approved, you can review this question Approve comment hook? For comment submitted, you can hook into the comment_post hook, like function show_message_function( $comment_ID, $comment_approved ) { if( 0 === $comment_approved ){ //function logic goes here } } add_action( 'comment_post', 'show_message_function', 10, 2 ); Code ...


1

I think this would be possible using the wp_mail() function (https://developer.wordpress.org/reference/functions/wp_mail/) alongside the publish_post action. In fact, the publish_post action codex page has an example: https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post function post_published_notification( $ID, $post ) { $author = $...



Top 50 recent answers are included