From 845c6ef24fa2838aff10c8ea4b33b2c140a0f06e Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Mon, 17 Jun 2019 14:33:28 +0200 Subject: [PATCH] Enable dev tools on all but production Fixes https://github.com/humanmade/altis-dev-tools/issues/3 --- docs/README.md | 2 +- load.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 5d11a46..1a2c953 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,7 +7,7 @@ The Altis developer tools are built on top of the [Query Monitor](https://querym ## Getting started -The developer tools are active by default for local development. While logged in, a summary of the request's details will appear in the toolbar at the top of the page. Click this summary to open the developer tools. +The developer tools are active by default for all environment types except `production`. While logged in, a summary of the request's details will appear in the toolbar at the top of the page. Click this summary to open the developer tools. ![Screenshot of the developer tools toolbar item](./toolbar.png) diff --git a/load.php b/load.php index 7356031..05f93ad 100644 --- a/load.php +++ b/load.php @@ -2,7 +2,7 @@ namespace Altis\Dev_Tools; // @codingStandardsIgnoreLine -use function Altis\get_environment_architecture; +use function Altis\get_environment_type; use function Altis\register_module; require_once __DIR__ . '/inc/namespace.php'; @@ -14,7 +14,7 @@ add_action( 'altis.modules.init', function () { $default_settings = [ - 'enabled' => in_array( get_environment_architecture(), [ 'chassis', 'local-server' ] ), + 'enabled' => get_environment_type() !== 'production', 'query-monitor' => true, ];