Commit 69cfb47
committed
General: Allow to hook into
This changeset allow developers to attach custom error handlers into `wp_trigger_error()` even if `WP_DEBUG` is not truthy.
It introduces two new hooks, making `wp_trigger_error()` consistent with what is available in `_doing_it_wrong`:
- `wp_trigger_error_always_run` always fires when the given function triggers a user-level error/warning/notice/deprecation message.
- `wp_trigger_error_trigger_error` filters whether to trigger the error.
Props kkmuffme, swissspidy, audrasjb.
Fixes #60886.
git-svn-id: https://develop.svn.wordpress.org/trunk@61688 602fd350-edb4-49c9-b593-d223f7449a82wp_trigger_error() when WP_DEBUG is not truthy.1 parent 0964835 commit 69cfb47
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6089 | 6089 | | |
6090 | 6090 | | |
6091 | 6091 | | |
| 6092 | + | |
| 6093 | + | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
| 6097 | + | |
| 6098 | + | |
| 6099 | + | |
| 6100 | + | |
| 6101 | + | |
| 6102 | + | |
| 6103 | + | |
| 6104 | + | |
| 6105 | + | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
| 6110 | + | |
| 6111 | + | |
| 6112 | + | |
| 6113 | + | |
| 6114 | + | |
| 6115 | + | |
| 6116 | + | |
| 6117 | + | |
6092 | 6118 | | |
6093 | 6119 | | |
6094 | 6120 | | |
| |||
6102 | 6128 | | |
6103 | 6129 | | |
6104 | 6130 | | |
6105 | | - | |
6106 | | - | |
| 6131 | + | |
| 6132 | + | |
6107 | 6133 | | |
6108 | 6134 | | |
6109 | 6135 | | |
| |||
0 commit comments