| @@ -11,8 +11,12 @@ | ||
| 11 | 11 | * |
| 12 | 12 | * @package automattic/jetpack |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 16 | + exit( 0 ); | |
| 17 | +} | |
| 18 | + | |
| 15 | 19 | /** |
| 16 | 20 | * Get ID of requested archive.org book embed. |
| 17 | 21 | * |
| 18 | 22 | * @since 4.5.0 |
| @@ -129,5 +133,7 @@ | ||
| 129 | 133 | |
| 130 | 134 | return $content; |
| 131 | 135 | } |
| 132 | 136 | |
| 133 | -add_filter( 'pre_kses', 'jetpack_archiveorg_book_embed_to_shortcode' ); | |
| 137 | +if ( jetpack_shortcodes_should_hook_pre_kses() ) { | |
| 138 | + add_filter( 'pre_kses', 'jetpack_archiveorg_book_embed_to_shortcode' ); | |
| 139 | +} | |