[wp-trac] [WordPress Trac] #59455: Replace trigger_error() with wp_trigger_error() for 6.4

WordPress Trac noreply at wordpress.org
Tue Sep 26 12:56:44 UTC 2023


#59455: Replace trigger_error() with wp_trigger_error() for 6.4
----------------------------+---------------------
 Reporter:  hellofromTonya  |       Owner:  (none)
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  6.4
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+---------------------

Comment (by hellofromTonya):

 In [changeset:"56705" 56705]:

 General: Use wp_trigger_error() in _doing_it_wrong() and _deprecated_*().

 Uses `wp_trigger_error()` in `_doing_it_wrong()` and each
 `_deprecated_*()` function, i.e. instead of `trigger_error()`.

 To avoid redundancy, uses `wp_trigger_error()` once. How? Saves each
 message to `$message` variable and then passes it to `wp_trigger_error()`
 at the end of the function.

 Functions:
 * _doing_it_wrong()
 * _deprecated_function()
 * _deprecated_constructor()
 * _deprecated_class()
 * _deprecated_file()
 * _deprecated_argument()
 * _deprecated_hook()

 Follow-up to [56530].

 Props azaozz, costdev, flixos90, hellofromTonya, peterwilsoncc.
 See #57686.

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


More information about the wp-trac mailing list