WordPress.org

Make WordPress Core

Changeset 29014


Ignore:
Timestamp:
07/07/2014 10:17:44 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Introduce 'rss_tag_pre' action, which fires between the xml and rss tags in a feed.

props solarissmoke, wonderboymusic, DrewAPicture.
fixes #19017.

Location:
trunk/src/wp-includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/feed-atom-comments.php

    r26863 r29014  
    88header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
    99echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
     10
     11/** This action is documented in wp-includes/feed-rss2.php */
     12do_action( 'rss_tag_pre', 'atom-comments' );
    1013?>
    1114<feed
     
    1316    xml:lang="<?php bloginfo_rss( 'language' ); ?>"
    1417    xmlns:thr="http://purl.org/syndication/thread/1.0"
    15     <?php 
     18    <?php
    1619        /** This action is documented in wp-includes/feed-atom.php */
    17         do_action( 'atom_ns' ); 
    18        
     20        do_action( 'atom_ns' );
     21
    1922        /**
    2023         * Fires inside the feed tag in the Atom comment feed.
     
    5053    <id><?php bloginfo_rss('comments_atom_url'); ?></id>
    5154<?php } ?>
    52 <?php 
     55<?php
    5356    /**
    5457     * Fires at the end of the Atom comment feed header.
  • trunk/src/wp-includes/feed-atom.php

    r25531 r29014  
    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').'"?'.'>';
     12
     13/** This action is documented in wp-includes/feed-rss2.php */
     14do_action( 'rss_tag_pre', 'atom' );
     15?>
    1216<feed
    1317  xmlns="http://www.w3.org/2005/Atom"
  • trunk/src/wp-includes/feed-rdf.php

    r25880 r29014  
    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').'"?'.'>';
     12
     13/** This action is documented in wp-includes/feed-rss2.php */
     14do_action( 'rss_tag_pre', 'rdf' );
     15?>
    1216<rdf:RDF
    1317    xmlns="http://purl.org/rss/1.0/"
  • trunk/src/wp-includes/feed-rss2-comments.php

    r25880 r29014  
    99
    1010echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
     11
     12/** This action is documented in wp-includes/feed-rss2.php */
     13do_action( 'rss_tag_pre', 'rss2-comments' );
    1114?>
    1215<rss version="2.0"
  • trunk/src/wp-includes/feed-rss2.php

    r25530 r29014  
    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').'"?'.'>';
    1212
     13/**
     14 * Fires between the <xml> and <rss> tags in a feed.
     15 *
     16 * @since 4.0.0
     17 *
     18 * @param string $context Type of feed. Possible values include 'rss2', 'rss2-comments',
     19 *                        'rdf', 'atom', and 'atom-comments'.
     20 */
     21do_action( 'rss_tag_pre', 'rss2' );
     22?>
    1323<rss version="2.0"
    1424    xmlns:content="http://purl.org/rss/1.0/modules/content/"
Note: See TracChangeset for help on using the changeset viewer.