# optimole-wp/trunk/inc/compatibilities/kadence_blocks.php

Optimole – Optimize Images | Convert WebP &amp; AVIF | CDN &amp; Lazy Load | Image Optimization, version trunk. 40 lines.

- Page: https://pluginprobe.com/plugins/optimole-wp/trunk/code/inc/compatibilities/kadence_blocks.php
- Raw: https://pluginprobe.com/plugins/optimole-wp/trunk/raw/inc/compatibilities/kadence_blocks.php
- Modified: 2026-01-08T15:13:44+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/optimole-wp/trunk/code/inc/compatibilities/kadence_blocks.php#L10-L20`.

```php
<?php

/**
 * Class Optml_kadence_blocks.
 *
 * @reason @reason Adding selectors for background lazyload
 */
class Optml_kadence_blocks extends Optml_compatibility {


	/**
	 * Should we load the integration logic.
	 *
	 * @return bool Should we load.
	 */
	public function should_load() {
		include_once ABSPATH . 'wp-admin/includes/plugin.php';

		return is_plugin_active( 'kadence-blocks/kadence-blocks.php' );
	}

	/**
	 * Register integration details.
	 *
	 * @return void
	 */
	public function register() {
		add_filter(
			'optml_lazyload_bg_selectors',
			function ( $all_watchers ) {
				$all_watchers[] = '.kt-row-has-bg';
				$all_watchers[] = '.kt-row-layout-overlay';
				$all_watchers[] = '.kt-inside-inner-col';

				return $all_watchers;
			}
		);
	}
}

```
