Shortcode: Instagram hidecaption not working
References https://github.com/Automattic/jetpack/pull/17700
Steps to reproduce the issue
Tested with WP 5.6 and Jetpack 9.3.
- Use shortcode in format: [instagram url="https://www.instagram.com/p/xxx/" hidecaption="true"]
What I expected
Instagram embed without the caption showing.
What happened instead
Instagram embed shows but with the caption.
Code:
<iframe class="instagram-media instagram-media-rendered" id="instagram-embed-2" src="https://www.instagram.com/p/xxx/embed/captioned/?cr=1&v=13&wp=1160&rd=https%3A%2F%2Fdomain.com&rp=%2F%3Fp%3D2545%26preview%3Dtrue#%7B%22ci%22%3A2%2C%22os%22%3A1532%7D" allowtransparency="true" allowfullscreen="true" data-instgrm-payload-id="instagram-media-payload-2" scrolling="no" style="background: white none repeat scroll 0% 0%; max-width: 580px; width: 2290px; border-radius: 3px; border: 1px solid rgb(219, 219, 219); box-shadow: none; display: block; margin: 0px 0px 12px; min-width: 326px; padding: 0px;" data-origwidth="" data-origheight="704" height="704" frameborder="0"></iframe>
- Copy&pasting Instagram url in format:
https://www.instagram.com/p/xxx/?hidecaption=trueworks as expected, it uses<figure class="wp-block-embed is-type-rich is-provider-instagram wp-block-embed-instagram">...</figure>and no caption is displayed. - Jetpack > Writing > Shortcodes is enabled.