[wp-trac] [WordPress Trac] #60886: wp_trigger_error() has no action or filter to always run like wp_doing_it_wrong has
WordPress Trac
noreply at wordpress.org
Thu Feb 19 10:20:18 UTC 2026
#60886: wp_trigger_error() has no action or filter to always run like
wp_doing_it_wrong has
------------------------------+-----------------------
Reporter: kkmuffme | Owner: audrasjb
Type: enhancement | Status: closed
Priority: normal | Milestone: 7.0
Component: General | Version:
Severity: trivial | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------
Changes (by audrasjb):
* owner: (none) => audrasjb
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"61688" 61688]:
{{{
#!CommitTicketReference repository="" revision="61688"
General: Allow to hook into `wp_trigger_error()` when `WP_DEBUG` is not
truthy.
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.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60886#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list