| @@ -1,17 +1,21 @@ | ||
| 1 | -<?php | |
| 2 | -defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' ); | |
| 1 | +<?php | |
| 2 | +defined( 'ABSPATH' ) || exit; | |
| 3 | 3 | |
| 4 | 4 | if ( class_exists( 'WpeCommon' ) ) : |
| 5 | 5 | |
| 6 | -/** | |
| 7 | - * Conflict with WP Engine: it seems that WP Engine limits SQL queries size. | |
| 8 | - * | |
| 9 | - * @since 1.4.7 | |
| 10 | - * @author Jonathan Buttigieg | |
| 11 | - */ | |
| 12 | -add_filter( 'imagify_unoptimized_attachment_limit', '_imagify_wengine_unoptimized_attachment_limit' ); | |
| 13 | -function _imagify_wengine_unoptimized_attachment_limit() { | |
| 14 | - return 2500; | |
| 15 | -} | |
| 6 | + add_filter( 'imagify_unoptimized_attachment_limit', '_imagify_wpengine_unoptimized_attachment_limit' ); | |
| 7 | + add_filter( 'imagify_count_saving_data_limit', '_imagify_wpengine_unoptimized_attachment_limit' ); | |
| 8 | + /** | |
| 9 | + * Change the limit for the number of posts: WP Engine limits SQL queries size to 2048 octets (16384 characters). | |
| 10 | + * | |
| 11 | + * @since 1.4.7 | |
| 12 | + * @since 1.6.7 Renamed (and deprecated) _imagify_wengine_unoptimized_attachment_limit() into _imagify_wpengine_unoptimized_attachment_limit(). | |
| 13 | + * @author Jonathan Buttigieg | |
| 14 | + * | |
| 15 | + * @return int | |
| 16 | + */ | |
| 17 | + function _imagify_wpengine_unoptimized_attachment_limit() { | |
| 18 | + return 2500; | |
| 19 | + } | |
| 16 | 20 | |
| 17 | -endif; | |
| 21 | +endif; | |