钩子文档

get_edit_tag_link

💡 云策文档标注

概述

本文档介绍了 WordPress 中的 get_edit_tag_link 过滤器,用于修改标签或其他分类法中术语的编辑链接。它基于 get_edit_term_link 函数,允许开发者自定义链接生成。

关键要点

  • get_edit_tag_link 是一个过滤器,用于过滤标签或分类法术语的编辑链接。
  • 参数 $link 是术语编辑链接的字符串,可通过过滤器进行修改。
  • 该过滤器在 get_edit_term_link 函数的结果上应用,返回修改后的链接。
  • 自 WordPress 2.7.0 版本引入,位于 wp-includes/link-template.php 文件中。

代码示例

return apply_filters( 'get_edit_tag_link', get_edit_term_link( $tag, $taxonomy ) );

📄 原文内容

Filters the edit link for a tag (or term in another taxonomy).

Parameters

$linkstring
The term edit link.

Source

return apply_filters( 'get_edit_tag_link', get_edit_term_link( $tag, $taxonomy ) );

Changelog

Version Description
2.7.0 Introduced.