Code Duplication    Length = 8-8 lines in 2 locations

packages/sync/Module_Posts.php 2 locations

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