Skip to content

Commit

Permalink
Remove WP_DEBUG_DISPLAY override
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Mar 14, 2019
1 parent 45b7fdf commit 0eb93b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ Alternatively, you can use your own local WordPress environment and clone this r

Next, open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Then you can type `npm run dev` in your terminal or command prompt to keep the plugin building in the background as you work on it.

WordPress comes with specific [debug systems](https://codex.wordpress.org/Debugging_in_WordPress) designed to simplify the process as well as standardize code across core, plugins and themes. It is possible to use environment variables (`WP_DEBUG`, `WP_DEBUG_DISPLAY` and `SCRIPT_DEBUG`) to update a site's configuration constants located in `wp-config.php` file. Any of the flags can be disabled at any time by running the following command:
WordPress comes with specific [debug systems](https://codex.wordpress.org/Debugging_in_WordPress) designed to simplify the process as well as standardize code across core, plugins and themes. It is possible to use environment variables (`WP_DEBUG` and `SCRIPT_DEBUG`) to update a site's configuration constants located in `wp-config.php` file. Both flags can be disabled at any time by running the following command:
```
SCRIPT_DEBUG=false WP_DEBUG=false WP_DEBUG_DISPLAY=false ./bin/setup-local-env.sh
SCRIPT_DEBUG=false WP_DEBUG=false ./bin/setup-local-env.sh
```
By default, all 3 flags will be set to `true`.
By default, both flags will be set to `true`.

### On A Remote Server

Expand Down
1 change: 0 additions & 1 deletion bin/bootstrap-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

WP_VERSION=${WP_VERSION-latest}
WP_DEBUG=${WP_DEBUG-true}
WP_DEBUG_DISPLAY=${WP_DEBUG_DISPLAY-true}
SCRIPT_DEBUG=${SCRIPT_DEBUG-true}
DOCKER=${DOCKER-false}
DOCKER_ENV=${DOCKER_ENV-ci}
Expand Down
6 changes: 0 additions & 6 deletions bin/install-wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ if [ $WP_DEBUG != $WP_DEBUG_CURRENT ]; then
WP_DEBUG_RESULT=$(docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run -T --rm -u 33 $CLI config get --type=constant --format=json WP_DEBUG)
echo -e $(status_message "WP_DEBUG: $WP_DEBUG_RESULT...")
fi
WP_DEBUG_DISPLAY_CURRENT=$(docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run -T --rm -u 33 $CLI config get --type=constant --format=json WP_DEBUG_DISPLAY)
if [ $WP_DEBUG_DISPLAY != $WP_DEBUG_DISPLAY_CURRENT ]; then
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI config set WP_DEBUG_DISPLAY $WP_DEBUG_DISPLAY --raw --type=constant --quiet
WP_DEBUG_DISPLAY_RESULT=$(docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run -T --rm -u 33 $CLI config get --type=constant --format=json WP_DEBUG_DISPLAY)
echo -e $(status_message "WP_DEBUG_DISPLAY: $WP_DEBUG_DISPLAY_RESULT...")
fi
SCRIPT_DEBUG_CURRENT=$(docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run -T --rm -u 33 $CLI config get --type=constant --format=json SCRIPT_DEBUG)
if [ $SCRIPT_DEBUG != $SCRIPT_DEBUG_CURRENT ]; then
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI config set SCRIPT_DEBUG $SCRIPT_DEBUG --raw --type=constant --quiet
Expand Down

0 comments on commit 0eb93b6

Please sign in to comment.