本文整理匯總了PHP中FrmDb::uninstall方法的典型用法代碼示例。如果您正苦於以下問題:PHP FrmDb::uninstall方法的具體用法?PHP FrmDb::uninstall怎麽用?PHP FrmDb::uninstall使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FrmDb
的用法示例。
在下文中一共展示了FrmDb::uninstall方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_uninstall
/**
* @covers FrmDb::uninstall
*/
public function test_uninstall()
{
$this->set_as_user_role('administrator');
$frmdb = new FrmDb();
$uninstalled = $frmdb->uninstall();
$this->assertTrue($uninstalled);
$this->markTestIncomplete('Make sure uninstall is complete');
$this->do_tables_exist(false);
$this->assertEmpty(get_option('frm_db_version', true));
$this->assertEmpty(get_option('frm_options', true));
// TODO: Check if roles exist FrmAppHelper::frm_capabilities()
// TODO: Check if any posts exist for extra types
// TODO: Check if transients exist: frmpro_css, frm_options, frmpro_options, %frm_form_fields%
}
示例2: uninstall
public static function uninstall()
{
check_ajax_referer('frm_ajax', 'nonce');
if (current_user_can('administrator')) {
$frmdb = new FrmDb();
$frmdb->uninstall();
//disable the plugin and redirect after uninstall so the tables don't get added right back
deactivate_plugins(FrmAppHelper::plugin_folder() . '/formidable.php', false, false);
echo esc_url_raw(admin_url('plugins.php?deactivate=true'));
} else {
$frm_settings = FrmAppHelper::get_settings();
wp_die($frm_settings->admin_permission);
}
wp_die();
}
示例3: uninstall
public static function uninstall()
{
FrmAppHelper::permission_check('administrator');
check_ajax_referer('frm_ajax', 'nonce');
$frmdb = new FrmDb();
$frmdb->uninstall();
//disable the plugin and redirect after uninstall so the tables don't get added right back
deactivate_plugins(FrmAppHelper::plugin_folder() . '/formidable.php', false, false);
echo esc_url_raw(admin_url('plugins.php?deactivate=true'));
wp_die();
}