1 | <?php |
||
6 | class Jetpack_Iframe_Embed { |
||
7 | static function init() { |
||
34 | |||
35 | static function is_embedding_in_iframe() { |
||
43 | |||
44 | private static function has_iframe_get_param() { |
||
47 | |||
48 | private static function has_preview_get_param() { |
||
51 | |||
52 | private static function has_preview_theme_preview_param() { |
||
55 | |||
56 | /** |
||
57 | * Disable `autoplay` shortcode attribute in context of an iframe |
||
58 | * Added via `shortcode_atts_video` & `shortcode_atts_audio` in `init` |
||
59 | * |
||
60 | * @param array $atts The output array of shortcode attributes. |
||
61 | * |
||
62 | * @return array The output array of shortcode attributes. |
||
63 | */ |
||
64 | static function disable_autoplay( $atts ) { |
||
67 | |||
68 | /** |
||
69 | * We don't want search engines to index iframe previews |
||
70 | * Added via `wp_head` action in `init` |
||
71 | */ |
||
72 | static function noindex() { |
||
75 | |||
76 | /** |
||
77 | * Make sure all links and forms open in a new window by default |
||
78 | * (unless overridden on client-side by JS) |
||
79 | * Added via `wp_head` action in `init` |
||
80 | */ |
||
81 | static function base_target_blank() { |
||
84 | } |
||
85 |