Code Duplication    Length = 17-17 lines in 2 locations

modules/sitemaps/sitemaps.php 2 locations

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