Code Duplication    Length = 5-7 lines in 2 locations

modules/sharedaddy/sharing-service.php 2 locations

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