Elementor\Control_Base_Multiple::get_replaced_style_values PHP Method

get_replaced_style_values() public method

public get_replaced_style_values ( $css_property, $control_value )
    public function get_replaced_style_values($css_property, $control_value)
    {
        if (!is_array($control_value)) {
            return '';
        }
        // Trying to retrieve whole the related properties
        // according to the string matches.
        // When one of the properties is empty, aborting
        // the action and returning an empty string.
        try {
            return preg_replace_callback('/\\{\\{([A-Z]+)}}/', function ($matches) use($control_value) {
                $value = $control_value[strtolower($matches[1])];
                if ('' === $value) {
                    throw new \Exception();
                }
                return $value;
            }, $css_property);
        } catch (\Exception $e) {
            return '';
        }
    }