Make WordPress Core

Ticket #49602: #49602.patch

File #49602.patch, 6.6 KB (added by arena, 5 years ago)

first patch

  • wp-admin/options-privacy.php

     
    115115$title       = __( 'Privacy Settings' );
    116116$parent_file = 'options-general.php';
    117117
     118get_current_screen()->add_help_tab(
     119        array(
     120                'id'      => 'overview',
     121                'title'   => __( 'Overview' ),
     122                'content' => '<p>' . __( 'This screen contains the settings that help you to set up or affect your privacy policy.' ) . '</p>' .
     123                        '<p>' . __( '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.' ) . '</p>',
     124        )
     125);
     126
     127get_current_screen()->add_help_tab(
     128        array(
     129                'id'      => 'privacy-policy-page',
     130                'title'   => __( 'Policy Page' ),
     131                'content' => '<p>' . __( 'If you already have a Privacy Policy page, please select it. If not, please create one.' ) . '</p>' .
     132                        '<p>' . __( 'The new page will include help and suggestions for your Privacy Policy.' ) . '</p>' .
     133                        '<p>' . __( '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.' ) . '</p>' .
     134                        '<p>' . __( 'After your Privacy Policy page is set, we suggest that you edit it.' ) . '</p>' .
     135                        '<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>',
     136        )
     137);
     138
     139get_current_screen()->set_help_sidebar(
     140        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
     141        /* translators: 1: Privacy Policy guide URL */
     142        '<p>' . sprintf( __( '<a href="%1$s">Privacy Policy guide</a>' ), esc_url( admin_url( 'privacy-policy-guide.php' ) ) ) . '</p>' .
     143        '<p>' . __( '<a href="https://wordpress.org/support/article/settings-privacy-screen/">Documentation on Privacy Settings</a>' ) . '</p>' .
     144        '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
     145);
     146
    118147require_once ABSPATH . 'wp-admin/admin-header.php';
    119148
    120149?>
    121150<div class="wrap">
    122151        <h1><?php echo $title; ?></h1>
    123         <h2><?php _e( 'Privacy Policy Page' ); ?></h2>
    124         <p>
    125                 <?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.' ); ?>
    126                 <?php _e( 'If you already have a Privacy Policy page, please select it below. If not, please create one.' ); ?>
    127         </p>
    128         <p>
    129                 <?php _e( 'The new page will include help and suggestions for your Privacy Policy.' ); ?>
    130                 <?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.' ); ?>
    131         </p>
    132         <p>
    133                 <?php _e( 'After your Privacy Policy page is set, we suggest that you edit it.' ); ?>
    134                 <?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.' ); ?>
    135         </p>
     152        <h2><?php _e( 'Policy Page' ); ?></h2>
    136153        <?php
    137154
    138155        if ( $privacy_policy_page_exists ) {
     
    146163
    147164                $view_href = get_permalink( $privacy_policy_page_id );
    148165                ?>
    149                 <p class="tools-privacy-edit"><strong>
     166                <p class="tools-privacy-edit">
    150167                        <?php
    151168                        if ( 'publish' === get_post_status( $privacy_policy_page_id ) ) {
    152169                                printf(
    153170                                        /* translators: 1: URL to edit Privacy Policy page, 2: URL to view Privacy Policy page. */
    154                                         __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your Privacy Policy page content.' ),
     171                                        __( 'You can already <a href="%1$s">edit</a> or <a href="%2$s">view</a> your Privacy Policy page content.' ),
    155172                                        esc_url( $edit_href ),
    156173                                        esc_url( $view_href )
    157174                                );
     
    158175                        } else {
    159176                                printf(
    160177                                        /* translators: 1: URL to edit Privacy Policy page, 2: URL to preview Privacy Policy page. */
    161                                         __( '<a href="%1$s">Edit</a> or <a href="%2$s">preview</a> your Privacy Policy page content.' ),
     178                                        __( 'You can already <a href="%1$s">edit</a> or <a href="%2$s">preview</a> your Privacy Policy page content.' ),
    162179                                        esc_url( $edit_href ),
    163180                                        esc_url( $view_href )
    164181                                );
    165182                        }
    166183                        ?>
    167                 </strong></p>
     184                </p>
    168185                <?php
    169186        }
    170187        ?>
    171         <p>
    172                 <?php
    173                 printf(
    174                         /* translators: 1: Privacy Policy guide URL, 2: Additional link attributes, 3: Accessibility text. */
    175                         __( 'Need help putting together your new Privacy Policy page? <a href="%1$s" %2$s>Check out our guide%3$s</a> for recommendations on what content to include, along with policies suggested by your plugins and theme.' ),
    176                         esc_url( admin_url( 'privacy-policy-guide.php' ) ),
    177                         '',
    178                         ''
    179                 );
    180                 ?>
    181         </p>
    182 
    183         <hr>
    184188        <table class="form-table tools-privacy-policy-page" role="presentation">
    185189                <tr>
    186190                        <th scope="row">
    187191                                <label for="page_for_privacy_policy">
    188192                                        <?php
    189                                         if ( $privacy_policy_page_exists ) {
    190                                                 _e( 'Change your Privacy Policy page' );
    191                                         } else {
    192                                                 _e( 'Select a Privacy Policy page' );
    193                                         }
     193                                                _e( 'Your Privacy Policy page' );
    194194                                        ?>
    195195                                </label>
     196                                <br />
     197<!--
     198                        <?php
     199                        if ( 'publish' === get_post_status( $privacy_policy_page_id ) ) {
     200                                printf(
     201                                        /* translators: 1: URL to edit Privacy Policy page, 2: URL to view Privacy Policy page. */
     202                                        __( '<span style="padding-right: 25px;"><a href="%1$s">Edit</a></span><a href="%2$s">View</a>' ),
     203                                        esc_url( $edit_href ),
     204                                        esc_url( $view_href )
     205                                );
     206                        } else {
     207                                printf(
     208                                        /* translators: 1: URL to edit Privacy Policy page, 2: URL to preview Privacy Policy page. */
     209                                        __( '<span style="padding-right: 25px;"><a href="%1$s">Edit</a></span><span style="padding-left:40px;"><a href="%2$s">Preview</a></span>' ),
     210                                        esc_url( $edit_href ),
     211                                        esc_url( $view_href )
     212                                );
     213                        }
     214                        ?>
     215-->
    196216                        </th>
    197217                        <td>
    198218                                <?php
     
    209229
    210230                                if ( $has_pages ) :
    211231                                        ?>
    212                                         <form method="post" action="">
     232                                        <form method="post" action="" style="float:left;">
    213233                                                <input type="hidden" name="action" value="set-privacy-page" />
    214234                                                <?php
    215235                                                wp_dropdown_pages(
     
    230250                                <?php endif; ?>
    231251
    232252                                <form class="wp-create-privacy-page" method="post" action="">
    233                                         <input type="hidden" name="action" value="create-privacy-page" />
    234                                         <span>
     253                                        <input type="hidden" name="action" value="create-privacy-page" /> 
     254                                        <span style="padding-left: 40px;">
    235255                                                <?php
    236256                                                if ( $has_pages ) {
    237257                                                        _e( 'Or:' );