Easy FancyBox version 1.7 – Conflict
-
Hi,
I use Easy FancyBox, as well as Justified Image Grid + NextGEN plugins. In the previous version 1.6, I could isolate the pages for the plugin to be used upon, preventing any conflicts/overlaps between them, and optimize their loading to certain pages only.
For example, under my theme ‘functions.php’ file:
// Remove scripts on pages not required (Load Optimization)
function my_conditional_script() {
if( class_exists(‘easyFancyBox’) && ( !is_page_template( ‘page-portfolio.php’ ) && !has_post_format( array( ‘gallery’, ‘image’ ) ) && !is_singular(‘product’) && !is_post_type_archive(‘product’) ) ) {
remove_action(‘wp_enqueue_scripts’, array(‘easyFancyBox’,’enqueue_styles’), 999);
remove_action(‘wp_print_scripts’, array(‘easyFancyBox’,’register_scripts’), 999);
remove_action(‘wp_head’, array(‘easyFancyBox’,’main_script’), 999);
remove_action(‘wp_footer’, array(‘easyFancyBox’,’enqueue_footer_scripts’), 999);
remove_action(‘wp_footer’, array(‘easyFancyBox’, ‘on_ready’), 999);
}
}
add_action(‘wp_head’,’my_conditional_script’,0);In version 1.7, this doesn’t appear to be working anymore? It’s creating two overlapping image popups for the Justified Image Grid galleries (Pretty Photo + FancyBox). Is it still possible to do this?
- The topic ‘Easy FancyBox version 1.7 – Conflict’ is closed to new replies.