Making WordPress.org

Changeset 11903


Ignore:
Timestamp:
06/03/2022 04:31:06 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Developer theme: Add a third footer section on the primary landing page.

This allows for easier editing of the widgets without making code changes.

Follow-up to [948], [7739].

Props robfelty, milana_cap, RMarks, TJNowell, tellyworth, SergeyBiryukov.
See #6338.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php

    r11901 r11903  
    254254        'name'          => __( 'Landing Page Footer - Center', 'wporg' ),
    255255        'id'            => 'landing-footer-2',
     256        'description'   => __( 'Appears in footer of the primary landing page', 'wporg' ),
     257        'before_widget' => '<div id="%1$s" class="widget box %2$s">',
     258        'after_widget'  => '</div>',
     259        'before_title'  => '<h4 class="widget-title">',
     260        'after_title'   => '</h4>',
     261    ) );
     262
     263    register_sidebar( array(
     264        'name'          => __( 'Landing Page Footer - Right', 'wporg' ),
     265        'id'            => 'landing-footer-3',
    256266        'description'   => __( 'Appears in footer of the primary landing page', 'wporg' ),
    257267        'before_widget' => '<div id="%1$s" class="widget box %2$s">',
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/page-home-landing.php

    r9325 r11903  
    7171                    <?php dynamic_sidebar( 'landing-footer-1' ); ?>
    7272                <?php } else { ?>
    73                     <div class=" box"></div>
     73                    <div class="box"></div>
    7474                <?php } ?>
    75 
    76                 <div class="box">
    77                     <h3 class="widget-title"><?php _e( 'Contribute', 'wporg' ); ?></h3>
    78                     <ul class="unordered-list no-bullets">
    79                         <li><a href="https://make.wordpress.org/" class="make-wp-link"><?php _e( 'Help Make WordPress', 'wporg' ); ?></a></li>
    80                     </ul>
    81                 </div>
    8275
    8376                <?php if ( is_active_sidebar( 'landing-footer-2') ) { ?>
    8477                    <?php dynamic_sidebar( 'landing-footer-2' ); ?>
    8578                <?php } else { ?>
    86                     <div class=" box"></div>
     79                    <div class="box"></div>
     80                <?php } ?>
     81
     82                <?php if ( is_active_sidebar( 'landing-footer-3') ) { ?>
     83                    <?php dynamic_sidebar( 'landing-footer-3' ); ?>
     84                <?php } else { ?>
     85                    <div class="box"></div>
    8786                <?php } ?>
    8887
Note: See TracChangeset for help on using the changeset viewer.