|
|
|
@ -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 |
|
|
|
|