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

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

merged 3 commits into from Jan 31, 2017


None yet
3 participants
Copy link

commented Jan 31, 2017

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 some commits Sep 13, 2016

Don't try to load FB embeds compat unless we're in Instant Articles c…
…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

@diegoquinteiro diegoquinteiro requested a review from everton-rosario Jan 31, 2017

Copy link

left a comment


@@ -79,7 +85,7 @@ public static function facebook_embed_handler( $matches, $attr, $url ) {
$locale = 'en_US';
return '<figure class="op-social"><iframe><script src="' . $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="' . $locale . '/sdk.js#xfbml=1&amp;version=v2.6" async></script><div class="fb-post" data-href="' . esc_url( $url ) . '"></div></iframe></figure>';

This comment has been minimized.

Copy link

everton-rosario Jan 31, 2017


Nice catch.

@diegoquinteiro diegoquinteiro merged commit 9259ec4 into master Jan 31, 2017

2 checks passed

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

@diegoquinteiro diegoquinteiro deleted the rinatkhaziev-fix-jetpack-fb-compat branch Feb 13, 2017

@diegoquinteiro diegoquinteiro modified the milestones: 3.3.2, 3.4 Feb 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.