File Editor
Directories:
.. (Back)
blocks
build
fonts
genericons
lib
social-logos
Files:
accessible-focus.js
class.jetpack-provision.php
connect-button.js
crowdsignal-shortcode.js
crowdsignal-survey.js
facebook-embed.js
footer.php
gallery-settings.js
genericons.php
header.php
idc-notice.js
jetpack-admin.js
jetpack-connection-banner.js
jetpack-deactivate-dialog.js
jetpack-jitm.js
jetpack-modules.js
jetpack-modules.models.js
jetpack-modules.views.js
jetpack-server-sandbox.php
jetpack-strings.php
jetpack-wizard-banner.js
jquery.jetpack-resize.js
jquery.spin.js
polldaddy-shortcode.js
postmessage.js
social-logos.php
spin.js
twitter-timeline.js
Create New File
Create
Edit File: facebook-embed.js
/* global FB, jpfbembed */ ( function( window ) { var facebookEmbed = function() { var fbroot, src, newScript, firstScript; if ( 'undefined' !== typeof FB && FB.XFBML ) { FB.XFBML.parse(); } else { fbroot = document.createElement( 'div' ); fbroot.id = 'fb-root'; document.getElementsByTagName( 'body' )[ 0 ].appendChild( fbroot ); src = '//connect.facebook.net/' + jpfbembed.locale + '/sdk.js#xfbml=1'; if ( jpfbembed.appid ) { src += '&appId=' + jpfbembed.appid; } src += '&version=v2.3'; newScript = document.createElement( 'script' ); newScript.setAttribute( 'src', src ); firstScript = document.querySelector( 'script' ); firstScript.parentNode.insertBefore( newScript, firstScript ); } }; window.fbAsyncInit = function() { FB.init( { appId: jpfbembed.appid, version: 'v2.3', } ); FB.XFBML.parse(); }; if ( 'undefined' !== typeof infiniteScroll ) { document.body.addEventListener( 'post-load', facebookEmbed ); } facebookEmbed(); } )( this );
Save Changes
Rename File
Rename