| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) exit; |
| 4 |
|
| 5 |
use BerqWP\BerqWP; |
| 6 |
|
| 7 |
class berqEWWWW extends berqIntegrations { |
| 8 |
|
| 9 |
function __construct() { |
| 10 |
add_action( 'berqwp_notices', [$this, 'add_notice'] ); |
| 11 |
} |
| 12 |
|
| 13 |
function add_notice() { |
| 14 |
|
| 15 |
if (class_exists('EWWW_Image') && get_option( 'ewww_image_optimizer_lazy_load' ) && get_option( 'berqwp_image_lazyloading' )) { |
| 16 |
bwp_notice('error', 'Disable Image Lazy Loading in EWWW Settings', "<p>To ensure compatibility, please disable the \"Image Lazy Load\" feature in the EWWW settings. This helps prevent conflicts with optimization features.</p>", [ |
| 17 |
[ |
| 18 |
'href' => esc_attr(get_admin_url( ).'options-general.php?page=ewww-image-optimizer-options'), |
| 19 |
'text' => 'Go to EWWW Settings', |
| 20 |
'classes' => '', |
| 21 |
] |
| 22 |
]); |
| 23 |
} |
| 24 |
|
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
} |
| 29 |
|
| 30 |
new berqEWWWW(); |