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.

Props xkon, laurelfulford, birgire, azaozz, iandunn.
See #43715.


git-svn-id: https://develop.svn.wordpress.org/trunk@43051 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ian Dunn 2018-05-01 06:27:45 +00:00
parent e73af26e92
commit c07f5272f2
19 changed files with 136 additions and 21 deletions

View File

@ -26,7 +26,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

@ -2352,6 +2352,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

@ -2434,6 +2434,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

@ -355,6 +355,14 @@ td {
margin: -1px 0 0 18px;
}
/**
* 8.0 Footer
* -----------------------------------------------------------------------------
*/
.site-info span[role=separator] {
padding: 0 0.5em;
}
/**
* 9.0 Featured Content

View File

@ -2916,6 +2916,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

@ -52,7 +52,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;
}
@ -400,16 +401,6 @@ body:not(.search-results) .entry-summary .alignleft {
}
/**
* 8.4 - Footer
*/
.site-footer .site-title:after {
padding-right: 0.538461538em;
padding-left: 0.307692308em;
}
/**
* 9.0 - Multisites
*/

View File

@ -2443,6 +2443,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">
@ -38,7 +43,9 @@
*/
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

@ -1318,6 +1318,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

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

View File

@ -2705,6 +2705,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