コード例 #1
0
ファイル: ninja-forms.php プロジェクト: jbs321/portfolio
                continue;
            }
            /*
             * There are non-compatible add-ons installed.
             */
            return FALSE;
        }
    }
    return $has_addons;
}
/*
|--------------------------------------------------------------------------
| Uninstall Hook
|--------------------------------------------------------------------------
*/
if (nf_is_freemius_on()) {
    // Override plugin's version, should be executed before Freemius init.
    nf_override_plugin_version();
    // Init Freemius.
    nf_fs();
    nf_fs()->add_action('after_uninstall', 'ninja_forms_uninstall');
} else {
    register_uninstall_hook(__FILE__, 'ninja_forms_uninstall');
}
function ninja_forms_uninstall()
{
    global $wpdb;
    $settings = Ninja_Forms()->get_plugin_settings();
    // Bail if we haven't checked the "delete on uninstall" box.
    if (isset($settings['delete_on_uninstall']) && 1 == $settings['delete_on_uninstall']) {
        // Remove our options.
コード例 #2
0
function nf_fs_downgrade()
{
    update_option('ninja_forms_version', '2.9');
    if (!nf_is_freemius_on()) {
        return;
    }
    if (nf_fs()->is_registered()) {
        // Send immediate downgrade event.
        nf_fs()->_run_sync_install();
    }
}