Support » Plugin: If-So Dynamic Content » Performance issues and incompatibilities with other plugins

  • Resolved theownplay

    (@theownplay)


    Hi there, unfortunately, your plugin loads all CSS and JS files, within the admin area, on every page. This causes a lot of plugins to break that use the same libraries as you do.

    I figured that out since it breaks the logic of the plugin WP Webhooks since it uses bootstrap too. Accordions can’t be opened due to that.

    Please load your scripts and styles only on necessary pages or use a safe-mode for bootstrap files in case you really require loading them on every page. Otherwise, these compatibility issues will happen more often and other parts of the backend might break as well.

    I had to write a temporary fix to make your plugin compatible for WP Webhooks at the moment, which requires the following code to be placed into the functions.php file:

    add_action( 'admin_enqueue_scripts', 'wpwh_deregister_if_so_scripts', 1000 );
    function wpwh_deregister_if_so_scripts(){
    
    	if( ! isset( $_GET['wpwhprovrs'] ) ){
    		return;
    	}
    
    	$plugin_name = 'if-so';
    
    	//That's the script that causes the actual issue
    	wp_dequeue_script( $plugin_name . 'BootstrapJS' ); 
    
    	//All the other scripts
    	wp_dequeue_script( $plugin_name . 'IfSoHelpers' ); 
    	wp_dequeue_script( $plugin_name . 'JQueryMinUI' ); 
    	wp_dequeue_script( $plugin_name . 'BootstrapValidator' ); 
    	wp_dequeue_script( $plugin_name . 'DateTimePickerFullMinJs' ); 
    	wp_dequeue_script( $plugin_name . 'DateTimePickerFullMinJs' ); 
    	wp_dequeue_script( $plugin_name . 'WeeklyScheduleMinJs' ); 
    	wp_dequeue_script( $plugin_name . 'GooglePlacesJS' ); 
    	wp_dequeue_script( $plugin_name . 'EasyAutocompleteJS' ); 
    	wp_dequeue_script( $plugin_name . 'IfSoJqueryModalJS' ); 
    	wp_dequeue_script( $plugin_name . 'VendorsJS' ); 
    	wp_dequeue_script( $plugin_name . 'CustomizedContentJs' ); 
    	wp_dequeue_script( $plugin_name . 'GooglePlacesAPI' ); 
    }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Performance issues and incompatibilities with other plugins’ is closed to new replies.