Why esc_html_() is not used on every text that has a translation (on Twenty Twenty One)?
Why, in the register_nav_menus()
functions (from Twenty Twenty One functions.php), do we find esc_html__()
on the primary menu but not on secondary menu, like below :
register_nav_menus(
array(
'primary' = esc_html__( 'Primary menu', 'twentytwentyone' ),
'footer' = __( 'Secondary menu', 'twentytwentyone' ),
)
);
I understand that esc_html() retrieve the translation of $text and escapes it for safe use in HTML output, as explained in WordPress codex, but why is it used on the first menu and not on the second, that's what i cannot figure out.
Is there a specific rule that I missed ?