PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.2
Jetpack – WP Security, Backup, Speed, & Growth v16.2
16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 All 503 releases
← All changes | modules/shortcodes/getty.php +8 -2 12.9.516.2 View file →
@@ -7,8 +7,12 @@
7 7 *
8 8 * @package automattic/jetpack
9 9 */
10 10
11 +if ( ! defined( 'ABSPATH' ) ) {
12 + exit( 0 );
13 +}
14 +
11 15 if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
12 16 add_action( 'init', 'jetpack_getty_enable_embeds' );
13 17 } else {
14 18 jetpack_getty_enable_embeds();
@@ -25,10 +29,12 @@
25 29 // Support their oEmbed Endpoint.
26 30 wp_oembed_add_provider( '#https?://www\.gettyimages\.com/detail/.*#i', 'https://embed.gettyimages.com/oembed/', true );
27 31 wp_oembed_add_provider( '#https?://(www\.)?gty\.im/.*#i', 'https://embed.gettyimages.com/oembed/', true );
28 32
29 - // Allow iframes to be filtered to short code (so direct copy+paste can be done).
30 - add_filter( 'pre_kses', 'wpcom_shortcodereverse_getty' );
33 + if ( jetpack_shortcodes_should_hook_pre_kses() ) {
34 + // Allow iframes to be filtered to short code (so direct copy+paste can be done).
35 + add_filter( 'pre_kses', 'wpcom_shortcodereverse_getty' );
36 + }
31 37
32 38 // Actually display the Getty Embed.
33 39 add_shortcode( 'getty', 'jetpack_getty_shortcode' );
34 40 }