为什么,在register_nav_menus()
函数(来自二十二个函数.php),我们是否发现esc_html__()
在主菜单上but not on secondary menu, 如下所示:
register_nav_menus(
array(
\'primary\' => esc_html__( \'Primary menu\', \'twentytwentyone\' ),
\'footer\' => __( \'Secondary menu\', \'twentytwentyone\' ),
)
);
我理解esc\\u html()”的意思;检索$文本的翻译并将其转义,以便在HTML输出中安全使用;,正如WordPress codex中所解释的,但为什么它被用在第一个菜单上而不是第二个菜单上,这是我无法理解的。是否有我遗漏的特定规则?