WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/02/2018 02:58:12 AM (3 years ago)
Author:
SergeyBiryukov
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.
Merges [42980] to the 4.9 branch.
See #43620.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/link-template.php

    r41589 r43101  
    41054105    return apply_filters( 'parent_theme_file_path', $path, $file );
    41064106}
     4107
     4108/**
     4109 * Retrieves the URL to the privacy policy page.
     4110 *
     4111 * @since 4.9.6
     4112 *
     4113 * @return string The URL to the privacy policy page. Empty string if it doesn't exist.
     4114 */
     4115function get_privacy_policy_url() {
     4116    $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
     4117
     4118    if ( empty( $policy_page_id ) ) {
     4119        return '';
     4120    }
     4121
     4122    return get_permalink( $policy_page_id );
     4123}
Note: See TracChangeset for help on using the changeset viewer.