[wp-trac] [WordPress Trac] #57686: Introduce wp_trigger_error() to compliment _doing_it_wrong()
WordPress Trac
noreply at wordpress.org
Thu Feb 9 22:29:30 UTC 2023
#57686: Introduce wp_trigger_error() to compliment _doing_it_wrong()
-------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+---------------------
Comment (by peterwilsoncc):
Coincidentally, I was discussing this with another contributor recently as
a suitable helper function so would very much like to see it.
My preference would be for core to swap all instances of
`_doing_it_wrong()` to use the new function as "you're doing it wrong" is
the least helpful way of advising developers how to improve their code.
Unfortunately throwing deprecation notices in `_doing_it_wrong()` isn't
really possible as then WordPress would be throwing notices on it's
notices and, ugh, that would be ugly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57686#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list