summaryrefslogtreecommitdiff
blob: 035a5de40b97f790b036dbda7fdea5e1d43a5d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
 * Carto (formerly CartoDB)
 *
 * Example URL: http://osm2.carto.com/viz/08aef918-94da-11e4-ad83-0e0c41326911/public_map
 *
 * possible patterns:
 * [username].carto.com/viz/[map-id]/public_map
 * [username].carto.com/viz/[map-id]/embed_map
 * [username].carto.com/viz/[map-id]/map
 * [organization].carto.com/u/[username]/viz/[map-id]/public_map
 * [organization].carto.com/u/[username]/viz/[map-id]/embed_map
 * [organization].carto.com/u/[username]/viz/[map-id]/map
 *
 * On July 8th, 2016 CartoDB changed its primary domain from cartodb.com to carto.com
 * So this shortcode still supports the cartodb.com domain for oembeds.
 *
 * @package automattic/jetpack
 */

wp_oembed_add_provider( '#https?://(?:www\.)?[^/^\.]+\.carto(db)?\.com/\S+#i', 'https://services.carto.com/oembed', true );