-
Notifications
You must be signed in to change notification settings - Fork 4
Environment features
The Raccoon WordPress plugin can use the environment status to perform some actions based on the environment.
Environment status with Bedrock
Bedrock is a WordPress boilerplate which create a better projet structure mainly with a new wp-content/
folder renamed app/
.
Bedrock use Composer and environments variables.
The Raccoon WordPress plugin can use environments variables from Bedrocks to know the environment status (development, production, staging) and manage which debug informations has to be returned by the theme.
If you don't use Bedrock, you can manually set environment status in the manifest file like:
{
"environment-status": "development",
"environment-status": "staging",
"environment-status": "production"
}
When your project is in production, you do not always want all admin menu items accessible to end users. With this plugin, you can set items to remove from the production menu.
For example, to delete the item "Tools" and the subitem theme menu editor (parent item: themes.php
), you have to add these lines in your manifest:
{
"production": {
"admin-menu": {
"remove": [
"tools.php",
{
"themes.php": ["nav-menus.php"]
}
]
}
}
}