WordPress.org

Ready to get started?Download WordPress

Forums

PHP Question (6 posts)

  1. eli2k
    Member
    Posted 9 years ago #

    I noticed a particular theme used the following PHP line:

    <?php _e('Archives'); ?>

    I was wondering what that does, because it seems to generate the text Archives in its place, and it would seem easier to just type Archives instead of including in the PHP code, but I'm assuming _e() must be doing something else.

    Thank you.

  2. eridan
    Member
    Posted 9 years ago #

    It's just 'echoing' the test. (printing it on your website)

  3. eli2k
    Member
    Posted 9 years ago #

    Thanks for the quick reply.

    Is this a programming style preference, or is there any advantage to doing that?

  4. eridan
    Member
    Posted 9 years ago #

    I don't see the advantage doing it :)

  5. JuneBleeds
    Member
    Posted 9 years ago #

    Localizing WordPress

    Take a look under the "Localization Technology" heading. It'll tell you exactly what _e('message') and __('message') is for. Hope that helps a little.

  6. eli2k
    Member
    Posted 9 years ago #

    Thanks. That provided a good explanation. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.