function if_download_lowest_price_function($atts, $content)
{
    $atts = shortcode_atts(array('not' => 'no', 'id' => '', 'equals' => '', 'greater' => '', 'less' => ''), $atts, 'if_download_price_lowest');
    if ($atts['id'] != '') {
        $id = $atts['id'];
    } else {
        $id = get_the_id();
    }
    ob_start();
    $price = '';
    $price = edd_get_download_price($id);
    // echo $price;
    if ($atts['not'] == 'yes' || $atts['not'] == '1') {
        if (!eval_condition($price, $atts['equals'], $atts['greater'], $atts['less'])) {
            echo do_shortcode($content);
        } else {
            echo '';
        }
    } else {
        if (eval_condition($price, $atts['equals'], $atts['greater'], $atts['less'])) {
            echo do_shortcode($content);
        } else {
            echo '';
        }
    }
    return ob_get_clean();
}
function if_download_price_function($atts, $content)
{
    $atts = shortcode_atts(array('not' => 'no', 'id' => '', 'equals' => '', 'greater' => '', 'less' => ''), $atts, 'if_download_price');
    if ($atts['id'] != '') {
        $id = $atts['id'];
    } else {
        $id = get_the_id();
    }
    ob_start();
    $price = '';
    if (edd_has_variable_prices($id)) {
        $get_default_price = edd_get_default_variable_price($id);
        $prices = edd_get_variable_prices($id);
        $price = $prices[$get_default_price]['amount'];
    } else {
        $price = edd_get_download_price($id);
    }
    if ($atts['not'] == 'yes' || $atts['not'] == '1') {
        if (!eval_condition($price, $atts['equals'], $atts['greater'], $atts['less'])) {
            echo do_shortcode($content);
        } else {
            echo '';
        }
    } else {
        if (eval_condition($price, $atts['equals'], $atts['greater'], $atts['less'])) {
            echo do_shortcode($content);
        } else {
            echo '';
        }
    }
    return ob_get_clean();
}
function if_download_name_function($atts, $content)
{
    $atts = shortcode_atts(array('not' => 'no', 'id' => '', 'is' => '', 'is_sensitive' => '', 'equals' => '', 'greater' => '', 'less' => '', 'search' => '', 'search_sensitive' => ''), $atts, 'if_download_name');
    if ($atts['id'] != '') {
        $id = $atts['id'];
    } else {
        $id = get_the_id();
    }
    ob_start();
    $name = get_the_title($id);
    $str_length = strlen($name);
    if ($atts['not'] == 'yes' || $atts['not'] == 1) {
        if (eval_condition($str_length, $atts['equals'], $atts['greater'], $atts['less']) && is_equals($name, $atts['is']) && is_equals_sensitive($name, $atts['is_sensitive']) && is_present($name, $atts['search']) && is_present_sensitive($name, $atts['search_sensitive'])) {
            echo '';
        } else {
            echo do_shortcode($content);
        }
    } else {
        if (eval_condition($str_length, $atts['equals'], $atts['greater'], $atts['less']) && is_equals($name, $atts['is']) && is_equals_sensitive($name, $atts['is_sensitive']) && is_present($name, $atts['search']) && is_present_sensitive($name, $atts['search_sensitive'])) {
            echo do_shortcode($content);
        } else {
            echo '';
        }
    }
    return ob_get_clean();
}
function if_download_description_function($atts, $content)
{
    $atts = shortcode_atts(array('not' => 'no', 'id' => '', 'is' => '', 'is_sensitive' => '', 'equals' => '', 'greater' => '', 'less' => '', 'search' => '', 'search_sensitive' => ''), $atts, 'if_download_description');
    if ($atts['id'] != '') {
        $post = get_post($atts['id']);
        $description = $post->post_content;
    } else {
        $description = get_the_content();
    }
    $str_length = strlen($description);
    ob_start();
    if ($atts['not'] == 'yes' || $atts['not'] == 1) {
        if (eval_condition($str_length, $atts['equals'], $atts['greater'], $atts['less']) && is_equals($description, $atts['is']) && is_equals_sensitive($description, $atts['is_sensitive']) && is_present($description, $atts['search']) && is_present_sensitive($description, $atts['search_sensitive'])) {
            echo '';
        } else {
            echo do_shortcode($content);
        }
    } else {
        if (eval_condition($str_length, $atts['equals'], $atts['greater'], $atts['less']) && is_equals($description, $atts['is']) && is_equals_sensitive($description, $atts['is_sensitive']) && is_present($description, $atts['search']) && is_present_sensitive($description, $atts['search_sensitive'])) {
            echo do_shortcode($content);
        } else {
            echo '';
        }
    }
    return ob_get_clean();
}
function if_download_id_function($atts, $content)
{
    $atts = shortcode_atts(array('id' => 'all', 'equals' => '', 'greater' => '', 'less' => '', 'not' => 'no'), $atts, 'if_download_id');
    if ($atts['id'] == 'all') {
        $download_id = get_the_ID();
        if ($atts['not'] == 'yes' || $atts['not'] == 1) {
            if (!eval_condition($download_id, $atts['equals'], $atts['greater'], $atts['less'])) {
                return do_shortcode($content);
            } else {
                return '';
            }
        } else {
            if (eval_condition($download_id, $atts['equals'], $atts['greater'], $atts['less'])) {
                return do_shortcode($content);
            } else {
                return '';
            }
        }
    } else {
        if ($atts['not'] == 'yes' || $atts['not'] == 1) {
            $download_id = get_the_ID();
            $id = explode(',', $atts['id']);
            if (!(in_array($download_id, $id) && eval_condition($download_id, $atts['equals'], $atts['greater'], $atts['less']))) {
                return do_shortcode($content);
            } else {
                return '';
            }
        } else {
            $download_id = get_the_ID();
            $id = explode(',', $atts['id']);
            if (in_array($download_id, $id) && eval_condition($download_id, $atts['equals'], $atts['greater'], $atts['less'])) {
                return do_shortcode($content);
            } else {
                return '';
            }
        }
    }
}