Changes between Version 3 and Version 4 of Ticket #17019, comment 18
- Timestamp:
- 04/07/2011 08:03:51 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #17019, comment 18
v3 v4 15 15 causes my_function to be executed every time WP_Query applies filters for any query; I have no choice. 16 16 17 Same for my_function2 and my_function3 which also want to filter posts_where , but for a different use case. All 3 of them, when hooked directly to posts_where, will each be executed every N times posts_where filters are applied. Is there not some overhead in needless call_user_func_array() calls?17 Same for my_function2 and my_function3 which also want to filter posts_where within the same http request, but for different queries. Each one, when hooked directly to posts_where, will each be executed every N times posts_where filters are applied. Is there not some overhead in needless call_user_func_array() calls? 18 18 19 19 So as it stands, my plugin code will instead hook '''one''' function to posts_where and let it route the traffic. But most plugin / theme authors won't bother to do that, so I thought it would be better to just skip the call_user_func_array() when a context mismatch is known.