[wp-hackers] apply_filters, merge_filters and reset()

Ryan Boren ryan at boren.nu
Fri Nov 9 06:26:47 GMT 2007


On 11/8/07, Jacob <wordpress at santosj.name> wrote:
> Hmm, I believe my usage of foreach was to use the $value of the first
> foreach (since it is the array) instead of doing your method. I was able
> to confirm that, at the very least, it doesn't break anything on the
> trunk. I would rather use foreach than while since it looks cleaner.
>
> If you want to take care of 2.3.x, I'll submit a patch for 2.4. There
> are some other areas I want to clean up in the trunk.

I think we used to do a foreach.  A switch was made to do-while-next
because it was supposedly faster.  I don't really care what the loop
looks like as long it is as fast as can be.  apply_filters is called
hundreds of times.  Any changes need to be profiled.

Ryan


More information about the wp-hackers mailing list