# jetpack/16.3-a.7/modules/shortcodes/cartodb.php

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 16.3-a.7. 26 lines.

- Page: https://pluginprobe.com/plugins/jetpack/16.3-a.7/code/modules/shortcodes/cartodb.php
- Raw: https://pluginprobe.com/plugins/jetpack/16.3-a.7/raw/modules/shortcodes/cartodb.php
- Modified: 2025-11-24T17:00:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetpack/16.3-a.7/code/modules/shortcodes/cartodb.php#L10-L20`.

```php
<?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
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit( 0 );
}

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

```
