Ticket #9611: 9611.diff
| File 9611.diff, 1.6 KB (added by , 15 years ago) |
|---|
-
wp-includes/functions.php
1718 1718 * If the feed action does not have a hook, then the function will die with a 1719 1719 * message telling the visitor that the feed is not valid. 1720 1720 * 1721 * If the request is for a comment feed for a post on which comments/pings are closed 1722 * then the function will die with status code 410 1723 * 1721 1724 * It is better to only have one hook for each feed. 1722 1725 * 1723 1726 * @since 2.1.0 … … 1740 1743 $message = sprintf( __( 'ERROR: %s is not a valid feed template.' ), esc_html($feed)); 1741 1744 wp_die( $message, '', array( 'response' => 404 ) ); 1742 1745 } 1746 1747 if( is_comment_feed() && is_singular() && ! comments_open() && ! pings_open() ) 1748 wp_die( __('The feed you requested is no longer available because comments on the associated article are closed.' ), '', array( 'response' => 410 ) ); 1743 1749 1744 1750 do_action( $hook, $wp_query->is_comment_feed ); 1745 1751 } -
wp-includes/general-template.php
1642 1642 if ( is_single() || is_page() ) { 1643 1643 $post = &get_post( $id = 0 ); 1644 1644 1645 if ( comments_open() || pings_open() || $post->comment_count > 0) {1645 if ( comments_open() || pings_open() ) { 1646 1646 $title = esc_attr(sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], esc_html( get_the_title() ) )); 1647 1647 $href = get_post_comments_feed_link( $post->ID ); 1648 1648 }