mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-18 17:33:43 +03:00
Theme: Enable testing new header on w.org sandboxes
See https://github.com/WordPress/wporg-mu-plugins/issues/19
This commit is contained in:
parent
e49ee6bf94
commit
ac25f4c008
|
@ -6,4 +6,10 @@ namespace WordPressDotOrg\FiveForTheFuture\Theme;
|
|||
|
||||
</div><!-- #content -->
|
||||
|
||||
<?php require WPORGPATH . 'footer.php';
|
||||
<?php
|
||||
|
||||
if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
|
||||
echo do_blocks( '<!-- wp:wporg/global-footer /-->' );
|
||||
} else {
|
||||
require WPORGPATH . 'footer.php';
|
||||
}
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
namespace WordPressDotOrg\FiveForTheFuture\Theme;
|
||||
|
||||
// Temporary for local environments. Remove this when the new header launches.
|
||||
// See https://github.com/WordPress/wporg-mu-plugins/issues/38
|
||||
if ( ! defined( 'FEATURE_2021_GLOBAL_HEADER_FOOTER' ) ) {
|
||||
define( 'FEATURE_2021_GLOBAL_HEADER_FOOTER', false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up theme defaults and registers support for various WordPress features.
|
||||
|
|
|
@ -2,17 +2,21 @@
|
|||
|
||||
namespace WordPressDotOrg\FiveForTheFuture\Theme;
|
||||
|
||||
global $wporg_global_header_options;
|
||||
$GLOBALS['pagetitle'] = wp_get_document_title();
|
||||
if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
|
||||
echo do_blocks( '<!-- wp:wporg/global-header /-->' );
|
||||
} else {
|
||||
global $wporg_global_header_options;
|
||||
$GLOBALS['pagetitle'] = wp_get_document_title();
|
||||
|
||||
if ( ! isset( $wporg_global_header_options['in_wrapper'] ) ) {
|
||||
$wporg_global_header_options['in_wrapper'] = '';
|
||||
if ( ! isset( $wporg_global_header_options['in_wrapper'] ) ) {
|
||||
$wporg_global_header_options['in_wrapper'] = '';
|
||||
}
|
||||
|
||||
$wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#main">' . esc_html__( 'Skip to content', 'wporg-5ftf' ) . '</a>';
|
||||
|
||||
require WPORGPATH . 'header.php';
|
||||
}
|
||||
|
||||
$wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#main">' . esc_html__( 'Skip to content', 'wporg-5ftf' ) . '</a>';
|
||||
|
||||
require WPORGPATH . 'header.php';
|
||||
|
||||
?>
|
||||
|
||||
<div id="page" class="site">
|
||||
|
|
Loading…
Reference in a new issue