# jetpack/16.3/jetpack_vendor/automattic/jetpack-image-cdn/src/compatibility/breakdance.php

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 16.3. 47 lines.

- Page: https://pluginprobe.com/plugins/jetpack/16.3/code/jetpack_vendor/automattic/jetpack-image-cdn/src/compatibility/breakdance.php
- Raw: https://pluginprobe.com/plugins/jetpack/16.3/raw/jetpack_vendor/automattic/jetpack-image-cdn/src/compatibility/breakdance.php
- Modified: 2026-10-05T16:03:54+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/code/jetpack_vendor/automattic/jetpack-image-cdn/src/compatibility/breakdance.php#L10-L20`.

```php
<?php
/**
 * Compatibility functions for the Breakdance plugin.
 *
 * @since 0.7.20
 *
 * @package automattic/jetpack-image-cdn
 */

namespace Automattic\Jetpack\Image_CDN\Compatibility;

use Automattic\Jetpack\Image_CDN\Image_CDN;

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

/**
 * Hook the compatibility functions into Breakdance filters.
 *
 * @since 0.7.20
 *
 * @return void
 */
function load_breakdance_compat() {
	add_filter( 'breakdance_singular_content', __NAMESPACE__ . '\use_image_cdn' );
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_breakdance_compat' );

/**
 * Unless the 'Apply the_content filter to Breakdance content' option is enabled
 * in the Breakdance settings, the content will not be filtered by the_content filter.
 * This ensures that images are passed through Image CDN when it's enabled.
 *
 * @since 0.7.20
 *
 * @param string $content The content to filter.
 * @return string The filtered content.
 */
function use_image_cdn( $content ) {
	if ( Image_CDN::is_enabled() ) {
		$content = Image_CDN::filter_the_content( $content );
	}

	return $content;
}

```
