本文整理汇总了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();
}