Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 2 years ago

#5761 closed enhancement (fixed)

Make comments_open and pings_open filterable

Reported by: tellyworth's profile tellyworth Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:


This makes it possible to filter the result of the comments_open and pings_open post status flags. It also changes wp-comments-post.php and wp-trackback.php to call those functions rather than checking $post->comment_status and $post->ping_status directly. This makes it possible for plugins to override and disable comment posting.

Unfortunately many (most?) themes check those flags directly rather than calling comments_open() and pings_open(), so they might incorrectly display a comment form when comments are in fact disabled.

Attachments (1)

comments-open-filter-r6692-3.patch (2.4 KB) - added by tellyworth 16 years ago.

Download all attachments as: .zip

Change History (3)

#1 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6716]) Add filters to comments_open() and pings_open(). Props tellyworth. fixes #5761

This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.

6 years ago

Note: See TracTickets for help on using tickets.