Make WordPress Core

Ticket #56111: 56111.patch

File 56111.patch, 4.0 KB (added by kartikpatel, 2 years ago)
  • wp-admin/options-privacy.php

    diff --git a/wp-admin/options-privacy.php b/wp-admin/options-privacy.php
    index 008ea30fcf..07d16b7954 100644
    a b  
    1010require_once __DIR__ . '/admin.php';
    1111
    1212if ( ! current_user_can( 'manage_privacy_options' ) ) {
    13         wp_die( __( 'Sorry, you are not allowed to manage privacy options on this site.' ) );
     13        wp_die( esc_html__( 'Sorry, you are not allowed to manage privacy options on this site.' ) );
    1414}
    1515
    1616if ( isset( $_GET['tab'] ) && 'policyguide' === $_GET['tab'] ) {
    require_once ABSPATH . 'wp-admin/admin-header.php'; 
    175175<hr class="wp-header-end">
    176176
    177177<div class="notice notice-error hide-if-js">
    178         <p><?php _e( 'The Privacy Settings require JavaScript.' ); ?></p>
     178        <p><?php esc_html_e( 'The Privacy Settings require JavaScript.' ); ?></p>
    179179</div>
    180180
    181181<div class="privacy-settings-body hide-if-no-js">
    182         <h2><?php _e( 'Privacy Settings' ); ?></h2>
     182        <h2><?php esc_html_e( 'Privacy Settings' ); ?></h2>
    183183        <p>
    184                 <?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.' ); ?>
    185                 <?php _e( 'If you already have a Privacy Policy page, please select it below. If not, please create one.' ); ?>
     184                <?php esc_html_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.' ); ?>
     185                <?php esc_html_e( 'If you already have a Privacy Policy page, please select it below. If not, please create one.' ); ?>
    186186        </p>
    187187        <p>
    188                 <?php _e( 'The new page will include help and suggestions for your Privacy Policy.' ); ?>
    189                 <?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.' ); ?>
     188                <?php esc_html_e( 'The new page will include help and suggestions for your Privacy Policy.' ); ?>
     189                <?php esc_html_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.' ); ?>
    190190        </p>
    191191        <p>
    192                 <?php _e( 'After your Privacy Policy page is set, you should edit it.' ); ?>
    193                 <?php _e( 'You should also review 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.' ); ?>
     192                <?php esc_html_e( 'After your Privacy Policy page is set, you should edit it.' ); ?>
     193                <?php esc_html_e( 'You should also review 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.' ); ?>
    194194        </p>
    195195        <p>
    196196                <?php
    require_once ABSPATH . 'wp-admin/admin-header.php'; 
    253253                                <label for="create-page">
    254254                                <?php
    255255                                if ( $has_pages ) {
    256                                         _e( 'Create a new Privacy Policy Page' );
     256                                        esc_html_e( 'Create a new Privacy Policy Page' );
    257257                                } else {
    258                                         _e( 'There are no pages.' );
     258                                        esc_html_e( 'There are no pages.' );
    259259                                }
    260260                                ?>
    261261                                </label>
    require_once ABSPATH . 'wp-admin/admin-header.php'; 
    276276                                <label for="page_for_privacy_policy">
    277277                                        <?php
    278278                                        if ( $privacy_policy_page_exists ) {
    279                                                 _e( 'Change your Privacy Policy page' );
     279                                                esc_attr_e( 'Change your Privacy Policy page' );
    280280                                        } else {
    281                                                 _e( 'Select a Privacy Policy page' );
     281                                                esc_attr_e( 'Select a Privacy Policy page' );
    282282                                        }
    283283                                        ?>
    284284                                </label>
    require_once ABSPATH . 'wp-admin/admin-header.php'; 
    292292                                                        'name'              => 'page_for_privacy_policy',
    293293                                                        'show_option_none'  => __( '&mdash; Select &mdash;' ),
    294294                                                        'option_none_value' => '0',
    295                                                         'selected'          => $privacy_policy_page_id,
     295                                                        'selected'          => esc_html( $privacy_policy_page_id ),
    296296                                                        'post_status'       => array( 'draft', 'publish' ),
    297297                                                )
    298298                                        );