WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/08/2018 11:44:57 PM (2 years ago)
Author:
azaozz
Message:

Privacy: outputting the privacy policy guide and suggested content to a new page instead of a postbox.

Props melchoyce, azaozz.
See #43980.

File:
1 edited

Legend:

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

    r43160 r43184  
    1414}
    1515
     16if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
     17    require_once( ABSPATH . 'wp-admin/includes/misc.php' );
     18}
     19
    1620// "Borrow" xfn.js for now so we don't have to create new files.
    17 // wp_enqueue_script( 'xfn' );
     21wp_enqueue_script( 'xfn' );
    1822
    1923$action = isset( $_POST['action'] ) ? $_POST['action'] : '';
     
    3741        );
    3842    } elseif ( 'create-privacy-page' === $action ) {
    39         if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
    40             require_once( ABSPATH . 'wp-admin/includes/misc.php' );
    41         }
    4243
    4344        $privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content();
     
    116117?>
    117118<div class="wrap">
     119<?php
     120
     121if ( isset( $_GET['wp-suggested-policy-content'] ) ) {
     122
     123    ?>
     124    <h1><?php _e( 'Privacy Policy Guide' ); ?></h1>
     125    <div class="wp-suggested-policy-content">
     126        <?php WP_Privacy_Policy_Content::privacy_policy_guide(); ?>
     127    </div>
     128    <?php
     129
     130} else {
     131
     132?>
    118133    <h1><?php _e( 'Privacy Settings' ); ?></h1>
    119134    <h2><?php _e( 'Privacy Policy page' ); ?></h2>
     
    206221</div>
    207222<?php
     223} // End if/else isset( $_GET['wp-suggested-policy-content'] ).
    208224
    209225include( ABSPATH . 'wp-admin/admin-footer.php' );
Note: See TracChangeset for help on using the changeset viewer.