Making WordPress.org


Ignore:
Timestamp:
01/17/2022 04:45:59 AM (4 years ago)
Author:
dd32
Message:

Themes: Use a mu-plugin to output consistent skip-to links for all themes.

This is to remove the reliance upon $wporg_global_header_options.

See https://github.com/WordPress/wporg-mu-plugins/issues/42, https://github.com/WordPress/wporg-mu-plugins/pull/70.
Closes https://github.com/WordPress/wordpress.org/pull/49

File:
1 edited

Legend:

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

    r11431 r11448  
    1212namespace WordPressdotorg\Plugin_Directory\Theme;
    1313
     14\WordPressdotorg\skip_to( '#main' );
     15
    1416$menu_items = array(
    1517    '/browse/favorites/' => __( 'My Favorites', 'wporg-plugins' ),
     
    2123    echo do_blocks( '<!-- wp:wporg/global-header /-->' );
    2224} else {
    23     global $wporg_global_header_options;
    24     if ( !isset( $wporg_global_header_options['in_wrapper'] ) )
    25         $wporg_global_header_options['in_wrapper'] = '';
    26     $wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#main">' . esc_html__( 'Skip to content', 'wporg-plugins' ) . '</a>';
    2725    require WPORGPATH . 'header.php';
    2826}
Note: See TracChangeset for help on using the changeset viewer.