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
merged 3 commits into from Sep 17, 2018

Conversation

Projects
None yet
2 participants
@chandrapatel
Contributor

chandrapatel commented Sep 17, 2018

Fixes #822

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

@westonruter

This comment has been minimized.

Member

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' => '',

This comment has been minimized.

@chandrapatel

chandrapatel Sep 17, 2018

Contributor

@westonruter I think, include this attribute if <blockquote class="instagram-media"> element has data-instgrm-captioned attribute. Please let me know your suggetion.

This comment has been minimized.

@westonruter

westonruter Sep 17, 2018

Member

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

This comment has been minimized.

@chandrapatel

chandrapatel Sep 17, 2018

Contributor

Thanks, I've made changes and PR updated.

@westonruter

This comment has been minimized.

Member

westonruter commented Sep 17, 2018

Thank you very much!

@westonruter westonruter merged commit 84c1ab1 into ampproject:develop Sep 17, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chandrapatel chandrapatel deleted the chandrapatel: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