Make WordPress Core


Ignore:
Timestamp:
04/30/2018 02:46:25 PM (7 years ago)
Author:
azaozz
Message:

Privacy: add default text for a privacy policy. First run.

Props xkon, idea15, allendav, azaozz.
See #43473.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/privacy.php

    r42978 r43044  
    3737        );
    3838    } elseif ( 'create-privacy-page' === $action ) {
     39        if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
     40            require_once( ABSPATH . 'wp-admin/includes/misc.php' );
     41        }
     42
     43        $privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content();
    3944        $privacy_policy_page_id = wp_insert_post(
    4045            array(
    41                 'post_title'  => __( 'Privacy Policy' ),
    42                 'post_status' => 'draft',
    43                 'post_type'   => 'page',
     46                'post_title'   => __( 'Privacy Policy' ),
     47                'post_status'  => 'draft',
     48                'post_type'    => 'page',
     49                'post_content' => $privacy_policy_page_content,
    4450            ),
    4551            true
Note: See TracChangeset for help on using the changeset viewer.