mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Privacy: Introduce Privacy Policy page helpers:
* `is_privacy_policy()` template tag * `privacy-policy.php` template * `.privacy-policy` body class * `.menu-item-privacy-policy` menu item class Props garrett-eclipse, birgire, xkon, Clorith. Fixes #44005. git-svn-id: https://develop.svn.wordpress.org/trunk@44966 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1590,4 +1590,24 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
$this->assertTrue( is_single( $p2 ) );
|
||||
$this->assertFalse( is_single( $p1 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 44005
|
||||
* @group privacy
|
||||
*/
|
||||
public function test_is_privacy_policy() {
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'Privacy Policy',
|
||||
)
|
||||
);
|
||||
|
||||
update_option( 'wp_page_for_privacy_policy', $page_id );
|
||||
|
||||
$this->go_to( get_permalink( $page_id ) );
|
||||
|
||||
$this->assertQueryTrue( 'is_page', 'is_singular', 'is_privacy_policy' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user