Skip to content

Commit 2f43bbf

Browse files
committed
Move front-end facing javascript to footer and add version
1 parent 7e6d244 commit 2f43bbf

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
@@ -471,7 +471,7 @@ function maybe_enqueue_frontend_script() {
471471
global $post;
472472

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

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

0 commit comments

Comments
 (0)