Changeset 16447
- Timestamp:
- 11/18/2010 03:19:08 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r16438 r16447 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 global $wp_query; 316 317 return $wp_query->is_feed( );315 function is_feed( $feeds = '' ) { 316 global $wp_query; 317 318 return $wp_query->is_feed( $feeds ); 318 319 } 319 320 … … 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
Note: See TracChangeset
for help on using the changeset viewer.