标签在Wordpress中创建/编辑/删除钩子 [英] Tags create/edit/delete hooks in wordpress
问题描述
如果标签已删除,创建和编辑,我需要挂钩.我尚未在WordPress Codex/功能参考中找到它们.
I need hooks if tags have removed, created and edited. I have not found them in the WordPress Codex / Function Reference.
对于类别:
edit_category
create_category
delete_category
有人遇到过这个问题吗?
Has anyone encountered this problem?
推荐答案
要明确定位标签,您需要 create_ $ taxonomy
, edit_ $ taxonomy
和 delete_ $ taxonomy
,其中 $ taxonomy
是 post_tag
(即 create_post_tag
, edit_post_tag
和delete_post_tag
).在传递(例如) wp_insert_term
时提到了它们a>.
To explicitly target tags, you'll need create_$taxonomy
, edit_$taxonomy
and delete_$taxonomy
where $taxonomy
is post_tag
(ie create_post_tag
, edit_post_tag
and delete_post_tag
). They're mentioned in passing in (eg) the wp_insert_term
.
标记是一种分类法,因此通用动作 create_term
, edit_term
和 delete_term
也可以正常使用,尽管它们也会触发其他分类法(例如类别).
Tags are a taxonomy, so the generic actions create_term
, edit_term
, and delete_term
would work as well, though they'll also fire for other taxonomies (such as categories).
这篇关于标签在Wordpress中创建/编辑/删除钩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!