Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 442-449 (lines=8) @@
439
	 *
440
	 * @global $wp_embed
441
	 */
442
	public function remove_embed() {
443
		global $wp_embed;
444
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
445
		// remove the embed shortcode since we would do the part later.
446
		remove_shortcode( 'embed' );
447
		// Attempts to embed all URLs in a post.
448
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
449
	}
450
451
	/**
452
	 * Add the embed shortcode.
@@ 456-463 (lines=8) @@
453
	 *
454
	 * @global $wp_embed
455
	 */
456
	public function add_embed() {
457
		global $wp_embed;
458
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
459
		// Shortcode placeholder for strip_shortcodes().
460
		add_shortcode( 'embed', '__return_false' );
461
		// Attempts to embed all URLs in a post.
462
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
463
	}
464
465
	/**
466
	 * Expands wp_insert_post to include filtered content