38 'formatter' =>
'single-line',
39 'versioning' => false,
40 'rewrite_import_urls' => false,
41 'boilerplate' => false,
44 $config = (array) $this->config->css_compiler_options;
50 return Crush::$process->compile()->__toString();
61 public function getCssVars(array $compiler_options = [],
bool $load_config_vars =
true): array {
62 $default_vars = array_merge($this->getCoreVars(), $this->getPluginVars());
63 $custom_vars = (array)
elgg_extract(
'vars', $compiler_options, []);
64 $vars = array_merge($default_vars, $custom_vars);
66 $results = (array) $this->events->triggerResults(
'vars:compiler',
'css', $compiler_options,
$vars);
68 if (!$load_config_vars) {
81 $file =
Paths::
elgg() .
'engine/theme.php';
82 return Includer::includeFile($file);
95 $plugin_vars =
$plugin->getStaticConfig(
'theme', []);
96 if (empty($plugin_vars)) {
100 $return = array_merge($return, $plugin_vars);
Compile CSS with CSSCrush.
compile($css, array $options=[])
Compile CSS.
getCssVars(array $compiler_options=[], bool $load_config_vars=true)
Fetches a combined set of CSS variables and their value.
getPluginVars()
Plugin theme variables.
__construct(protected Config $config, protected EventsService $events)
Constructor.
getCoreVars()
Default Elgg theme variables.
Allow executing scripts without $this context or local vars.
Find Elgg and project paths.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
if($who_can_change_language==='nobody') elseif($who_can_change_language==='admin_only' &&!elgg_is_admin_logged_in()) $options
$config
Advanced site settings, debugging section.
elgg()
Bootstrapping and helper procedural code available for use in Elgg core and plugins.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_get_plugins(string $status='active')
Returns an ordered list of plugins.