public function register_assets()
{
if (!wp_script_is('spin', 'registered')) {
wp_register_script('spin', plugins_url('_inc/spin.js', JETPACK__PLUGIN_FILE), false, '1.3');
}
if (!wp_script_is('jquery.spin', 'registered')) {
wp_register_script('jquery.spin', plugins_url('_inc/jquery.spin.js', JETPACK__PLUGIN_FILE), array('jquery', 'spin'), '1.3');
}
if (!wp_script_is('jetpack-gallery-settings', 'registered')) {
wp_register_script('jetpack-gallery-settings', plugins_url('_inc/gallery-settings.js', JETPACK__PLUGIN_FILE), array('media-views'), '20121225');
}
if (!wp_script_is('jetpack-twitter-timeline', 'registered')) {
wp_register_script('jetpack-twitter-timeline', plugins_url('_inc/twitter-timeline.js', JETPACK__PLUGIN_FILE), array('jquery'), '4.0.0', true);
}
if (!wp_script_is('jetpack-facebook-embed', 'registered')) {
wp_register_script('jetpack-facebook-embed', plugins_url('_inc/facebook-embed.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, 'locale' => $this->get_locale()));
}
/**
* As jetpack_register_genericons is by default fired off a hook,
* the hook may have already fired by this point.
* So, let's just trigger it manually.
*/
require_once JETPACK__PLUGIN_DIR . '_inc/genericons.php';
jetpack_register_genericons();
/**
* Register the social logos
*/
require_once JETPACK__PLUGIN_DIR . '_inc/social-logos.php';
jetpack_register_social_logos();
if (!wp_style_is('jetpack-icons', 'registered')) {
wp_register_style('jetpack-icons', plugins_url('css/jetpack-icons.min.css', JETPACK__PLUGIN_FILE), false, JETPACK__VERSION);
}
}