Skip to content
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

Merged

Conversation

chandrapatel
Copy link
Contributor

@chandrapatel chandrapatel commented Sep 17, 2018

Fixes #822

@westonruter westonruter added this to the v1.0 milestone Sep 17, 2018
@westonruter
Copy link
Member

Should the attribute be included in the create_amp_instagram_and_replace_node 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' => '',
Copy link
Contributor Author

@chandrapatel chandrapatel Sep 17, 2018

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.

Copy link
Member

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' ).

Copy link
Contributor Author

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.

@westonruter
Copy link
Member

Thank you very much!

@westonruter westonruter merged commit 84c1ab1 into ampproject:develop Sep 17, 2018
@chandrapatel chandrapatel deleted the add/amp-instagram-caption-support branch September 17, 2018 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants