當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wfConfig::updateTableExists方法代碼示例

本文整理匯總了PHP中wfConfig::updateTableExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP wfConfig::updateTableExists方法的具體用法?PHP wfConfig::updateTableExists怎麽用?PHP wfConfig::updateTableExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在wfConfig的用法示例。


在下文中一共展示了wfConfig::updateTableExists方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: uninstallPlugin

 public static function uninstallPlugin()
 {
     //Check if caching is enabled and if it is, disable it and fix the .htaccess file.
     $cacheType = wfConfig::get('cacheType', false);
     if ($cacheType == 'falcon') {
         wfCache::addHtaccessCode('remove');
         wfCache::updateBlockedIPs('remove');
         wfConfig::set('cacheType', false);
         //We currently don't clear the cache when plugin is disabled because it will take too long if done synchronously and won't work because plugin is disabled if done asynchronously.
         //wfCache::scheduleCacheClear();
     } else {
         if ($cacheType == 'php') {
             wfConfig::set('cacheType', false);
         }
     }
     //Used by MU code below
     update_option('wordfenceActivated', 0);
     wp_clear_scheduled_hook('wordfence_daily_cron');
     wp_clear_scheduled_hook('wordfence_hourly_cron');
     wp_clear_scheduled_hook('wordfence_daily_autoUpdate');
     //Remove old legacy cron job if it exists
     wp_clear_scheduled_hook('wordfence_scheduled_scan');
     //Remove all scheduled scans.
     self::unscheduleAllScans();
     // Remove cron for email summary
     wfActivityReport::clearCronJobs();
     // Remove the admin user list so it can be regenerated if Wordfence is reactivated.
     wfConfig::set_ser('adminUserList', false);
     if (!WFWAF_SUBDIRECTORY_INSTALL) {
         wfWAFConfig::set('wafDisabled', true);
     }
     if (wfConfig::get('deleteTablesOnDeact')) {
         $schema = new wfSchema();
         $schema->dropAll();
         wfConfig::updateTableExists();
         foreach (array('wordfence_version', 'wordfenceActivated') as $opt) {
             delete_option($opt);
         }
         if (!WFWAF_SUBDIRECTORY_INSTALL) {
             try {
                 if (WFWAF_AUTO_PREPEND) {
                     $helper = new wfWAFAutoPrependHelper();
                     if ($helper->uninstall()) {
                         wfWAF::getInstance()->uninstall();
                     }
                 } else {
                     wfWAF::getInstance()->uninstall();
                 }
             } catch (wfWAFStorageFileException $e) {
                 error_log($e->getMessage());
             }
         }
     }
 }
開發者ID:GafaMX,項目名稱:operaciondespierta.org,代碼行數:54,代碼來源:wordfenceClass.php


注:本文中的wfConfig::updateTableExists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。