public function after_save_settings() { if (isset($_POST['bt_save_settings']) && isset($_POST[WOO_DYNAMIC_GALLERY_PREFIX . 'reset_galleries_activate'])) { delete_option(WOO_DYNAMIC_GALLERY_PREFIX . 'reset_galleries_activate'); WC_Dynamic_Gallery_Functions::reset_products_galleries_activate(); } if ((isset($_POST['bt_save_settings']) || isset($_POST['bt_reset_settings'])) && get_option('wc_dgallery_lite_clean_on_deletion') == 'no') { $uninstallable_plugins = (array) get_option('uninstall_plugins'); unset($uninstallable_plugins[WOO_DYNAMIC_GALLERY_NAME]); update_option('uninstall_plugins', $uninstallable_plugins); } }