[wp-trac] Re: [WordPress Trac] #5232: Get the current action and
current filter name
WordPress Trac
wp-trac at lists.automattic.com
Thu Oct 25 04:07:18 GMT 2007
#5232: Get the current action and current filter name
-------------------------+--------------------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.4
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+--------------------------------------------------
Comment (by darkdragon):
Agreed, I had to overcome a similar limitation while developing a patch.
One of the problems perhaps is that every millisecond adds up when you
need to have calls totaling over 3000 times. I'm unsure what the total is
WordPress, but in which case the upper limit before things start running
really slow (1-3 seconds) is around 4000 to 6000 times.
The problem is that in most cases when you do Object Oriented code, you'll
want to do the time consuming tests once and before the hook is added.
That way, you can just focus on calling what you need without doing the
checks in the call method.
I've done some prototyping with this (all complete crap). I was thinking
about it. That the code would be a really good candidate for a PHP
extension. The code is simple enough, that it wouldn't take more than a
few days to write, test, and deploy. The only problem is that you'll need
something that everyone would have and not many would go through the
effort to install a PECL extension.
I'm not so much concern with the objects as I am with having to support
PHP4 with such an object. I'll be unwilling to write OO code that has to
be compatible with PHP4.
The patch is beautiful by the way. I really do think it should be
accepted.
--
Ticket URL: <http://trac.wordpress.org/ticket/5232#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list