当前位置: 首页>>代码示例>>PHP>>正文


PHP C_Photocrati_Installer::uninstall方法代码示例

本文整理汇总了PHP中C_Photocrati_Installer::uninstall方法的典型用法代码示例。如果您正苦于以下问题:PHP C_Photocrati_Installer::uninstall方法的具体用法?PHP C_Photocrati_Installer::uninstall怎么用?PHP C_Photocrati_Installer::uninstall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在C_Photocrati_Installer的用法示例。


在下文中一共展示了C_Photocrati_Installer::uninstall方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: reset_action

 function reset_action()
 {
     global $wpdb;
     // Flush the cache
     C_Photocrati_Cache::flush('all');
     // Uninstall the plugin
     $settings = C_NextGen_Settings::get_instance();
     if (defined('NGG_PRO_PLUGIN_VERSION') || defined('NEXTGEN_GALLERY_PRO_VERSION')) {
         C_Photocrati_Installer::uninstall('photocrati-nextgen-pro');
     }
     C_Photocrati_Installer::uninstall('photocrati-nextgen');
     // removes all ngg_options entry in wp_options
     $settings->reset();
     $settings->destroy();
     // clear NextGEN's capabilities from the roles system
     $capabilities = array("NextGEN Gallery overview", "NextGEN Use TinyMCE", "NextGEN Upload images", "NextGEN Manage gallery", "NextGEN Manage others gallery", "NextGEN Manage tags", "NextGEN Edit album", "NextGEN Change style", "NextGEN Change options", "NextGEN Attach Interface");
     $roles = array("subscriber", "contributor", "author", "editor", "administrator");
     foreach ($roles as $role) {
         $role = get_role($role);
         foreach ($capabilities as $capability) {
             $role->remove_cap($capability);
         }
     }
     // Some installations of NextGen that upgraded from 1.9x to 2.0x have duplicates installed,
     // so for now (as of 2.0.21) we explicitly remove all display types and lightboxes from the
     // db as a way of fixing this.
     $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'display_type'));
     $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'lightbox_library'));
     // the installation will run on the next page load; so make our own request before reloading the browser
     wp_remote_get(admin_url('plugins.php'), array('timeout' => 180, 'blocking' => true, 'sslverify' => false));
     header('Location: ' . $_SERVER['REQUEST_URI']);
     throw new E_Clean_Exit();
 }
开发者ID:ayoayco,项目名称:upbeat,代码行数:33,代码来源:adapter.reset_form.php

示例2: deactivate

 public function deactivate()
 {
     delete_option('new_royalslider_ng_slider_id');
     if (class_exists('C_Photocrati_Installer')) {
         C_Photocrati_Installer::uninstall('ds-nextgen_royalslider');
         C_Photocrati_Installer::uninstall('ds-royalslider');
     }
 }
开发者ID:treydonovan,项目名称:mymexicotours,代码行数:8,代码来源:NextGen.php

示例3: reset_action

 function reset_action()
 {
     global $wpdb;
     // Flush the cache
     C_Photocrati_Cache::flush('all');
     // Uninstall the plugin
     $settings = C_NextGen_Settings::get_instance();
     if (defined('NGG_PRO_PLUGIN_VERSION') || defined('NEXTGEN_GALLERY_PRO_VERSION')) {
         C_Photocrati_Installer::uninstall('photocrati-nextgen-pro');
     }
     C_Photocrati_Installer::uninstall('photocrati-nextgen');
     // removes all ngg_options entry in wp_options
     $settings->reset();
     $settings->destroy();
     // Some installations of NextGen that upgraded from 1.9x to 2.0x have duplicates installed,
     // so for now (as of 2.0.21) we explicitly remove all display types and lightboxes from the
     // db as a way of fixing this.
     $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'display_type'));
     $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'lightbox_library'));
     // the installation will run on the next page load; so make our own request before reloading the browser
     wp_remote_get(admin_url('plugins.php'), array('timeout' => 180, 'blocking' => true, 'sslverify' => false));
     header('Location: ' . $_SERVER['REQUEST_URI']);
     throw new E_Clean_Exit();
 }
开发者ID:JeffreyBue,项目名称:jb,代码行数:24,代码来源:adapter.reset_form.php

示例4: deactivate

 /**
  * Run the uninstaller
  */
 static function deactivate()
 {
     C_Photocrati_Installer::uninstall(NGG_PLUGIN_BASENAME);
 }
开发者ID:patrickmetzger,项目名称:adthrive-touch,代码行数:7,代码来源:nggallery.php

示例5: deactivate

 /**
  * Run the uninstaller
  */
 static function deactivate()
 {
     C_Photocrati_Installer::uninstall(NEXTGEN_GALLERY_PLUGIN_BASENAME);
 }
开发者ID:lcw07r,项目名称:productcampamsterdam.org,代码行数:7,代码来源:nggallery.php

示例6: deactivate

 static function deactivate()
 {
     if (class_exists('C_Photocrati_Installer')) {
         C_Photocrati_Installer::uninstall('photocrati-nextgen-pro');
     }
 }
开发者ID:CodeNoEvil,项目名称:mbp_web_infrastructure,代码行数:6,代码来源:nggallery-pro.php


注:本文中的C_Photocrati_Installer::uninstall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。