WordPress.org

Make WordPress Core

Ticket #19017: 19017.diff

File 19017.diff, 2.9 KB (added by solarissmoke, 7 years ago)

Add an action after the XML declaration in feeds to allow the insertion of style information (and anything else)

  • wp-includes/feed-rss2.php

     
    88header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
    99$more = 1;
    1010
    11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
    12 
     11echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
     12do_action('rss2_pre');
     13?>
    1314<rss version="2.0"
    1415        xmlns:content="http://purl.org/rss/1.0/modules/content/"
    1516        xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  • wp-includes/feed-atom.php

     
    88header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
    99$more = 1;
    1010
    11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
     11echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
     12do_action('atom_pre');
     13?>
    1214<feed
    1315  xmlns="http://www.w3.org/2005/Atom"
    1416  xmlns:thr="http://purl.org/syndication/thread/1.0"
  • wp-includes/feed-rdf.php

     
    88header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
    99$more = 1;
    1010
    11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
     11echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
     12do_action('rdf_pre');
     13?>
    1214<rdf:RDF
    1315        xmlns="http://purl.org/rss/1.0/"
    1416        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  • wp-includes/feed-atom-comments.php

     
    77
    88header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
    99echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
     10do_action('atom_pre');
    1011?>
    1112<feed
    1213        xmlns="http://www.w3.org/2005/Atom"
  • wp-includes/feed-rss2-comments.php

     
    88header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
    99
    1010echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
     11do_action('rss2_pre');
    1112?>
    1213<rss version="2.0"
    1314        xmlns:content="http://purl.org/rss/1.0/modules/content/"