[wp-trac] [WordPress Trac] #40192: apply_filters() works only once, if doing multiple array merge

WordPress Trac noreply at wordpress.org
Sat Mar 18 09:58:43 UTC 2017


#40192: apply_filters() works only once, if doing multiple array merge
--------------------------+----------------------
 Reporter:  esemlabel     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by ocean90):

 * status:  new => closed
 * version:  trunk =>
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Hello @esemlabel, thanks for your report. That's actually how
 `apply_filters()` and `add_filter() are working. Filters have to make sure
 to either return the original value or an extended/modified value based on
 the original value.

 Feel free to look at our [https://developer.wordpress.org/plugins/hooks/
 plugin handbook] if you want to know more about hooks in general.

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


More information about the wp-trac mailing list