Make WordPress Core


Ignore:
Timestamp:
11/10/2025 10:49:33 PM (9 months ago)
Author:
adamsilverstein
Message:

Notes: refine post author notifications.

Code maintenance follow up to r61179. Move wp_new_comment_via_rest_notify_postauthor callback from REST API Comments controller to comment.php. Add default to wp_notes_notify for multisite compatibility.

Props adamsilverstein, justlevine, mukesh27, mamaduka, peterwilsoncc, desros.
See #64204.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r61179 r61199  
    3737        }
    3838
    39         /**
    40          * Send a notification to the post author when a new note is added via the REST API.
    41          *
    42          * @since 6.9.0
    43          *
    44          * @param WP_Comment $comment The comment object.
    45          */
    46         public static function wp_new_comment_via_rest_notify_postauthor( $comment ) {
    47                 if ( 'note' === $comment->comment_type ) {
    48                         wp_new_comment_notify_postauthor( $comment->comment_ID );
    49                 }
    50         }
    5139        /**
    5240         * Registers the routes for comments.
Note: See TracChangeset for help on using the changeset viewer.