This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
Releases: devuri/wp-env-config
Releases · devuri/wp-env-config
v0.20.2
0.20.2 (2023-03-10)
Features
- Add
config(false)
to use WP_ENVIRONMENT_TYPE (5d5f2e4) - Adds
DEVELOPER_ADMIN
const an int user ID (d935426) - Adds
overrides
forconfig.php
(f5c2c6c) - Adds support for custom log dir
year-month-day.log
(54c4ba0) - when
null
orfalse
theWP_ENVIRONMENT_TYPE
is used (5adb242)
Bug Fixes
- fixes error log location (e884570)
v0.20.1
0.20.1 (2023-03-07)
Features
- add configMap() Display a list of constants defined by Setup. (68f1fa5)
- Adds 'wordpress' => 'wp', (16f5804)
- Adds
asset_url()
(47d33b8) - Adds
Asset::url
(d8572c2) - Adds
env()
function (c9ce38b) - Adds
HttpKernel
default args (5e4a020) - Adds
static::detect_error()
andstatic::env()
(b310e16) - adds a list of setup options (9dea7b3)
- adds config method in class Setup (5a5502b)
- Adds docs dir (4f89446)
- adds Environment::secure() (8a2f109)
- adds Exception try catch block (c71034f)
- adds getEnvironment() to get the current Environment setup (46f65d5)
- Adds Kernel (8fc96c2)
- adds more error reporting for
debug
(7c55d36) - Adds tests for
HttpKernel
(b18b06c) - can now disable and bypass the default setup process (617938a)
- constant can be overridden in wp-config.php, add Directory $path (e9fa1b5)
- defines Environment types (36e7778)
- simplify environment setup, allow bypass of default setup (8ef04d5)
Bug Fixes
v0.20
v0.19
v0.17
Features
5e4a020 - Adds
Kernel
default
Kernel
args
- We can configure the Kernel args to setup custom directory structure.
$args = [
'web_root' => 'public',
'wp_dir_path' => 'wp',
'asset_dir' => 'assets',
'content_dir' => 'content',
'plugin_dir' => 'plugins',
'mu_plugin_dir' => 'mu-plugins',
'disable_updates' => true,
];
$http_app = new Kernel(__DIR__, $args);
// or
$http_app = new Kernel(__DIR__, ['content_dir' => 'content']);
v0.16
v0.16 #27
asset()
The asset() function will generate a URL for an asset.
- You can configure the asset URL by setting the
ASSET_URL
in your .env - Or optionally in the main config file.
asset( "/bootstrap/css/bootstrap-grid.css" ); // https://example.com/assets/dist/bootstrap/css/bootstrap-grid.css
asset( "/images/thing.png" ); // https://example.com/assets/dist/images/thing.png
asset( "/images/thing.png", "/static" ); // https://example.com/static/images/thing.png