File Editor
Directories:
.. (Back)
blocks
build
fonts
genericons
lib
social-logos
Files:
accessible-focus.js
blogging-prompts.php
class.jetpack-provision.php
crowdsignal-shortcode.js
crowdsignal-survey.js
deprecate.js
facebook-embed.js
gallery-settings.js
genericons.php
jetpack-admin.js
jetpack-deactivate-dialog.js
jetpack-modules.js
jetpack-modules.models.js
jetpack-modules.views.js
polldaddy-shortcode.js
social-logos.php
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(); } )( window );
Save Changes
Rename File
Rename