Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 206-213 (lines=8) @@
203
		return false;
204
	}
205
206
	function remove_embed() {
207
		global $wp_embed;
208
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
209
		// remove the embed shortcode since we would do the part later.
210
		remove_shortcode( 'embed' );
211
		// Attempts to embed all URLs in a post
212
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
213
	}
214
215
	function add_embed() {
216
		global $wp_embed;
@@ 215-222 (lines=8) @@
212
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
213
	}
214
215
	function add_embed() {
216
		global $wp_embed;
217
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
218
		// Shortcode placeholder for strip_shortcodes()
219
		add_shortcode( 'embed', '__return_false' );
220
		// Attempts to embed all URLs in a post
221
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
222
	}
223
224
	// Expands wp_insert_post to include filtered content
225
	function filter_post_content_and_add_links( $post_object ) {