Make WordPress Core


Ignore:
Timestamp:
04/16/2018 08:52:18 AM (7 years ago)
Author:
azaozz
Message:

Privacy: add a postbox that is shown when editing the privacy policy page, and where plugins and core will output suggested content and additional privacy info. First run.

Props melchoyce, azaozz.
See #43620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r42828 r42980  
    42744274    return apply_filters( 'parent_theme_file_path', $path, $file );
    42754275}
     4276
     4277/**
     4278 * Retrieves the URL to the privacy policy page.
     4279 *
     4280 * @since 4.9.6
     4281 *
     4282 * @return string The URL to the privacy policy page. Empty string if it doesn't exist.
     4283 */
     4284function get_privacy_policy_url() {
     4285    $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
     4286
     4287    if ( empty( $policy_page_id ) ) {
     4288        return '';
     4289    }
     4290
     4291    return get_permalink( $policy_page_id );
     4292}
Note: See TracChangeset for help on using the changeset viewer.