钩子文档

edit_tag_link

💡 云策文档标注

概述

edit_tag_link 是一个 WordPress 过滤器,用于修改标签(或其他分类法中的术语)编辑链接的锚标签。它允许开发者自定义编辑链接的 HTML 输出。

关键要点

  • 过滤器名称:edit_tag_link
  • 参数:$link(字符串类型,表示编辑链接的锚标签)
  • 用途:过滤标签编辑链接的锚标签,支持自定义输出
  • 相关函数:edit_tag_link(),用于显示或检索带格式的标签编辑链接
  • 引入版本:WordPress 2.7.0

代码示例

echo $before . apply_filters( 'edit_tag_link', $link ) . $after;

📄 原文内容

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

Parameters

$linkstring
The anchor tag for the edit link.

Source

echo $before . apply_filters( 'edit_tag_link', $link ) . $after;

Changelog

Version Description
2.7.0 Introduced.