Skip to content

Commit

Permalink
Fixed fallback to custom in child
Browse files Browse the repository at this point in the history
  • Loading branch information
overclokk committed Feb 3, 2019
1 parent b61c2f8 commit 5728b82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Asset/Asset_Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ function add_style_and_script() {
if ( file_exists( CHILDPATH . '/css/' . $dev_dir . CURRENT_TEMPLATE_SLUG . '.css' ) ) {
$style_file_url = STYLESHEETURL . '/css/' . $dev_dir . CURRENT_TEMPLATE_SLUG . '.css';
$style_file_path = CHILDPATH . '/css/' . $dev_dir . CURRENT_TEMPLATE_SLUG . '.css';
} elseif ( file_exists( CHILDPATH . '/css/' . $dev_dir . 'custom.css' ) ) {
$style_file_url = STYLESHEETURL . '/css/' . $dev_dir . 'custom.css';
$style_file_path = CHILDPATH . '/css/' . $dev_dir . 'custom.css';
}

// d( get_theme_file_uri( '/css/' . $dev_dir . CURRENT_TEMPLATE_SLUG . '.css' ) );
Expand All @@ -107,6 +110,9 @@ function add_style_and_script() {
if ( file_exists( CHILDPATH . '/js/' . CURRENT_TEMPLATE_SLUG . $min . '.js' ) ) {
$script_file_url = STYLESHEETURL . '/js/' . CURRENT_TEMPLATE_SLUG . $min . '.js';
$script_file_path = CHILDPATH . '/js/' . CURRENT_TEMPLATE_SLUG . $min . '.js';
} elseif ( file_exists( CHILDPATH . '/js/custom' . $min . '.js' ) ) {
$script_file_url = STYLESHEETURL . '/js/custom' . $min . '.js';
$script_file_path = CHILDPATH . '/js/custom' . $min . '.js';
}

$config_scripts = [
Expand Down

0 comments on commit 5728b82

Please sign in to comment.