本文整理汇总了PHP中C_Photocrati_Installer::get_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP C_Photocrati_Installer::get_instance方法的具体用法?PHP C_Photocrati_Installer::get_instance怎么用?PHP C_Photocrati_Installer::get_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C_Photocrati_Installer
的用法示例。
在下文中一共展示了C_Photocrati_Installer::get_instance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall_action
function uninstall_action()
{
$installer = C_Photocrati_Installer::get_instance();
$installer->uninstall(NEXTGEN_GALLERY_PLUGIN_BASENAME, TRUE);
deactivate_plugins(NEXTGEN_GALLERY_PLUGIN_BASENAME);
wp_redirect(admin_url('/plugins.php'));
}
示例2: reset_action
function reset_action()
{
global $wpdb;
$installer = C_Photocrati_Installer::get_instance();
$settings = C_NextGen_Settings::get_instance();
// removes lightbox, display type, and source settings
$installer->uninstall(NEXTGEN_GALLERY_PLUGIN_BASENAME);
// removes ngg_options entry in wp_options
$settings->destroy();
$settings->save();
// TODO: remove this sometime after 2.0.21
//
// Some installations of NextGen that upgraded from 1.9x to 2.0x have duplicate display types installed,
// so for now (as of 2.0.21) we explicitly remove all display types from the db as a way of fixing this
$wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'display_type'));
// trigger the install routine
$installer->update(TRUE);
}