WordPress.org

Make WordPress Core

Ticket #40286: 40286.2.patch

File 40286.2.patch, 895 bytes (added by shulard, 3 years ago)

Mistake in diff file, the first one will remove my updates...

  • src/wp-includes/comment-template.php

    diff --git c/src/wp-includes/comment-template.php w/src/wp-includes/comment-template.php
    index e97229f5f6..56e0ccda54 100644
    c w function comments_open( $post_id = null ) { 
    12011201         * @param bool        $open    Whether the current post is open for comments.
    12021202         * @param int|WP_Post $post_id The post ID or WP_Post object.
    12031203         */
    1204         return apply_filters( 'comments_open', $open, $post_id );
     1204        return apply_filters( 'comments_open', $open, $_post->ID );
    12051205}
    12061206
    12071207/**
    function pings_open( $post_id = null ) { 
    12261226         * @param bool        $open    Whether the current post is open for pings.
    12271227         * @param int|WP_Post $post_id The post ID or WP_Post object.
    12281228         */
    1229         return apply_filters( 'pings_open', $open, $post_id );
     1229        return apply_filters( 'pings_open', $open, $_post->ID );
    12301230}
    12311231
    12321232/**