WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35357, comment 10


Ignore:
Timestamp:
01/08/2016 02:44:17 AM (5 years ago)
Author:
chriscct7
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35357, comment 10

    initial v1  
    1 I stand corrected. It does indeed return 1. So there is a difference, however I don't see a use case where the way did_action which counts per do_action call as opposed to the number of functions that run on it (like my above patch does) makes sense for filters. I actually think the patch method of counting is more expected for filters because of exactly this:
     1I stand corrected. It does indeed return 1. Therefore there is a difference, however I don't see a use case where the way did_action which counts per do_action call as opposed to the number of functions that run on it (like my above patch does) makes sense for filters. I actually think the patch method of counting is more expected for filters because of exactly this:
    22
    33> I've never seen much utility for this, because filters are often run in different, repeated contexts, rather than a single-time action.