https://github.com/ssnepenthe/wp-dump-zone
Aggregates Symfony var-dumper output in a dedicated "dump zone" on your WordPress sites
https://github.com/ssnepenthe/wp-dump-zone
toy wordpress
Last synced: about 2 months ago
JSON representation
Aggregates Symfony var-dumper output in a dedicated "dump zone" on your WordPress sites
- Host: GitHub
- URL: https://github.com/ssnepenthe/wp-dump-zone
- Owner: ssnepenthe
- License: mit
- Created: 2022-05-13T02:45:17.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-10T23:34:04.000Z (almost 4 years ago)
- Last Synced: 2025-01-07T20:34:51.184Z (over 1 year ago)
- Topics: toy, wordpress
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wp-dump-zone
WP Dump Zone provides a simple approach to an improved experience of working the Symfony var-dumper component on a WordPress site.
Typically dumps are rendered at call time and, depending on the way a theme is styled, can lead to output that is difficult to read or interact with.
WP Dump Zone solves this problem by aggregating dump calls to be rendered after the rest of the page in a dedicated dump zone.
## Warning
This package is currently in development and is subject to breaking changes without notice until v1.0 has been tagged.
It is one in a series of [WordPress toys](https://github.com/ssnepenthe?tab=repositories&q=topic%3Atoy+topic%3Awordpress&type=&language=&sort=) I have been working on with the intention of exploring ways to modernize the feel of working with WordPress.
As the label suggests, it should be treated as a toy.
## Installation
```sh
composer require ssnepenthe/wp-dump-zone
```
## Usage
Replace calls to the `dump()` function with calls to the `dz()` function. That's it!
## Advanced Usage
The underlying cloner and dumper instances can be overridden using the corresponding setters: `DumpZone\DumpZone::setCloner()` and `DumpZone\DumpZone::setDumper()`.
By default, the dump zone is rendered in the `admin_footer` and `wp_footer` hooks at a priority of `999`. You can add an additional render hook using `DumpZone\DumpZone::addRenderHook()` or override the render hooks list completely using `DumpZone\DumpZone::setRenderHooks()`.