Changeset 48426
- Timestamp:
- 07/10/2020 08:21:01 PM (5 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r48406 r48426 3606 3606 * @since 3.1.0 3607 3607 * 3608 * @return bool 3608 * @return bool Whether the query is for an existing archive page. 3609 3609 */ 3610 3610 public function is_archive() { … … 3619 3619 * @param string|string[] $post_types Optional. Post type or array of posts types 3620 3620 * to check against. Default empty. 3621 * @return bool 3621 * @return bool Whether the query is for an existing post type archive page. 3622 3622 */ 3623 3623 public function is_post_type_archive( $post_types = '' ) { … … 3642 3642 * @param int|string|int[]|string[] $attachment Optional. Attachment ID, title, slug, or array of such 3643 3643 * to check against. Default empty. 3644 * @return bool 3644 * @return bool Whether the query is for an existing attachment page. 3645 3645 */ 3646 3646 public function is_attachment( $attachment = '' ) { … … 3677 3677 * @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such 3678 3678 * to check against. Default empty. 3679 * @return bool 3679 * @return bool Whether the query is for an existing author archive page. 3680 3680 */ 3681 3681 public function is_author( $author = '' ) { … … 3713 3713 * @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such 3714 3714 * to check against. Default empty. 3715 * @return bool 3715 * @return bool Whether the query is for an existing category archive page. 3716 3716 */ 3717 3717 public function is_category( $category = '' ) { … … 3749 3749 * @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such 3750 3750 * to check against. Default empty. 3751 * @return bool 3751 * @return bool Whether the query is for an existing tag archive page. 3752 3752 */ 3753 3753 public function is_tag( $tag = '' ) { … … 3793 3793 * @param int|string|int[]|string[] $term Optional. Term ID, name, slug, or array of such 3794 3794 * to check against. Default empty. 3795 * @return bool True for custom taxonomy archive pages, false for built-in taxonomies 3795 * @return bool Whether the query is for an existing custom taxonomy archive page. 3796 * True for custom taxonomy archive pages, false for built-in taxonomies 3796 3797 * (category and tag archives). 3797 3798 */ … … 3836 3837 * @deprecated 4.5.0 3837 3838 * 3838 * @return bool3839 * @return false Always returns false. 3839 3840 */ 3840 3841 public function is_comments_popup() { … … 3849 3850 * @since 3.1.0 3850 3851 * 3851 * @return bool 3852 * @return bool Whether the query is for an existing date archive. 3852 3853 */ 3853 3854 public function is_date() { … … 3860 3861 * @since 3.1.0 3861 3862 * 3862 * @return bool 3863 * @return bool Whether the query is for an existing day archive. 3863 3864 */ 3864 3865 public function is_day() { … … 3873 3874 * @param string|string[] $feeds Optional. Feed type or array of feed types 3874 3875 * to check against. Default empty. 3875 * @return bool 3876 * @return bool Whether the query is for a feed. 3876 3877 */ 3877 3878 public function is_feed( $feeds = '' ) { … … 3879 3880 return (bool) $this->is_feed; 3880 3881 } 3882 3881 3883 $qv = $this->get( 'feed' ); 3882 3884 if ( 'feed' === $qv ) { 3883 3885 $qv = get_default_feed(); 3884 3886 } 3887 3885 3888 return in_array( $qv, (array) $feeds, true ); 3886 3889 } … … 3891 3894 * @since 3.1.0 3892 3895 * 3893 * @return bool 3896 * @return bool Whether the query is for a comments feed. 3894 3897 */ 3895 3898 public function is_comment_feed() { … … 3911 3914 * @since 3.1.0 3912 3915 * 3913 * @return bool True, if front ofsite.3916 * @return bool Whether the query is for the front page of the site. 3914 3917 */ 3915 3918 public function is_front_page() { … … 3940 3943 * @since 3.1.0 3941 3944 * 3942 * @return bool True if blog viewhomepage.3945 * @return bool Whether the query is for the blog homepage. 3943 3946 */ 3944 3947 public function is_home() { … … 3957 3960 * @since 5.2.0 3958 3961 * 3959 * @return bool True, ifPrivacy Policy page.3962 * @return bool Whether the query is for the Privacy Policy page. 3960 3963 */ 3961 3964 public function is_privacy_policy() { … … 3974 3977 * @since 3.1.0 3975 3978 * 3976 * @return bool 3979 * @return bool Whether the query is for an existing month archive. 3977 3980 */ 3978 3981 public function is_month() { … … 4031 4034 4032 4035 /** 4033 * Is the query for paged result and not for the first page?4036 * Is the query for a paged result and not for the first page? 4034 4037 * 4035 4038 * @since 3.1.0 4036 4039 * 4037 * @return bool 4040 * @return bool Whether the query is for a paged result. 4038 4041 */ 4039 4042 public function is_paged() { … … 4046 4049 * @since 3.1.0 4047 4050 * 4048 * @return bool 4051 * @return bool Whether the query is for a post or page preview. 4049 4052 */ 4050 4053 public function is_preview() { … … 4057 4060 * @since 3.1.0 4058 4061 * 4059 * @return bool 4062 * @return bool Whether the query is for the robots.txt file. 4060 4063 */ 4061 4064 public function is_robots() { … … 4068 4071 * @since 5.4.0 4069 4072 * 4070 * @return bool 4073 * @return bool Whether the query is for the favicon.ico file. 4071 4074 */ 4072 4075 public function is_favicon() { … … 4079 4082 * @since 3.1.0 4080 4083 * 4081 * @return bool 4084 * @return bool Whether the query is for a search. 4082 4085 */ 4083 4086 public function is_search() { … … 4168 4171 * @since 3.1.0 4169 4172 * 4170 * @return bool 4173 * @return bool Whether the query is for a specific time. 4171 4174 */ 4172 4175 public function is_time() { … … 4179 4182 * @since 3.1.0 4180 4183 * 4181 * @return bool 4184 * @return bool Whether the query is for a trackback endpoint call. 4182 4185 */ 4183 4186 public function is_trackback() { … … 4190 4193 * @since 3.1.0 4191 4194 * 4192 * @return bool 4195 * @return bool Whether the query is for an existing year archive. 4193 4196 */ 4194 4197 public function is_year() { … … 4201 4204 * @since 3.1.0 4202 4205 * 4203 * @return bool 4206 * @return bool Whether the query is a 404 error. 4204 4207 */ 4205 4208 public function is_404() { … … 4212 4215 * @since 4.4.0 4213 4216 * 4214 * @return bool 4217 * @return bool Whether the query is for an embedded post. 4215 4218 */ 4216 4219 public function is_embed() { … … 4225 4228 * @global WP_Query $wp_query WordPress Query object. 4226 4229 * 4227 * @return bool 4230 * @return bool Whether the query is the main query. 4228 4231 */ 4229 4232 public function is_main_query() { -
trunk/src/wp-includes/deprecated.php
r48200 r48426 3750 3750 * @deprecated 4.5.0 3751 3751 * 3752 * @return bool3752 * @return false Always returns false. 3753 3753 */ 3754 3754 function is_comments_popup() { -
trunk/src/wp-includes/query.php
r48407 r48426 149 149 * @global WP_Query $wp_query WordPress Query object. 150 150 * 151 * @return bool 151 * @return bool Whether the query is for an existing archive page. 152 152 */ 153 153 function is_archive() { … … 175 175 * @param string|string[] $post_types Optional. Post type or array of posts types 176 176 * to check against. Default empty. 177 * @return bool 177 * @return bool Whether the query is for an existing post type archive page. 178 178 */ 179 179 function is_post_type_archive( $post_types = '' ) { … … 201 201 * @param int|string|int[]|string[] $attachment Optional. Attachment ID, title, slug, or array of such 202 202 * to check against. Default empty. 203 * @return bool 203 * @return bool Whether the query is for an existing attachment page. 204 204 */ 205 205 function is_attachment( $attachment = '' ) { … … 230 230 * @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such 231 231 * to check against. Default empty. 232 * @return bool 232 * @return bool Whether the query is for an existing author archive page. 233 233 */ 234 234 function is_author( $author = '' ) { … … 259 259 * @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such 260 260 * to check against. Default empty. 261 * @return bool 261 * @return bool Whether the query is for an existing category archive page. 262 262 */ 263 263 function is_category( $category = '' ) { … … 288 288 * @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such 289 289 * to check against. Default empty. 290 * @return bool 290 * @return bool Whether the query is for an existing tag archive page. 291 291 */ 292 292 function is_tag( $tag = '' ) { … … 323 323 * @param int|string|int[]|string[] $term Optional. Term ID, name, slug, or array of such 324 324 * to check against. Default empty. 325 * @return bool True for custom taxonomy archive pages, false for built-in taxonomies 325 * @return bool Whether the query is for an existing custom taxonomy archive page. 326 * True for custom taxonomy archive pages, false for built-in taxonomies 326 327 * (category and tag archives). 327 328 */ … … 348 349 * @global WP_Query $wp_query WordPress Query object. 349 350 * 350 * @return bool 351 * @return bool Whether the query is for an existing date archive. 351 352 */ 352 353 function is_date() { … … 374 375 * @global WP_Query $wp_query WordPress Query object. 375 376 * 376 * @return bool 377 * @return bool Whether the query is for an existing day archive. 377 378 */ 378 379 function is_day() { … … 400 401 * @param string|string[] $feeds Optional. Feed type or array of feed types 401 402 * to check against. Default empty. 402 * @return bool 403 * @return bool Whether the query is for a feed. 403 404 */ 404 405 function is_feed( $feeds = '' ) { … … 420 421 * @global WP_Query $wp_query WordPress Query object. 421 422 * 422 * @return bool 423 * @return bool Whether the query is for a comments feed. 423 424 */ 424 425 function is_comment_feed() { … … 453 454 * @global WP_Query $wp_query WordPress Query object. 454 455 * 455 * @return bool True, if front ofsite.456 * @return bool Whether the query is for the front page of the site. 456 457 */ 457 458 function is_front_page() { … … 486 487 * @global WP_Query $wp_query WordPress Query object. 487 488 * 488 * @return bool True if blog view homepage, otherwise false.489 * @return bool Whether the query is for the blog homepage. 489 490 */ 490 491 function is_home() { … … 516 517 * @global WP_Query $wp_query WordPress Query object. 517 518 * 518 * @return bool 519 * @return bool Whether the query is for the Privacy Policy page. 519 520 */ 520 521 function is_privacy_policy() { … … 540 541 * @global WP_Query $wp_query WordPress Query object. 541 542 * 542 * @return bool 543 * @return bool Whether the query is for an existing month archive. 543 544 */ 544 545 function is_month() { … … 586 587 587 588 /** 588 * Determines whether the query is for paged resultsand not for the first page.589 * 590 * For more information on this and similar theme functions, check out 591 * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ 592 * Conditional Tags} article in the Theme Developer Handbook. 593 * 594 * @since 1.5.0 595 * 596 * @global WP_Query $wp_query WordPress Query object. 597 * 598 * @return bool 589 * Determines whether the query is for a paged result and not for the first page. 590 * 591 * For more information on this and similar theme functions, check out 592 * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ 593 * Conditional Tags} article in the Theme Developer Handbook. 594 * 595 * @since 1.5.0 596 * 597 * @global WP_Query $wp_query WordPress Query object. 598 * 599 * @return bool Whether the query is for a paged result. 599 600 */ 600 601 function is_paged() { … … 620 621 * @global WP_Query $wp_query WordPress Query object. 621 622 * 622 * @return bool 623 * @return bool Whether the query is for a post or page preview. 623 624 */ 624 625 function is_preview() { … … 640 641 * @global WP_Query $wp_query WordPress Query object. 641 642 * 642 * @return bool 643 * @return bool Whether the query is for the robots.txt file. 643 644 */ 644 645 function is_robots() { … … 660 661 * @global WP_Query $wp_query WordPress Query object. 661 662 * 662 * @return bool 663 * @return bool Whether the query is for the favicon.ico file. 663 664 */ 664 665 function is_favicon() { … … 684 685 * @global WP_Query $wp_query WordPress Query object. 685 686 * 686 * @return bool 687 * @return bool Whether the query is for a search. 687 688 */ 688 689 function is_search() { … … 776 777 * @global WP_Query $wp_query WordPress Query object. 777 778 * 778 * @return bool 779 * @return bool Whether the query is for a specific time. 779 780 */ 780 781 function is_time() { … … 800 801 * @global WP_Query $wp_query WordPress Query object. 801 802 * 802 * @return bool 803 * @return bool Whether the query is for a trackback endpoint call. 803 804 */ 804 805 function is_trackback() { … … 824 825 * @global WP_Query $wp_query WordPress Query object. 825 826 * 826 * @return bool 827 * @return bool Whether the query is for an existing year archive. 827 828 */ 828 829 function is_year() { … … 848 849 * @global WP_Query $wp_query WordPress Query object. 849 850 * 850 * @return bool 851 * @return bool Whether the query is a 404 error. 851 852 */ 852 853 function is_404() { … … 868 869 * @global WP_Query $wp_query WordPress Query object. 869 870 * 870 * @return bool Whether we're in an embedded post or not.871 * @return bool Whether the query is for an embedded post. 871 872 */ 872 873 function is_embed() { … … 892 893 * @global WP_Query $wp_query WordPress Query object. 893 894 * 894 * @return bool 895 * @return bool Whether the query is the main query. 895 896 */ 896 897 function is_main_query() {
Note: See TracChangeset
for help on using the changeset viewer.