rest_insert_comment

rest_insert_comment

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.4.3

do_action('rest_insert_comment') is found 2 times:

  • /wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php line 728
    		 * @param WP_REST_Request $request  Request object.
    		 * @param bool            $creating True when creating a comment, false
    		 *                                  when updating.
    		 */
    		do_action( 'rest_insert_comment', $comment, $request, true );
    
    		$schema = $this->get_item_schema();
    
    		if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
    			$meta_update = $this->meta->update_value( $request['meta'], $comment_id );
    
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php line 892
     
    		$comment = get_comment( $id );
    
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */
    		do_action( 'rest_insert_comment', $comment, $request, false );
    
    		$schema = $this->get_item_schema();
    
    		if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
    			$meta_update = $this->meta->update_value( $request['meta'], $id );