Make WordPress Core


Ignore:
Timestamp:
03/21/2019 07:47:29 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/url/getPrivacyPolicyUrl.php

    r43002 r44966  
    4646            )
    4747        );
    48 
    49         self::$privacy_policy_url = get_permalink( self::$privacy_policy_page_id );
    5048    }
    5149
     
    6159     */
    6260    public function test_get_privacy_policy_url_should_return_valid_url_when_policy_page_set() {
     61        $privacy_policy_url = get_permalink( self::$privacy_policy_page_id );
    6362        update_option( 'wp_page_for_privacy_policy', self::$privacy_policy_page_id );
    6463
    65         $this->assertSame( self::$privacy_policy_url, get_privacy_policy_url() );
     64        $this->assertSame( $privacy_policy_url, get_privacy_policy_url() );
    6665    }
    6766
Note: See TracChangeset for help on using the changeset viewer.