• Resolved rowild

    (@rowild)


    How can I dequeue the “ext-widget-opts-css” css from the “widget options” plugin? It is included all the time, even though I am not logged in?

    I digged through the files and found the “enqueue_scripts” function in “functions.widgets.opts.php”, which is called from the constructor. But my tries were not successful so far. I tried there variants:

    
    function deactivate_plugin_styles() {
        wp_dequeue_style( 'ext-widget-opts-css' );
        wp_deregister_style( 'ext-widget-opts-css' );
        wp_dequeue_style( 'extended-widget-options-css' );
        wp_deregister_style( 'extended-widget-options-css' );
    }
    // also with "wp_head"
    add_action('wp_print_styles', 'deactivate_plugin_styles', 100);
    
    // and:
    remove_action('admin_enqueue_scripts','enqueue_scripts');
    remove_action('customize_controls_enqueue_scripts','enqueue_scripts');
    

    Any hint would be most appreciated!

    • This topic was modified 7 years, 10 months ago by rowild. Reason: format code snippet
    • This topic was modified 7 years, 10 months ago by rowild. Reason: Reformulate a bit
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rowild

    (@rowild)

    Anybody?

    Hi,

    Thank you for choosing Widget Options. Regarding your concern, please update to the latest version and use this code to remove the stylesheet:

    add_action( 'wp_enqueue_scripts', 'widgetopts_dequeue', 90 );
    function widgetopts_dequeue(){
    	wp_dequeue_style( 'widgetopts-styles' );
    }

    Let me know how it goes. Thanks!

    Cheers,
    Jeffrey

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘dequeue styles?’ is closed to new replies.