Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 331-338 (lines=8) @@
328
	 *
329
	 * @global $wp_embed
330
	 */
331
	public function remove_embed() {
332
		global $wp_embed;
333
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
334
		// remove the embed shortcode since we would do the part later.
335
		remove_shortcode( 'embed' );
336
		// Attempts to embed all URLs in a post.
337
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
338
	}
339
340
	/**
341
	 * Add the embed shortcode.
@@ 345-352 (lines=8) @@
342
	 *
343
	 * @global $wp_embed
344
	 */
345
	public function add_embed() {
346
		global $wp_embed;
347
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
348
		// Shortcode placeholder for strip_shortcodes().
349
		add_shortcode( 'embed', '__return_false' );
350
		// Attempts to embed all URLs in a post.
351
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
352
	}
353
354
	/**
355
	 * Expands wp_insert_post to include filtered content