Make WordPress Core

Ticket #43933: 43933.3.diff

File 43933.3.diff, 3.0 KB (added by iandunn, 7 years ago)

Move details from intro to help tab, add short & friendly intro

  • src/wp-admin/privacy.php

    diff --git src/wp-admin/privacy.php src/wp-admin/privacy.php
    index 8fec1785de..ac6b36859d 100644
    if ( ! empty( $privacy_policy_page_id ) ) { 
    120120$title       = __( 'Privacy Settings' );
    121121$parent_file = 'options-general.php';
    122122
     123$privacy_help = '<p>' . __( 'If you already have a Privacy Policy page, please select it below. If not, you can create one.' ) . '</p>' .
     124        '<p>' . __( 'The new page will include help and suggestions for your Privacy Policy.' ) . '</p>' .
     125        '<p>' . __( "It's important to customize the suggested content to match the data that you collect, and how you use it. It's also important to keep the content up to date as your site changes." ) . '</p>' .
     126        '<p>' . __( 'After your Privacy Policy page is set, we suggest that you edit it.' ) . '</p>' .
     127        '<p>' . __( 'We would also suggest reviewing your Privacy Policy from time to time, especially after installing or updating any themes or plugins. There may be changes or new suggested information for you to consider adding to your policy.' ) . '</p>';
     128
     129get_current_screen()->add_help_tab(
     130        array(
     131                'id'      => 'privacy',
     132                'title'   => __( 'Privacy' ),
     133                'content' => $privacy_help,
     134        )
     135);
     136
    123137require_once( ABSPATH . 'wp-admin/admin-header.php' );
    124138
    125139?>
    126140<div class="wrap">
    127141        <h1><?php echo $title; ?></h1>
    128142        <h2><?php _e( 'Privacy Policy page' ); ?></h2>
    129         <p>
    130                 <?php _e( 'As a website owner, you may need to follow national or international privacy laws. For example, you may need to create and display a Privacy Policy.' ); ?>
    131                 <?php _e( 'If you already have a Privacy Policy page, please select it below. If not, please create one.' ); ?>
    132         </p>
    133         <p>
    134                 <?php _e( 'The new page will include help and suggestions for your Privacy Policy.' ); ?>
    135                 <?php _e( 'However, it is your responsibility to use those resources correctly, to provide the information that your Privacy Policy requires, and to keep that information current and accurate.' ); ?>
    136         </p>
    137         <p>
    138                 <?php _e( 'After your Privacy Policy page is set, we suggest that you edit it.' ); ?>
    139                 <?php _e( 'We would also suggest reviewing your Privacy Policy from time to time, especially after installing or updating any themes or plugins. There may be changes or new suggested information for you to consider adding to your policy.' ); ?>
    140         </p>
     143
    141144        <?php
    142145
     146        printf(
     147                // translators: 1: HTML attributes for the button
     148                __( 'Some international laws require website owners to display a privacy policy that tells visitors to your website what data you collect about them, and how it’s used. <button %1$s>Learn more</button>.' ),
     149                'type="button" id="open-privacy-help-tab" class="button-link"'
     150        );
     151
    143152        if ( $privacy_policy_page_exists ) {
    144153                $edit_href = add_query_arg(
    145154                        array(
    require_once( ABSPATH . 'wp-admin/admin-header.php' ); 
    252261                </tr>
    253262        </table>
    254263</div>
     264
     265<script>
     266        jQuery( '#open-privacy-help-tab' ).click( function() {
     267                jQuery( '#contextual-help-link' ).click();
     268        } );
     269</script>
     270
    255271<?php
    256272
    257273include( ABSPATH . 'wp-admin/admin-footer.php' );