Make WordPress Core

Ticket #15460: 15460.patch

File 15460.patch, 658 bytes (added by johnbillion, 14 years ago)
  • query.php

     
    311311 *
    312312 * @return bool
    313313 */
    314 function is_feed() {
     314function is_feed( $format = null ) {
    315315        global $wp_query;
    316316
    317         return $wp_query->is_feed();
     317        return $wp_query->is_feed( $format );
    318318}
    319319
    320320/**
     
    29382938         *
    29392939         * @return bool
    29402940         */
    2941         function is_feed() {
    2942                 return (bool) $this->is_feed;
     2941        function is_feed( $format ) {
     2942                if ( !$this->is_feed )
     2943                        return false;
     2944                else if ( $format )
     2945                        return ( $format === get_query_var( 'feed' ) );
     2946                else
     2947                        return true;
    29432948        }
    29442949
    29452950        /**