Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 120-127 (lines=8) @@
117
		return ! in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) );
118
	}
119
120
	function remove_embed() {
121
		global $wp_embed;
122
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
123
		// remove the embed shortcode since we would do the part later.
124
		remove_shortcode( 'embed' );
125
		// Attempts to embed all URLs in a post
126
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
127
	}
128
129
	function add_embed() {
130
		global $wp_embed;
@@ 129-136 (lines=8) @@
126
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
127
	}
128
129
	function add_embed() {
130
		global $wp_embed;
131
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
132
		// Shortcode placeholder for strip_shortcodes()
133
		add_shortcode( 'embed', '__return_false' );
134
		// Attempts to embed all URLs in a post
135
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
136
	}
137
138
	// Expands wp_insert_post to include filtered content
139
	function filter_post_content_and_add_links( $post_object ) {