validation script not enqueued

November 2, 2014 5:58 pm

We are using the shortcode in a custom field, rather than in the body of a page. This prevents the validation script from being enqueued, because the function is checking to see if the shortcode is being used in the page content.

I realize that the code is doing this in order to only load the javascript on the necessary pages, but you can also achieve this by enqueuing the script right from the shortcode function. Here is a post that helps explain this: http://scribu.net/wordpress/conditional-script-loading-revisited.html

I have modified your plugin code to use this method of enqueuing the validation script. Would you be able to include this modification in the next version of your plugin? I’m happy to provide the code updates. Let me know if I can help.

Thanks!
Julia

Published by 1 Comment

1 Reply

  • Hi Julia,

    Thanks for the useful post and contribution! I have noted this and we are discussing best way to implement. Hope the plugin is working out well for you and have a great day.

    Brandon

Leave a Reply

Your email address will not be published.