Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

Restore Image Title

Restores the title attribute when images are inserted into posts

WordPress 3.5 introduced a new feature - when images are inserted into posts, the title attribute is not included in the image tag. This was done with the best of intentions relating to accessibility, as documented on Trac

Unfortunately, this causes problems for some Lightbox plugins, quite apart from stopping image tooltips from appearing.

This plugin hooks into the media_send_to_editor filter and inserts the image title into the html inserted into the post.

Author Les Bessant
Profile
Contributors LesBessant
Tags image, title
  1. Upload the restore-image-title folder into the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

1.0

  • Initial release

1.1

  • Checks for existence of title attribute before adding anything. Filters title with esc_attr() to avoid any markup in the title breaking the img tag.

1.5

  • Now adds titles to gallery thumbnails, which also works for at least some lightbox plugins. Thanks to photoMaldives for posting code and OC2PS for prompting me to update the plugin.

Does it do anything else?

No.

Share  
Download
Version 1.5

Requires WordPress version: 3.5 or higher

Compatible up to: 4.7.2

Last Updated 08 Dec 2016

Date Added: 27 Dec 2012

Evaluation
star1
star2
star3
star4
star5

4.9 stars
11 ratings
9,605 downloads

Compatibility

Not Enough Data

Reports:
Works: 0
Broken: 0