Ticket #23749: 23749.2.diff
File 23749.2.diff, 1.6 KB (added by , 11 years ago) |
---|
-
src/wp-includes/query.php
292 292 } 293 293 294 294 /** 295 * Is the query for a post format archive page? 296 * 297 * If the $format parameter is specified, this function will check 298 * if the query is for one of the formats specified. 299 * 300 * @since 3.9.0 301 * @uses $wp_query 302 * 303 * @param mixed $format Optional. Format slug or array of format slugs, without the post-format prefix. 304 * @return bool 305 */ 306 function is_post_format_archive( $format = '' ) { 307 global $wp_query; 308 309 if ( ! isset( $wp_query ) ) { 310 return false; 311 } 312 313 return $wp_query->is_post_format_archive( $format ); 314 } 315 316 /** 295 317 * Whether the current URL is within the comments popup window. 296 318 * 297 319 * @see WP_Query::is_comments_popup() … … 3944 3966 } 3945 3967 3946 3968 /** 3969 * Is the query for a post format archive page? 3970 * 3971 * If the $format parameter is specified, this function will check 3972 * if the query is for one of the formats specified. 3973 * 3974 * @since 3.9.0 3975 * 3976 * @param mixed $format Optional. Format slug or array of format slugs, without the post-format prefix. 3977 * @return bool 3978 */ 3979 function is_post_format_archive( $format = '' ) { 3980 if ( ! empty( $format ) ) { 3981 $format = (array) $format; 3982 3983 foreach ( $format as &$value ) { 3984 $value = 'post-format-' . $value; 3985 } 3986 } 3987 3988 return $this->is_tax( 'post_format', $format ); 3989 } 3990 3991 /** 3947 3992 * Whether the current URL is within the comments popup window. 3948 3993 * 3949 3994 * @since 3.1.0