Skip to content

Commit c07f527

Browse files
committed
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
1 parent e73af26 commit c07f527

19 files changed

Lines changed: 136 additions & 21 deletions

File tree

src/wp-content/themes/twentyeleven/footer.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@
2626

2727
<div id="site-generator">
2828
<?php do_action( 'twentyeleven_credits' ); ?>
29-
<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>
29+
<?php
30+
if ( function_exists( 'the_privacy_policy_link' ) ) {
31+
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
32+
}
33+
?>
34+
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyeleven' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>">
35+
<?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?>
36+
</a>
3037
</div>
3138
</footer><!-- #colophon -->
3239
</div><!-- #page -->

src/wp-content/themes/twentyeleven/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,12 @@ p.comment-form-comment {
23522352
color: #555;
23532353
font-weight: bold;
23542354
}
2355+
#site-generator span[role=separator] {
2356+
padding: 0 0.25em 0 0.5em
2357+
}
2358+
#site-generator span[role=separator]::before {
2359+
content: '\007c';
2360+
}
23552361

23562362

23572363
/* =Responsive Structure

src/wp-content/themes/twentyfifteen/footer.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@
2222
*/
2323
do_action( 'twentyfifteen_credits' );
2424
?>
25-
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>
25+
<?php
26+
if ( function_exists( 'the_privacy_policy_link' ) ) {
27+
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
28+
}
29+
?>
30+
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>" class="imprint">
31+
<?php printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?>
32+
</a>
2633
</div><!-- .site-info -->
2734
</footer><!-- .site-footer -->
2835

src/wp-content/themes/twentyfifteen/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,6 +2434,13 @@ a.post-thumbnail:focus {
24342434
color: #333;
24352435
}
24362436

2437+
.site-info span[role=separator] {
2438+
padding: 0 0.25em 0 0.5em;
2439+
}
2440+
2441+
.site-info span[role=separator]::before {
2442+
content: '\002f';
2443+
}
24372444

24382445
/**
24392446
* 14.0 Media

src/wp-content/themes/twentyfourteen/footer.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818

1919
<div class="site-info">
2020
<?php do_action( 'twentyfourteen_credits' ); ?>
21-
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?></a>
21+
<?php
22+
if ( function_exists( 'the_privacy_policy_link' ) ) {
23+
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
24+
}
25+
?>
26+
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>" class="imprint">
27+
<?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?>
28+
</a>
2229
</div><!-- .site-info -->
2330
</footer><!-- #colophon -->
2431
</div><!-- #page -->

src/wp-content/themes/twentyfourteen/rtl.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,14 @@ td {
355355
margin: -1px 0 0 18px;
356356
}
357357

358+
/**
359+
* 8.0 Footer
360+
* -----------------------------------------------------------------------------
361+
*/
362+
363+
.site-info span[role=separator] {
364+
padding: 0 0.5em;
365+
}
358366

359367
/**
360368
* 9.0 Featured Content
@@ -855,4 +863,4 @@ td {
855863
margin-left: -18%;
856864
margin-right: auto;
857865
}
858-
}
866+
}

src/wp-content/themes/twentyfourteen/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,6 +2916,13 @@ a.post-thumbnail:hover {
29162916
color: #41a62a;
29172917
}
29182918

2919+
.site-info span[role=separator] {
2920+
padding: 0 0.25em 0 0.5em;
2921+
}
2922+
2923+
.site-info span[role=separator]::before {
2924+
content: '\002f';
2925+
}
29192926

29202927
/**
29212928
* 9.0 Featured Content

src/wp-content/themes/twentyseventeen/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,6 +2378,14 @@ body:not(.twentyseventeen-front-page) .entry-header {
23782378
width: 100%;
23792379
}
23802380

2381+
.site-info span[role=separator] {
2382+
padding: 0 0.2em 0 0.4em;
2383+
}
2384+
2385+
.site-info span[role=separator]::before {
2386+
content: '\002f';
2387+
}
2388+
23812389
/*--------------------------------------------------------------
23822390
14.0 Comments
23832391
--------------------------------------------------------------*/

src/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,12 @@
1010

1111
?>
1212
<div class="site-info">
13-
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?></a>
13+
<?php
14+
if ( function_exists( 'the_privacy_policy_link' ) ) {
15+
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
16+
}
17+
?>
18+
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyseventeen' ) ); ?>" class="imprint">
19+
<?php printf( __( 'Proudly powered by %s', 'twentyseventeen' ), 'WordPress' ); ?>
20+
</a>
1421
</div><!-- .site-info -->

src/wp-content/themes/twentysixteen/footer.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@
5252
do_action( 'twentysixteen_credits' );
5353
?>
5454
<span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
55-
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?></a>
55+
<?php
56+
if ( function_exists( 'the_privacy_policy_link' ) ) {
57+
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
58+
}
59+
?>
60+
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>" class="imprint">
61+
<?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?>
62+
</a>
5663
</div><!-- .site-info -->
5764
</footer><!-- .site-footer -->
5865
</div><!-- .site-inner -->

0 commit comments

Comments
 (0)