Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: notify_post_author

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1788      /**
1789       * Filter whether to send the post author new comment notification emails,
1790       * overriding the site setting.
1791       *
1792       * @since 4.4.0
1793       *
1794       * @param bool $maybe_notify Whether to notify the post author about the new comment.
1795       * @param int  $comment_ID   The ID of the comment for the notification.
1796       */
1797      $maybe_notify = apply_filters( 'notify_post_author', $maybe_notify, $comment_ID );
1798
1799      /*
1800       * wp_notify_postauthor() checks if notifying the author of their own comment.
1801       * By default, it won't, but filters can override this.
1802       */
1803      if ( ! $maybe_notify ) {
1804           return false;
1805      }
1806