I have used this code in my page content to try and output an image + caption with a custom caption class and id...
[caption id="my-caption-id" class="my-caption-class" align="alignnone" width="399"]<img src="whatever.jpg" alt="whatever" width="399" height="600" /> My caption text[/caption]
...but the caption's id and class names are not being output.
After some digging around, I found the img_caption_shortcode
function in wp-includes/media.php which handles the id and class attributes of the [caption]
shortcode but, after some experimenting, it seems this function is not executed with the [caption]
shortcode...
So does anyone know which function the [caption]
shortcode is linked to? (and / or how to get the class and id attributes to be output on a caption?)
I'm using WordPress 3.9.2 .