IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 140 | 140 | * |
| 141 | 141 | * @global WP_Query $wp_query Global WP_Query instance. |
| 142 | 142 | * |
| | 143 | * @param string|array $post_types Optional. Post type or array of posts types to check against. |
| 143 | 144 | * @return bool |
| 144 | 145 | */ |
| 145 | | function is_archive() { |
| | 146 | function is_archive( $post_types = '' ) { |
| 146 | 147 | global $wp_query; |
| 147 | 148 | |
| 148 | 149 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 150 | 151 | return false; |
| 151 | 152 | } |
| 152 | 153 | |
| 153 | | return $wp_query->is_archive(); |
| | 154 | return $wp_query->is_archive( $post_types ); |
| 154 | 155 | } |
| 155 | 156 | |
| 156 | 157 | /** |
| … |
… |
|
| 4078 | 4079 | * |
| 4079 | 4080 | * @since 3.1.0 |
| 4080 | 4081 | * |
| | 4082 | * @param string|array $post_types Optional. Post type or array of posts types to check against. |
| | 4083 | * |
| 4081 | 4084 | * @return bool |
| 4082 | 4085 | */ |
| 4083 | | public function is_archive() { |
| | 4086 | public function is_archive( $post_types = '' ) { |
| | 4087 | if ( ! empty( $post_types )) { |
| | 4088 | return $this->is_post_type_archive( $post_types ); |
| | 4089 | } |
| | 4090 | |
| 4084 | 4091 | return (bool) $this->is_archive; |
| 4085 | 4092 | } |
| 4086 | 4093 | |