Code Duplication    Length = 5-7 lines in 2 locations

modules/sharedaddy/sharing-service.php 2 locations

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