Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (8 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r38925 r42343  
    66 */
    77
    8 header('Content-Type: ' . feed_content_type('rss') . '; charset=' . get_option('blog_charset'), true);
     8header( 'Content-Type: ' . feed_content_type( 'rss' ) . '; 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' ) . '"?' . '>'; ?>
    1212<rss version="0.92">
    1313<channel>
    1414    <title><?php wp_title_rss(); ?></title>
    15     <link><?php bloginfo_rss('url') ?></link>
    16     <description><?php bloginfo_rss('description') ?></description>
    17     <lastBuildDate><?php
     15    <link><?php bloginfo_rss( 'url' ); ?></link>
     16    <description><?php bloginfo_rss( 'description' ); ?></description>
     17    <lastBuildDate>
     18    <?php
    1819        $date = get_lastpostmodified( 'GMT' );
    1920        echo $date ? mysql2date( 'D, d M Y H:i:s +0000', $date ) : date( 'D, d M Y H:i:s +0000' );
    20     ?></lastBuildDate>
     21    ?>
     22    </lastBuildDate>
    2123    <docs>http://backend.userland.com/rss092</docs>
    2224    <language><?php bloginfo_rss( 'language' ); ?></language>
     
    3133    ?>
    3234
    33 <?php while (have_posts()) : the_post(); ?>
     35<?php
     36while ( have_posts() ) :
     37    the_post();
     38?>
    3439    <item>
    35         <title><?php the_title_rss() ?></title>
    36         <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
    37         <link><?php the_permalink_rss() ?></link>
     40        <title><?php the_title_rss(); ?></title>
     41        <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
     42        <link><?php the_permalink_rss(); ?></link>
    3843        <?php
    3944        /**
Note: See TracChangeset for help on using the changeset viewer.