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 4 years ago.
Fix missing parenthesis in 16090.diff

Download all attachments as: .zip

Change History (15)

@Otto425 years ago

patch to not close comments on pages automatically

comment:1 @ocean905 years ago

Duplicate #16085.

comment:2 @westi5 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

comment:3 @westi5 years ago

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

comment:4 @nacin5 years ago

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

comment:5 @Otto425 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.

comment:6 @westi5 years ago

IMHO it should whitelist itself and only apply to posts.

CPTs can do there own thing.

@nacin5 years ago

comment:7 @nacin5 years ago

Here's a simple whitelist + filter solution.

comment:8 @ryan4 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.

comment:9 @markjaquith4 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.

@johnjamesjacoby4 years ago

Fix missing parenthesis in 16090.diff

comment:10 @johnjamesjacoby4 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.

comment:11 @westi4 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.

comment:12 @nacin4 years ago

We forgot about attachments here. #19858

Note: See TracTickets for help on using tickets.