[wp-hackers] On slug change, do something
Haluk Karamete
halukkaramete at gmail.com
Tue Jul 30 21:51:43 UTC 2013
for do_action("edit_term", $term_id, $tt_id); please see
http://adambrown.info/p/wp_hooks/hook/edit_term?version=2.3&file=wp-includes/taxonomy.php
and for do_action("edit_term", $term_id, $tt_id, $taxonomy); please see
http://adambrown.info/p/wp_hooks/hook/edit_term?version=2.9&file=wp-includes/taxonomy.php
I just noticed, the only diff is the version number in the query string!
2nd one is WordPress version: 2.9 while the first is version 2.3
Boy! I had not noticed them before,
thanks to your trigger... now I know I was looking at the
http://adambrown.info site the wrong way all this time.
In this case, all I need to worry about is the latest WP version out there.
http://adambrown.info/p/wp_hooks/hook/edit_term?version=3.5&file=wp-includes/taxonomy.php
and there we have it as do_action("edit_term", $term_id, $tt_id,
$taxonomy);
But I'm not sure, if looking for the latest is gonna solve the original
problem I had. Even on the latest version, are all function calls to that
action hook pass the same number of args? That I do not know.
Isn't there a function exactly named as "edit_term" in the core which I can
go and look up to check how many args does that function possibly take ?
That way I'd be going to the function def ( which is in one place) as
opposed to going to function calls to it - thru sites like adambrown?
On Tue, Jul 30, 2013 at 2:15 PM, J.D. Grimes <jdg at codesymphony.co> wrote:
>
> > I searched the core, in one instance, the core uses it as
> >
> > do_action("edit_term", $term_id, $tt_id);
> >
> >
> > and in another instance, as
> >
> > do_action("edit_term", $term_id, $tt_id, $taxonomy);
> >
> >
> > as you see, in the former, the action takes 2 args whereas in the latter
> > does it with 3.
>
> Where are you seeing this? What is the file and line number? I just did a
search and the "edit_term" action is called only once, in
wp-includes/taxonomy.php (
http://adambrown.info/p/wp_hooks/hook/edit_term?version=3.5&file=wp-includes/taxonomy.php).
It takes the three parameters as shown in your second example above. There
is an "edit_$taxonomy" hook with calls like that of your first example, and
there is also an "edit_terms" (plural) hook, but I don't see any other
calls to "edit_term".
>
> -J.D.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list