<?php

// defines what css variant the wysiwyg editor should get (light, adaptive, dark)
function f9_hook_sceditor(&$sce_options) {
	global $options, $settings, $context;

	// determine the sceditor css variant to pull in
	$variant = 'light';
	if (!array_key_exists('dark_light', $options) || $options['dark_light'] == 0) {
		$variant = 'adaptive';
	} else if ($options['dark_light'] == 2) {
		$variant = 'dark';
	}

	// only override if the variant exists
	if (file_exists($settings['theme_dir'] . "/css/jquery.sceditor.$variant.css")) {
		$sce_options['style'] = $settings['theme_url'] . "/css/jquery.sceditor.$variant.css" . $context['browser_cache'];
	}
}

?>
