|
1 | 1 | # WP Tracy
|
2 | 2 |
|
3 | 3 | [Tracy](https://github.com/nette/tracy) is an excellent PHP debugger bar from [Nette](https://nette.org) PHP framework.
|
4 |
| -WP Tracy is port to [WordPress](https://wordpress.org) for test environment. |
| 4 | + |
| 5 | +WP Tracy is port to [WordPress](https://wordpress.org) for test environment. |
| 6 | + |
5 | 7 | When it's activated, it automatically shows Tracy bar and displays within global WP constants and their values.
|
6 | 8 |
|
7 | 9 | ## Installation & Configuration
|
8 | 10 |
|
9 | 11 | 1. Use command on your path: `composer require hlavacm/wp-tracy`
|
10 | 12 | 2. Profit!
|
11 | 13 | 3. You can optionally define custom PHP constants in the code, but they must be defined in the action `init` with priority 1.
|
12 |
| -3.1 WP_TRACY_ADMIN_DISABLED - `true` |
13 |
| -3.2 WP_TRACY_CHECK_IS_USER_LOGGED_IN - `on`/`off` |
14 |
| -3.3 WP_TRACY_ONLY_FOR_USER_ID - `some (existing) user ID (as a number)` |
15 |
| -3.4 WP_TRACY_ENABLE_MODE - `detect`/`development`/`production` |
16 |
| -3.5 WP_TRACY_PANELS_FILTERING_ALLOWED - `on`/`off` |
| 14 | + - WP_TRACY_ADMIN_DISABLED - `true` |
| 15 | + - WP_TRACY_CHECK_IS_USER_LOGGED_IN - `on`/`off` |
| 16 | + - WP_TRACY_ONLY_FOR_USER_ID - `some (existing) user ID (as a number)` |
| 17 | + - WP_TRACY_ENABLE_MODE - `detect`/`development`/`production` |
| 18 | + - WP_TRACY_PANELS_FILTERING_ALLOWED - `on`/`off` |
17 | 19 | 4. You can optionally define custom options `wp-tracy-user-settings` as serialized array of keys and values:
|
18 |
| -4.1 `check-is-user-logged-in` => `on`/`off` |
19 |
| -4.2 `only-for-user-id` => some (existing) user ID (as number) |
20 |
| -4.3 `debugger-mode` => `detect`/`development`/`production` |
21 |
| -4.4 `panels-filtering-allowed` => `on`/`off` |
| 20 | + - `check-is-user-logged-in` => `on`/`off` |
| 21 | + - `only-for-user-id` => some (existing) user ID (as number) |
| 22 | + - `debugger-mode` => `detect`/`development`/`production` |
| 23 | + - `panels-filtering-allowed` => `on`/`off` |
22 | 24 | 5. You can optionally use `wp_tracy_panels_filter` to modify default panels array (full class names)
|
23 | 25 | 6. The following panels are visible by default (if they are available):
|
24 |
| -6.1 `WpTracy\\WpPanel` |
25 |
| -6.2 `WpTracy\\WpUserPanel` |
26 |
| -6.3 `WpTracy\\WpPostPanel` |
27 |
| -6.4 `WpTracy\\WpQueryPanel` |
28 |
| -6.5 `WpTracy\\WpQueriedObjectPanel` |
29 |
| -6.6 `WpTracy\\WpDbPanel` |
30 |
| -6.7 `WpTracy\\WpRolesPanel` |
31 |
| -6.8 `WpTracy\\WpRewritePanel` |
32 |
| -6.9 `WpTracy\\WpCurrentScreenPanel` |
| 26 | + - `WpTracy\\WpPanel` |
| 27 | + - `WpTracy\\WpUserPanel` |
| 28 | + - `WpTracy\\WpPostPanel` |
| 29 | + - `WpTracy\\WpQueryPanel` |
| 30 | + - `WpTracy\\WpQueriedObjectPanel` |
| 31 | + - `WpTracy\\WpDbPanel` |
| 32 | + - `WpTracy\\WpRolesPanel` |
| 33 | + - `WpTracy\\WpRewritePanel` |
| 34 | + - `WpTracy\\WpCurrentScreenPanel` |
33 | 35 |
|
34 | 36 | 
|
35 | 37 | 
|
|
0 commit comments