本文整理汇总了PHP中YIT_Plugin_Licence函数的典型用法代码示例。如果您正苦于以下问题:PHP YIT_Plugin_Licence函数的具体用法?PHP YIT_Plugin_Licence怎么用?PHP YIT_Plugin_Licence使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了YIT_Plugin_Licence函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register_plugin_for_activation
/**
* Register plugins for activation tab
*
* @return void
* @since 1.0.0
* @author Andrea Grillo <andrea.grillo@yithemes.com>
*/
public function register_plugin_for_activation()
{
if (!class_exists('YIT_Plugin_Licence')) {
require_once 'plugin-fw/licence/lib/yit-licence.php';
require_once 'plugin-fw/licence/lib/yit-plugin-licence.php';
}
YIT_Plugin_Licence()->register(YWCPS_INIT, YWCPS_SECRET_KEY, YWCPS_SLUG);
}
示例2: plugin_update_row
/**
* Add the plugin update row in plugin page
*
* @return void
* @fire "in_theme_update_message-{$init}" action
*
* @since 1.0
* @see after_plugin_row_{$init} action
* @author Andrea Grillo <andrea.grillo@yithemes.com>
*/
public function plugin_update_row()
{
$current = get_site_transient('update_plugins');
$init = str_replace('after_plugin_row_', '', current_filter());
if (!isset($current->response[$init])) {
return false;
}
/**
* stdClass Object
*/
$r = $current->response[$init];
$changelog_id = str_replace(array('/', '.php', '.'), array('-', '', '-'), $init);
$details_url = '#TB_inline' . esc_url(add_query_arg(array('width' => 722, 'height' => 914, 'inlineId' => $changelog_id), ''));
/**
* @see wp_plugin_update_rows() in wp-single\wp-admin\includes\update.php
*/
$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
if (is_network_admin() || !is_multisite() || true) {
echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
if (!current_user_can('update_plugins')) {
printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button" title="%3$s">View version %4$s details</a>.', 'yith-plugin-fw'), $this->_plugins[$init]['info']['Name'], esc_url($details_url), esc_attr($this->_plugins[$init]['info']['Name']), $r->new_version);
} elseif (is_plugin_active_for_network($init)) {
printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button" title="%3$s">View version %4$s details</a>. <em>You have to activate the plugin on a single site of the network to benefit from automatic updates.</em>', 'yith-plugin-fw'), $this->_plugins[$init]['info']['Name'], esc_url($details_url), esc_attr($this->_plugins[$init]['info']['Name']), $r->new_version);
} elseif (empty($r->package)) {
printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin, please <a href="%5$s" title="License activation">activate</a> your copy of %6s.</em>', 'yith-plugin-fw'), $this->_plugins[$init]['info']['Name'], esc_url($details_url), esc_attr($this->_plugins[$init]['info']['Name']), $r->new_version, YIT_Plugin_Licence()->get_licence_activation_page_url(), $this->_plugins[$init]['info']['Name']);
} else {
printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.', 'yith-plugin-fw'), $this->_plugins[$init]['info']['Name'], esc_url($details_url), esc_attr($this->_plugins[$init]['info']['Name']), $r->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $init, 'upgrade-plugin_' . $init));
}
/**
* Fires at the end of the update message container in each
* row of the themes list table.
*
* The dynamic portion of the hook name, `$theme_key`, refers to
* the theme slug as found in the WordPress.org themes repository.
*
* @since Wordpress 3.1.0
* }
*/
do_action("in_theme_update_message-{$init}", $this->_plugins[$init], $r->changelog, $changelog_id);
echo '</div></td></tr>';
}
}