Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 391-398 (lines=8) @@
388
	 *
389
	 * @global $wp_embed
390
	 */
391
	public function remove_embed() {
392
		global $wp_embed;
393
		remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
394
		// remove the embed shortcode since we would do the part later.
395
		remove_shortcode( 'embed' );
396
		// Attempts to embed all URLs in a post.
397
		remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
398
	}
399
400
	/**
401
	 * Add the embed shortcode.
@@ 405-412 (lines=8) @@
402
	 *
403
	 * @global $wp_embed
404
	 */
405
	public function add_embed() {
406
		global $wp_embed;
407
		add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 );
408
		// Shortcode placeholder for strip_shortcodes().
409
		add_shortcode( 'embed', '__return_false' );
410
		// Attempts to embed all URLs in a post.
411
		add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 );
412
	}
413
414
	/**
415
	 * Expands wp_insert_post to include filtered content