wp/wp-admin/privacy-policy-guide.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
     8 
     8 
     9 /** WordPress Administration Bootstrap */
     9 /** WordPress Administration Bootstrap */
    10 require_once __DIR__ . '/admin.php';
    10 require_once __DIR__ . '/admin.php';
    11 
    11 
    12 if ( ! current_user_can( 'manage_privacy_options' ) ) {
    12 if ( ! current_user_can( 'manage_privacy_options' ) ) {
    13 	wp_die( __( 'Sorry, you are not allowed to manage privacy on this site.' ) );
    13 	wp_die( __( 'Sorry, you are not allowed to manage privacy options on this site.' ) );
    14 }
    14 }
    15 
    15 
    16 if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
    16 if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
    17 	include_once ABSPATH . 'wp-admin/includes/class-wp-privacy-policy-content.php';
    17 	include_once ABSPATH . 'wp-admin/includes/class-wp-privacy-policy-content.php';
    18 }
    18 }
    19 
    19 
    20 $title = __( 'Privacy Policy Guide' );
    20 add_filter(
       
    21 	'admin_body_class',
       
    22 	function( $body_class ) {
       
    23 		$body_class .= ' privacy-settings ';
       
    24 
       
    25 		return $body_class;
       
    26 	}
       
    27 );
    21 
    28 
    22 wp_enqueue_script( 'privacy-tools' );
    29 wp_enqueue_script( 'privacy-tools' );
    23 
    30 
    24 require_once ABSPATH . 'wp-admin/admin-header.php';
    31 require_once ABSPATH . 'wp-admin/admin-header.php';
    25 
    32 
    26 ?>
    33 ?>
    27 <div class="wrap">
    34 <div class="privacy-settings-header">
    28 	<h1><?php echo esc_html( $title ); ?></h1>
    35 	<div class="privacy-settings-title-section">
       
    36 		<h1>
       
    37 			<?php _e( 'Privacy' ); ?>
       
    38 		</h1>
       
    39 	</div>
    29 
    40 
    30 	<div class="wp-privacy-policy-guide">
    41 	<nav class="privacy-settings-tabs-wrapper hide-if-no-js" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
       
    42 		<a href="<?php echo esc_url( admin_url( 'options-privacy.php' ) ); ?>" class="privacy-settings-tab">
       
    43 			<?php
       
    44 			/* translators: Tab heading for Site Health Status page. */
       
    45 			_ex( 'Settings', 'Privacy Settings' );
       
    46 			?>
       
    47 		</a>
       
    48 
       
    49 		<a href="<?php echo esc_url( admin_url( 'options-privacy.php?tab=policyguide' ) ); ?>" class="privacy-settings-tab active" aria-current="true">
       
    50 			<?php
       
    51 			/* translators: Tab heading for Site Health Status page. */
       
    52 			_ex( 'Policy Guide', 'Privacy Settings' );
       
    53 			?>
       
    54 		</a>
       
    55 	</nav>
       
    56 </div>
       
    57 
       
    58 <hr class="wp-header-end">
       
    59 
       
    60 <div class="notice notice-error hide-if-js">
       
    61 	<p><?php _e( 'The Privacy Settings require JavaScript.' ); ?></p>
       
    62 </div>
       
    63 
       
    64 <div class="privacy-settings-body hide-if-no-js">
       
    65 	<h2><?php _e( 'Privacy Policy Guide' ); ?></h2>
       
    66 	<h3 class="section-title"><?php _e( 'Introduction' ); ?></h3>
       
    67 	<p><?php _e( 'This text template will help you to create your web site&#8217;s privacy policy.' ); ?></p>
       
    68 	<p><?php _e( 'We have suggested the sections you will need. Under each section heading you will find a short summary of what information you should provide, which will help you to get started. Some sections include suggested policy content, others will have to be completed with information from your theme and plugins.' ); ?></p>
       
    69 	<p><?php _e( 'Please edit your privacy policy content, making sure to delete the summaries, and adding any information from your theme and plugins. Once you publish your policy page, remember to add it to your navigation menu.' ); ?></p>
       
    70 	<p><?php _e( 'It is your responsibility to write a comprehensive privacy policy, to make sure it reflects all national and international legal requirements on privacy, and to keep your policy current and accurate.' ); ?></p>
       
    71 	<div class="privacy-settings-accordion">
       
    72 		<h4 class="privacy-settings-accordion-heading">
       
    73 			<button aria-expanded="false" class="privacy-settings-accordion-trigger" aria-controls="privacy-settings-accordion-block-privacy-policy-guide" type="button">
       
    74 				<span class="title"><?php _e( 'Privacy Policy Guide' ); ?></span>
       
    75 				<span class="icon"></span>
       
    76 			</button>
       
    77 		</h4>
       
    78 		<div id="privacy-settings-accordion-block-privacy-policy-guide" class="privacy-settings-accordion-panel" hidden="hidden">
       
    79 			<?php
       
    80 			$content = WP_Privacy_Policy_Content::get_default_content( true, false );
       
    81 			echo $content;
       
    82 			?>
       
    83 		</div>
       
    84 	</div>
       
    85 	<hr class="hr-separator">
       
    86 	<h3 class="section-title"><?php _e( 'Policies' ); ?></h3>
       
    87 	<div class="privacy-settings-accordion wp-privacy-policy-guide">
    31 		<?php WP_Privacy_Policy_Content::privacy_policy_guide(); ?>
    88 		<?php WP_Privacy_Policy_Content::privacy_policy_guide(); ?>
    32 	</div>
    89 	</div>
    33 </div>
    90 </div>
    34 <?php
    91 <?php
    35 
    92