diff --git a/platforms/wordpress/templates/Template_Basic_Component.php b/platforms/wordpress/templates/Template_Basic_Component.php index e9ecd54..8a9f39e 100644 --- a/platforms/wordpress/templates/Template_Basic_Component.php +++ b/platforms/wordpress/templates/Template_Basic_Component.php @@ -13,15 +13,18 @@ class <%= blockClassModel %>_Component { // $version = get_plugin_data( __DIR__ . "/../../scytale-custom-blocks.php" )['Version']; // In Plugins $version = \Core\Global_Functions::get_current_version_number(); // In Theme + // $base_path = plugin_dir_url( __FILE__ ); // In Plugins + $base_path = get_template_directory_uri() . '/components/partials/<%= blockFilename %>/'; + wp_register_style( '<%= blockFilename %>', - get_template_directory_uri() . '/components/partials/<%= blockFilename %>/templates/styles/<%= blockFilename %>.min.css', + $base_path . 'templates/styles/<%= blockFilename %>.min.css', [ 'style-wp' ], $version ); wp_enqueue_style( '<%= blockFilename %>' ); wp_register_script( 'script-<%= blockFilename %>', - get_template_directory_uri() . '/components/partials/<%= blockFilename %>/templates/scripts/<%= blockFilename %>.min.js', + $base_path . 'templates/scripts/<%= blockFilename %>.min.js', [ 'jquery', 'swiper' ], $version, true