WordPress.org

Make WordPress Core

Ticket #11695: 11695-2.diff

File 11695-2.diff, 593 bytes (added by sillybean, 7 years ago)

Updated for revision 17246

  • wp-includes/functions.php

     
    17411741                wp_die( $message, '', array( 'response' => 404 ) );
    17421742        }
    17431743
    1744         do_action( $hook, $wp_query->is_comment_feed );
     1744        if ( $wp_query->is_comment_feed && $wp_query->is_singular && ( !current_user_can( 'read_private_posts' ) && 'private' == $wp_query->post->post_status ) )
     1745                include_once( get_404_template() );
     1746        else
     1747                do_action( $hook, $wp_query->is_comment_feed );
    17451748}
    17461749
    17471750/**