function fifu_desactivate()
{
    update_option('fifu_woocommerce', 'toggleoff');
    update_option('fifu_hope', 'toggleoff');
    shell_exec('sh ../wp-content/plugins/featured-image-from-url/scripts/disableWoocommerce.sh');
    fifu_disable_nonstandard_compatibility();
}
Esempio n. 2
0
function fifu_get_menu_html()
{
    $image_button = plugins_url() . '/featured-image-from-url/admin/images/onoff.jpg';
    $enable_woocommerce = get_option('fifu_woocommerce');
    $enable_content = get_option('fifu_content');
    $enable_hope = get_option('fifu_hope');
    $array_cpt = array();
    for ($x = 0; $x <= 4; $x++) {
        $array_cpt[$x] = get_option('fifu_cpt' . $x);
    }
    $show_woocommerce_button = $show_content_button = "display:block";
    $output = shell_exec('uname -s');
    if ($output == "") {
        $compatible = "Unfortunatelly, the script and your server system are not compatible. " . "But we still can do the WooCommerce integration manually. In this case, send an email to <a href='mailto:contact@marceljm.com'>contact@marceljm.com</a>.";
        $show_woocommerce_button = "display:none";
    } else {
        if (strpos($output, "Linux") !== false) {
            $compatible = "You server is using {$output} system. Great! The script will work =)";
        } else {
            $compatible = "You server is using {$output} system. The script may work. <p/>" . "Please, send an email to <a href='mailto:contact@marceljm.com'>contact@marceljm.com</a> " . "informing your server system and let me know if it worked for you.";
        }
    }
    include 'html/menu.html';
    fifu_update_menu_options();
    fifu_script_woocommerce();
    if (get_option('fifu_hope') == 'toggleon') {
        fifu_enable_nonstandard_compatibility();
    } else {
        fifu_disable_nonstandard_compatibility();
    }
}