Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 161-168 (lines=8) @@
158
		return false;
159
	}
160
161
	function remove_embed() {
162
		global $wp_embed;
163
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
164
		// remove the embed shortcode since we would do the part later.
165
		remove_shortcode( 'embed' );
166
		// Attempts to embed all URLs in a post
167
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
168
	}
169
170
	function add_embed() {
171
		global $wp_embed;
@@ 170-177 (lines=8) @@
167
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
168
	}
169
170
	function add_embed() {
171
		global $wp_embed;
172
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
173
		// Shortcode placeholder for strip_shortcodes()
174
		add_shortcode( 'embed', '__return_false' );
175
		// Attempts to embed all URLs in a post
176
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
177
	}
178
179
	// Expands wp_insert_post to include filtered content
180
	function filter_post_content_and_add_links( $post_object ) {