PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / 3.0.0
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization v3.0.0
4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 3.12.1 All 134 releases
optimole-wp / inc / conflicts / elementor.php

elementor.php in Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization 3.0.0, at inc/conflicts/elementor.php

47 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class Optml_Elementor
5 *
6 * An example of a conflict.
7 */
8 class Optml_Elementor extends Optml_abstract_conflict {
9
10 /**
11 * Optml_Elementor constructor.
12 */
13 public function __construct() {
14 $this->priority = 2;
15 $this->severity = self::SEVERITY_HIGH;
16 parent::__construct();
17 }
18
19 /**
20 * Set the message property
21 *
22 * @since 2.0.6
23 * @access public
24 */
25 public function define_message() {
26 $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>' );
27 }
28
29 /**
30 * Determine if conflict is applicable.
31 *
32 * @return bool
33 * @since 2.0.6
34 * @access public
35 */
36 public function is_conflict_valid() {
37
38 if ( ! is_plugin_active( 'elementor/elementor.php' ) ) {
39 return false;
40 }
41
42 $print_method = get_option( 'elementor_css_print_method', 'external' );
43
44 return $print_method === 'external';
45 }
46 }
47