john-michael
Member
Posted 1 year 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?
Thanks!
john-michael
Member
Posted 1 year 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.
Adam Capriola
Member
Posted 10 months 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!
john-michael
Member
Posted 10 months 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!