Example #1
0
function fivehundred_dequeue()
{
    $disable_skins = false;
    if (isset($_GET['purchaseform'])) {
        remove_filter('the_content', 'wpautop');
        $disable_skins = true;
    } else {
        if (isset($_GET['create_project'])) {
            $disable_skins = true;
        } else {
            if (isset($_GET['edit_project'])) {
                $disable_skins = true;
            } else {
                if (isset($_GEt['action']) && $_GET['action'] == 'register') {
                    $disable_skins = true;
                }
            }
        }
    }
    if ($disable_skins) {
        global $theme_base;
        if (isset($theme_base) && $theme_base == 'fivehundred') {
            $theme_name = getThemeFileName();
            if (!empty($theme_name)) {
                wp_dequeue_style($theme_name);
            }
        }
    }
}
function embedWidget()
{
    global $wpdb;
    $tz = get_option('timezone_string');
    if (empty($tz)) {
        $tz = 'UTC';
    }
    date_default_timezone_set($tz);
    $theme_name = getThemeFileName();
    echo "<link rel='stylesheet' id='ignitiondeck-iframe-css'  href='" . plugins_url('/ignitiondeck-iframe.css?ver=3.1.3', __FILE__) . "' type='text/css' media='all' />";
    if (isset($_GET['product_no'])) {
        $project_id = $_GET['product_no'];
    }
    if (!empty($project_id)) {
        $deck = new Deck($project_id);
        $the_deck = $deck->the_deck();
        $post_id = $deck->get_project_postid();
        $project_desc = get_post_meta($post_id, "ign_project_description", true);
        $project_desc = get_post_meta($post_id, "ign_project_description", true);
        //GETTING the main settings of ignitiondeck
        $settings = getSettings();
        $logo_on = true;
        if (is_id_pro() && $settings->id_widget_logo_on !== '1') {
            $logo_on = false;
        }
        //GETTING project URL
        $product_url = getProjectURLfromType($project_id);
        require 'languages/text_variables.php';
        include 'templates/_embedWidget.php';
    }
    exit;
}