GD Star Rating
preventing gdsr.css.php from generating css (4 posts)

  1. john-michael
    Posted 5 years ago #

    To increase performance & maintainability, I would like to combine gdsr's css into my main.css file. However, I'm having a hard time finding where the style meta tag is being generated.

    I found some related echo statements in /gd-star-rating/code/class.php

    Which I attempted to comment out, but they had no affect. I'm not using a cashing plugin at the moment, so I'm sure that's not the issue.

    Any ideas where else the gdsr.css.php?... meta tag is being generated?


  2. john-michael
    Posted 5 years ago #

    Found it!

    Around line 1346 of /gd-star-rating/code/class.php

    wp_enqueue_style("gdsr_style_main", $this->include_rating_css(true, true), array(), $this->o["version"]);

    comment that line out and make sure to include the css you want into your wordpress css file.

  3. Adam Capriola
    Posted 5 years ago #

    Thank you!!! This works even better:

    // Stop GD-StarRating from auto-generating CSS
    add_action( 'wp_print_styles', 'kill_gdstar_css', 100 );
    function kill_gdstar_css() {
    	wp_deregister_style( 'gdsr_style_main' );

    No need to hack the plugin files... just drop that in your functions.php and you're good to go!

  4. john-michael
    Posted 5 years ago #

    There's the right way and my way. Thanks! I actually forgot I had made that change and obviously when upgrading the changes were lost.

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic