Quick WordPress Plugin 2
I need a quick WordPress plugin
It would attach to the_content filter
For each post it would get the attached images using for example
$allimages =&get_children(‘post_type=attachment&post_mime_type=image&post_parent=’ . $post->ID );
For every image it will use wp_get_attachment_url($attachid) to get it’s url and then check if this image was displayed on the page.
If it is, it will link thoe whole image it to it’s attachment page using get_attachment_link($attachid).
If it was linking to something else it would replace that link with the link to the attachment page.
So the end result is something like <a href=”attachment page url><img src=”image url” /></a>
First one to finish wins the project.