Introduce 'rss_tag_pre' action, which fires between the xml and rss tags in a feed.
props solarissmoke, wonderboymusic, DrewAPicture. fixes #19017. Built from https://develop.svn.wordpress.org/trunk@29014 git-svn-id: http://core.svn.wordpress.org/trunk@28802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f5b5b89e66
commit
c321e40016
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
|
||||||
echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
|
echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
|
||||||
|
|
||||||
|
/** This action is documented in wp-includes/feed-rss2.php */
|
||||||
|
do_action( 'rss_tag_pre', 'atom-comments' );
|
||||||
?>
|
?>
|
||||||
<feed
|
<feed
|
||||||
xmlns="http://www.w3.org/2005/Atom"
|
xmlns="http://www.w3.org/2005/Atom"
|
||||||
|
|
|
@ -8,7 +8,11 @@
|
||||||
header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||||
|
|
||||||
|
/** This action is documented in wp-includes/feed-rss2.php */
|
||||||
|
do_action( 'rss_tag_pre', 'atom' );
|
||||||
|
?>
|
||||||
<feed
|
<feed
|
||||||
xmlns="http://www.w3.org/2005/Atom"
|
xmlns="http://www.w3.org/2005/Atom"
|
||||||
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
||||||
|
|
|
@ -8,7 +8,11 @@
|
||||||
header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||||
|
|
||||||
|
/** This action is documented in wp-includes/feed-rss2.php */
|
||||||
|
do_action( 'rss_tag_pre', 'rdf' );
|
||||||
|
?>
|
||||||
<rdf:RDF
|
<rdf:RDF
|
||||||
xmlns="http://purl.org/rss/1.0/"
|
xmlns="http://purl.org/rss/1.0/"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||||
|
|
||||||
|
/** This action is documented in wp-includes/feed-rss2.php */
|
||||||
|
do_action( 'rss_tag_pre', 'rss2-comments' );
|
||||||
?>
|
?>
|
||||||
<rss version="2.0"
|
<rss version="2.0"
|
||||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||||
|
|
|
@ -8,8 +8,18 @@
|
||||||
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
|
||||||
$more = 1;
|
$more = 1;
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires between the <xml> and <rss> tags in a feed.
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*
|
||||||
|
* @param string $context Type of feed. Possible values include 'rss2', 'rss2-comments',
|
||||||
|
* 'rdf', 'atom', and 'atom-comments'.
|
||||||
|
*/
|
||||||
|
do_action( 'rss_tag_pre', 'rss2' );
|
||||||
|
?>
|
||||||
<rss version="2.0"
|
<rss version="2.0"
|
||||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||||
|
|
Loading…
Reference in New Issue