I am wanting by _s (underscores) starter theme and see that they are utilizing esc_html for almost every thing. Simply an instance from features.php
register_nav_menus( array(
'major' => esc_html__( 'Main', '_s' ),
) );
register_sidebar( array(
'title' => esc_html__( 'Sidebar', '_s' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets right here.', '_s' ),
'before_widget' => '<part id="%1$s" class="widget %2$s">',
'after_widget' => '</part>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
My present understanding of esc_html is to make use of it after we output both knowledge from the database or consumer enter.
Why escape the names of the menu and sidebar?
It is solely accessible to people who have entry to the php information and it does not seem like put into the db. I regarded by the db and could not discover something associated to the names, please right me if I am fallacious.
Is the underscores theme simply being overly cautious about every thing?
Thanks