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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45451 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2019-05-26 22:56:18 +00:00
parent 41847b234e
commit 2fb86e26e6
4 changed files with 78 additions and 38 deletions

View File

@@ -15,18 +15,10 @@ list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
include( ABSPATH . 'wp-admin/admin-header.php' );
$is_privacy_notice = isset( $_GET['privacy-notice'] );
if ( $is_privacy_notice ) {
$freedoms_class = '';
$privacy_class = ' nav-tab-active';
$freedoms_aria_current = '';
$privacy_aria_current = ' aria-current="page"';
} else {
$freedoms_class = ' nav-tab-active';
$privacy_class = '';
$freedoms_aria_current = ' aria-current="page"';
$privacy_aria_current = '';
// This file was used to also display the Privacy tab on the About screen from 4.9.6 until 5.3.0.
if ( isset( $_GET['privacy-notice'] ) ) {
wp_redirect( admi_url( 'privacy.php' ), 301 );
exit;
}
?>
@@ -59,31 +51,10 @@ if ( $is_privacy_notice ) {
<nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab<?php echo $freedoms_class; ?>"<?php echo $freedoms_aria_current; ?>><?php _e( 'Freedoms' ); ?></a>
<a href="freedoms.php?privacy-notice" class="nav-tab<?php echo $privacy_class; ?>"<?php echo $privacy_aria_current; ?>><?php _e( 'Privacy' ); ?></a>
<a href="freedoms.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Freedoms' ); ?></a>
<a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</nav>
<?php if ( $is_privacy_notice ) : ?>
<div class="about-wrap-content">
<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>
<p>
<?php
/* translators: %s: https://wordpress.org/about/stats/ */
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/' );
?>
</p>
<p>
<?php
/* translators: %s: https://wordpress.org/about/privacy/ */
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/' );
?>
</p>
</div>
<?php else : ?>
<div class="about-wrap-content">
<div class="feature-section has-1-columns">
<h2><?php _e( 'Freedoms' ); ?></h2>
@@ -139,6 +110,5 @@ if ( $is_privacy_notice ) {
</div>
</div>
<?php endif; ?>
</div>
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>