WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Shortcode Detector

Detects shortcodes before wp_head() call.

Detects shortcodes before wp_head() call to allow selective enqueuing of scripts and styles (i.e. js and css files) that are specifically used for the shortcode.

How to use the plugin?

Make sure that the shortcode you want to detect is defined. If it is a WordPress shortcode then there's no need to define it.

<?php add_shortcode( 'my_shorcode', 'my_function' ); ?>

To detect the shortcode use the code below. Change 'my_shortcode' to the shortcode you want to detect.

<?php add_action( 'shortcode_detected_my_shortcode', 'my_add_resources_function' ); ?>

Requires: 3.5.1 or higher
Compatible up to: 3.5.2
Last Updated: 2013-5-12
Downloads: 146

Ratings

0 stars
0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1