Making WordPress.org

Changeset 11388


Ignore:
Timestamp:
12/17/2021 10:00:57 PM (3 years ago)
Author:
iandunn
Message:

WordPress.org Base Theme: Enable new global header/footer behind flag.

See https://github.com/WordPress/wporg-mu-plugins/issues/19

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

Legend:

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

    r8556 r11388  
    1212namespace WordPressdotorg\Theme;
    1313
    14 require WPORGPATH . 'footer.php';
     14if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
     15    echo do_blocks( '<!-- wp:wporg/global-footer /-->' );
     16} else {
     17    require WPORGPATH . 'footer.php';
     18}
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/footer.php

    r9560 r11388  
    1616    </div><!-- #content -->
    1717</div><!-- #page -->
     18
    1819<?php
    19 require WPORGPATH . 'footer.php';
     20
     21if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
     22    echo do_blocks( '<!-- wp:wporg/global-footer /-->' );
     23} else {
     24    require WPORGPATH . 'footer.php';
     25}
    2026
    2127return;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/header-wporg.php

    r6277 r11388  
    1212namespace WordPressdotorg\Theme;
    1313
    14 require WPORGPATH . 'header.php';
     14if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
     15    echo do_blocks( '<!-- wp:wporg/global-header /-->' );
     16} else {
     17    require WPORGPATH . 'header.php';
     18}
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/header.php

    r8257 r11388  
    1212namespace WordPressdotorg\Theme;
    1313
    14 global $wporg_global_header_options;
    15 if ( !isset( $wporg_global_header_options['in_wrapper'] ) )
    16     $wporg_global_header_options['in_wrapper'] = '';
    17 $wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#content">' . esc_html__( 'Skip to content', 'wporg' ) . '</a>';
     14if ( ! FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
     15    global $wporg_global_header_options;
     16
     17    if ( ! isset( $wporg_global_header_options['in_wrapper'] ) ) {
     18        $wporg_global_header_options['in_wrapper'] = '';
     19    }
     20    $wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#content">' . esc_html__( 'Skip to content', 'wporg' ) . '</a>';
     21}
    1822
    1923get_template_part( 'header', 'wporg' );
    2024?>
     25
    2126<div id="page" class="site">
    2227    <div id="content" class="site-content row gutters">
Note: See TracChangeset for help on using the changeset viewer.