Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #609 conflict with wp cloudflare super page cache #650

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inc/3rd-party/3rd-party.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
require IMAGIFY_PATH . 'inc/3rd-party/regenerate-thumbnails/regenerate-thumbnails.php';
require IMAGIFY_PATH . 'inc/3rd-party/screets-lc.php';
require IMAGIFY_PATH . 'inc/3rd-party/wp-real-media-library.php';
require IMAGIFY_PATH . 'inc/3rd-party/wp-cloudflare-super-page-cache.php';
require IMAGIFY_PATH . 'inc/3rd-party/wp-rocket/wp-rocket.php';
require IMAGIFY_PATH . 'inc/3rd-party/yoast-seo.php';
require IMAGIFY_PATH . 'inc/3rd-party/WooCommerce/class-woocommerce.php';
Expand Down
16 changes: 16 additions & 0 deletions inc/3rd-party/wp-cloudflare-super-page-cache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
defined( 'ABSPATH' ) || die( 'Cheatin uh?' );

add_action( 'admin_enqueue_scripts', function($hook_suffix) {
if (
! is_admin()
||
'media_page_imagify-bulk-optimization' !== $hook_suffix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that @markonikolic985 told me that we need to do that in all imagify admin pages not just only bulk optimization one, right?

||
! class_exists( 'SWCFPC_Backend' )
){
return;
}

wp_deregister_script( 'swcfpc_sweetalert_js' );
}, 100 );