WordPress.org

Make WordPress Core

Ticket #16090: 16090.diff

File 16090.diff, 484 bytes (added by Otto42, 4 years ago)

patch to not close comments on pages automatically

  • wp-includes/comment.php

     
    19581958        if ( !$days_old ) 
    19591959                return $posts; 
    19601960 
     1961        if ( 'page' == $posts[0]->post_type )  
     1962                return $posts; 
     1963         
    19611964        if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) { 
    19621965                $posts[0]->comment_status = 'closed'; 
    19631966                $posts[0]->ping_status = 'closed';