summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-04-18 11:52:28 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-04-18 11:52:28 -0400
commit097e7d91b32dd6d27ea47e5d7cd8d6bdcf1e50a2 (patch)
treeedf0e0c9fcd6ce7c922593a4df301d624e9faeb1 /plugins/jetpack/modules/shortcodes/facebook.php
parentUpdate pluging wordpress-mobile-pack to 2.2.2 (diff)
downloadblogs-gentoo-097e7d91b32dd6d27ea47e5d7cd8d6bdcf1e50a2.tar.gz
blogs-gentoo-097e7d91b32dd6d27ea47e5d7cd8d6bdcf1e50a2.tar.bz2
blogs-gentoo-097e7d91b32dd6d27ea47e5d7cd8d6bdcf1e50a2.zip
Update plugin jetpack to 3.9.6
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/facebook.php')
-rw-r--r--plugins/jetpack/modules/shortcodes/facebook.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/plugins/jetpack/modules/shortcodes/facebook.php b/plugins/jetpack/modules/shortcodes/facebook.php
index c054ecc6..778fc543 100644
--- a/plugins/jetpack/modules/shortcodes/facebook.php
+++ b/plugins/jetpack/modules/shortcodes/facebook.php
@@ -37,21 +37,9 @@ function jetpack_facebook_embed_handler( $matches, $attr, $url ) {
// since Facebook is a faux embed, we need to load the JS SDK in the wpview embed iframe
if ( defined( 'DOING_AJAX' ) && DOING_AJAX && ! empty( $_POST['action'] ) && 'parse-embed' == $_POST['action'] ) {
- return $embed . '<script src="//connect.facebook.net/en_US/all.js#xfbml=1"></script>';
+ return $embed . wp_scripts()->do_items( array( 'jetpack-facebook-embed' ) );
} else {
- wp_enqueue_script( 'jetpack-facebook-embed', plugins_url( 'js/facebook.js', __FILE__ ), array( 'jquery' ), null, true );
- /** This filter is documented in modules/sharedaddy/sharing-sources.php */
- $fb_app_id = apply_filters( 'jetpack_sharing_facebook_app_id', '249643311490' );
- if ( ! is_numeric( $fb_app_id ) ) {
- $fb_app_id = '';
- }
- wp_localize_script(
- 'jetpack-facebook-embed',
- 'jpfbembed',
- array(
- 'appid' => $fb_app_id
- )
- );
+ wp_enqueue_script( 'jetpack-facebook-embed' );
return $embed;
}
}