Code Duplication    Length = 5-7 lines in 2 locations

modules/sharedaddy/sharing-service.php 2 locations

@@ 490-494 (lines=5) @@
487
	$global_options  = $sharer->get_global_options();
488
489
	$enqueue         = false;
490
	if ( is_singular() && in_array( get_post_type(), $global_options['show'] ) ) {
491
		$enqueue = true;
492
	} elseif ( in_array( 'index', $global_options['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global_options['show'] ) ) ) {
493
		$enqueue = true;
494
	}
495
496
	/**
497
	 * Filter to decide when sharing scripts should be enqueued.
@@ 640-646 (lines=7) @@
637
	$global = $sharer->get_global_options();
638
639
	$show = false;
640
	if ( !is_feed() ) {
641
		if ( is_singular() && in_array( get_post_type(), $global['show'] ) ) {
642
			$show = true;
643
		} elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) {
644
			$show = true;
645
		}
646
	}
647
648
	/**
649
	 * Filter to decide if sharing buttons should be displayed.