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.


Built from https://develop.svn.wordpress.org/trunk@45451


git-svn-id: http://core.svn.wordpress.org/trunk@45262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-05-26 22:57:52 +00:00
parent 6aab3f2f05
commit cbcccbd5b6
5 changed files with 79 additions and 39 deletions

View File

@ -45,7 +45,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<a href="about.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'What&#8217;s New' ); ?></a> <a href="about.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a> <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a> <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
<a href="freedoms.php?privacy-notice" class="nav-tab"><?php _e( 'Privacy' ); ?></a> <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</nav> </nav>
<div class="headline-feature"> <div class="headline-feature">

View File

@ -46,7 +46,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a> <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a> <a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a> <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
<a href="freedoms.php?privacy-notice" class="nav-tab"><?php _e( 'Privacy' ); ?></a> <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</nav> </nav>
<div class="about-wrap-content"> <div class="about-wrap-content">

View File

@ -15,18 +15,10 @@ list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
include( ABSPATH . 'wp-admin/admin-header.php' ); include( ABSPATH . 'wp-admin/admin-header.php' );
$is_privacy_notice = isset( $_GET['privacy-notice'] ); // 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'] ) ) {
if ( $is_privacy_notice ) { wp_redirect( admi_url( 'privacy.php' ), 301 );
$freedoms_class = ''; exit;
$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 = '';
} }
?> ?>
@ -59,31 +51,10 @@ if ( $is_privacy_notice ) {
<nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>"> <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="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="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" class="nav-tab nav-tab-active" aria-current="page"><?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="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</nav> </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="about-wrap-content">
<div class="feature-section has-1-columns"> <div class="feature-section has-1-columns">
<h2><?php _e( 'Freedoms' ); ?></h2> <h2><?php _e( 'Freedoms' ); ?></h2>
@ -139,6 +110,5 @@ if ( $is_privacy_notice ) {
</div> </div>
</div> </div>
<?php endif; ?>
</div> </div>
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?> <?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>

70
wp-admin/privacy.php Normal file
View File

@ -0,0 +1,70 @@
<?php
/**
* Privacy administration panel.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );
$title = __( 'Privacy' );
list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap about-wrap full-width-layout">
<h1>
<?php
/* translators: %s: The current WordPress version number */
printf( __( 'Welcome to WordPress&nbsp;%s' ), $display_version );
?>
</h1>
<p class="about-text">
<?php
printf(
/* translators: %s: The current WordPress version number */
__( 'Congratulations on updating to WordPress %s! This update makes it easier than ever to fix your site if something goes wrong.' ),
$display_version
);
?>
</p>
<div class="wp-badge">
<?php
/* translators: %s: The current WordPress version number */
printf( __( 'Version %s' ), $display_version );
?>
</div>
<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 _e( 'Freedoms' ); ?></a>
<a href="privacy.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Privacy' ); ?></a>
</nav>
<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>
</div>
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-45450'; $wp_version = '5.3-alpha-45451';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.