本文整理汇总了PHP中Dashboard::get_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashboard::get_instance方法的具体用法?PHP Dashboard::get_instance怎么用?PHP Dashboard::get_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dashboard
的用法示例。
在下文中一共展示了Dashboard::get_instance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_upgrade_notice
/**
* Renders Upgrade Notice.
*
*/
public function render_upgrade_notice()
{
if ($this->type == 'theme') {
$icon = file_exists(get_template_directory() . '/static/images/icon.png') ? get_template_directory_uri() . '/static/images/icon.png' : false;
} else {
$icon = file_exists($this->path('static/images/icon.png', 'dir')) ? $this->path('static/images/icon.png', 'url') : false;
}
ob_start();
$vars = apply_filters('ud::bootstrap::upgrade_notice::vars', array('content' => false, 'icon' => $icon, 'name' => $this->name, 'type' => $this->type, 'dashboard_link' => admin_url('index.php?page=' . Dashboard::get_instance()->page_slug . '&slug=' . $this->slug), 'dismiss_link' => admin_url('index.php?page=' . Dashboard::get_instance()->page_slug . '&slug=' . $this->slug . '&dismiss=1'), 'home_link' => !empty($this->schema['homepage']) ? $this->schema['homepage'] : false));
extract($vars);
require dirname(dirname(__DIR__)) . '/static/views/install_notice.php';
$content = ob_get_clean();
echo apply_filters('ud::bootstrap::upgrade_notice::template', $content, $this->slug, $vars);
}