Ticket #15460: 15460.patch
File 15460.patch, 658 bytes (added by , 14 years ago) |
---|
-
query.php
311 311 * 312 312 * @return bool 313 313 */ 314 function is_feed( ) {314 function is_feed( $format = null ) { 315 315 global $wp_query; 316 316 317 return $wp_query->is_feed( );317 return $wp_query->is_feed( $format ); 318 318 } 319 319 320 320 /** … … 2938 2938 * 2939 2939 * @return bool 2940 2940 */ 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; 2943 2948 } 2944 2949 2945 2950 /**