[wp-trac] [WordPress Trac] #44406: Mismatch in the default value of the optional replacement argument in do_action_deprecated(), apply_filters_deprecated() and _deprecated_hook()

WordPress Trac noreply at wordpress.org
Mon Sep 17 01:51:39 UTC 2018


#44406: Mismatch in the default value of the optional replacement argument in
do_action_deprecated(), apply_filters_deprecated() and _deprecated_hook()
--------------------------+------------------------------
 Reporter:  birgire       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.6
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by naoki0h):

 I think `! empty( $replacement )` is better.  Because it adjust `false`
 and `null`.

 Also, I think `null` is better for the default argument of the functions.

 Because ,  setting default argument `null` doesn't affect any functions,
 but if we set default argument `false`, it affects `do_action(
 'deprecated_hook_run', $hook, $replacement, $version, $message )` .

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


More information about the wp-trac mailing list