I am using WordPress-Plugin-Boilerplate
In the plugins class-my-plugin-public.php I have the enqueue_scripts() function.
The ajax and the fabric load just fine. However if I load others below it will not insert into the page. Any ideas what I am doing wrong?
/**
* Register the JavaScript for the public-facing side of the site.
*
* @since 1.0.0
*/
public function enqueue_scripts() {
wp_localize_script( $this->plugin_name, 'canvas-draw' , array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fabric.min.js', array( 'jquery' ), $this->version, false );
// This doesnt load
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/scroll-behaviour.js', array( 'jquery' ), $this->version, true );
// This doesnt load either
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/drag-drop-index.min.js', array( 'jquery' ), $this->version, true );
}
$this->plugin_name- here's the note from link above - If you try to register or enqueue an already registered handle with different parameters, the new parameters will be ignored. Instead, use wp_deregister_script() and register the script again with the new parameters.