[Plugin: WP-LESS] Correct way to add @import dynamically
-
What is the correct way to add less import dynamically in one file.
Something like:require THEME_DIR . '/inc/plugins/wp-less/bootstrap-for-theme.php'; if(something) { $WPLessPlugin->addImport('mixins1.less'); } else { $WPLessPlugin->addImport('mixins2.less'); } $WPLessPlugin->dispatch( ); function l_scripts() { wp_enqueue_style('style', get_bloginfo('template_directory').'/style.less', array(), '', 'screen, projection'); } add_action( 'wp', 'l_scripts' );
Is it at least possible?
Thanks for help.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: WP-LESS] Correct way to add @import dynamically’ is closed to new replies.