本文整理汇总了PHP中GFAddOn::display_plugin_message方法的典型用法代码示例。如果您正苦于以下问题:PHP GFAddOn::display_plugin_message方法的具体用法?PHP GFAddOn::display_plugin_message怎么用?PHP GFAddOn::display_plugin_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFAddOn
的用法示例。
在下文中一共展示了GFAddOn::display_plugin_message方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rg_plugin_row
public function rg_plugin_row()
{
if (!$this->_is_gravityforms_supported) {
$message = sprintf(esc_html__('Gravity Forms %s is required. Activate it now or %spurchase it today!%s', 'gravityforms'), $this->_min_gravityforms_version, "<a href='http://www.gravityforms.com'>", '</a>');
GFAddOn::display_plugin_message($message, true);
} else {
$version_info = $this->get_version_info($this->_slug);
if (!rgar($version_info, 'is_valid_key')) {
$title = $this->_title;
if (version_compare($this->_version, $version_info['version'], '<')) {
$new_version = sprintf(esc_html__('There is a new version of %s available.', 'gravityforms'), $title) . sprintf(' <a class="thickbox" title="%s" href="plugin-install.php?tab=plugin-information&plugin=%s&TB_iframe=true&width=640&height=808">', $title, $this->_slug) . sprintf(esc_html__('View version %s Details', 'gravityforms'), $version_info['version']) . '</a>. ';
} else {
$new_version = '';
}
$message = $new_version . sprintf(esc_html__('%sRegister%s your copy of Gravity Forms to receive access to automatic upgrades and support. Need a license key? %sPurchase one now%s.', 'gravityforms'), '<a href="admin.php?page=gf_settings">', '</a>', '<a href="http://www.gravityforms.com">', '</a>') . '</div></td>';
GFAddOn::display_plugin_message($message);
}
}
}
示例2: display_upgrade_message
private function display_upgrade_message($plugin_name, $plugin_title, $version, $message, $localization_namespace)
{
$upgrade_message = $message . ' <a class="thickbox" title="' . $plugin_title . '" href="plugin-install.php?tab=plugin-information&plugin=' . $plugin_name . '&TB_iframe=true&width=640&height=808">' . sprintf(__('View version %s Details', $localization_namespace), $version) . '</a>. ';
GFAddOn::display_plugin_message($upgrade_message);
}