• Resolved Slobodan Manić

    (@slobodanmanic)


    Hey Toby,

    Really nice plugin. Is there any chance you could change how CSS file is being loaded, from adding ‘<link …. >’ to wp_head to using wp_enqueue_style?

    All that needs to be done is to disable this:

    function my_css() {
        echo '<link type="text/css" rel="stylesheet" href="' . plugins_url( 'css/simple-pull-quote.css', __FILE__ ) . '" />' . "\n";
    }
    add_action('wp_head', 'my_css');

    with this:

    function simple_pull_quotes_css() {
        wp_enqueue_style( 'simple-pull-quotes', plugins_url( 'css/simple-pull-quote.css', __FILE__ ) );
    }
    add_action( 'wp_enqueue_scripts', 'simple_pull_quotes_css' );

    Barely anything changes for visitors, but gives theme developers a chance to disable that CSS file.

    https://ww.wp.xz.cn/plugins/simple-pull-quote/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Using wp_enqueue_style for simple-pull-quote.css’ is closed to new replies.