Title: Wrap in
Last modified: August 30, 2016

---

# Wrap in

 *  Resolved [sojic](https://wordpress.org/support/users/sojic/)
 * (@sojic)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wrap-in/)
 * Great plugin, but I would like to “control” the result html. It should be something
   like:
    `<figure><img><figcaption>...` or even better, add [http://schema.org/ImageObject](http://schema.org/ImageObject)
 * [https://wordpress.org/plugins/media-credit/](https://wordpress.org/plugins/media-credit/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wrap-in/#post-6570767)
 * I can see adding schema.org markup (as an option), however, the case for `<figure
   >` is more difficult. In theory, we could check whether the theme supports HTML5
   captions. However, to properly handle both embedded media credits (with captions)
   and stand-alone ones (without captions), we’d have to override the `caption` 
   shortcode ourselves.
 * While in principle this is easy to do (and is indeed what I’ve done for [my own blog](https://mundschenk.at)),
   it wreaks havoc with other plugins (and themes) modifying `caption`. If you privately
   want to do it, you can just add filters to `media_credit_shortcode` and `img_caption_shortcode`.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wrap-in/#post-6570868)
 * PS: I might have an idea to do that automagically, but I’ll have to test things
   first, so I can’t promise anything yet.
 *  Thread Starter [sojic](https://wordpress.org/support/users/sojic/)
 * (@sojic)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wrap-in/#post-6570872)
 * Thanks for the response! Take your time!
 *  Thread Starter [sojic](https://wordpress.org/support/users/sojic/)
 * (@sojic)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wrap-in/#post-6570923)
 * Here is the “minimum” html markup:
 *     ```
       <figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
       	<img src="small-image.jpg" itemprop="image" alt="Image description" />
   
       	<figcaption itemprop="caption description">
       		Long image description
   
       		<span itemprop="copyrightHolder">Photo: AP</span>
       	</figcaption>
       </figure>
       ```
   
 * I will appreciate if I can get this markup! (Of course there can be link as well)
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wrap-in/#post-6570924)
 * I’m somewhat dubious about the duplication of semantic markup and schema.org 
   annotations (regarding the `<img>` and `<figcaption>` tags), but I still think
   it’s a good idea. What I’d be reluctant to do is the `itemprop="associatedMedia"`
   on the `<figure>`. That needs needs enclosing schema.org annotations to make 
   sense, if at all. What else but media files associated with the enclosing content
   should a `<figure>` be?
 * Anyway, even if I’m able to do the semantic markup (HTML5 and/or schema.org),“
   Long image description” in your example would be empty. I’m not touching standard
   caption elements from within Media Credit, only stand-alone shortcodes.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/wrap-in/#post-6571032)
 * I’ve added an enhancement request on Github to track this issue: [https://github.com/mundschenk-at/media-credit/issues/2](https://github.com/mundschenk-at/media-credit/issues/2)
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [10 years ago](https://wordpress.org/support/topic/wrap-in/#post-6571046)
 * The feature will be included in 3.1.0.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Wrap in’ is closed to new replies.

 * ![](https://ps.w.org/media-credit/assets/icon.svg?rev=2570388)
 * [Media Credit](https://wordpress.org/plugins/media-credit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-credit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-credit/)
 * [Active Topics](https://wordpress.org/support/plugin/media-credit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-credit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-credit/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [pepe](https://wordpress.org/support/users/pputzer/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/wrap-in/#post-6571046)
 * Status: resolved