Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#16090 closed enhancement (fixed)

_close_comments_for_old_posts should not close pages

Reported by: Otto42 Owned by: westi
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.1
Component: Comments Keywords: has-patch commit
Focuses: Cc:


_close_comments_for_old_posts should do a check on the post_type and not apply itself to Pages.

Attachments (3)

16090.diff (484 bytes) - added by Otto42 5 years ago.
patch to not close comments on pages automatically
16090.2.diff (885 bytes) - added by nacin 5 years ago.
16090.3.diff (831 bytes) - added by johnjamesjacoby 5 years ago.
Fix missing parenthesis in 16090.diff

Download all attachments as: .zip

Change History (15)

5 years ago

patch to not close comments on pages automatically

#1 @ocean90
5 years ago

Duplicate #16085.

#2 @westi
5 years ago

  • Keywords 3.2-early added
  • Milestone changed from Awaiting Review to Future Release
  • Owner set to westi
  • Status changed from new to accepted

#3 @westi
5 years ago

  • Keywords has-patch commit added; 3.2-early removed
  • Milestone changed from Future Release to 3.2

#4 @nacin
5 years ago

Should this be whitelisted for posts, rather than blacklisted for pages? Should the whitelist or blacklist be filterable for CPTs?

#5 @Otto42
5 years ago

Filterable makes sense.

Whitelist vs. blacklist I have no opinion on. Either way, an in_array check on a filtered array is easy enough to do.

#6 @westi
5 years ago

IMHO it should whitelist itself and only apply to posts.

CPTs can do there own thing.

5 years ago

#7 @nacin
5 years ago

Here's a simple whitelist + filter solution.

#8 @ryan
5 years ago

I'll be contrary and say it should apply to all types. If I check this box it means I am lazy and don't want to moderate comments on any old content.

#9 @markjaquith
5 years ago

But the concept of "oldness" doesn't really apply to pages. They don't exist chronologically. Yeah, they have a timestamp, but they don't fade away in prominence just because their timestamp is old.

5 years ago

Fix missing parenthesis in 16090.diff

#10 @johnjamesjacoby
5 years ago

I agree with everyone but Ryan. Sorry friend. :)

I think custom post types should have their own comment settings for things like this, or at least have mechanisms to opt out/override.

Patch applied clean but was missing parenthesis. Refreshed in 16090.3.diff.

#11 @westi
4 years ago

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

In [18087]:

Only close comments on old posts by default. Fixes #16090 props nacin and johnjamesjacoby.

#12 @nacin
4 years ago

We forgot about attachments here. #19858

Note: See TracTickets for help on using tickets.