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


PHP RGFormsModel::drop_tables方法代码示例

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


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

示例1: tearDown

 public function tearDown()
 {
     parent::tearDown();
     /*
      * Uninstall Gravity Forms
      */
     RGFormsModel::drop_tables();
 }
开发者ID:hirenbhut93,项目名称:gravity-pdf,代码行数:8,代码来源:test-gravity-forms.php

示例2: settings_uninstall_page

    public static function settings_uninstall_page()
    {
        self::page_header(__('Uninstall Gravity Forms', 'gravityforms'), '');
        if (isset($_POST['uninstall'])) {
            if (!GFCommon::current_user_can_any('gravityforms_uninstall') || function_exists('is_multisite') && is_multisite() && !is_super_admin()) {
                die(esc_html__("You don't have adequate permission to uninstall Gravity Forms.", 'gravityforms'));
            }
            //dropping all tables
            RGFormsModel::drop_tables();
            //removing options
            delete_option('rg_form_version');
            delete_option('rg_gforms_key');
            delete_option('rg_gforms_disable_css');
            delete_option('rg_gforms_enable_html5');
            delete_option('rg_gforms_captcha_public_key');
            delete_option('rg_gforms_captcha_private_key');
            delete_option('rg_gforms_message');
            delete_option('gform_enable_noconflict');
            delete_option('gform_enable_background_updates');
            delete_option('gf_dismissed_upgrades');
            delete_option('rg_gforms_currency');
            delete_option('gform_api_count');
            delete_option('gform_email_count');
            //removing gravity forms upload folder
            GFCommon::delete_directory(RGFormsModel::get_upload_root());
            //Deactivating plugin
            $plugin = 'gravityforms/gravityforms.php';
            deactivate_plugins($plugin);
            update_option('recently_activated', array($plugin => time()) + (array) get_option('recently_activated'));
            ?>
			<div class="updated fade" style="padding:20px;"><?php 
            echo sprintf(esc_html__('Gravity Forms has been successfully uninstalled. It can be re-activated from the %splugins page%s.', 'gravityforms'), "<a href='plugins.php'>", '</a>');
            ?>
</div>
			<?php 
            return;
        }
        ?>

		<form action="" method="post">
			<?php 
        if (GFCommon::current_user_can_any('gravityforms_uninstall') && (!function_exists('is_multisite') || !is_multisite() || is_super_admin())) {
            ?>
				<h3><span><i class="fa fa-times"></i> <?php 
            esc_html_e('Uninstall Gravity Forms', 'gravityforms');
            ?>
</span>
				</h3>
				<div class="delete-alert alert_red">

					<h3>
						<i class="fa fa-exclamation-triangle gf_invalid"></i> <?php 
            esc_html_e('Warning', 'gravityforms');
            ?>
					</h3>

					<div class="gf_delete_notice"><strong><?php 
            esc_html_e('This operation deletes ALL Gravity Forms data.', 'gravityforms');
            ?>
</strong> <?php 
            esc_html_e('If you continue, You will not be able to retrieve or restore your forms or entries.', 'gravityforms');
            ?>
				</div>

				<?php 
            $uninstall_button = '<input type="submit" name="uninstall" value="' . esc_attr__('Uninstall Gravity Forms', 'gravityforms') . '" class="button" onclick="return confirm(\'' . esc_js(__("Warning! ALL Gravity Forms data, including form entries will be deleted. This cannot be undone. 'OK' to delete, 'Cancel' to stop", 'gravityforms')) . '\');"/>';
            /**
             * Allows for the modification of the Gravity Forms uninstall button
             *
             * @param string $uninstall_button The HTML of the uninstall button
             */
            echo apply_filters('gform_uninstall_button', $uninstall_button);
            ?>

				</div>
			<?php 
        }
        ?>
		</form>

		<?php 
        self::page_footer();
    }
开发者ID:jordanmaslyn,项目名称:vvv-starter,代码行数:83,代码来源:settings.php

示例3: settings_uninstall_page

    public static function settings_uninstall_page()
    {
        self::page_header(__("Uninstall Gravity Forms", "gravityforms"), "");
        if (isset($_POST["uninstall"])) {
            if (!GFCommon::current_user_can_any("gravityforms_uninstall") || function_exists("is_multisite") && is_multisite() && !is_super_admin()) {
                die(__("You don't have adequate permission to uninstall Gravity Forms.", "gravityforms"));
            }
            //dropping all tables
            RGFormsModel::drop_tables();
            //removing options
            delete_option("rg_form_version");
            delete_option("rg_gforms_key");
            delete_option("rg_gforms_disable_css");
            delete_option("rg_gforms_enable_html5");
            delete_option("rg_gforms_captcha_public_key");
            delete_option("rg_gforms_captcha_private_key");
            delete_option("rg_gforms_message");
            delete_option("gf_dismissed_upgrades");
            delete_option("rg_gforms_currency");
            delete_option("gform_api_count");
            delete_option("gform_email_count");
            //removing gravity forms upload folder
            GFCommon::delete_directory(RGFormsModel::get_upload_root());
            //Deactivating plugin
            $plugin = "gravityforms/gravityforms.php";
            deactivate_plugins($plugin);
            update_option('recently_activated', array($plugin => time()) + (array) get_option('recently_activated'));
            ?>
            <div class="updated fade" style="padding:20px;"><?php 
            echo sprintf(__("Gravity Forms have been successfully uninstalled. It can be re-activated from the %splugins page%s.", "gravityforms"), "<a href='plugins.php'>", "</a>");
            ?>
</div>
            <?php 
            return;
        }
        ?>

    <form action="" method="post">
            <?php 
        if (GFCommon::current_user_can_any("gravityforms_uninstall") && (!function_exists("is_multisite") || !is_multisite() || is_super_admin())) {
            ?>
            <h3><span><i class="fa fa-times"></i> <?php 
            _e("Uninstall Gravity Forms", "gravityforms");
            ?>
</span></h3>
                <div class="delete-alert alert_red">

                    <h3><i class="fa fa-exclamation-triangle gf_invalid"></i> <?php 
            _e("Warning", "gravityforms");
            ?>
</h3>
                    <div class="gf_delete_notice""><strong><?php 
            _e("This operation deletes ALL Gravity Forms data.", "gravityforms");
            ?>
</strong> <?php 
            _e("If you continue, You will not be able to retrieve or restore your forms or entries.", "gravityforms");
            ?>
</div>

                    <?php 
            $uninstall_button = '<input type="submit" name="uninstall" value="' . __("Uninstall Gravity Forms", "gravityforms") . '" class="button" onclick="return confirm(\'' . __("Warning! ALL Gravity Forms data, including form entries will be deleted. This cannot be undone. \\'OK\\' to delete, \\'Cancel\\' to stop", "gravityforms") . '\');"/>';
            echo apply_filters("gform_uninstall_button", $uninstall_button);
            ?>

                </div>
            <?php 
        }
        ?>
        </form>

		<?php 
        self::page_footer();
    }
开发者ID:maverickmediaco,项目名称:truenorthrealtorsny,代码行数:73,代码来源:settings.php

示例4: gravityforms_settings_page

    public static function gravityforms_settings_page()
    {
        global $wpdb;
        if (!GFCommon::ensure_wp_version()) {
            return;
        }
        if (isset($_GET["setup"])) {
            //forcing setup
            RGForms::setup(true);
        }
        if (isset($_POST["submit"])) {
            check_admin_referer('gforms_update_settings', 'gforms_update_settings');
            if (!GFCommon::current_user_can_any("gravityforms_edit_settings")) {
                die(__("You don't have adequate permission to edit settings.", "gravityforms"));
            }
            RGFormsModel::save_key($_POST["gforms_key"]);
            update_option("rg_gforms_disable_css", $_POST["gforms_disable_css"]);
            update_option("rg_gforms_enable_html5", $_POST["gforms_enable_html5"]);
            update_option("rg_gforms_captcha_public_key", $_POST["gforms_captcha_public_key"]);
            update_option("rg_gforms_captcha_private_key", $_POST["gforms_captcha_private_key"]);
            if (!rgempty("gforms_currency")) {
                update_option("rg_gforms_currency", rgpost("gforms_currency"));
            }
            //Updating message because key could have been changed
            GFCommon::cache_remote_message();
            //Re-caching version info
            $version_info = GFCommon::get_version_info(false);
            ?>
            <div class="updated fade" style="padding:6px;">
                <?php 
            _e("Settings Updated", "gravityforms");
            ?>
.
             </div>
             <?php 
        } else {
            if (isset($_POST["uninstall"])) {
                if (!GFCommon::current_user_can_any("gravityforms_uninstall") || function_exists("is_multisite") && is_multisite() && !is_super_admin()) {
                    die(__("You don't have adequate permission to uninstall Gravity Forms.", "gravityforms"));
                }
                //droping all tables
                RGFormsModel::drop_tables();
                //removing options
                delete_option("rg_form_version");
                delete_option("rg_gforms_key");
                delete_option("rg_gforms_disable_css");
                delete_option("rg_gforms_enable_html5");
                delete_option("rg_gforms_captcha_public_key");
                delete_option("rg_gforms_captcha_private_key");
                delete_option("rg_gforms_message");
                delete_option("gf_dismissed_upgrades");
                delete_option("rg_gforms_currency");
                //removing gravity forms upload folder
                GFCommon::delete_directory(RGFormsModel::get_upload_root());
                //Deactivating plugin
                $plugin = "gravityforms/gravityforms.php";
                deactivate_plugins($plugin);
                update_option('recently_activated', array($plugin => time()) + (array) get_option('recently_activated'));
                ?>
            <div class="updated fade" style="padding:20px;"><?php 
                echo sprintf(__("Gravity Forms have been successfully uninstalled. It can be re-activated from the %splugins page%s.", "gravityforms"), "<a href='plugins.php'>", "</a>");
                ?>
</div>
            <?php 
                return;
            }
        }
        if (!isset($version_info)) {
            $version_info = GFCommon::get_version_info();
        }
        ?>
        <form method="post">
            <?php 
        wp_nonce_field('gforms_update_settings', 'gforms_update_settings');
        ?>
            <h3><?php 
        _e("General Settings", "gravityforms");
        ?>
</h3>
            <table class="form-table">
              <tr valign="top">
                   <th scope="row"><label for="gforms_key"><?php 
        _e("Support License Key", "gravityforms");
        ?>
</label>  <?php 
        gform_tooltip("settings_license_key");
        ?>
</th>
                    <td>
                        <?php 
        $key = GFCommon::get_key();
        $key_field = '<input type="password" name="gforms_key" id="gforms_key" style="width:350px;" value="' . $key . '" />';
        if ($version_info["is_valid_key"]) {
            $key_field .= "&nbsp;<img src='" . GFCommon::get_base_url() . "/images/tick.png' class='gf_keystatus_valid' alt='valid key' title='valid key'/>";
        } else {
            if (!empty($key)) {
                $key_field .= "&nbsp;<img src='" . GFCommon::get_base_url() . "/images/cross.png' class='gf_keystatus_invalid' alt='invalid key' title='invalid key'/>";
            }
        }
        echo apply_filters('gform_settings_key_field', $key_field);
//.........这里部分代码省略.........
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:101,代码来源:settings.php

示例5: gravityview_shutdown

function gravityview_shutdown()
{
    RGFormsModel::drop_tables();
}
开发者ID:hansstam,项目名称:makerfaire,代码行数:4,代码来源:bootstrap.php


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