-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add caption support to all amp-instagram embeds #1438
Add caption support to all amp-instagram embeds #1438
Conversation
Should the attribute be included in the |
…ode' method as well
@@ -145,6 +146,7 @@ private function create_amp_instagram_and_replace_node( $dom, $node ) { | |||
|
|||
$new_node = AMP_DOM_Utils::create_node( $dom, $this->amp_tag, array( | |||
'data-shortcode' => $instagram_id, | |||
'data-captioned' => '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westonruter I think, include this attribute if <blockquote class="instagram-media">
element has data-instgrm-captioned
attribute. Please let me know your suggetion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chandrapatel excellent point. Yes indeed. So only add the data-captioned
attribute if $node->hasAttribute( 'data-instgrm-captioned' )
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've made changes and PR updated.
Thank you very much! |
Fixes #822