Ticket #15460: 15460.diff
File 15460.diff, 936 bytes (added by , 10 years ago) |
---|
-
wp-includes/query.php
309 309 * @since 1.5.0 310 310 * @uses $wp_query 311 311 * 312 * @param string|array $feeds Optional feed types to check. 312 313 * @return bool 313 314 */ 314 function is_feed( ) {315 function is_feed( $feeds = '' ) { 315 316 global $wp_query; 316 317 317 return $wp_query->is_feed( );318 return $wp_query->is_feed( $feeds ); 318 319 } 319 320 320 321 /** … … 2936 2937 * 2937 2938 * @since 3.1.0 2938 2939 * 2940 * @param string|array $feeds Optional feed types to check. 2939 2941 * @return bool 2940 2942 */ 2941 function is_feed() { 2942 return (bool) $this->is_feed; 2943 function is_feed( $feeds = '' ) { 2944 if ( empty( $feeds ) || ! $this->is_feed ) 2945 return (bool) $this->is_feed; 2946 $qv = $this->get( 'feed' ); 2947 if ( 'feed' == $qv ) 2948 $qv = get_default_feed(); 2949 return in_array( $qv, (array) $feeds ); 2943 2950 } 2944 2951 2945 2952 /**