Just installed wp-scss plugin, however I would like the scss to compile to a plugin folder instead
$wpscss_settings = array(
'scss_dir' => WPSCSS_THEME_DIR . $scss_dir_setting,
'css_dir' => WPSCSS_THEME_DIR . $css_dir_setting,
'compiling' => $wpscss_options['compiling_options'],
'errors' => $wpscss_options['errors'],
'enqueue' => isset($wpscss_options['enqueue']) ? $wpscss_options['enqueue'] : 0
);
what should I change the WPSCSS_THEME_DIR to be..
$plugin_url = plugin_url();
$wpscss_settings = array(
'scss_dir' => $plugin_url . $scss_dir_setting,
'css_dir' => $plugin_url . $css_dir_setting,
'compiling' => $wpscss_options['compiling_options'],
'errors' => $wpscss_options['errors'],
'enqueue' => isset($wpscss_options['enqueue']) ? $wpscss_options['enqueue'] : 0
);
I know that I need to have the right privileges but is this advised as the latter version white screened and had to revert?
I had to do a similar thing, so I had to edit the plugin global variables. Please be advised, if this plugin ever gets updated, you will lose any code you change here.
In wp-scss.php file, find the first global variable around line 31. Change your path from “get_stylesheet_directory()” to wherever you want the root of where this plugin looks for scss files. Then in the plugin settings in the backend of WP, you can edit the specific subfolder.
Original Plugin Code:
Your Edited Plugin Code:
In functions.php, you could then write something like this: