Skip to content

Commit

Permalink
Only run on debug
Browse files Browse the repository at this point in the history
  • Loading branch information
darylldoyle committed Nov 28, 2024
1 parent a1b2cd9 commit 0f163c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mu-plugins/000-wp-ignition-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* @package WP_Ignition
*/

// Don't load in production.
if ( 'production' === wp_get_environment_type() ) {
// Don't load in production or if WP_DEBUG is disabled.
if ( 'production' !== wp_get_environment_type() || false === WP_DEBUG ) {
return;
}

Expand Down
3 changes: 2 additions & 1 deletion mu-plugins/wp-ignition/wp-ignition.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

require __DIR__ . '/vendor/autoload.php';

// Register Ignition
\Spatie\Ignition\Ignition::make()
->setTheme( 'dark' )
->shouldDisplayException( 'production' !== wp_get_environment_type() ) // Ensure it's disabled in production
->shouldDisplayException( 'production' !== wp_get_environment_type() && true === WP_DEBUG )
->register();

0 comments on commit 0f163c5

Please sign in to comment.