Soliloquy stylesheets
Published March 30th, 2015 under Plugins
I had serious trouble today in trying to figure out how to disable the stylesheets in the Soliloquy plugin for WordPress. After much difficulty, I eventually realised that the stylesheets were added without using the standard WordPress API. They are simply dumped out as raw HTML. These can be removed by filtering the array containing the stylesheet HTML.
Feel free to use the following code snippet in your own projects. Simply copy and paste it into your theme or plugin.
<?php /** * Removing Soliloquy styles. * * @author Ryan Hellyer <ryanhellyer@gmail.com> * @param array $dead Stylesheet information * @return string Blank (stylesheet information) */ add_filter( 'soliloquy_stylesheets', '__return_empty_string', 500 );
Frank says:
Hi Ryan,
a small hint to write light and which WP Core functions.
add_filter( \'soliloquy_stylesheets\', \'__return_empty_string\', 500 );
March 31, 2015 at 6:42 am # //
Ryan says:
Ohh, excellent point Frank. I’ll update the post 🙂
April 1, 2015 at 2:32 pm # //