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

WordPress Trac noreply at wordpress.org
Sat Mar 18 10:48:30 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:
--------------------------+----------------------

Comment (by ocean90):

 `tables_to_repair` can be used to add ''additional'' tables. The
 `array_merge()` ensures that the default tables are always in `$tables`
 variable. Same for `cron_schedules`. The default schedules cannot be
 removed as it would break core's default cron events.

 As mentioned before, if plugins are using these filters they have to make
 sure to '''extend''' (for example with `array_merge()`) the previous
 value.

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


More information about the wp-trac mailing list