Code Duplication    Length = 11-11 lines in 2 locations

modules/sitemaps/sitemap-constants.php 2 locations

@@ 164-174 (lines=11) @@
161
 *
162
 * @return string The index type.
163
 */
164
function jp_sitemap_index_type_of( $type ) {
165
	if ( JP_PAGE_SITEMAP_TYPE === $type ) {
166
		return JP_PAGE_SITEMAP_INDEX_TYPE;
167
	} elseif ( JP_IMAGE_SITEMAP_TYPE === $type ) {
168
		return JP_IMAGE_SITEMAP_INDEX_TYPE;
169
	} elseif ( JP_VIDEO_SITEMAP_TYPE === $type ) {
170
		return JP_VIDEO_SITEMAP_INDEX_TYPE;
171
	} else {
172
		return "error-bad-type-$type";
173
	}
174
}
175
176
/**
177
 * The sitemap type corresponding to an index type.
@@ 185-195 (lines=11) @@
182
 *
183
 * @return string The sitemap type.
184
 */
185
function jp_sitemap_child_type_of( $type ) {
186
	if ( JP_PAGE_SITEMAP_INDEX_TYPE === $type ) {
187
		return JP_PAGE_SITEMAP_TYPE;
188
	} elseif ( JP_IMAGE_SITEMAP_INDEX_TYPE === $type ) {
189
		return JP_IMAGE_SITEMAP_TYPE;
190
	} elseif ( JP_VIDEO_SITEMAP_INDEX_TYPE === $type ) {
191
		return JP_VIDEO_SITEMAP_TYPE;
192
	} else {
193
		return "error-bad-type-$type";
194
	}
195
}
196
197
/**
198
 * Convert '0000-00-00 00:00:00' to '0000-00-00T00:00:00Z'.