# optimole-wp/3.0.0/inc/conflicts/elementor.php

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

- Page: https://pluginprobe.com/plugins/optimole-wp/3.0.0/code/inc/conflicts/elementor.php
- Raw: https://pluginprobe.com/plugins/optimole-wp/3.0.0/raw/inc/conflicts/elementor.php
- Modified: 2019-05-29T14:43:00+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/3.0.0/code/inc/conflicts/elementor.php#L10-L20`.

```php
<?php

/**
 * Class Optml_Elementor
 *
 * An example of a conflict.
 */
class Optml_Elementor extends Optml_abstract_conflict {

	/**
	 * Optml_Elementor constructor.
	 */
	public function __construct() {
		$this->priority = 2;
		$this->severity = self::SEVERITY_HIGH;
		parent::__construct();
	}

	/**
	 * Set the message property
	 *
	 * @since   2.0.6
	 * @access  public
	 */
	public function define_message() {
		$this->message = sprintf( __( 'It seems your are using %1$sElementor%2$s right now. %3$s In order for Optimole to replace the images in your Elementor pages, you will need to go to %4$sElementor -> Tools -> General%5$s and click Regenerate files for the images to be processed. ', 'optimole-wp' ), '<b>', '</b>', '<br/>', '<a target="_blank" href="' . admin_url( 'admin.php?page=elementor-tools' ) . '">', '</a>' );
	}

	/**
	 * Determine if conflict is applicable.
	 *
	 * @return bool
	 * @since   2.0.6
	 * @access  public
	 */
	public function is_conflict_valid() {

		if ( ! is_plugin_active( 'elementor/elementor.php' ) ) {
			return false;
		}

		$print_method = get_option( 'elementor_css_print_method', 'external' );

		return $print_method === 'external';
	}
}

```
