Support » Plugins and Hacks » Why wp_get_attachment_link is using filename as title attribute?

  • Actually wp_get_attachment_link (called inside the gallery shortcode) function is using the filename of the image to fill the title tag:

    <a rel="gallery-1" href="[...]/uploads/2013/06/dorepicture.png" title="dorepicture" class="cboxElement">
    	<img width="150" height="150" src="[...]/uploads/2013/06/dorepicture-150x150.png" class="attachment-thumbnail" alt="website screenshot">
    </a>

    I need to change this behaviour, in order to show the title in the gallery. So:

    <a rel="gallery-1" href="[...]/uploads/2013/06/dorepicture.png" title="My website screenshot!" class="cboxElement">
    	<img width="150" height="150" src="[...]/uploads/2013/06/dorepicture-150x150.png" class="attachment-thumbnail" alt="website screenshot">
    </a>
  • The topic ‘Why wp_get_attachment_link is using filename as title attribute?’ is closed to new replies.