diff --git a/juxtapose.php b/juxtapose.php index 79709b4..978c010 100644 --- a/juxtapose.php +++ b/juxtapose.php @@ -23,6 +23,8 @@ class Juxtapose { // TODO: Sanitize attributes static function shortcode( $atts ) { + self::$shortcode_rendered = true; + wp_enqueue_script('juxtapose'); $a = shortcode_atts( array( @@ -60,7 +62,9 @@ EOT; // Yeah i know, inside
is not valid HTML. // But i don't want to load this css when there's not need to. // SUE ME. - echo ''; + if(self::$shortcode_rendered){ + echo ''; + } } }