Forums

Why are theme names specified in PHP functions? (2 posts)

  1. karyl.gilbertson
    Member
    Posted 9 months ago #

    I have been seeing this sort of thing around a lot while customizing themes.

    <?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>

    Why does it say "twentyeleven" in there? I am seeing this in a ton of different PHP functions in multiple themes (different name depending on the theme of course).

    I tried removing them to see what it would do, and it didn't break anything. So what purpose do they serve?

  2. sixhours
    Member
    Posted 9 months ago #

    It's part of the language translation component of WordPress... see more about that particular function here. Also, WordPress in Your Language.

Reply

You must log in to post.

About this Topic