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

@westonruter westonruter commented Sep 17, 2018

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

@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

@westonruter westonruter Sep 17, 2018

@chandrapatel excellent point. Yes indeed. So only add the data-captioned attribute if $node->hasAttribute( 'data-instgrm-captioned' ).

Copy link
Contributor Author

@chandrapatel chandrapatel Sep 17, 2018

Thanks, I've made changes and PR updated.

@westonruter
Copy link
Member

@westonruter westonruter commented Sep 17, 2018

Thank you very much!

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

Successfully merging this pull request may close these issues.

None yet

2 participants