| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | -defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); | |
| 2 | +defined( 'ABSPATH' ) || exit; | |
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Compatibility with AMP plugin from WordPress.com VIP. |
| 6 | 6 | */ |
| @@ -5,14 +5,13 @@ | ||
| 5 | 5 | * Compatibility with AMP plugin from WordPress.com VIP. |
| 6 | 6 | */ |
| 7 | 7 | if ( function_exists( 'is_amp_endpoint' ) ) : |
| 8 | 8 | |
| 9 | - add_filter( 'imagify_allow_picture_tags_for_webp', 'imagify_amp_disable_picture_on_endpoint' ); | |
| 9 | + add_filter( 'imagify_allow_picture_tags_for_nextgen', 'imagify_amp_disable_picture_on_endpoint' ); | |
| 10 | 10 | /** |
| 11 | 11 | * Do not use <picture> tags in AMP pages. |
| 12 | 12 | * |
| 13 | - * @since 1.9 | |
| 14 | - * @author Grégory Viguier | |
| 13 | + * @since 1.9 | |
| 15 | 14 | * |
| 16 | 15 | * @param bool $allow True to allow the use of <picture> tags (default). False to prevent their use. |
| 17 | 16 | * @return bool |
| 18 | 17 | */ |
| @@ -17,7 +16,7 @@ | ||
| 17 | 16 | * @return bool |
| 18 | 17 | */ |
| 19 | 18 | function imagify_amp_disable_picture_on_endpoint( $allow ) { |
| 20 | 19 | return $allow && ! is_amp_endpoint(); |
| 21 | - }; | |
| 20 | + } | |
| 22 | 21 | |
| 23 | 22 | endif; |