Skip to content

Commit ec82273

Browse files
committed
initial release
1 parent 9371684 commit ec82273

28 files changed

Lines changed: 668 additions & 48 deletions

README.md

Lines changed: 84 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,95 @@
1-
# %namespace%
1+
# xrDebug WordPress Plugin
22

33
> 🔔 Subscribe to the [newsletter](https://chv.to/chevere-newsletter) to don't miss any update regarding Chevere.
44
5-
![Chevere](chevere.svg)
5+
<a href="https://xrdebug.com"><img alt="xrDebug" src="xr.svg" width="40%"></a>
66

7-
[![Build](https://img.shields.io/github/actions/workflow/status/chevere/reponame/test.yml?branch=%branch%&style=flat-square)](https://github.com/chevere/reponame/actions)
8-
![Code size](https://img.shields.io/github/languages/code-size/chevere/reponame?style=flat-square)
9-
[![Apache-2.0](https://img.shields.io/github/license/chevere/reponame?style=flat-square)](LICENSE)
7+
[![Build](https://img.shields.io/github/actions/workflow/status/xrdebug/wordpress/test.yml?branch=0.1&style=flat-square)](https://github.com/xrdebug/wordpress/actions)
8+
![Code size](https://img.shields.io/github/languages/code-size/xrdebug/wordpress?style=flat-square)
9+
[![Apache-2.0](https://img.shields.io/github/license/xrdebug/wordpress?style=flat-square)](LICENSE)
1010
[![PHPStan](https://img.shields.io/badge/PHPStan-level%209-blueviolet?style=flat-square)](https://phpstan.org/)
11-
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchevere%2Freponame%2F%branch%)](https://dashboard.stryker-mutator.io/reports/github.com/chevere/reponame/%branch%)
1211

13-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=chevere_reponame&metric=alert_status)](https://sonarcloud.io/dashboard?id=chevere_reponame)
14-
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=chevere_reponame&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chevere_reponame)
15-
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=chevere_reponame&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chevere_reponame)
16-
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=chevere_reponame&metric=security_rating)](https://sonarcloud.io/dashboard?id=chevere_reponame)
17-
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=chevere_reponame&metric=coverage)](https://sonarcloud.io/dashboard?id=chevere_reponame)
18-
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=chevere_reponame&metric=sqale_index)](https://sonarcloud.io/dashboard?id=chevere_reponame)
19-
[![CodeFactor](https://www.codefactor.io/repository/github/chevere/reponame/badge)](https://www.codefactor.io/repository/github/chevere/reponame)
12+
## Summary
2013

21-
## Documentation
14+
WordPress plugin for debugging with [xrDebug](https://xrdebug.com). This plugin uses the [xrDebug PHP library](https://github.com/xrdebug/php) and it adds WordPress-specific features.
2215

23-
Documentation is available at [chevere.org](https://chevere.org/).
16+
## Installation
17+
18+
1. Go to [latest release](https://github.com/xrdebug/wordpress/releases/latest) and download `xrdebug.zip`.
19+
2. Go to your WordPress admin panel, click on `Plugins` and then `Add New`.
20+
3. Click on `Upload Plugin` and select the downloaded zip file.
21+
4. Click on `Install Now` and then `Activate`.
22+
23+
## Debug Helpers
24+
25+
In addition to the [PHP xrDebug helpers](https://github.com/xrdebug/php?tab=readme-ov-file#debug-helpers) this plugin adds the following WordPress-specific debug helpers.
26+
27+
### wp_xri
28+
29+
Use function `wp_xri` to access the xrDebug WordPress inspector instance, which can be used to control the WordPress inspector logging features.
30+
31+
| Method | Toggles |
32+
| --------------------------- | --------------- |
33+
| [showErrors](#showerrors) | Showing errors |
34+
| [showHooks](#showhooks) | Showing hooks |
35+
| [showMails](#showmails) | Showing emails |
36+
| [showQueries](#showqueries) | Showing queries |
37+
38+
#### showErrors
39+
40+
Use method `showErrors` to show the PHP errors during the WordPress request.
41+
42+
```php
43+
wp_xri()->showErrors();
44+
```
45+
46+
To stop showing errors pass `FALSE` as argument.
47+
48+
```php
49+
wp_xri()->showErrors(FALSE);
50+
```
51+
52+
#### showHooks
53+
54+
Use method `showHooks` to show the WordPress hooks executed during the WordPress request.
55+
56+
```php
57+
wp_xri()->showHooks();
58+
```
59+
60+
To stop showing hooks pass `FALSE` as argument.
61+
62+
```php
63+
wp_xri()->showHooks(FALSE);
64+
```
65+
66+
#### showMails
67+
68+
Use method `showMails` to show the emails sent during the WordPress request.
69+
70+
```php
71+
wp_xri()->showMails();
72+
```
73+
74+
To stop showing emails pass `FALSE` as argument.
75+
76+
```php
77+
wp_xri()->showMails(FALSE);
78+
```
79+
80+
#### showQueries
81+
82+
Use method `showQueries` to show the SQL queries executed during the WordPress request.
83+
84+
```php
85+
wp_xri()->showQueries();
86+
```
87+
88+
To stop showing queries pass `FALSE` as argument.
89+
90+
```php
91+
wp_xri()->showQueries(FALSE);
92+
```
2493

2594
## License
2695

assets/banner-1544x500-rtl.jpg

187 KB
Loading

assets/banner-1544x500.jpg

187 KB
Loading

assets/banner-772x250-rtl.jpg

66.1 KB
Loading

assets/banner-772x250.jpg

66 KB
Loading

assets/icon.svg

Lines changed: 14 additions & 0 deletions
Loading

assets/screenshot-1.png

49 KB
Loading

assets/screenshot-2.png

81.7 KB
Loading

assets/screenshot-3.png

198 KB
Loading

chevere.svg

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)