mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Docs: Improve documentation for WP_Query::is_archive() per the documentation standards.
Follow-up to [49504]. See #50545. git-svn-id: https://develop.svn.wordpress.org/trunk@49506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e38410c2fd
commit
33111495b2
@ -3607,10 +3607,18 @@ class WP_Query {
|
||||
/**
|
||||
* Is the query for an existing archive page?
|
||||
*
|
||||
* Month, Year, Category, Author, Post Type archive...
|
||||
* Archive pages include category, tag, author, date, custom post type,
|
||||
* and custom taxonomy based archives.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @see WP_Query::is_category()
|
||||
* @see WP_Query::is_tag()
|
||||
* @see WP_Query::is_author()
|
||||
* @see WP_Query::is_date()
|
||||
* @see WP_Query::is_post_type_archive()
|
||||
* @see WP_Query::is_tax()
|
||||
*
|
||||
* @return bool Whether the query is for an existing archive page.
|
||||
*/
|
||||
public function is_archive() {
|
||||
|
||||
@ -138,7 +138,8 @@ function wp_reset_postdata() {
|
||||
/**
|
||||
* Determines whether the query is for an existing archive page.
|
||||
*
|
||||
* Archive pages include {@link https://developer.wordpress.org/reference/functions/is_category/ category}, {@link https://developer.wordpress.org/reference/functions/is_tag/ tag}, {@link https://developer.wordpress.org/reference/functions/is_author/ author}, {@link https://developer.wordpress.org/reference/functions/is_date/ date}, {@link https://developer.wordpress.org/reference/functions/is_post_type_archive/ custom post type}, and {@link https://developer.wordpress.org/reference/functions/is_tax/ custom taxonomy} based archives.
|
||||
* Archive pages include category, tag, author, date, custom post type,
|
||||
* and custom taxonomy based archives.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
@ -146,6 +147,12 @@ function wp_reset_postdata() {
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @see is_category()
|
||||
* @see is_tag()
|
||||
* @see is_author()
|
||||
* @see is_date()
|
||||
* @see is_post_type_archive()
|
||||
* @see is_tax()
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*
|
||||
* @return bool Whether the query is for an existing archive page.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user