Changes between Initial Version and Version 1 of Ticket #17019, comment 22
- Timestamp:
- 04/08/2011 04:53:28 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #17019, comment 22
initial v1 4 4 > Given that add_filter() and apply_filters() are called so many times throughout a request, I'd be very surprized if this "strategic application" would yield any speed improvements. 5 5 > 6 Yes, the is_array() check in add_filter was a mistake so I've removed that in the revised patch. apply_filters() is not affected, as the context check is in apply_filters_ref_array() - used mainly by WP_Query to the tune of 26 per typical query by my count.6 Yes, the is_array() check in add_filter() was a mistake so I've removed that in the revised patch. apply_filters() is not affected, as the context check is in apply_filters_ref_array() - used mainly by WP_Query to the tune of 26 per typical query by my count. 7 7 8 8 Assuming a new optional arg to add_filter would not be appreciated either, I'm instead proposing a new function: