Changeset 44966 for trunk/src/wp-includes/query.php
- Timestamp:
- 03/21/2019 07:47:29 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r44941 r44966 488 488 489 489 return $wp_query->is_home(); 490 } 491 492 /** 493 * Determines whether the query is for the Privacy Policy page. 494 * 495 * The Privacy Policy page is the page that shows the Privacy Policy content of the site. 496 * 497 * is_privacy_policy() is dependent on the site's "Change your Privacy Policy page" Privacy Settings 'wp_page_for_privacy_policy'. 498 * 499 * This function will return true only on the page you set as the "Privacy Policy page". 500 * 501 * For more information on this and similar theme functions, check out 502 * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ 503 * Conditional Tags} article in the Theme Developer Handbook. 504 * 505 * @since 5.2.0 506 * 507 * @global WP_Query $wp_query Global WP_Query instance. 508 * 509 * @return bool 510 */ 511 function is_privacy_policy() { 512 global $wp_query; 513 514 if ( ! isset( $wp_query ) ) { 515 _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' ); 516 return false; 517 } 518 519 return $wp_query->is_privacy_policy(); 490 520 } 491 521
Note: See TracChangeset
for help on using the changeset viewer.