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. delete_option('ninja_forms_settings'); delete_option('nf_version_upgraded_from'); delete_option('nf_upgrade_notice'); delete_option('nf_database_migrations'); delete_option('nf_convert_notifications_forms');
function nf_fs_optout() { nf_fs()->delete_account_event(); // Turn Freemius off. update_option('ninja_forms_freemius', 0); }