Code Duplication    Length = 11-11 lines in 2 locations

modules/shortcodes/archiveorg-book.php 1 location

@@ 22-32 (lines=11) @@
19
 *
20
 * @return int|string
21
 */
22
function jetpack_shortcode_get_archiveorg_book_id( $atts ) {
23
	if ( isset( $atts[0] ) ) {
24
		$atts[0] = trim( $atts[0] , '=' );
25
		if ( preg_match( '#archive.org/stream/(.+)/?$#i', $atts[0], $match ) ) {
26
			$id = $match[1];
27
		} else {
28
			$id = $atts[0];
29
		}
30
		return $id;
31
	}
32
	return 0;
33
}
34
35
/**

modules/shortcodes/archiveorg.php 1 location

@@ 22-32 (lines=11) @@
19
 *
20
 * @return int|string
21
 */
22
function jetpack_shortcode_get_archiveorg_id( $atts ) {
23
	if ( isset( $atts[0] ) ) {
24
		$atts[0] = trim( $atts[0] , '=' );
25
		if ( preg_match( '#archive.org/(details|embed)/(.+)/?$#i', $atts[0], $match ) ) {
26
			$id = $match[2];
27
		} else {
28
			$id = $atts[0];
29
		}
30
		return $id;
31
	}
32
	return 0;
33
}
34
35
/**