Make WordPress Core

Ticket #39066: 39066.diff

File 39066.diff, 619 bytes (added by dlh, 8 years ago)
  • src/wp-includes/feed.php

     
    702702        do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
    703703        $feed->init();
    704704        $feed->set_output_encoding( get_option( 'blog_charset' ) );
    705         $feed->handle_content_type();
    706705
     706        // Don't change REST API response headers.
     707        if ( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST ) {
     708                $feed->handle_content_type();
     709        }
     710
    707711        if ( $feed->error() )
    708712                return new WP_Error( 'simplepie-error', $feed->error() );
    709713