Code Duplication    Length = 8-8 lines in 2 locations

packages/sync/src/modules/class-posts.php 2 locations

@@ 359-366 (lines=8) @@
356
	 *
357
	 * @global $wp_embed
358
	 */
359
	public function remove_embed() {
360
		global $wp_embed;
361
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
362
		// remove the embed shortcode since we would do the part later.
363
		remove_shortcode( 'embed' );
364
		// Attempts to embed all URLs in a post.
365
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
366
	}
367
368
	/**
369
	 * Add the embed shortcode.
@@ 373-380 (lines=8) @@
370
	 *
371
	 * @global $wp_embed
372
	 */
373
	public function add_embed() {
374
		global $wp_embed;
375
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
376
		// Shortcode placeholder for strip_shortcodes().
377
		add_shortcode( 'embed', '__return_false' );
378
		// Attempts to embed all URLs in a post.
379
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
380
	}
381
382
	/**
383
	 * Expands wp_insert_post to include filtered content