Bundled Themes: Add link to privacy policy page in footer.

If a privacy policy has been set, then a link to it will automatically be shown in the footer.

The element containing the "Proudly powered by WordPress" link was chosen for the new policy link, in order to minimize visual conflicts with custom CSS that was written before the new link existed. Unfortunately, some minor conflicts are expected and unavoidable. Adding this link is required as part of GDPR compliance, and the benefits outweigh the downsides. 

To further mitigate the conflicts, a new imprint class was added to the "Proudly powered..." link, in order to facilitate targeting each link invididually with custom styles.

This was accidentally not backported to the `4.9` branch before the beta/RC phase, but there was a consensus that it is safe to do that this late in the release cycle. 
See https://wordpress.slack.com/archives/C02RQBWTW/p1526577643000132.
See https://wordpress.slack.com/archives/C02RQBWTW/p1526580781000240.

Props xkon, laurelfulford, birgire, azaozz, iandunn.
Merges [43051] to the 4.9 branch.
See #43715.

Built from https://develop.svn.wordpress.org/branches/4.9@43294


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
iandunn 2018-05-17 18:21:26 +00:00
parent bed757a726
commit d097213a7b
20 changed files with 137 additions and 22 deletions

View File

@ -25,7 +25,14 @@
<div id="site-generator">
<?php do_action( 'twentyeleven_credits' ); ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyeleven' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyeleven' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>">
<?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?>
</a>
</div>
</footer><!-- #colophon -->
</div><!-- #page -->

View File

@ -2355,6 +2355,12 @@ p.comment-form-comment {
color: #555;
font-weight: bold;
}
#site-generator span[role=separator] {
padding: 0 0.25em 0 0.5em
}
#site-generator span[role=separator]::before {
content: '\007c';
}
/* =Responsive Structure

View File

@ -22,7 +22,14 @@
*/
do_action( 'twentyfifteen_credits' );
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?>
</a>
</div><!-- .site-info -->
</footer><!-- .site-footer -->

View File

@ -2446,6 +2446,13 @@ a.post-thumbnail:focus {
color: #333;
}
.site-info span[role=separator] {
padding: 0 0.25em 0 0.5em;
}
.site-info span[role=separator]::before {
content: '\002f';
}
/**
* 14.0 Media

View File

@ -18,7 +18,14 @@
<div class="site-info">
<?php do_action( 'twentyfourteen_credits' ); ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?>
</a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->

View File

@ -358,6 +358,14 @@ td {
margin: -1px 0 0 18px;
}
/**
* 8.0 Footer
* -----------------------------------------------------------------------------
*/
.site-info span[role=separator] {
padding: 0 0.5em;
}
/**
* 9.0 Featured Content
@ -858,4 +866,4 @@ td {
margin-left: -18%;
margin-right: auto;
}
}
}

View File

@ -2923,6 +2923,13 @@ a.post-thumbnail:hover {
color: #41a62a;
}
.site-info span[role=separator] {
padding: 0 0.25em 0 0.5em;
}
.site-info span[role=separator]::before {
content: '\002f';
}
/**
* 9.0 Featured Content

View File

@ -2378,6 +2378,14 @@ body:not(.twentyseventeen-front-page) .entry-header {
width: 100%;
}
.site-info span[role=separator] {
padding: 0 0.2em 0 0.4em;
}
.site-info span[role=separator]::before {
content: '\002f';
}
/*--------------------------------------------------------------
14.0 Comments
--------------------------------------------------------------*/

View File

@ -10,5 +10,12 @@
?>
<div class="site-info">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?>
</a>
</div><!-- .site-info -->

View File

@ -48,7 +48,14 @@
do_action( 'twentysixteen_credits' );
?>
<span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?>
</a>
</div><!-- .site-info -->
</footer><!-- .site-footer -->
</div><!-- .site-inner -->

View File

@ -98,7 +98,8 @@ textarea,
.site-footer .site-title,
.site-footer .site-title:after,
.widecolumn label,
.widecolumn .mu_register label {
.widecolumn .mu_register label,
.site-footer span[role=separator] {
font-family: Arial, Tahoma, sans-serif;
}
@ -407,16 +408,6 @@ body:not(.search-results) .entry-summary .alignleft {
font-family: Arial, Tahoma, sans-serif;
}
/**
* 8.4 - Footer
*/
.site-footer .site-title:after {
padding-right: 0.538461538em;
padding-left: 0.307692308em;
}
/**
* 9.0 - Multisites
*/

View File

@ -2453,6 +2453,16 @@ body.search-no-results .page-header {
padding: 0 0.307692308em 0 0.538461538em;
}
.site-footer span[role=separator] {
font-family: Montserrat, sans-serif;
opacity: 0.7;
padding: 0 0.307692308em 0 0.538461538em;
}
.site-footer span[role=separator]::before {
content: '\002f';
}
/**
* 12.0 - Media

View File

@ -27,6 +27,11 @@
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '<span role="separator" aria-hidden="true"></span>', '' );
}
?>
</div><!-- #site-info -->
<div id="site-generator">
@ -37,7 +42,9 @@
* @since Twenty Ten 1.0
*/
do_action( 'twentyten_credits' ); ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyten' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyten' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>">
<?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?>
</a>
</div><!-- #site-generator -->
</div><!-- #colophon -->

View File

@ -1322,6 +1322,12 @@ img#wpstats {
display: block;
margin: 0 auto 10px;
}
#site-info span[role=separator] {
padding: 0 0.6em 0 0.3em;
}
#site-info span[role=separator]::before {
content: '\007c';
}
/* =Mobile Safari ( iPad, iPhone and iPod Touch )

View File

@ -16,7 +16,14 @@
<div class="site-info">
<?php do_action( 'twentythirteen_credits' ); ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentythirteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentythirteen' ) ); ?>" class="imprint">
<?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?>
</a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->

View File

@ -571,6 +571,9 @@ div.nav-menu > ul {
margin-right: auto;
}
.site-footer span[role=separator] {
padding: 0 0.5em;
}
/**
* 8.0 Media Queries
@ -773,4 +776,4 @@ div.nav-menu > ul {
margin-left: 0;
margin-right: auto;
}
}
}

View File

@ -2709,6 +2709,13 @@ footer.entry-meta {
margin: -10px auto 0;
}
.site-footer span[role=separator] {
padding: 0 0.25em 0 0.5em;
}
.site-footer span[role=separator]::before {
content: '\002f';
}
/**
* 8.0 Media Queries

View File

@ -13,7 +13,14 @@
<footer id="colophon" role="contentinfo">
<div class="site-info">
<?php do_action( 'twentytwelve_credits' ); ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a>
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwelve' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>">
<?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?>
</a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->

View File

@ -694,6 +694,12 @@ footer[role="contentinfo"] a {
footer[role="contentinfo"] a:hover {
color: #21759b;
}
.site-info span[role=separator] {
padding: 0 0.3em 0 0.6em;
}
.site-info span[role=separator]::before {
content: '\002f';
}
/* =Main content and comment content

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9.6-RC2-43289';
$wp_version = '4.9.6-RC2-43294';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.