1. 首页
  2. WordPress钩子手册

gettext_with_context

apply_filters( ‘gettext_with_context’, string $translation, string $text, string $context, string $domain )

过滤器::根据上下文信息过滤文本及其翻译。
Filter Hook: Filters text with its translation based on context information.

目录锚点:#参数#源码


参数(Parameters)

参数 类型 说明
$translation (string) 翻译文本。
$text (string) 要翻译的文本。
$context (string) 译者的上下文信息。
$domain (string) 文本域。检索转换字符串的唯一标识符。

源码(Source)


更新版本 源码位置 使用 被使用
2.8.0 wp-includes/l10n.php:238 1 0

gettext_with_context 为WP2原创文章,链接:https://www.wp2.cn/hook/gettext_with_context/