Code Duplication    Length = 5-7 lines in 2 locations

modules/sharedaddy/sharing-service.php 2 locations

@@ 509-513 (lines=5) @@
506
	$global_options  = $sharer->get_global_options();
507
508
	$enqueue         = false;
509
	if ( is_singular() && in_array( get_post_type(), $global_options['show'] ) ) {
510
		$enqueue = true;
511
	} elseif ( in_array( 'index', $global_options['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global_options['show'] ) ) ) {
512
		$enqueue = true;
513
	}
514
515
	/**
516
	 * Filter to decide when sharing scripts should be enqueued.
@@ 656-662 (lines=7) @@
653
	$global = $sharer->get_global_options();
654
655
	$show = false;
656
	if ( !is_feed() ) {
657
		if ( is_singular() && in_array( get_post_type(), $global['show'] ) ) {
658
			$show = true;
659
		} elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) {
660
			$show = true;
661
		}
662
	}
663
664
	/**
665
	 * Filter to decide if sharing buttons should be displayed.