本文整理汇总了PHP中GFAddOn::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP GFAddOn::setup方法的具体用法?PHP GFAddOn::setup怎么用?PHP GFAddOn::setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFAddOn
的用法示例。
在下文中一共展示了GFAddOn::setup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setup
protected function setup()
{
parent::setup();
//upgrading Feed Add-On base class
$installed_version = get_option("gravityformsaddon_feed-base_version");
//if ($installed_version != $this->_feed_version)
//$this->upgrade_base($installed_version);
//update_option("gravityformsaddon_feed-base_version", $this->_feed_version);
}
示例2: setup
protected function setup()
{
//upgrading Feed Add-On base class
$installed_version = get_option('gravityformsaddon_feed-base_version');
if ($installed_version != $this->_feed_version) {
$this->upgrade_base($installed_version);
}
update_option('gravityformsaddon_feed-base_version', $this->_feed_version);
parent::setup();
}
示例3: setup
/**
* Performs upgrade tasks when the version of the Add-On changes. To add additional upgrade tasks, override the upgrade() function, which will only get executed when the plugin version has changed.
*/
public function setup()
{
global $wpdb;
$table_name = $wpdb->prefix . 'gf_addon_feed';
// upgrading Feed Add-On base class
$installed_version = get_option('gravityformsaddon_feed-base_version');
if ($installed_version != $this->_feed_version || isset($_GET['setup']) && $this->is_plugin_settings() && !$this->table_exists($table_name)) {
$this->upgrade_base($installed_version);
update_option('gravityformsaddon_feed-base_version', $this->_feed_version);
}
parent::setup();
}
示例4: setup
protected function setup()
{
global $wpdb;
$table_name = $wpdb->prefix . 'gf_addon_feed';
//upgrading Feed Add-On base class
$installed_version = get_option('gravityformsaddon_feed-base_version');
if ($installed_version != $this->_feed_version || !$this->table_exists($table_name)) {
$this->upgrade_base($installed_version);
update_option('gravityformsaddon_feed-base_version', $this->_feed_version);
}
parent::setup();
}