[wp-trac] [WordPress Trac] #57686: Introduce wp_trigger_error() to compliment _doing_it_wrong()

WordPress Trac noreply at wordpress.org
Wed Sep 13 18:45:58 UTC 2023


#57686: Introduce wp_trigger_error() to compliment _doing_it_wrong()
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:
                                                 |  hellofromTonya
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.4
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-dev-note has-patch has-unit-   |     Focuses:
  tests commit                                   |
-------------------------------------------------+-------------------------

Comment (by hellofromTonya):

 Thanks everyone! Sorry for my scattered thoughts, i.e. more of a
 brainstorming session.

 I want to point out something.

 These functions (`_doing_it_wrong()`, `wp_trigger_error()`,
 `_deprecated_*()`) are developer and debugging tools. The message is not
 displayed anywhere unless `WP_DEBUG` is turned on. Thus, there should be
 no or little risk to users should a message contain something nefarious in
 it.

 As a tool, I think it's okay to not escape the message and document the
 incoming arguments should be clean.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57686#comment:48>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list