Changes between Version 1 and Version 2 of Ticket #60835, comment 9
- Timestamp:
- 04/18/2024 10:14:20 PM (22 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #60835, comment 9
v1 v2 5 5 As I said [https://core.trac.wordpress.org/ticket/60835?replyto=6#comment:1 above] using nested filters there is not a particularly good idea. It is how a plugin may do this. However this is core, there is no need to "filter a filter" :) 6 6 7 BTW, been having some "second thoughts" on that infinite loop caused by improper use of a filter. This is a "developer error". Of course there will be an infinite loop when you call the parent function from a callback (well, it is a little more complex here, but still the same thing: a callback should not call its parent function).7 BTW, been having some "second thoughts" on that infinite loop caused by improper use of a filter. This is a "developer error". Of course there will be an infinite loop when you call the parent function from a callback (well, it is a little more complex here, but still the same thing: a callback should not call any of its parent, grandparent, great-grandparent, etc. functions). 8 8 9 9 Seems that hiding this kind of developer error doesn't actually help anybody. The developer is left wondering why their code doesn't work as there is no clue that they did something wrong.