GiuB/WP-Remove-Css-Js — pull request #2 by JDGrimes (2014-01-22 22:04:27+00:00)
Title: When no conditional is active, don't deregister handles for all conditionals

When none of the conditions where matched (`wp_ex_is_conditionals()` returns `NULL`), all of handles for all conditionals are being returned. This causes all of the scripts/styles that are disabled for the various conditions to be removed. The expected behavior was, that if none of the conditions were met, then no handles would be deregistered.

As a bonus, I’ve added some inline docs for the function, and added
`$wpdb->prepare()` to avoid SQL injection. The latter is needed elsewhere as well, but that can be for another PR.