wp/wp-includes/feed-rss2.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
     6  */
     6  */
     7 
     7 
     8 header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
     8 header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
     9 $more = 1;
     9 $more = 1;
    10 
    10 
    11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
    11 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
    12 
    12 
       
    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  */
       
    21 do_action( 'rss_tag_pre', 'rss2' );
       
    22 ?>
    13 <rss version="2.0"
    23 <rss version="2.0"
    14 	xmlns:content="http://purl.org/rss/1.0/modules/content/"
    24 	xmlns:content="http://purl.org/rss/1.0/modules/content/"
    15 	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    25 	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    16 	xmlns:dc="http://purl.org/dc/elements/1.1/"
    26 	xmlns:dc="http://purl.org/dc/elements/1.1/"
    17 	xmlns:atom="http://www.w3.org/2005/Atom"
    27 	xmlns:atom="http://www.w3.org/2005/Atom"
    32 	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
    42 	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
    33 	<link><?php bloginfo_rss('url') ?></link>
    43 	<link><?php bloginfo_rss('url') ?></link>
    34 	<description><?php bloginfo_rss("description") ?></description>
    44 	<description><?php bloginfo_rss("description") ?></description>
    35 	<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
    45 	<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
    36 	<language><?php bloginfo_rss( 'language' ); ?></language>
    46 	<language><?php bloginfo_rss( 'language' ); ?></language>
    37 	<?php
    47 	<sy:updatePeriod><?php
    38 	$duration = 'hourly';
    48 		$duration = 'hourly';
    39 	/**
    49 
    40 	 * Filter how often to update the RSS feed.
    50 		/**
    41 	 *
    51 		 * Filter how often to update the RSS feed.
    42 	 * @since 2.1.0
    52 		 *
    43 	 *
    53 		 * @since 2.1.0
    44 	 * @param string $duration The update period.
    54 		 *
    45 	 *                         Default 'hourly'. Accepts 'hourly', 'daily', 'weekly', 'monthly', 'yearly'.
    55 		 * @param string $duration The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly',
    46 	 */
    56 		 *                         'yearly'. Default 'hourly'.
    47 	?>
    57 		 */
    48 	<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', $duration ); ?></sy:updatePeriod>
    58 		echo apply_filters( 'rss_update_period', $duration );
    49 	<?php
    59 	?></sy:updatePeriod>
    50 	$frequency = '1';
    60 	<sy:updateFrequency><?php
    51 	/**
    61 		$frequency = '1';
    52 	 * Filter the RSS update frequency.
    62 
    53 	 *
    63 		/**
    54 	 * @since 2.1.0
    64 		 * Filter the RSS update frequency.
    55 	 *
    65 		 *
    56 	 * @param string $frequency An integer passed as a string representing the frequency
    66 		 * @since 2.1.0
    57 	 *                          of RSS updates within the update period. Default '1'.
    67 		 *
    58 	 */
    68 		 * @param string $frequency An integer passed as a string representing the frequency
    59 	?>
    69 		 *                          of RSS updates within the update period. Default '1'.
    60 	<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', $frequency ); ?></sy:updateFrequency>
    70 		 */
       
    71 		echo apply_filters( 'rss_update_frequency', $frequency );
       
    72 	?></sy:updateFrequency>
    61 	<?php
    73 	<?php
    62 	/**
    74 	/**
    63 	 * Fires at the end of the RSS2 Feed Header.
    75 	 * Fires at the end of the RSS2 Feed Header.
    64 	 *
    76 	 *
    65 	 * @since 2.0.0
    77 	 * @since 2.0.0