Last active
April 16, 2019 15:06
-
-
Save seothemes/295bfaedcb4f8d3c6681923a51f38e3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Check if WP-SCSS plugin is active | |
if ( !is_plugin_active( 'wp-scss/wp-scss.php' ) ) { | |
return; | |
} | |
// Always recompile in the customizer | |
if ( is_customize_preview() && !defined('WP_SCSS_ALWAYS_RECOMPILE')) { | |
define('WP_SCSS_ALWAYS_RECOMPILE', true); | |
} | |
// Update the default paths to match theme | |
$seo_wpscss_options = get_option('wpscss_options'); | |
if( $seo_wpscss_options['scss_dir'] !== '/sass/' || $seo_wpscss_options['css_dir'] !== '/' ) { | |
// Alter the options array appropriately | |
$seo_wpscss_options['scss_dir'] = '/sass/'; | |
$seo_wpscss_options['css_dir'] = '/'; | |
// Update entire array | |
update_option('wpscss_options', $seo_wpscss_options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment