plugin development – How to remove dynamic-css

Question

I want to remove dynamic css from header of my plugin.

<style type="text/css" title="dynamic-css" class="options-output"> ... </style>

I use this code for remove other styles but can’t remove this one:

    function remove_all_theme_styles() {
    global $wp_styles;
    foreach ( $wp_styles->queue as $style ) :
        if ( 'idcrm-contacts' !== $style && 'monster-style' !== $style ) {
            wp_deregister_style( $style );
            wp_dequeue_style( $style );
        }
        endforeach;
}

    add_action( 'wp_print_styles', 'remove_all_theme_styles', 100 );

0
Megos 9 months 2021-11-29T17:23:29-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse