Changeset 44966 for trunk/src/wp-includes/class-wp-query.php
- Timestamp:
- 03/21/2019 07:47:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r44941 r44966 325 325 */ 326 326 public $is_home = false; 327 328 /** 329 * Signifies whether the current query is for the Privacy Policy page. 330 * 331 * @since 5.2.0 332 * @var bool 333 */ 334 public $is_privacy_policy = false; 327 335 328 336 /** … … 464 472 $this->is_trackback = false; 465 473 $this->is_home = false; 474 $this->is_privacy_policy = false; 466 475 $this->is_404 = false; 467 476 $this->is_paged = false; … … 999 1008 $this->is_posts_page = true; 1000 1009 } 1010 1011 if ( isset( $this->queried_object_id ) && $this->queried_object_id == get_option( 'wp_page_for_privacy_policy' ) ) { 1012 $this->is_privacy_policy = true; 1013 } 1001 1014 } 1002 1015 … … 1006 1019 $this->is_home = true; 1007 1020 $this->is_posts_page = true; 1021 } 1022 1023 if ( $qv['page_id'] == get_option( 'wp_page_for_privacy_policy' ) ) { 1024 $this->is_privacy_policy = true; 1008 1025 } 1009 1026 } … … 3879 3896 3880 3897 /** 3898 * Is the query for the Privacy Policy page? 3899 * 3900 * This is the page which shows the Privacy Policy content of your site. 3901 * 3902 * Depends on the site's "Change your Privacy Policy page" Privacy Settings 'wp_page_for_privacy_policy'. 3903 * 3904 * This function will return true only on the page you set as the "Privacy Policy page". 3905 * 3906 * @since 5.2.0 3907 * 3908 * @return bool True, if Privacy Policy page. 3909 */ 3910 public function is_privacy_policy() { 3911 if ( get_option( 'wp_page_for_privacy_policy' ) && $this->is_page( get_option( 'wp_page_for_privacy_policy' ) ) ) { 3912 return true; 3913 } else { 3914 return false; 3915 } 3916 } 3917 3918 /** 3881 3919 * Is the query for an existing month archive? 3882 3920 *
Note: See TracChangeset
for help on using the changeset viewer.