WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Whats the function _e(‘xxx’)

[Resolved] Whats the function _e(‘xxx’)

  • Hi folks – Ive been trying to find info on the php _e function.
    as inusage <h2><?php _e(‘Archives’); ?></h2>
    I understand that it “echos” Archives (i think) but cant find info in the codex other than being mentioned and Im not gamne to dig in the wp files.
    How is it used – briefly – Like its in the sidebar between the <H> tags – anybody explain please any attributes/parameters etc.
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mark (podz)

    @podz

    Support Maven

    I believe it’s integral to the Localisation of the code.

    Yes, as I understand it works like this:

    If your blog is non-english (you’ve specified it in the wp-config file), then it will check the words within _e() and see if they have translations available in the language file. _e() is for echoing, and __() is for returning. This all makes it really easy to localize wordpress so that other language users can just plug and play.

    So anyways, if your blog is in English and it’s going to stay in English (and you aren’t going to release a theme or something), then it wouldn’t make a lot of sense to use it.

    In which file is the _e() function contained?

    wp-includes/wp-l10n.php

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Whats the function _e(‘xxx’)’ is closed to new replies.