Code Duplication    Length = 17-17 lines in 2 locations

modules/sitemaps/sitemaps.php 2 locations

@@ 617-633 (lines=17) @@
614
 *
615
 * @return string Sitemap URL.
616
 */
617
function jetpack_sitemap_uri() {
618
	if ( get_option( 'permalink_structure' ) ) {
619
		$sitemap_url = home_url( '/sitemap.xml' );
620
	} else {
621
		$sitemap_url = home_url( '/?jetpack-sitemap=true' );
622
	}
623
	/**
624
	 * Filter sitemap URL relative to home URL.
625
	 *
626
	 * @module sitemaps
627
	 *
628
	 * @since 3.9.0
629
	 *
630
	 * @param string $sitemap_url Sitemap URL.
631
	 */
632
	return apply_filters( 'jetpack_sitemap_location', $sitemap_url );
633
}
634
635
/**
636
 * Absolute URL of the current blog's news sitemap.
@@ 640-656 (lines=17) @@
637
 *
638
 * @module sitemaps
639
 */
640
function jetpack_news_sitemap_uri() {
641
	if ( get_option( 'permalink_structure' ) ) {
642
		$news_sitemap_url = home_url( '/news-sitemap.xml' );
643
	} else {
644
		$news_sitemap_url = home_url( '/?jetpack-news-sitemap=true' );
645
	}
646
	/**
647
	 * Filter news sitemap URL relative to home URL.
648
	 *
649
	 * @module sitemaps
650
	 *
651
	 * @since 3.9.0
652
	 *
653
	 * @param string $news_sitemap_url News sitemap URL.
654
	 */
655
	return apply_filters( 'jetpack_news_sitemap_location', $news_sitemap_url );
656
}
657
658
/**
659
 * Output the default sitemap URL.