Code Duplication    Length = 5-7 lines in 2 locations

modules/sharedaddy/sharing-service.php 2 locations

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