WordPress.org

Make WordPress Core

Ticket #9588: 9588.8.diff

File 9588.8.diff, 591 bytes (added by Denis-de-Bernardy, 6 years ago)

this one for akismet

  • wp-content/plugins/akismet/akismet.php

     
    263263 
    264264                $post = get_post( $comment['comment_post_ID'] ); 
    265265                $last_updated = strtotime( $post->post_modified_gmt ); 
    266                 $diff = time() - $last_updated; 
     266                $diff = strtotime(gmdate("Y-m-d H:i:s")) - $last_updated; 
    267267                $diff = $diff / 86400; 
    268268 
    269269                if ( $post->post_type == 'post' && $diff > 30 && get_option( 'akismet_discard_month' ) == 'true' )