本文整理汇总了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();
}
示例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');
}
}
示例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();
}
示例4: deactivate
/**
* Run the uninstaller
*/
static function deactivate()
{
C_Photocrati_Installer::uninstall(NGG_PLUGIN_BASENAME);
}
示例5: deactivate
/**
* Run the uninstaller
*/
static function deactivate()
{
C_Photocrati_Installer::uninstall(NEXTGEN_GALLERY_PLUGIN_BASENAME);
}
示例6: deactivate
static function deactivate()
{
if (class_exists('C_Photocrati_Installer')) {
C_Photocrati_Installer::uninstall('photocrati-nextgen-pro');
}
}