Making WordPress.org


Ignore:
Timestamp:
01/31/2022 09:45:57 PM (5 years ago)
Author:
iandunn
Message:

Translate: Remove code unused after new header/footer launch.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/class-plugin.php

    r11456 r11494  
    7777                        $this->register_cli_commands();
    7878                }
    79 
    80                 // @todo temporary for new header/footer launch.
    81                 add_filter( 'stylesheet', array( $this, 'switch_theme_for_new_header' ) );
    82                 add_filter( 'template', array( $this, 'switch_theme_for_new_header' ) );
    8379        }
    8480
    … …  
    561557                return $content;
    562558        }
    563 
    564         /**
    565          * Switch to the `wporg-main` theme once the new header/footer launches.
    566          *
    567          * TwentyFifteen has a bunch of styles that interfere with the design, and we don't want them enqueued. We
    568          * do want to enqueue all the other styles/scripts from Core/plugins, though.
    569          * See `blocks/global-header-footer/classic-header.php`.
    570          *
    571          * @todo This can be removed after launch, but you must permanently switch the theme to `pub/wporg-main`.
    572          *
    573          * @param string $stylesheet
    574          *
    575          * @return string
    576          */
    577         function switch_theme_for_new_header( $stylesheet ) {
    578                 /*
    579                  * Otherwise this interferes with `render_global_styles()`, and we don't get all of the CSS variables
    580                  * from News.
    581                  */
    582                 if ( ms_is_switched() ) {
    583                         return $stylesheet;
    584                 }
    585 
    586                 if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
    587                         if ( 'stylesheet' === current_filter() ) {
    588                                 $stylesheet = 'pub/wporg-main';
    589                         } else {
    590                                 /* template */
    591                                 $stylesheet = 'pub/wporg';
    592                         }
    593                 } else {
    594                         $stylesheet = 'core/twentyfifteen';
    595                 }
    596 
    597                 return $stylesheet;
    598         }
    599559}
Note: See TracChangeset for help on using the changeset viewer.