Code Duplication    Length = 8-8 lines in 2 locations

packages/sync/src/modules/Posts.php 2 locations

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