Closed pbfteambox closed 10 years ago
There are a couple of bugs in the class.cta.render.php file that prevent the CSS and JS files located in the assets directory of cta templates to be loaded.
The following patch resolves this issue:
diff -up classes/class.cta.render.php.orig classes/class.cta.render.php --- classes/class.cta.render.php.orig 2014-10-03 08:55:39.000000000 +0200 +++ classes/class.cta.render.php 2014-10-03 10:50:45.000000000 +0200 @@ -261,8 +261,8 @@ if ( !class_exists( 'CTA_Render' ) ) { } /* Check if Dirs exist first */ - $has_js_dir = WP_CTA_PATH.'templates/'.$template['slug'].'/assets/css/'; - $has_style_dir = WP_CTA_URLPATH.'templates/'.$template['slug'].'/assets/js/'; + $has_js_dir = WP_CTA_PATH.'templates/'.$template['slug'].'/assets/js/'; + $has_css_dir = WP_CTA_PATH.'templates/'.$template['slug'].'/assets/css/'; if(file_exists($has_js_dir)) { /* get js files */ @@ -276,7 +276,7 @@ if ( !class_exists( 'CTA_Render' ) ) { } } - if(file_exists($has_js_dir)) { + if(file_exists($has_css_dir)) { /* get css files */ $results = scandir($template['path'].'assets/css/'); foreach ($results as $name) {
@pbfteambox
Thank you I've confirmed and built in the patch, will you confirm?
Yep the fix looks ok. Thanks!
There are a couple of bugs in the class.cta.render.php file that prevent the CSS and JS files located in the assets directory of cta templates to be loaded.
The following patch resolves this issue: