Make WordPress Core


Ignore:
Timestamp:
05/03/2018 05:58:40 PM (6 years ago)
Author:
azaozz
Message:

Privacy: add default text for a privacy policy including a tutorial on now to create one.
Insert both the text and tutorial in new policy pages and highlight is brightly in the editor.
Show only the suggested text in the policy postbox.

Props melchoyce, idea15, allendav, xkon, macbookandrew, azaozz.
Merges [43044], [43048], [43052], [43126], [43146], and [43148] to the 4.9 branch.
Fixes #43473.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/privacy.php

    r43134 r43149  
    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.