Not for the front-end CSS, no because I have no way of knowing if you are displaying book reviews on an archive page or using the shortcode on any page or post. If you want to remove the css you can just deregister it:
wp_deregister_style( 'book-review-library-public' );
wp_deregister_style( 'book-review-library-genericons' );
http://codex.wordpress.org/Function_Reference/wp_deregister_style
http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles
i have resolved with
if ( !('book-review' == get_post_type()) ) {
wp_deregister_style( 'book-review-library-public' );
wp_deregister_style( 'book-review-library-genericons' );
}
with the hook wp_enqueue_scripts
If you were using the shortcode, that check would still fail, since the post type would be page
or post
so the CSS would still load.
Scratch that, since you’re deregistering the script on posts and pages (and other post types), if you were using the shortcode, the CSS would not load on those pages. So, again, it’s not something that should be added into the plugin because it could break in certain environments.
for the shortcode i can use the new function of wordpress has_shortcode.
With this function it’s possible check if the page/post/ecc contain the shortcode.
Good point. I’ll do some testing and see if I can get this to work.
Got this working and it will be integrated into the plugin in the next update. Thanks for the feedback!