WordPress.org

Make WordPress Core

Ticket #40286: 40286-with-docs.patch

File 40286-with-docs.patch, 1.2 KB (added by shulard, 3 years ago)

Fix the code and update the filters docs.

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

    diff --git c/src/wp-includes/comment-template.php w/src/wp-includes/comment-template.php
    index e97229f5f6..9b8f6bbc86 100644
    c w function comments_open( $post_id = null ) { 
    11981198         *
    11991199         * @since 2.5.0
    12001200         *
    1201          * @param bool        $open    Whether the current post is open for comments.
    1202          * @param int|WP_Post $post_id The post ID or WP_Post object.
     1201         * @param bool $open    Whether the current post is open for comments.
     1202         * @param int  $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 ) { 
    12231223         *
    12241224         * @since 2.5.0
    12251225         *
    1226          * @param bool        $open    Whether the current post is open for pings.
    1227          * @param int|WP_Post $post_id The post ID or WP_Post object.
     1226         * @param bool $open    Whether the current post is open for pings.
     1227         * @param int  $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/**