Skip to content

Commit

Permalink
replaces uri with path for asset filemtime
Browse files Browse the repository at this point in the history
  • Loading branch information
bacoords committed Feb 7, 2023
1 parent a756031 commit 6fbf0a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ function theme_enqueue_styles() {
$theme_styles = "/css/child-theme{$suffix}.css";
$theme_scripts = "/js/child-theme{$suffix}.js";

$css_version = $theme_version . '.' . filemtime( get_stylesheet_directory_uri() . $theme_styles );
$css_version = $theme_version . '.' . filemtime( get_stylesheet_directory() . $theme_styles );

wp_enqueue_style( 'child-understrap-styles', get_stylesheet_directory_uri() . $theme_styles, array(), $css_version );
wp_enqueue_script( 'jquery' );

$js_version = $theme_version . '.' . filemtime( get_stylesheet_directory_uri() . $theme_scripts );
$js_version = $theme_version . '.' . filemtime( get_stylesheet_directory() . $theme_scripts );

wp_enqueue_script( 'child-understrap-scripts', get_stylesheet_directory_uri() . $theme_scripts, array(), $js_version, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
Expand Down

0 comments on commit 6fbf0a5

Please sign in to comment.