Code Duplication    Length = 8-8 lines in 2 locations

sync/class.jetpack-sync-module-posts.php 2 locations

@@ 229-236 (lines=8) @@
226
		return false;
227
	}
228
229
	function remove_embed() {
230
		global $wp_embed;
231
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
232
		// remove the embed shortcode since we would do the part later.
233
		remove_shortcode( 'embed' );
234
		// Attempts to embed all URLs in a post
235
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
236
	}
237
238
	function add_embed() {
239
		global $wp_embed;
@@ 238-245 (lines=8) @@
235
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
236
	}
237
238
	function add_embed() {
239
		global $wp_embed;
240
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
241
		// Shortcode placeholder for strip_shortcodes()
242
		add_shortcode( 'embed', '__return_false' );
243
		// Attempts to embed all URLs in a post
244
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
245
	}
246
247
	// Expands wp_insert_post to include filtered content
248
	function filter_post_content_and_add_links( $post_object ) {