<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o" -->

---
title: author filter now has the final say on post author...
description: WordPress 7.1 changes the order of operations in `wp_new_comment_notify_postauthor()`: the comment approval status check now runs before the...
canonical: https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: author filter now has the final say on post author notifications – Make WordPress Core | daily.dev
og:description: WordPress 7.1 changes the order of operations in `wp_new_comment_notify_postauthor()`: the comment approval status check now runs before the...
og:url: https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o
og:image: https://api.daily.dev/og/posts/C2qGiHN0o.png
og:image:alt: author filter now has the final say on post author notifications – Make WordPress Core
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# author filter now has the final say on post author notifications – Make WordPress Core

**[Make WordPress Core](https://daily.dev/sources/wordpresscore)** · 3 min read · 1 upvotes · 0 comments

## Summary

WordPress 7.1 changes the order of operations in `wp_new_comment_notify_postauthor()`: the comment approval status check now runs before the `notify_post_author` filter fires, not after. This means the filter receives an accurate boolean default and its return value is now authoritative. Previously, returning `true` from the filter could not force notifications for unapproved comments, and the filter received misleading defaults. Now, returning `true` will send notifications even for unapproved, spam, or trashed comments. Sites using `__return_true` on this filter should update their callbacks to check approval status if they don't want emails for non-approved comments. Additional changes include the default always being a strict boolean and the function returning `false` immediately for invalid comment IDs without firing the filter.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://make.wordpress.org/core/2026/08/05/the-notify_post_author-filter-now-has-the-final-say-on-post-author-notifications>

## Questions this post answers

### How does the notify_post_author filter behave differently in WordPress 7.1 compared to earlier versions?

In WordPress 7.1, the comment approval status check now happens before the notify_post_author filter runs, so the filter's return value fully determines whether a notification is sent. Previously the check happened after the filter, so a misleading default of true could be passed for unapproved comments, and returning true could not force a notification for them since the return value was silently discarded.

_daily.dev helps developers track breaking filter changes like this before they ship a WordPress update._

### Will my __return_true callback on notify_post_author send emails for spam or unapproved comments after upgrading to WordPress 7.1?

Yes, a callback such as __return_true on notify_post_author will now also trigger emails for comments held in moderation, marked as spam, or trashed, because the filter's return value is final. To avoid this, the callback should check the comment's comment_approved status and only return true for approved comments, falling back to the passed $maybe_notify value otherwise.

_Plugin authors auditing comment notification logic can follow WordPress core changes like this via daily.dev._

### What type does the default value passed to the notify_post_author filter have in WordPress 7.1?

The default value passed to the notify_post_author filter is now always a strict boolean, true or false, rather than a raw option value such as the string '1'. Callbacks that strictly compare the incoming $maybe_notify parameter should compare against true or false rather than expecting a string, since previously the raw comments_notify option value could pass through unconverted.

_daily.dev keeps WordPress developers current on filter and API behavior changes affecting plugin code._

## Similar posts on daily.dev

- [Removing title attributes in author link functions](https://daily.dev/posts/removing-title-attributes-in-author-link-functions-ycrj0bgpb) · Make WordPress Core · 5 upvotes · 1 comments
- [More-reliable email in WordPress 6.9](https://daily.dev/posts/more-reliable-email-in-wordpress-6-9-8ax1pj7f9) · Make WordPress Core · 3 upvotes · 0 comments
- [Notifications triggered by spam accounts are now correctly hidden](https://daily.dev/posts/notifications-triggered-by-spam-accounts-are-now-correctly-hidden-jb4yv3mjj) · GitHub Changelog · 0 upvotes · 0 comments
- [Substack’s new ‘Reply Rules’ feature lets creators control how people respond](https://daily.dev/posts/substack-s-new-reply-rules-feature-lets-creators-control-how-people-respond-eaoadaenu) · TechCrunch · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#wordpress](https://daily.dev/tags/wordpress)

[View this post on daily.dev](https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"author filter now has the final say on post author notifications – Make WordPress Core","url":"https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o"},"datePublished":"2026-08-05T12:24:41.325Z","dateModified":"2026-09-13T18:54:14.041Z","description":"WordPress 7.1 changes the order of operations in `wp_new_comment_notify_postauthor()`: the comment approval status check now runs before the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6ad4f5b66be737a1618019916626b1bd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6ad4f5b66be737a1618019916626b1bd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Make WordPress Core","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Make WordPress Core","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/892d1a79e30e4e8a911b5726c6fb1a06","url":"https://daily.dev/sources/wordpresscore"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,wordpress","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Make WordPress Core","item":"https://daily.dev/sources/wordpresscore"},{"@type":"ListItem","position":3,"name":"author filter now has the final say on post author notifications – Make WordPress Core"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/author-filter-now-has-the-final-say-on-post-author-notifications-make-wordpress-core-c2qgihn0o#faq","mainEntity":[{"@type":"Question","name":"How does the notify_post_author filter behave differently in WordPress 7.1 compared to earlier versions?","acceptedAnswer":{"@type":"Answer","text":"In WordPress 7.1, the comment approval status check now happens before the notify_post_author filter runs, so the filter's return value fully determines whether a notification is sent. Previously the check happened after the filter, so a misleading default of true could be passed for unapproved comments, and returning true could not force a notification for them since the return value was silently discarded. daily.dev helps developers track breaking filter changes like this before they ship a WordPress update."}},{"@type":"Question","name":"Will my __return_true callback on notify_post_author send emails for spam or unapproved comments after upgrading to WordPress 7.1?","acceptedAnswer":{"@type":"Answer","text":"Yes, a callback such as __return_true on notify_post_author will now also trigger emails for comments held in moderation, marked as spam, or trashed, because the filter's return value is final. To avoid this, the callback should check the comment's comment_approved status and only return true for approved comments, falling back to the passed $maybe_notify value otherwise. Plugin authors auditing comment notification logic can follow WordPress core changes like this via daily.dev."}},{"@type":"Question","name":"What type does the default value passed to the notify_post_author filter have in WordPress 7.1?","acceptedAnswer":{"@type":"Answer","text":"The default value passed to the notify_post_author filter is now always a strict boolean, true or false, rather than a raw option value such as the string '1'. Callbacks that strictly compare the incoming $maybe_notify parameter should compare against true or false rather than expecting a string, since previously the raw comments_notify option value could pass through unconverted. daily.dev keeps WordPress developers current on filter and API behavior changes affecting plugin code."}}]}
```

