/**
 * Display conversion area for default template
 * @param OBJECT $post
 * @param STRING $content
 * @param bool $return
 * @param bool $doshortcode
 * @return null
 */
function lp_conversion_area($post = null, $content = null, $return = false, $doshortcode = true)
{
    if (!isset($post)) {
        global $post;
    }
    $content = Landing_Pages_Variations::get_conversion_area($post->ID);
    $wrapper_class = lp_discover_important_wrappers($content);
    if ($doshortcode) {
        $content = do_shortcode($content);
    }
    $content = apply_filters('lp_conversion_area_post', $content, $post);
    if (!$return) {
        $content = str_replace('<p><div id="inbound-form-wrapper"', '<div id="inbound-form-wrapper"', $content);
        $content = preg_replace('/<p[^>]*><\\/p[^>]*>/', '', $content);
        /* remove empty p tags */
        $content = preg_replace('/<\\/p>/', '', $content);
        /* remove last empty p tag */
        echo do_shortcode($content);
    } else {
        return $content;
    }
}
function lp_conversion_area($post = null, $content = null, $return = false, $doshortcode = true, $rebuild_attributes = true)
{
    if (!isset($post)) {
        global $post;
    }
    $wrapper_class = "";
    $content = get_post_meta($post->ID, 'lp-conversion-area', true);
    $content = apply_filters('lp_conversion_area_pre_standardize', $content, $post, $doshortcode);
    $wrapper_class = lp_discover_important_wrappers($content);
    if ($doshortcode) {
        $content = do_shortcode($content);
    }
    if ($rebuild_attributes) {
        //$content = lp_rebuild_attributes( $content, $wrapper_class );
    }
    $content = apply_filters('lp_conversion_area_post', $content, $post);
    if (!$return) {
        $content = str_replace('<p><div id="inbound-form-wrapper"', '<div id="inbound-form-wrapper"', $content);
        $content = preg_replace('/<p[^>]*><\\/p[^>]*>/', '', $content);
        // remove empty p tags
        $content = preg_replace('/<\\/p>/', '', $content);
        // remove last empty p tag
        echo do_shortcode($content);
    } else {
        return do_shortcode($content);
    }
}