Skip to content

Commit

Permalink
Merge pull request #1458 from BrookeDot/feature/support-script-debug
Browse files Browse the repository at this point in the history
Support Script Debug
  • Loading branch information
bacoords committed Oct 29, 2021
2 parents cf7cbf4 + e3c0afc commit 25ef3df
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions inc/enqueue.php
Expand Up @@ -17,13 +17,14 @@ function understrap_scripts() {
$the_theme = wp_get_theme();
$theme_version = $the_theme->get( 'Version' );
$bootstrap_version = get_theme_mod( 'understrap_bootstrap_version', 'bootstrap4' );
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';

// Grab asset urls.
$theme_styles = '/css/theme.min.css';
$theme_scripts = '/js/theme.min.js';
$theme_styles = "/css/theme{$suffix}.css";
$theme_scripts = "/js/theme{$suffix}.js";
if ( 'bootstrap4' === $bootstrap_version ) {
$theme_styles = '/css/theme-bootstrap4.min.css';
$theme_scripts = '/js/theme-bootstrap4.min.js';
$theme_styles = "/css/theme-bootstrap4{$suffix}.css";
$theme_scripts = "/js/theme-bootstrap4{$suffix}.js";
}

$css_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_styles );
Expand Down

0 comments on commit 25ef3df

Please sign in to comment.