Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Don't try to load embeds compat unless we're in Instant Articles context #597

Merged
merged 3 commits into from
Jan 31, 2017

Conversation

diegoquinteiro
Copy link
Collaborator

This PR is built on top of #457 and using the solution introduced by #568.

It prevents the compat layer from messing with the regular FE output, running only during the Instant Article transformation.

rinatkhaziev and others added 3 commits September 14, 2016 01:07
…ontext to prevent outputting

of IA-version embed on regular frontend/in visual editor
replace op-social with op-interactive (op-social is deprecated)
@diegoquinteiro diegoquinteiro added this to the 3.4 milestone Jan 31, 2017
Copy link
Collaborator

@everton-rosario everton-rosario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
🚢

@@ -79,7 +85,7 @@ public static function facebook_embed_handler( $matches, $attr, $url ) {
$locale = 'en_US';
}

return '<figure class="op-social"><iframe><script src="https://connect.facebook.net/' . $locale . '/sdk.js#xfbml=1&amp;version=v2.6" async></script><div class="fb-post" data-href="' . esc_url( $url ) . '"></div></iframe></figure>';
return '<figure class="op-interactive"><iframe><script src="https://connect.facebook.net/' . $locale . '/sdk.js#xfbml=1&amp;version=v2.6" async></script><div class="fb-post" data-href="' . esc_url( $url ) . '"></div></iframe></figure>';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch.

@diegoquinteiro diegoquinteiro merged commit 9259ec4 into master Jan 31, 2017
@diegoquinteiro diegoquinteiro deleted the rinatkhaziev-fix-jetpack-fb-compat branch February 13, 2017 18:55
@diegoquinteiro diegoquinteiro modified the milestones: 3.3.2, 3.4 Feb 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants