Skip to content

Commit

Permalink
FEAT: new WP_DEVELOPMENT_MODE constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Dareth NHANG committed Nov 10, 2023
1 parent 8234a04 commit 184366e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ WP_SITEURL="${WP_HOME}/wp"
# Specify optional debug.log path
# WP_DEBUG_LOG='/path/to/debug.log'

# Configuring development mode
# Values: core, plugin, theme, all (default)
# See: https://make.wordpress.org/core/2023/07/14/configuring-development-mode-in-6-3/
# WP_DEVELOPMENT_MODE=core

## WP OPTIONS
WP_CACHE=true
WP_POST_REVISIONS=5
Expand Down
1 change: 1 addition & 0 deletions config/environments/development.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use function Env\env;

Config::define('SAVEQUERIES', true);
Config::define('WP_DEVELOPMENT_MODE', env('WP_DEVELOPMENT_MODE') ?? 'all');
Config::define('WP_DEBUG', true);
Config::define('WP_DEBUG_DISPLAY', true);
Config::define('WP_DEBUG_LOG', env('WP_DEBUG_LOG') ?? true);
Expand Down
24 changes: 24 additions & 0 deletions config/environments/local.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* Configuration overrides for WP_ENV === 'local'
*/

use Roots\WPConfig\Config;
use function Env\env;

Config::define('SAVEQUERIES', true);
Config::define('WP_DEVELOPMENT_MODE', env('WP_DEVELOPMENT_MODE') ?? 'all');
Config::define('WP_DEBUG', true);
Config::define('WP_DEBUG_DISPLAY', true);
Config::define('WP_DEBUG_LOG', env('WP_DEBUG_LOG') ?? true);
Config::define('WP_DISABLE_FATAL_ERROR_HANDLER', true);
Config::define('SCRIPT_DEBUG', true);
Config::define('DISALLOW_INDEXING', true);

ini_set('display_errors', '1');

// Enable plugin and theme updates and installation from the admin
Config::define('DISALLOW_FILE_MODS', false);

// Disable the plugin and theme file editor in the admin
Config::define('DISALLOW_FILE_EDIT', false);

0 comments on commit 184366e

Please sign in to comment.