Skip to content

Commit

Permalink
Default sandboxing to off, requiring filter to enable instead of WP_D…
Browse files Browse the repository at this point in the history
…EBUG
  • Loading branch information
westonruter committed Aug 25, 2021
1 parent 26380fa commit e3bf4e3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/SandboxingLevels.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,9 @@ final class SandboxingLevels implements Service, Registerable, Conditional {
/**
* Whether service is needed.
*
* This is experimental.
*
* @return bool
*/
public static function is_needed() {
// @todo This is a hack to prevent the service from running in the unit tests.
if ( defined( 'TESTS_PLUGIN_DIR' ) ) {
return false;
}

/**
* Filters whether experimental sandboxing is enabled.
*
Expand All @@ -66,7 +59,7 @@ public static function is_needed() {
*
* @param bool $enabled Sandboxing enabled.
*/
return (bool) apply_filters( 'amp_experimental_sandboxing_enabled', defined( 'WP_DEBUG' ) && WP_DEBUG );
return (bool) apply_filters( 'amp_experimental_sandboxing_enabled', false );
}

/**
Expand Down

0 comments on commit e3bf4e3

Please sign in to comment.