WordPress.org

Make WordPress Core

Changeset 43051


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

Location:
trunk/src/wp-content/themes
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/footer.php

    r42343 r43051  
    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 -->
  • trunk/src/wp-content/themes/twentyeleven/style.css

    r42105 r43051  
    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
  • trunk/src/wp-content/themes/twentyfifteen/footer.php

    r30896 r43051  
    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 -->
  • trunk/src/wp-content/themes/twentyfifteen/style.css

    r42105 r43051  
    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/**
  • trunk/src/wp-content/themes/twentyfourteen/footer.php

    r42343 r43051  
    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 -->
  • trunk/src/wp-content/themes/twentyfourteen/rtl.css

    r40839 r43051  
    356356}
    357357
     358/**
     359 * 8.0 Footer
     360 * -----------------------------------------------------------------------------
     361 */
     362
     363.site-info span[role=separator] {
     364    padding: 0 0.5em;
     365}
    358366
    359367/**
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r42105 r43051  
    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/**
  • trunk/src/wp-content/themes/twentyseventeen/style.css

    r42881 r43051  
    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
  • 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 -->
  • trunk/src/wp-content/themes/twentysixteen/footer.php

    r42343 r43051  
    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 -->
  • trunk/src/wp-content/themes/twentysixteen/rtl.css

    r41756 r43051  
    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}
     
    402403
    403404/**
    404  * 8.4 - Footer
    405  */
    406 
    407 .site-footer .site-title:after {
    408     padding-right: 0.538461538em;
    409     padding-left: 0.307692308em;
    410 }
    411 
    412 
    413 /**
    414405 * 9.0 - Multisites
    415406 */
  • trunk/src/wp-content/themes/twentysixteen/style.css

    r42105 r43051  
    24442444}
    24452445
     2446.site-footer span[role=separator] {
     2447    font-family: Montserrat, sans-serif;
     2448    opacity: 0.7;
     2449    padding: 0 0.307692308em 0 0.538461538em;
     2450}
     2451
     2452.site-footer span[role=separator]::before {
     2453    content: '\002f';
     2454}
     2455
    24462456
    24472457/**
  • trunk/src/wp-content/themes/twentyten/footer.php

    r42343 r43051  
    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
     
    3944                do_action( 'twentyten_credits' );
    4045                ?>
    41                 <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>
     46                <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyten' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>">
     47                    <?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?>
     48                </a>
    4249            </div><!-- #site-generator -->
    4350
  • trunk/src/wp-content/themes/twentyten/style.css

    r42886 r43051  
    13191319    margin: 0 auto 10px;
    13201320}
     1321#site-info span[role=separator] {
     1322    padding: 0 0.6em 0 0.3em;
     1323}
     1324#site-info span[role=separator]::before {
     1325    content: '\007c';
     1326}
    13211327
    13221328
  • trunk/src/wp-content/themes/twentythirteen/footer.php

    r42343 r43051  
    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 -->
  • trunk/src/wp-content/themes/twentythirteen/rtl.css

    r40839 r43051  
    568568}
    569569
     570.site-footer span[role=separator] {
     571    padding: 0 0.5em;
     572}
    570573
    571574/**
  • trunk/src/wp-content/themes/twentythirteen/style.css

    r42105 r43051  
    27062706}
    27072707
     2708.site-footer span[role=separator] {
     2709    padding: 0 0.25em 0 0.5em;
     2710}
     2711
     2712.site-footer span[role=separator]::before {
     2713    content: '\002f';
     2714}
    27082715
    27092716/**
  • trunk/src/wp-content/themes/twentytwelve/footer.php

    r42343 r43051  
    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 -->
  • trunk/src/wp-content/themes/twentytwelve/style.css

    r42105 r43051  
    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.