Make WordPress Core

Ticket #43435: 43435.diff

File 43435.diff, 1.8 KB (added by xkon, 7 years ago)

adds a new Privacy Policy page under Tools

  • wp-admin/menu.php

     
    256256        $submenu['tools.php'][5]  = array( __( 'Available Tools' ), 'edit_posts', 'tools.php' );
    257257        $submenu['tools.php'][10] = array( __( 'Import' ), 'import', 'import.php' );
    258258        $submenu['tools.php'][15] = array( __( 'Export' ), 'export', 'export.php' );
     259        $submenu['tools.php'][20] = array( __( 'Privacy Policy' ), 'manage_options', 'privacy-policy.php' );
    259260if ( is_multisite() && ! is_main_site() ) {
    260261        $submenu['tools.php'][25] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' );
    261262}
  • wp-admin/privacy-policy.php

     
     1<?php
     2/**
     3 * Privacy Policy Screen.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** WordPress Administration Bootstrap */
     10require_once( dirname( __FILE__ ) . '/admin.php' );
     11
     12$title = __('Privacy Policy');
     13
     14get_current_screen()->add_help_tab( array(
     15        'id'      => 'privacypolicy',
     16        'title'   => __('Privacy Policy'),
     17        'content' => '<p>' . __('This page will show all of the information gathered by WordPress and/or compatible plugins to assist you on making your Privacy Policy page.' ) . '</p>',
     18) );
     19
     20get_current_screen()->set_help_sidebar(
     21        '<p><strong>' . __('For more information:') . '</strong></p>' .
     22        '<p>' . __('<a href="#">Documentation on GDPR</a>') . '</p>'
     23);
     24
     25require_once( ABSPATH . 'wp-admin/admin-header.php' );
     26
     27?>
     28        <div class="wrap">
     29                <h1><?php echo esc_html( $title ); ?></h1>
     30        </div>
     31<?php
     32include( ABSPATH . 'wp-admin/admin-footer.php' );