PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / 3.11.3
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization v3.11.3
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 / wprocket.php

wprocket.php in Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization 3.11.3, at inc/conflicts/wprocket.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_Wprocket
5 *
6 * An example of a conflict.
7 */
8 class Optml_Wprocket extends Optml_Abstract_Conflict {
9
10 /**
11 * Optml_Wprocket constructor.
12 */
13 public function __construct() {
14 $this->severity = self::SEVERITY_MEDIUM;
15 parent::__construct();
16 }
17
18 /**
19 * Set the message property
20 *
21 * @since 2.0.6
22 * @access public
23 */
24 public function define_message() {
25 $this->message = sprintf( __( 'It seems your are using %1$sWP Rocket%2$s with Lazy loading for images option active. %3$s Optimole already provides a lazy loading mechanism by it\'s own which might conflict with this. If you would like to further use Optimole lazy loading feature, you can turn that off from %4$sSettings -> WP Rocket -> Media%5$s page. ', 'optimole-wp' ), '<b>', '</b>', '<br/>', '<a target="_blank" href="' . admin_url( 'options-general.php?page=wprocket#media' ) . '">', '</a>' );
26 }
27
28 /**
29 * Determine if conflict is applicable.
30 *
31 * @return bool
32 * @since 2.0.6
33 * @access public
34 */
35 public function is_conflict_valid() {
36
37 if ( ! is_plugin_active( 'wp-rocket/wp-rocket.php' ) ) {
38 return false;
39 }
40 if ( ! function_exists( 'get_rocket_option' ) ) {
41 return false;
42 }
43
44 return get_rocket_option( 'lazyload', false );
45 }
46 }
47