Skip to content

Commit acd54cb

Browse files
author
Antti Kuosmanen
authored
Merge pull request #30 from timiwahalahti/issue-26
Move front-end facing javascript to footer and add version
2 parents 0ca3212 + 2f43bbf commit acd54cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

classes/class-cpt-wplf-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ function maybe_enqueue_frontend_script() {
475475
global $post;
476476

477477
// register the script, but only enqueue it if the current post contains a form in it
478-
wp_register_script( 'wplf-form-js', plugins_url( 'assets/scripts/wplf-form.js', dirname(__FILE__) ), array() );
478+
wp_register_script( 'wplf-form-js', plugins_url( 'assets/scripts/wplf-form.js', dirname(__FILE__) ), array(), '1.0.2', true );
479479

480480
if( is_a( $post, 'WP_Post' ) && ( has_shortcode( $post->post_content, 'libre-form') || $post->post_type === 'wplf-form') ) {
481481
wp_enqueue_script( 'wplf-form-js' );

0 commit comments

Comments
 (0)