[wp-trac] [WordPress Trac] #31168: Comments should be turned off on pages by default

WordPress Trac noreply at wordpress.org
Mon Jun 29 22:18:24 UTC 2015


#31168: Comments should be turned off on pages by default
-------------------------------------+---------------------------
 Reporter:  melchoyce                |       Owner:  valendesigns
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.3
Component:  Comments                 |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------------

Comment (by valendesigns):

 The two new functions could potentially be combined into one with a second
 param to switch cases. Though is being extra DRY the correct approach in
 this situation if we could potentially loose clarity and what would the
 function be named if they were combined? Thought I'd put it out there for
 discussion at the very least.

 A separate change we could make is to remove `if ( 'page' === $post_type )
 {` from both functions and create an actual filter function for pages
 using the newly created filters. A bit of dogfooding in Core.

 If anyone has other suggestions or even concerns with this approach please
 speak up soon as the feature deadline is looming.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31168#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list