WordPress.org

Make WordPress Core

Changeset 43294


Ignore:
Timestamp:
05/17/2018 06:20:44 PM (3 years ago)
Author:
iandunn
Message:

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.

Location:
branches/4.9
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-content/themes/twentyeleven/footer.php

    r35807 r43294  
    2626            <div id="site-generator">
    2727                <?php do_action( 'twentyeleven_credits' ); ?>
    28                 <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>
     28                <?php
     29                if ( function_exists( 'the_privacy_policy_link' ) ) {
     30                    the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
     31                }
     32                ?>
     33                <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyeleven' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>">
     34                    <?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?>
     35                </a>
    2936            </div>
    3037    </footer><!-- #colophon -->
  • branches/4.9/src/wp-content/themes/twentyeleven/style.css

    r43130 r43294  
    23562356    font-weight: bold;
    23572357}
     2358#site-generator span[role=separator] {
     2359    padding: 0 0.25em 0 0.5em
     2360}
     2361#site-generator span[role=separator]::before {
     2362    content: '\007c';
     2363}
    23582364
    23592365
  • branches/4.9/src/wp-content/themes/twentyfifteen/footer.php

    r30896 r43294  
    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 -->
  • branches/4.9/src/wp-content/themes/twentyfifteen/style.css

    r43130 r43294  
    24472447}
    24482448
     2449.site-info span[role=separator] {
     2450    padding: 0 0.25em 0 0.5em;
     2451}
     2452
     2453.site-info span[role=separator]::before {
     2454    content: '\002f';
     2455}
    24492456
    24502457/**
  • branches/4.9/src/wp-content/themes/twentyfourteen/footer.php

    r32314 r43294  
    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 -->
  • branches/4.9/src/wp-content/themes/twentyfourteen/rtl.css

    r43130 r43294  
    359359}
    360360
     361/**
     362 * 8.0 Footer
     363 * -----------------------------------------------------------------------------
     364 */
     365
     366.site-info span[role=separator] {
     367    padding: 0 0.5em;
     368}
    361369
    362370/**
  • branches/4.9/src/wp-content/themes/twentyfourteen/style.css

    r43130 r43294  
    29242924}
    29252925
     2926.site-info span[role=separator] {
     2927    padding: 0 0.25em 0 0.5em;
     2928}
     2929
     2930.site-info span[role=separator]::before {
     2931    content: '\002f';
     2932}
    29262933
    29272934/**
  • branches/4.9/src/wp-content/themes/twentyseventeen/style.css

    r43130 r43294  
    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/*--------------------------------------------------------------
    2382239014.0 Comments
  • branches/4.9/src/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php

    r38833 r43294  
    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 -->
  • branches/4.9/src/wp-content/themes/twentysixteen/footer.php

    r40851 r43294  
    4949                ?>
    5050                <span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
    51                 <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?></a>
     51                <?php
     52                if ( function_exists( 'the_privacy_policy_link' ) ) {
     53                    the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
     54                }
     55                ?>
     56                <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>" class="imprint">
     57                    <?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?>
     58                </a>
    5259            </div><!-- .site-info -->
    5360        </footer><!-- .site-footer -->
  • branches/4.9/src/wp-content/themes/twentysixteen/rtl.css

    r43130 r43294  
    9999.site-footer .site-title:after,
    100100.widecolumn label,
    101 .widecolumn .mu_register label {
     101.widecolumn .mu_register label,
     102.site-footer span[role=separator] {
    102103    font-family: Arial, Tahoma, sans-serif;
    103104}
     
    409410
    410411/**
    411  * 8.4 - Footer
    412  */
    413 
    414 .site-footer .site-title:after {
    415     padding-right: 0.538461538em;
    416     padding-left: 0.307692308em;
    417 }
    418 
    419 
    420 /**
    421412 * 9.0 - Multisites
    422413 */
  • branches/4.9/src/wp-content/themes/twentysixteen/style.css

    r43130 r43294  
    24542454}
    24552455
     2456.site-footer span[role=separator] {
     2457    font-family: Montserrat, sans-serif;
     2458    opacity: 0.7;
     2459    padding: 0 0.307692308em 0 0.538461538em;
     2460}
     2461
     2462.site-footer span[role=separator]::before {
     2463    content: '\002f';
     2464}
     2465
    24562466
    24572467/**
  • branches/4.9/src/wp-content/themes/twentyten/footer.php

    r41349 r43294  
    2828                    <?php bloginfo( 'name' ); ?>
    2929                </a>
     30                <?php
     31                if ( function_exists( 'the_privacy_policy_link' ) ) {
     32                    the_privacy_policy_link( '<span role="separator" aria-hidden="true"></span>', '' );
     33                }
     34                ?>
    3035            </div><!-- #site-info -->
    3136
     
    3843                 */
    3944                do_action( 'twentyten_credits' ); ?>
    40                 <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>
     45                <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyten' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>">
     46                    <?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?>
     47                </a>
    4148            </div><!-- #site-generator -->
    4249
  • branches/4.9/src/wp-content/themes/twentyten/style.css

    r43130 r43294  
    13231323    margin: 0 auto 10px;
    13241324}
     1325#site-info span[role=separator] {
     1326    padding: 0 0.6em 0 0.3em;
     1327}
     1328#site-info span[role=separator]::before {
     1329    content: '\007c';
     1330}
    13251331
    13261332
  • branches/4.9/src/wp-content/themes/twentythirteen/footer.php

    r36956 r43294  
    1717            <div class="site-info">
    1818                <?php do_action( 'twentythirteen_credits' ); ?>
    19                 <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentythirteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
     19                <?php
     20                if ( function_exists( 'the_privacy_policy_link' ) ) {
     21                    the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
     22                }
     23                ?>
     24                <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentythirteen' ) ); ?>" class="imprint">
     25                    <?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?>
     26                </a>
    2027            </div><!-- .site-info -->
    2128        </footer><!-- #colophon -->
  • branches/4.9/src/wp-content/themes/twentythirteen/rtl.css

    r43130 r43294  
    572572}
    573573
     574.site-footer span[role=separator] {
     575    padding: 0 0.5em;
     576}
    574577
    575578/**
  • branches/4.9/src/wp-content/themes/twentythirteen/style.css

    r43130 r43294  
    27102710}
    27112711
     2712.site-footer span[role=separator] {
     2713    padding: 0 0.25em 0 0.5em;
     2714}
     2715
     2716.site-footer span[role=separator]::before {
     2717    content: '\002f';
     2718}
    27122719
    27132720/**
  • branches/4.9/src/wp-content/themes/twentytwelve/footer.php

    r32314 r43294  
    1414        <div class="site-info">
    1515            <?php do_action( 'twentytwelve_credits' ); ?>
    16             <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>
     16            <?php
     17            if ( function_exists( 'the_privacy_policy_link' ) ) {
     18                the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
     19            }
     20            ?>
     21            <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwelve' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>">
     22                <?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?>
     23            </a>
    1724        </div><!-- .site-info -->
    1825    </footer><!-- #colophon -->
  • branches/4.9/src/wp-content/themes/twentytwelve/style.css

    r43130 r43294  
    695695    color: #21759b;
    696696}
     697.site-info span[role=separator] {
     698    padding: 0 0.3em 0 0.6em;
     699}
     700.site-info span[role=separator]::before {
     701    content: '\002f';
     702}
    697703
    698704
Note: See TracChangeset for help on using the changeset viewer.