Code Duplication    Length = 8-8 lines in 2 locations

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

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