Update path to assets.
This commit is contained in:
@@ -13,15 +13,18 @@ class <%= blockClassModel %>_Component {
|
|||||||
// $version = get_plugin_data( __DIR__ . "/../../scytale-custom-blocks.php" )['Version']; // In Plugins
|
// $version = get_plugin_data( __DIR__ . "/../../scytale-custom-blocks.php" )['Version']; // In Plugins
|
||||||
$version = \Core\Global_Functions::get_current_version_number(); // In Theme
|
$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 %>',
|
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' ],
|
[ 'style-wp' ],
|
||||||
$version
|
$version
|
||||||
);
|
);
|
||||||
wp_enqueue_style( '<%= blockFilename %>' );
|
wp_enqueue_style( '<%= blockFilename %>' );
|
||||||
|
|
||||||
wp_register_script( 'script-<%= 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' ],
|
[ 'jquery', 'swiper' ],
|
||||||
$version,
|
$version,
|
||||||
true
|
true
|
||||||
|
|||||||
Reference in New Issue
Block a user