| @@ -35,9 +35,16 @@ | ||
| 35 | 35 | * |
| 36 | 36 | * @package automattic/jetpack |
| 37 | 37 | */ |
| 38 | 38 | |
| 39 | -add_filter( 'pre_kses', 'googleapps_embed_to_shortcode' ); | |
| 39 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 40 | + exit( 0 ); | |
| 41 | +} | |
| 42 | + | |
| 43 | +if ( jetpack_shortcodes_should_hook_pre_kses() ) { | |
| 44 | + add_filter( 'pre_kses', 'googleapps_embed_to_shortcode' ); | |
| 45 | +} | |
| 46 | + | |
| 40 | 47 | add_shortcode( 'googleapps', 'googleapps_shortcode' ); |
| 41 | 48 | |
| 42 | 49 | /** |
| 43 | 50 | * Reverse iframe embed to shortcode mapping HTML attributes to shortcode attributes. |