Code Duplication    Length = 8-8 lines in 2 locations

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

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