Make WordPress Core


Ignore:
Timestamp:
05/01/2018 06:27:45 AM (6 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.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php

    r38833 r43051  
    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 -->
Note: See TracChangeset for help on using the changeset viewer.