I have these all over my theme, and when if I delete them, there nothing happens to the theme. What does it do? Should I leave them in or are they unnecessary? I want to optimize my site to load faster, so this is why I'm asking.
_e() = echo the translated string.
To get started, install the free TranslatePress plugin from WordPress.org. Then, go to Settings → TranslatePress to choose the language(s) into which you want to translate your site. Again, the free version lets you translate your site into one new language, while the premium version lets you use unlimited languages.
esc_html. Filters a string cleaned and escaped for output in HTML.
Filters a string cleaned and escaped for output in an HTML attribute. wp-includes/formatting.php: wp_check_invalid_utf8()
https://developer.wordpress.org/reference/functions/_e/
In WordPress, strings in the php files are marked for translation to other languages, and localization using two “tags” which are actually functions. They are:
__() _e()
They are used for localization in WordPress themes. If you're only using one language for your theme, you don't need them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With