ThemeShaper Forums » Thematic

Change edit page link to text

(5 posts)
  • Started 6 years ago by alst
  • Latest reply from alst
  • This topic is not a support question
  1. alst

    Hi Ian, I have managed to do something which I want, but am annoyed as I don't understand why it works.

    Wanted to change the text at the bottom of the page that says "edit this" to a clickable image.

    Looked at some other themes and found some code that works, but I want to understand why,

    <?php edit_post_link('<img src="' . get_bloginfo('template_directory') . '/images/page_edit.png" title="'. __('Edit this post','thematic') .'" />','','Edit this Page'); ?>

    Basically, what does the "." in front of get_bloginfo and the "." in front of /images achieve?

    Posted 6 years ago #
  2. It's sort of like the addition sign, only for strings of text. The stuff in the quotes is a string and get_bloginfo() returns a string. The period means "add these strings together".

    Posted 6 years ago #
  3. alst

    That makes sense now.

    And the "__" before ('Edit this post')

    Posted 6 years ago #
  4. That's for localization or translation. It includes the bracket afterwards as well. You can leave it out if you're making something for yourself. If you're releasing a theme you should localize.

    Posted 6 years ago #
  5. alst

    Fantastic. Thanks for the quick replies. Not releasing a theme, just (by a little trial and error) customising Thematic to run as our Radiology Department's clinical Intranet CMS.

    Chose wordpress as it seemed to have the most user friendly backend/frontend and had a big user base which means there is heaps of online doc.

    Chose thematic because it is so well commented and up-to-date/supported.

    Thanks for your help.


    Posted 6 years ago #

RSS feed for this topic


You must log in to post.