WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#32981 closed enhancement (duplicate)

Add filter before checking comment in wp-comments-post.php

Reported by: sgrant Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Comments Keywords:
Focuses: Cc:

Description

Hello!
We'd like to allow our users to submit WooCommerce ratings without being forced to write some text. Some people find this intimidating (they like or dislike the product, but can't or won't say why).
I've attached a patch that adds a filter immediately before the empty string check in wp-comments-post.php. This allows us to hook in and change an empty field to something simple (say, a single space) while maintaining WooCommerce's rating metadata. Is this reasonable for core?

Attachments (1)

comment_filter.diff (398 bytes) - added by sgrant 5 years ago.
Add a filter before the empty string comment check.

Download all attachments as: .zip

Change History (2)

@sgrant
5 years ago

Add a filter before the empty string comment check.

#1 @ocean90
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing as a duplicate of #16979 since this would affect the duplicate comment checks, which is handled by #16979 too.

Note: See TracTickets for help on using tickets.