一键导入
fix-textdomain
Convert hardcoded English strings in PHP files to WordPress i18n functions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert hardcoded English strings in PHP files to WordPress i18n functions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Write PHP DocBlocks with PHPStan support. DO NOT modify any code — only add/update documentation.
Perform a line-by-line security audit of a WordPress/WooCommerce plugin's source code and write findings to a ai-security-audit.md report with risk ratings. Use this skill whenever the user asks to audit, security-check, scan, or review plugin code for vulnerabilities, security issues, or weaknesses — especially when they mention the `includes` directory, a WooCommerce extension, SQLi/XSS/CSRF, nonce/capability/sanitization checks, or want a written security report. Trigger even if the user just says "check my plugin for security issues" without naming a specific vulnerability.
Fix Package JSON `devDependencies` and `dependencies` by sorting alphabetical order
| name | fix textdomain |
| description | Convert hardcoded English strings in PHP files to WordPress i18n functions. |
CLAUDE.md to find the plugin entry fileText Domain: header from that entry fileConvert user-facing strings in: echo, return, throw, wp_die(), array values for labels/messages/descriptions, admin notices, JSON responses.
Skip: already i18n'd strings, empty strings, array keys, hook names (do_action, apply_filters, add_action, add_filter), define() constants, technical strings (DB tables, option keys, CSS classes, regex, SQL, URLs, file paths).
| Context | Function |
|---|---|
| General / escaped output | esc_html__('Text', 'domain') |
| HTML attributes | esc_attr__('Text', 'domain') |
Inside echo | echo esc_html__('Text', 'domain') |
| Exceptions | throw new Exception(esc_html__('Text', 'domain')) |
wp_die() | wp_die(esc_html__('Text', 'domain')) |
Variables in strings — replace interpolation with sprintf + placeholder:
// Before
"Hello {$name}, welcome!"
// After
/* translators: %s: User name. */
sprintf(esc_html__('Hello %s, welcome!', 'domain'), esc_html($name))
Strings with HTML — separate HTML from translatable text:
sprintf(
/* translators: %s: Link HTML. */
esc_html__('Click %s', 'domain'),
'<a href="#">' . esc_html__('here', 'domain') . '</a>'
)
Plurals — use _n():
sprintf(
/* translators: %d: Number of items. */
_n('%d item', '%d items', $count, 'domain'),
$count
)
/* translators: ... */ comments before strings with placeholders