Make WordPress Core


Ignore:
Timestamp:
05/26/2019 10:56:18 PM (6 years ago)
Author:
azaozz
Message:

Privacy tools: restore privacy.php to its "proper" use to output the Privacy tab on the About screen, see [42814]. Then add the Privacy tab updates from freedoms.php.

See #43895.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/freedoms.php

    r45338 r45451  
    1616include( ABSPATH . 'wp-admin/admin-header.php' );
    1717
    18 $is_privacy_notice = isset( $_GET['privacy-notice'] );
    19 
    20 if ( $is_privacy_notice ) {
    21     $freedoms_class        = '';
    22     $privacy_class         = ' nav-tab-active';
    23     $freedoms_aria_current = '';
    24     $privacy_aria_current  = ' aria-current="page"';
    25 } else {
    26     $freedoms_class        = ' nav-tab-active';
    27     $privacy_class         = '';
    28     $freedoms_aria_current = ' aria-current="page"';
    29     $privacy_aria_current  = '';
     18// This file was used to also display the Privacy tab on the About screen from 4.9.6 until 5.3.0.
     19if ( isset( $_GET['privacy-notice'] ) ) {
     20    wp_redirect( admi_url( 'privacy.php' ), 301 );
     21    exit;
    3022}
    3123
     
    6052    <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
    6153    <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
    62     <a href="freedoms.php" class="nav-tab<?php echo $freedoms_class; ?>"<?php echo $freedoms_aria_current; ?>><?php _e( 'Freedoms' ); ?></a>
    63     <a href="freedoms.php?privacy-notice" class="nav-tab<?php echo $privacy_class; ?>"<?php echo $privacy_aria_current; ?>><?php _e( 'Privacy' ); ?></a>
     54    <a href="freedoms.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Freedoms' ); ?></a>
     55    <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
    6456</nav>
    6557
    66 <?php if ( $is_privacy_notice ) : ?>
    67 
    68 <div class="about-wrap-content">
    69     <p class="about-description"><?php _e( 'From time to time, your WordPress site may send data to WordPress.org &#8212; including, but not limited to &#8212; the version of WordPress you are using, and a list of installed plugins and themes.' ); ?></p>
    70 
    71     <p>
    72         <?php
    73         /* translators: %s: https://wordpress.org/about/stats/ */
    74         printf( __( 'This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the <a href="%s">WordPress.org stats page</a>.' ), 'https://wordpress.org/about/stats/' );
    75         ?>
    76     </p>
    77 
    78     <p>
    79         <?php
    80         /* translators: %s: https://wordpress.org/about/privacy/ */
    81         printf( __( 'We take privacy and transparency very seriously. To learn more about what data we collect, and how we use it, please visit <a href="%s">WordPress.org/about/privacy</a>.' ), 'https://wordpress.org/about/privacy/' );
    82         ?>
    83     </p>
    84 </div>
    85 
    86 <?php else : ?>
    8758<div class="about-wrap-content">
    8859    <div class="feature-section has-1-columns">
     
    140111</div>
    141112
    142 <?php endif; ?>
    143113</div>
    144114<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Note: See TracChangeset for help on using the changeset viewer.