Changeset 61199
- Timestamp:
- 11/10/2025 10:49:33 PM (6 weeks ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
-
wp-admin/includes/schema.php (modified) (1 diff)
-
wp-admin/options-discussion.php (modified) (1 diff)
-
wp-includes/comment.php (modified) (2 diffs)
-
wp-includes/default-filters.php (modified) (1 diff)
-
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/schema.php
r61179 r61199 564 564 // 6.9.0 565 565 'wp_notes_notify' => 1, 566 567 566 ); 568 567 -
trunk/src/wp-admin/options-discussion.php
r61179 r61199 163 163 <br /> 164 164 <label for="wp_notes_notify"> 165 <input name="wp_notes_notify" type="checkbox" id="wp_notes_notify" value="1" <?php checked( '1', get_option( 'wp_notes_notify' ) ); ?> />165 <input name="wp_notes_notify" type="checkbox" id="wp_notes_notify" value="1" <?php checked( '1', get_option( 'wp_notes_notify', 1 ) ); ?> /> 166 166 <?php _e( 'Anyone posts a note' ); ?> </label> 167 167 -
trunk/src/wp-includes/comment.php
r61179 r61199 2428 2428 $is_note = ( $comment && 'note' === $comment->comment_type ); 2429 2429 2430 $maybe_notify = $is_note ? get_option( 'wp_notes_notify' ) : get_option( 'comments_notify' );2430 $maybe_notify = $is_note ? get_option( 'wp_notes_notify', 1 ) : get_option( 'comments_notify' ); 2431 2431 2432 2432 /** … … 2457 2457 2458 2458 return wp_notify_postauthor( $comment_id ); 2459 } 2460 2461 /** 2462 * Send a notification to the post author when a new note is added via the REST API. 2463 * 2464 * @since 6.9.0 2465 * 2466 * @param WP_Comment $comment The comment object. 2467 */ 2468 function wp_new_comment_via_rest_notify_postauthor( $comment ) { 2469 if ( $comment instanceof WP_Comment && 'note' === $comment->comment_type ) { 2470 wp_new_comment_notify_postauthor( (int) $comment->comment_ID ); 2471 } 2459 2472 } 2460 2473 -
trunk/src/wp-includes/default-filters.php
r61179 r61199 523 523 add_action( 'comment_post', 'wp_new_comment_notify_moderator' ); 524 524 add_action( 'comment_post', 'wp_new_comment_notify_postauthor' ); 525 add_action( 'rest_insert_comment', array( 'WP_REST_Comments_Controller', 'wp_new_comment_via_rest_notify_postauthor' ));525 add_action( 'rest_insert_comment', 'wp_new_comment_via_rest_notify_postauthor' ); 526 526 add_action( 'after_password_reset', 'wp_password_change_notification' ); 527 527 add_action( 'register_new_user', 'wp_send_new_user_notifications' ); -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r61179 r61199 37 37 } 38 38 39 /**40 * Send a notification to the post author when a new note is added via the REST API.41 *42 * @since 6.9.043 *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 }51 39 /** 52 40 * Registers the routes for comments.
Note: See TracChangeset
for help on using the changeset viewer.