// Load plugins (if not already loaded) if (!$plugins_loaded) { $plugindir = '../../turbine/plugins'; if ($handle = opendir($plugindir)) { while (false !== ($pluginfile = readdir($handle))) { if ($pluginfile != '.' && $pluginfile != '..' && is_file($plugindir . '/' . $pluginfile) && pathinfo($plugindir . '/' . $pluginfile, PATHINFO_EXTENSION) == 'php' && !function_exists(substr($pluginfile, 0, -4))) { include $plugindir . '/' . $pluginfile; } } closedir($handle); } $plugins_loaded = true; } // Load string $source = stripslashes($_POST['css']); $cssp->load_string($source, true); // Set global filepath constant for the current file $filepath = dirname($file); if ($filepath != '.') { $cssp->global_constants['FILEPATH'] = $filepath; } else { $cssp->global_constants['FILEPATH'] = ''; } // Get plugin settings for the before parse hook $plugin_list = array(); $found = false; foreach ($cssp->code as $line) { if (!$found) { if (preg_match('/^[\\s\\t]*@turbine/i', $line) == 1) { $found = true; }