Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #17019, comment 22


Ignore:
Timestamp:
04/08/2011 04:53:28 PM (14 years ago)
Author:
kevinB
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17019, comment 22

    initial v1  
    44> 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.
    55>
    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.
     6Yes, 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.
    77
    88Assuming a new optional arg to add_filter would not be appreciated either, I'm instead proposing a new function: