Closed igmoweb closed 7 years ago
Can you submit this PR to the issue/16 branch so that I can test it alongside my premium styles addon? Thanks so much for the PR. There are a number of considerations here, and what I'm looking for do with all of those checks is to check to see if (a) there is a premium styles addon active or (b) a developer has uploaded a custom stylesheet or (c) something else I'm forgetting now. :-)
I'd like to test this in a separate branch from master, though.
Thanks @Benunc. Let me know if you need further help.
While the plugin is checking what stylesheet should be enqueued, it performs a few queries that could be easily avoided. These have been stripped out from the code and replaced for some functions that do not need to check against database.
There a few new functions to check if the custom or default stylesheet should be loaded. This way the plugin won't need to check against options anymore and it won't need to delete/add options in every request, something that could hurt performance in many sites.