You appear to be a bot. Output may be restricted
Description
Usage
Jetpack_Iframe_Embed::init();
Parameters
Returns
void
Source
File name: jetpack/_inc/lib/class.jetpack-iframe-embed.php
Lines:
1 to 27 of 27
static function init() { if ( ! self::is_embedding_in_iframe() ) { return; } // Disable the admin bar if ( ! defined( 'IFRAME_REQUEST' ) ) { define( 'IFRAME_REQUEST', true ); } // Prevent canonical redirects remove_filter( 'template_redirect', 'redirect_canonical' ); add_action( 'wp_head', array( 'Jetpack_Iframe_Embed', 'noindex' ), 1 ); add_action( 'wp_head', array( 'Jetpack_Iframe_Embed', 'base_target_blank' ), 1 ); add_filter( 'shortcode_atts_video', array( 'Jetpack_Iframe_Embed', 'disable_autoplay' ) ); add_filter( 'shortcode_atts_audio', array( 'Jetpack_Iframe_Embed', 'disable_autoplay' ) ); if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { wp_enqueue_script( 'jetpack-iframe-embed', WPMU_PLUGIN_URL . '/jetpack-iframe-embed/jetpack-iframe-embed.js', array( 'jquery' ) ); } else { $ver = sprintf( '%s-%s', gmdate( 'oW' ), defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : '' ); wp_enqueue_script( 'jetpack-iframe-embed', '//s0.wp.com/wp-content/mu-plugins/jetpack-iframe-embed/jetpack-iframe-embed.js', array( 'jquery' ), $ver ); } wp_localize_script( 'jetpack-iframe-embed', '_previewSite', array( 'siteURL' => get_site_url() ) ); }