Code Duplication    Length = 8-8 lines in 2 locations

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

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