Skip to content

Commit

Permalink
Blaze: do not load the UI if the JSON API module is inactive (#28267)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve authored Jan 12, 2023
1 parent e232b70 commit 394ee81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Do not load the Blaze UI if the JSON API module is inactive.
6 changes: 6 additions & 0 deletions projects/packages/blaze/src/class-blaze.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public static function should_initialize() {
$should_initialize = false;
}

// The feature relies on this module for now.
// See 1386-gh-dotcom-forge
if ( ! $is_wpcom && ! ( new Modules() )->is_active( 'json-api' ) ) {
$should_initialize = false;
}

/**
* Filter to disable all Blaze functionality.
*
Expand Down

0 comments on commit 394ee81

Please sign in to comment.