Skip to content

Commit

Permalink
Header/Footer: Don't enqueue wp4.css on WordCamp sites
Browse files Browse the repository at this point in the history
The Parent theme was added to `events.wordpress.org` in WordPress/wordcamp.org#1013. That site/network is hosted on the wordcamp.org server, which doesn't have (or need) `wp4.css`. Trying to enqueue it results in a `filemtime()` warning because the file doesn't exist.
  • Loading branch information
iandunn committed Aug 22, 2023
1 parent 97252b6 commit 273dde2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mu-plugins/blocks/global-header-footer/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ function enqueue_compat_wp4_styles() {
return;
}

if ( defined( 'IS_WORDCAMP_NETWORK' ) ) {
return;
}

if (
( ! wp_is_block_theme() && ! current_theme_supports( 'wp4-styles' ) ) ||
( defined( 'REST_REQUEST' ) && REST_REQUEST )
Expand Down

0 comments on commit 273dde2

Please sign in to comment.