本文整理汇总了PHP中YIT_Upgrade函数的典型用法代码示例。如果您正苦于以下问题:PHP YIT_Upgrade函数的具体用法?PHP YIT_Upgrade怎么用?PHP YIT_Upgrade使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了YIT_Upgrade函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register_plugin_for_updates
/**
* Register plugins for update tab
*
* @return void
* @since 1.0.0
* @author Andrea Grillo <andrea.grillo@yithemes.com>
*/
public function register_plugin_for_updates()
{
if (!class_exists('YIT_Upgrade')) {
require_once 'plugin-fw/lib/yit-upgrade.php';
}
YIT_Upgrade()->register(YWCPS_SLUG, YWCPS_INIT);
}
示例2: licence_after_check
public function licence_after_check()
{
/* === Regenerate Update Plugins Transient === */
YIT_Upgrade()->force_regenerate_update_transient();
}
示例3: __
$title = __('Update Plugin', 'yith-plugin-fw');
$parent_file = 'plugins.php';
$submenu_file = 'plugins.php';
wp_enqueue_script('updates');
require_once ABSPATH . 'wp-admin/admin-header.php';
$nonce = 'upgrade-plugin-multisite_' . $plugin;
$url = 'update.php?action=upgrade-plugin-multisite&plugin=' . urlencode($plugin);
$upgrader = new Plugin_Upgrader(new Plugin_Upgrader_Skin(compact('title', 'nonce', 'url', 'plugin')));
$upgrader->upgrade($plugin);
include ABSPATH . 'wp-admin/admin-footer.php';
}
}
}
if (!function_exists('YIT_Upgrade')) {
/**
* Main instance of plugin
*
* @return object
* @since 1.0
* @author Andrea Grillo <andrea.grillo@yithemes.com>
*/
function YIT_Upgrade()
{
return YIT_Upgrade::instance();
}
}
/**
* Instance a YIT_Upgrade object
*/
YIT_Upgrade();
示例4: update_licence_information
/**
* Update Plugins Information
*
* Send a request to API server to check activate plugins and update the informations
*
* @return void
* @use YIT_Theme_Licence->check()
*
* @since 1.0
* @author Andrea Grillo <andrea.grillo@yithemes.com>
*/
public function update_licence_information()
{
foreach ($this->_products as $init => $info) {
$this->check($init);
}
/* === Regenerate Update Plugins Transient === */
YIT_Upgrade()->force_regenerate_update_transient();
do_action('yit_licence_after_check');
$response['template'] = $this->show_activation_panel();
wp_send_json($response);
}
示例5: update_licence_information
/**
* Update Plugins Information
*
* Send a request to API server to check activate plugins and update the informations
*
* @return void
* @use YIT_Theme_Licence->check()
*
* @since 1.0
* @author Andrea Grillo <andrea.grillo@yithemes.com>
*/
public function update_licence_information()
{
/* Check licence information for alla products */
$this->check_all();
/* === Regenerate Update Plugins Transient === */
YIT_Upgrade()->force_regenerate_update_transient();
do_action('yit_licence_after_check');
if ($this->is_ajax()) {
$response['template'] = $this->show_activation_panel();
wp_send_json($response);
}
}