且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

标签在Wordpress中创建/编辑/删除钩子

更新时间:2023-12-04 13:31:52

要明确定位标签,您需要 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).