Make WordPress Core

Ticket #53446: 53446.diff

File 53446.diff, 5.0 KB (added by kapilpaul, 4 years ago)

Created patch.

  • src/wp-content/themes/twentytwenty/footer.php

    diff --git a/src/wp-content/themes/twentytwenty/footer.php b/src/wp-content/themes/twentytwenty/footer.php
    index afe204b629..d1aa6db962 100644
    a b  
    2828                                                        <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
    2929                                                </p><!-- .footer-copyright -->
    3030
     31                                                <?php
     32                                                if ( function_exists( 'the_privacy_policy_link' ) ) {
     33                                                        the_privacy_policy_link( '<p class="privacy-policy">', '</p>' );
     34                                                }
     35                                                ?>
     36
    3137                                                <p class="powered-by-wordpress">
    3238                                                        <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwenty' ) ); ?>">
    3339                                                                <?php _e( 'Powered by WordPress', 'twentytwenty' ); ?>
  • src/wp-content/themes/twentytwenty/style.css

    diff --git a/src/wp-content/themes/twentytwenty/style.css b/src/wp-content/themes/twentytwenty/style.css
    index f6d5d9ec92..1bf8e542db 100644
    a b ul.footer-social li { 
    44904490}
    44914491
    44924492.footer-copyright a,
     4493.privacy-policy a,
    44934494.powered-by-wordpress a {
    44944495        color: inherit;
    44954496}
    44964497
     4498.privacy-policy,
    44974499.powered-by-wordpress,
    44984500.to-the-top {
    44994501        color: #6d6d6d;
    a.to-the-top > * { 
    45084510        margin: 0;
    45094511}
    45104512
    4511 .powered-by-wordpress {
     4513.powered-by-wordpress,
     4514.privacy-policy {
    45124515        display: none;
    45134516        margin: 0 0 0 2.4rem;
    45144517}
    a.to-the-top > * { 
    56305633                font-weight: 700;
    56315634        }
    56325635
     5636        .privacy-policy,
    56335637        .powered-by-wordpress {
    56345638                display: block;
    56355639        }
  • src/wp-content/themes/twentytwentyone/footer.php

    diff --git a/src/wp-content/themes/twentytwentyone/footer.php b/src/wp-content/themes/twentytwentyone/footer.php
    index 63ecd99ac0..da1b09b2c8 100644
    a b  
    3838                                        ?>
    3939                                </ul><!-- .footer-navigation-wrapper -->
    4040                        </nav><!-- .footer-navigation -->
    41                 <?php endif; ?>
    42                 <div class="site-info">
    43                         <div class="site-name">
    44                                 <?php if ( has_custom_logo() ) : ?>
    45                                         <div class="site-logo"><?php the_custom_logo(); ?></div>
    46                                 <?php else : ?>
    47                                         <?php if ( get_bloginfo( 'name' ) && get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
    48                                                 <?php if ( is_front_page() && ! is_paged() ) : ?>
    49                                                         <?php bloginfo( 'name' ); ?>
    50                                                 <?php else : ?>
    51                                                         <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
    52                                                 <?php endif; ?>
    53                                         <?php endif; ?>
    54                                 <?php endif; ?>
    55                         </div><!-- .site-name -->
    56                         <div class="powered-by">
    57                                 <?php
    58                                 printf(
    59                                         /* translators: %s: WordPress. */
    60                                         esc_html__( 'Proudly powered by %s.', 'twentytwentyone' ),
    61                                         '<a href="' . esc_url( __( 'https://wordpress.org/', 'twentytwentyone' ) ) . '">WordPress</a>'
    62                                 );
    63                                 ?>
    64                         </div><!-- .powered-by -->
     41                        <?php
     42                endif;
     43
     44                get_template_part( 'template-parts/footer/site', 'info' );
     45                ?>
    6546
    66                 </div><!-- .site-info -->
    6747        </footer><!-- #colophon -->
    6848
    6949</div><!-- #page -->
  • src/wp-content/themes/twentytwentyone/style.css

    diff --git a/src/wp-content/themes/twentytwentyone/style.css b/src/wp-content/themes/twentytwentyone/style.css
    index 6dcc4045d9..98c38b1887 100644
    a b table.wp-calendar-table caption { 
    39743974.site-footer > .site-info .powered-by {
    39753975        margin-top: calc(0.5 * var(--global--spacing-vertical));
    39763976}
     3977
     3978.site-footer > .site-info .privacy-policy-link {
     3979        margin-top: calc(0.5 * var(--global--spacing-vertical));
     3980        margin-right: 10px;
     3981}
     3982
    39773983@media only screen and (min-width: 822px) {
    39783984
    39793985        .site-footer > .site-info {
  • new file src/wp-content/themes/twentytwentyone/template-parts/footer/site-info.php

    diff --git a/src/wp-content/themes/twentytwentyone/template-parts/footer/site-info.php b/src/wp-content/themes/twentytwentyone/template-parts/footer/site-info.php
    new file mode 100644
    index 0000000000..a448d62330
    - +  
     1<?php
     2/**
     3 * Displays footer site info
     4 *
     5 * @package WordPress
     6 * @subpackage Twenty_Twenty_One
     7 * @since Twenty Twenty One 1.5
     8 * @version 1.5
     9 */
     10
     11?>
     12<div class="site-info">
     13        <div class="site-name">
     14                <?php if ( has_custom_logo() ) : ?>
     15                        <div class="site-logo"><?php the_custom_logo(); ?></div>
     16                <?php else : ?>
     17                        <?php if ( get_bloginfo( 'name' ) && get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
     18                                <?php if ( is_front_page() && ! is_paged() ) : ?>
     19                                        <?php bloginfo( 'name' ); ?>
     20                                <?php else : ?>
     21                                        <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
     22                                <?php endif; ?>
     23                        <?php endif; ?>
     24                <?php endif; ?>
     25        </div><!-- .site-name -->
     26
     27        <div class="powered-by">
     28
     29                <?php
     30                if ( function_exists( 'the_privacy_policy_link' ) ) {
     31                        the_privacy_policy_link();
     32                }
     33                ?>
     34
     35                <?php
     36                printf(
     37                        /* translators: %s: WordPress. */
     38                        esc_html__( 'Proudly powered by %s.', 'twentytwentyone' ),
     39                        '<a href="' . esc_url( __( 'https://wordpress.org/', 'twentytwentyone' ) ) . '">WordPress</a>'
     40                );
     41                ?>
     42        </div><!-- .powered-by -->
     43
     44</div><!-- .site-info -->