protected function get_less_variables() {
        $variables = array();

        // Getting all the candidate functions.
        $candidates = array();
        foreach ($this->parent_configs as $parent_config) {
            if (!isset($parent_config->lessvariablescallback)) {
                continue;
            }
            $candidates[] = $parent_config->lessvariablescallback;
        }
        $candidates[] = $this->lessvariablescallback;

        // Calling the functions.
        foreach ($candidates as $function) {
            if (function_exists($function)) {
                $vars = $function($this);
                if (!is_array($vars)) {
                    debugging('Callback ' . $function . ' did not return an array() as expected', DEBUG_DEVELOPER);
                    continue;
                }
                $variables = array_merge($variables, $vars);
            }
        }

        return $variables;
    }