started theme versioning
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
|
||||
|
||||
// Enqueue styles and scripts
|
||||
function themeStarter_enqueue()
|
||||
{
|
||||
$theme_version = filemtime(get_stylesheet_directory() . '/style.css');
|
||||
|
||||
/* Register and Enqueue Scripts */
|
||||
|
||||
wp_register_script('themeStarter-app', get_parent_theme_file_uri('/assets/js/index.js'), [], null, true);
|
||||
wp_register_script('themeStarter-app', get_parent_theme_file_uri('/assets/js/index.js'), [], $theme_version, true);
|
||||
wp_enqueue_script('themeStarter-app');
|
||||
|
||||
|
||||
/* Register and Enqueue Styles */
|
||||
|
||||
wp_register_style('themeStarter-styles', get_parent_theme_file_uri('/assets/css/styles.css'), [], null, 'all');
|
||||
wp_register_style('themeStarter-styles', get_parent_theme_file_uri('/assets/css/styles.css'), [], $theme_version, 'all');
|
||||
wp_enqueue_style('themeStarter-styles');
|
||||
|
||||
wp_register_style('bootstrap-icons', get_parent_theme_file_uri('/assets/css/bootstrap-icons.css'), [], '1.11.1', 'all');
|
||||
|
Reference in New Issue
Block a user