function motopress_cherry_parallax_output_filter($content, $atts, $shortcodename)
{
    if (!empty($shortcodename) && $shortcodename == "cherry_parallax") {
        require_once 'motopress-cherry-shortcodes-utils.php';
        extract(shortcode_atts(addStyleAtts(), $atts));
        $classes = trim($mp_style_classes . getBasicClasses($shortcodename) . getMarginClasses($margin));
        return '<div' . (empty($classes) ? '' : ' class="' . $classes . '" ') . '>' . $content . '</div>';
    } else {
        return $content;
    }
}
function motopress_cherry_lazy_load_output_filter($content, $atts, $shortcodename)
{
    if (!empty($shortcodename) && $shortcodename == "lazy_load_box") {
        require_once 'motopress-cherry-shortcodes-utils.php';
        extract(shortcode_atts(addStyleAtts(), $atts));
        $divId = '';
        $script = '';
        if (isset($_GET['motopress-ce']) && $_GET['motopress-ce'] === '1' || isset($_POST['action']) && $_POST['action'] === 'motopress_ce_render_shortcode') {
            if ($shortcodename == 'lazy_load_box') {
                $uid = uniqid('lazy_load_');
                $divId = ' id="' . $uid . '" ';
                $script = '<script>jQuery("#' . $uid . ' .lazy-load-box").removeClass("trigger").animate({"opacity":"1"}, 100);</script>';
            }
        }
        $classes = trim($mp_style_classes . getBasicClasses($shortcodename) . getMarginClasses($margin));
        return '<div' . $divId . (empty($classes) ? '' : ' class="' . $classes . '" ') . '>' . $content . '</div>' . $script;
    } else {
        return $content;
    }
}
function motopress_cherry_common_shortcode_renderer($atts, $content = null, $shortcode_name)
{
    global $motopress_cherry_shortcodes_map;
    $shortCodeMap = $motopress_cherry_shortcodes_map[$shortcode_name];
    $originalShortcodeRenderFunction = $shortCodeMap['render_function'];
    if (strlen($originalShortcodeRenderFunction) == 0) {
        $originalShortcodeRenderFunction = $shortCodeMap['original_shortcode'] . '_shortcode';
    }
    if (is_callable($originalShortcodeRenderFunction)) {
        $result = call_user_func($originalShortcodeRenderFunction, $atts, $content);
    } else {
        $result = '"' . $originalShortcodeRenderFunction . '"' . ' is not callable';
    }
    extract(shortcode_atts(addStyleAtts(), $atts));
    if (!empty($classes)) {
        $classes = ' ' . $classes;
    }
    if (!empty($custom_class)) {
        $custom_class = ' ' . $custom_class;
    }
    return '<div class="' . $shortcode_name . $classes . getMarginClasses($margin) . $custom_class . '">' . $result . '</div>';
}
function motopress_cherry_plugin_shortcode_output_filter($content, $atts, $shortcodename)
{
    global $motopress_cherry_shortcodes_map;
    if (!empty($shortcodename) && array_key_exists($shortcodename, $motopress_cherry_shortcodes_map)) {
        extract(shortcode_atts(addStyleAtts(), $atts));
        $classes = trim($mp_style_classes . getBasicClasses($shortcodename) . getMarginClasses($margin));
        $output = '<div' . (empty($classes) ? '' : ' class="' . $classes . '" ') . '>' . $content . '</div>';
        if (isset($_POST['action']) && $_POST['action'] == 'motopress_ce_render_shortcode') {
            if ($shortcodename == 'carousel_owl') {
                $output .= '<script>cherryPluginCarouselInit();</script>';
            }
        }
        return $output;
    } else {
        return $content;
    }
}