Code Duplication    Length = 5-7 lines in 2 locations

modules/sharedaddy/sharing-service.php 2 locations

@@ 524-528 (lines=5) @@
521
	$global_options  = $sharer->get_global_options();
522
523
	$enqueue         = false;
524
	if ( is_singular() && in_array( get_post_type(), $global_options['show'] ) ) {
525
		$enqueue = true;
526
	} elseif ( in_array( 'index', $global_options['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global_options['show'] ) ) ) {
527
		$enqueue = true;
528
	}
529
530
	/**
531
	 * Filter to decide when sharing scripts should be enqueued.
@@ 671-677 (lines=7) @@
668
	$global = $sharer->get_global_options();
669
670
	$show = false;
671
	if ( !is_feed() ) {
672
		if ( is_singular() && in_array( get_post_type(), $global['show'] ) ) {
673
			$show = true;
674
		} elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) {
675
			$show = true;
676
		}
677
	}
678
679
	/**
680
	 * Filter to decide if sharing buttons should be displayed.