Correct Transformer rule for [caption] shortcode
-
When uploading pictures to the WordPress backend I often fill in the caption field which results in code like this being generated
[caption id="attachment_15046" align="aligncenter" width="520"]<img src=”https://picnic.ly/wp-content/uploads/2016/04/j3.jpg” alt=”https://www.pinterest.com/pin/308989224404163749/” width=”520″ height=”780″ class=”wp-image-15046″ /> HERE IS THE CAPTION[/caption]
What I’m seeing in the debug info for your plugin is
No rules defined for <div class=”wp-caption aligncenter”> in the context of InstantArticle
And then the code is missing from the transformed markup. Both the image and the caption don’t make it through the transformer.
Is this something the transformer should be picking up? If not, how would I extend the code to deal with this (pretty normal) case?
Thanks!
WordPress Version 4.4.2
Plugin Version 2.9
PHP Version 5.5.9-1ubuntu4.14
- The topic ‘Correct Transformer rule for [caption] shortcode’ is closed to new replies.