Skip to content

Commit

Permalink
Improve global style enqueuer - file modification timestamp (#150)
Browse files Browse the repository at this point in the history
This was a browser is forced to load the new file if you make modifications to your custom blocks CSS file.

Very important specially if you use a CDN.

Co-authored-by: fvmartin <[email protected]>
  • Loading branch information
foliovision and fvmartin authored Aug 1, 2023
1 parent 6f0e124 commit 5798dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/Blocks/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ protected function enqueue_global_styles() {
'genesis-custom-blocks__global-styles',
$stylesheet_url,
[],
wp_get_theme()->get( 'Version' )
filemtime( $stylesheet_path )
);
}
}
Expand Down

0 comments on commit 5798dcf

Please sign in to comment.