started theme versioning

This commit is contained in:
prospect
2024-01-19 08:04:24 -05:00
parent 160df267f2
commit 02cb84ce88
5 changed files with 180 additions and 105 deletions

View File

@@ -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');