[wp-hackers] category hooks/actions

Alexander Concha alex at buayacorp.com
Thu Dec 6 19:27:09 GMT 2007


Pixline escribió:
> Hi all, I've a question I can't find answer even by browsing trac code,
> and I hope someone of you can help, because I'm getting crazy :-)
> 
> I'm trying to make the Gengo plugin compatible with WP2.3+ , and this
> means rewriting all category-related stuff against the new API.
> The original plugin shipped with those actions:
> 
>                 // Categories.
>                 add_action('add_category', array(& $this, 'add_category'));
>                 add_action('delete_category', array(& $this,
> 'delete_category'));
> 
> It actually can't do anything, and browsing WordPress code I can't even
> find those action. So I supposed they've gone with the 2.3 family, and
> I've found this changeset:
> 
> http://trac.wordpress.org/changeset/5528
> 
> It seems that some actions died in this changeset (like those in
> admin-db.php - the removed part of it - lines #147/161)
> 
> Am I wrong, and they're just somewhere I can't reach, or maybe those
> actions aren't actually working?
> If so, I'll need to find another way to notify the plugin when a
> category is modified in any way...

It seems that add_category hook was renamed to create_category [1] --
delete_category[2] has not changed.

[1] http://trac.wordpress.org/browser/trunk/wp-includes/taxonomy.php#L1092
[2] http://trac.wordpress.org/browser/trunk/wp-includes/taxonomy.php#L943

Regards
-- 
Alexander Concha
http://www.buayacorp.com/

Los encargos con dinero no se olvidan.


More information about the wp-hackers mailing list