Code Duplication    Length = 7-7 lines in 2 locations

modules/shortcodes/vimeo.php 1 location

@@ 296-302 (lines=7) @@
293
}
294
295
/** This filter is documented in modules/shortcodes/youtube.php */
296
if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) {
297
	// We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out.
298
	if ( ! is_admin() ) {
299
		// Higher priority because we need it before auto-link and autop get to it
300
		add_filter( 'comment_text', 'vimeo_link', 1 );
301
	}
302
}
303

modules/shortcodes/youtube.php 1 location

@@ 366-372 (lines=7) @@
363
 *
364
 * @param int get_option('embed_autourls') Option to automatically embed all plain text URLs.
365
 */
366
if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) {
367
	// We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out.
368
	if ( ! is_admin() ) {
369
		// Higher priority because we need it before auto-link and autop get to it
370
		add_filter( 'comment_text', 'youtube_link', 1 );
371
	}
372
}
373
374
/**
375
 * Core changes to do_shortcode (https://core.trac.wordpress.org/changeset/34747) broke "improper" shortcodes