Skip to:
Content
Pages
Categories
Search
Top
Bottom

Simple PHP Question

  • @nickaster

    Member

    So, I’m learning how to hack around these bbpress themes pretty nicely, but sometimes the php confounds me. For example, here’ some code from a basic front page:

    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Last Poster'); ?></th>
    <th><?php _e('Freshness'); ?></th>

    Simple table headers, but what’s the point of the php? Why don’t I just slap the words in there exactly how I want it? Isn’t this just churning resources? Why wouldn’t I just do this:

    <th>Posts</th>
    <th>Last Poster</th>
    <th>Freshness</th>

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • @delayedinsanity

    Member

    https://codex.wordpress.org/I18n_for_WordPress_Developers

    Same concept for bbPress. You could make all those plain text if you like, they’re built that way by default for people who need to translate their sites.

    @nickaster

    Member

    Okay cool…. so two questions:

    1) Does keeping the PHP there burn resources?

    2) If I don’t care about translations, is there any reason to keep that stuff?

    Thanks!

    @delayedinsanity

    Member

    1) Yes. Not much per, but add them all together… in any site where you expect to have any respectable amount of traffic it’s always a good idea to make your templates static where and whenever possible.

    2) Nope.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar