本文整理汇总了PHP中MainWP_Utility::showUserTip方法的典型用法代码示例。如果您正苦于以下问题:PHP MainWP_Utility::showUserTip方法的具体用法?PHP MainWP_Utility::showUserTip怎么用?PHP MainWP_Utility::showUserTip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWP_Utility
的用法示例。
在下文中一共展示了MainWP_Utility::showUserTip方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderHeader
/**
* @param string $shownPage The page slug shown at this moment
*/
public static function renderHeader($shownPage)
{
?>
<div class="wrap">
<a href="https://mainwp.com" id="mainwplogo" title="MainWP" target="_blank"><img
src="<?php
echo plugins_url('images/logo.png', dirname(__FILE__));
?>
" height="50"
alt="MainWP"/></a>
<h2><i class="fa fa-cogs"></i> <?php
_e('MainWP Settings', 'mainwp');
?>
</h2>
<div style="clear: both;"></div><br/>
<div id="mainwp-tip-zone">
<?php
if ($shownPage == '') {
?>
<?php
if (MainWP_Utility::showUserTip('mainwp-settings-tips')) {
?>
<div class="mainwp-tips mainwp_info-box-blue">
<span class="mainwp-tip" id="mainwp-settings-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
_e('The majority of these default settings can also be tweaked on the Site level by visiting Manage Sites → Edit Site.', 'mainwp');
?>
</span><span><a href="#" class="mainwp-dismiss"><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span></div>
<?php
}
?>
<?php
}
?>
<?php
if ($shownPage == 'OfflineChecks') {
?>
<?php
if (MainWP_Utility::showUserTip('mainwp-aumrecommend-tips')) {
?>
<div class="mainwp-tips mainwp_info-box-blue">
<span class="mainwp-tip" id="mainwp-aumrecommend-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
echo sprintf(__('We currently recommend the free %sAdvanced Uptime Monitor Extension%s to perform more frequent tests.', 'mainwp'), '<a href="https://mainwp.com/extension/advanced-uptime-monitor/" target="_blank">', '</a>');
?>
</span><span><a href="#" class="mainwp-dismiss"><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span></div>
<?php
}
?>
<?php
}
?>
</div>
<div class="mainwp-tabs" id="mainwp-tabs">
<a class="nav-tab pos-nav-tab <?php
if ($shownPage === '') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=Settings"><?php
_e('Global Options', 'mainwp');
?>
</a>
<a style="float: right" class="mainwp-help-tab nav-tab pos-nav-tab <?php
if ($shownPage === 'SettingsHelp') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=SettingsHelp"><?php
_e('Help', 'mainwp');
?>
</a>
<?php
if (isset(self::$subPages) && is_array(self::$subPages)) {
foreach (self::$subPages as $subPage) {
?>
<a class="nav-tab pos-nav-tab <?php
if ($shownPage === $subPage['slug']) {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=Settings<?php
echo $subPage['slug'];
?>
"><?php
echo $subPage['title'];
?>
//.........这里部分代码省略.........
示例2: renderHeader
/**
* @param string $shownPage The page slug shown at this moment
*/
public static function renderHeader($shownPage)
{
?>
<div class="wrap">
<a href="https://mainwp.com" id="mainwplogo" title="MainWP" target="_blank"><img src="<?php
echo plugins_url('images/logo.png', dirname(__FILE__));
?>
" height="50" alt="MainWP"/></a>
<h2><i class="fa fa-paint-brush"></i> <?php
_e('Themes', 'mainwp');
?>
</h2>
<div style="clear: both;"></div><br/>
<div id="mainwp-tip-zone">
<?php
if ($shownPage == 'Manage') {
?>
<?php
if (MainWP_Utility::showUserTip('mainwp-managethemes-tips')) {
?>
<div class="mainwp-tips mainwp_info-box-blue">
<span class="mainwp-tip" id="mainwp-managethemes-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
_e('You can also quickly activate and deactivate installed Themes for a single site from your Individual Site Dashboard Theme widget by visiting Sites → Manage Sites → Child Site → Dashboard.', 'mainwp');
?>
</span><span><a href="#" class="mainwp-dismiss"><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span></div>
<?php
}
?>
<?php
}
?>
<?php
if ($shownPage == 'Install') {
?>
<?php
if (MainWP_Utility::showUserTip('mainwp-installthemes-tips')) {
?>
<div class="mainwp-tips mainwp_info-box-blue">
<span class="mainwp-tip" id="mainwp-installthemes-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
_e('If you check the "Overwrite Existing" option while installing a theme you can easily update or rollback the theme on your child sites.', 'mainwp');
?>
</span><span><a href="#" class="mainwp-dismiss"><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span></div>
<?php
}
?>
<?php
}
?>
</div>
<div class="mainwp-tabs" id="mainwp-tabs">
<a class="nav-tab pos-nav-tab <?php
if ($shownPage == 'Manage') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=ThemesManage"><?php
_e('Manage', 'mainwp');
?>
</a>
<?php
if (mainwp_current_user_can('dashboard', 'install_themes')) {
?>
<a class="nav-tab pos-nav-tab <?php
if ($shownPage == 'Install') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=ThemesInstall"><?php
_e('Install', 'mainwp');
?>
</a>
<?php
}
?>
<a class="nav-tab pos-nav-tab <?php
if ($shownPage == 'AutoUpdate') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=ThemesAutoUpdate"><?php
_e('Auto Updates', 'mainwp');
?>
</a>
<a class="nav-tab pos-nav-tab <?php
if ($shownPage == 'Ignore') {
//.........这里部分代码省略.........
示例3: on_show_page
function on_show_page()
{
if (!mainwp_current_user_can('dashboard', 'access_global_dashboard')) {
mainwp_do_not_have_permissions(__('global dashboard', 'mainwp'));
return;
}
global $screen_layout_columns;
?>
<div id="mainwp_tab-general" class="wrap">
<a href="https://mainwp.com" id="mainwplogo" title="MainWP" target="_blank"><img src="<?php
echo plugins_url('images/logo.png', dirname(__FILE__));
?>
" height="50" alt="MainWP"/></a>
<h2><i class="fa fa-tachometer"></i> <?php
_e('MainWP Dashboard', 'mainwp');
?>
</h2>
<div style="clear: both;"></div>
<br/><br/>
<?php
if (MainWP_Utility::showUserTip('mainwp-dashboard-tips')) {
?>
<div id="mainwp-tip-zone">
<div class="mainwp-tips mainwp_info-box-blue">
<span class="mainwp-tip" id="mainwp-dashboard-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
_e('You can move the Widgets around to fit your needs and even adjust the number of columns by selecting "Screen Options" on the top right.', 'mainwp');
?>
</span><span><a href="#" class="mainwp-dismiss"><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span></div>
</div>
<?php
}
?>
<?php
$websites = MainWP_DB::Instance()->query(MainWP_DB::Instance()->getSQLWebsitesForCurrentUser(false, null, 'wp_sync.dtsSync DESC, wp.url ASC'));
self::renderDashboardBody($websites, $this->dashBoard, $screen_layout_columns);
@MainWP_DB::free_result($websites);
?>
</div>
<?php
}
示例4: renderHeader
/**
* @param string $shownPage The page slug shown at this moment
*/
public static function renderHeader($shownPage)
{
?>
<div class="wrap">
<a href="https://mainwp.com" id="mainwplogo" title="MainWP" target="_blank"><img src="<?php
echo plugins_url('images/logo.png', dirname(__FILE__));
?>
" height="50" alt="MainWP"/></a>
<h2><i class="fa fa-file-text"></i> <?php
_e('Posts', 'mainwp');
?>
</h2>
<div style="clear: both;"></div><br/>
<div id="mainwp-tip-zone">
<?php
if ($shownPage == 'BulkManage') {
?>
<?php
if (MainWP_Utility::showUserTip('mainwp-manageposts-tips')) {
?>
<div class="mainwp-tips mainwp_info-box-blue"><span class="mainwp-tip" id="mainwp-manageposts-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
_e('You can also quickly see all Published, Draft, Pending and Trash Posts for a single site from your Individual Site Dashboard Recent Posts widget by visiting Sites → Manage Sites → Child Site → Dashboard.', 'mainwp');
?>
</span><span><a href="#" class="mainwp-dismiss"><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span></div>
<?php
}
?>
<?php
}
?>
</div>
<div class="mainwp-tabs" id="mainwp-tabs">
<?php
if (mainwp_current_user_can('dashboard', 'manage_posts')) {
?>
<a class="nav-tab pos-nav-tab <?php
if ($shownPage === 'BulkManage') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=PostBulkManage"><?php
_e('Manage', 'mainwp');
?>
</a>
<a class="nav-tab pos-nav-tab <?php
if ($shownPage === 'BulkAdd') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=PostBulkAdd"><?php
_e('Add New', 'mainwp');
?>
</a>
<?php
}
?>
<a style="float: right" class="mainwp-help-tab nav-tab pos-nav-tab <?php
if ($shownPage === 'PostsHelp') {
echo 'nav-tab-active';
}
?>
" href="admin.php?page=PostsHelp"><?php
_e('Help', 'mainwp');
?>
</a>
<?php
if (isset(self::$subPages) && is_array(self::$subPages)) {
foreach (self::$subPages as $subPage) {
if (isset($subPage['tab_link_hidden']) && $subPage['tab_link_hidden'] == true) {
$tab_link = '#';
} else {
$tab_link = 'admin.php?page=Post' . $subPage['slug'];
}
?>
<a class="nav-tab pos-nav-tab <?php
if ($shownPage === $subPage['slug']) {
echo 'nav-tab-active';
}
?>
" href="<?php
echo $tab_link;
?>
"><?php
echo $subPage['title'];
?>
</a>
<?php
}
}
?>
<div class="clear"></div>
//.........这里部分代码省略.........
示例5: renderHeader
public static function renderHeader($shownPage, &$subPages)
{
if ($shownPage == '') {
$shownPage = 'ManageSites';
}
$site_id = 0;
if (isset($_GET['id']) && !empty($_GET['id'])) {
$site_id = $_GET['id'];
} else {
if (isset($_GET['backupid']) && !empty($_GET['backupid'])) {
$site_id = $_GET['backupid'];
} else {
if (isset($_GET['dashboard']) && !empty($_GET['dashboard'])) {
$site_id = $_GET['dashboard'];
} else {
if (isset($_GET['scanid']) && !empty($_GET['scanid'])) {
$site_id = $_GET['scanid'];
}
}
}
}
$managesites_pages = array('ManageSites' => array('href' => 'admin.php?page=managesites', 'title' => __('Manage', 'mainwp'), 'access' => true), 'AddNew' => array('href' => 'admin.php?page=managesites&do=new', 'title' => __('Add New', 'mainwp'), 'access' => mainwp_current_user_can('dashboard', 'add_sites')), 'Test' => array('href' => 'admin.php?page=managesites&do=test', 'title' => __('Test Connection', 'mainwp'), 'access' => mainwp_current_user_can('dashboard', 'test_connection')), 'ManageGroups' => array('href' => 'admin.php?page=ManageGroups', 'title' => __('Groups', 'mainwp'), 'access' => true));
$site_pages = array('ManageSitesDashboard' => array('href' => 'admin.php?page=managesites&dashboard=' . $site_id, 'title' => __('Dashboard', 'mainwp'), 'access' => mainwp_current_user_can('dashboard', 'access_individual_dashboard')), 'ManageSitesEdit' => array('href' => 'admin.php?page=managesites&id=' . $site_id, 'title' => __('Edit', 'mainwp'), 'access' => mainwp_current_user_can('dashboard', 'edit_sites')), 'ManageSitesBackups' => array('href' => 'admin.php?page=managesites&backupid=' . $site_id, 'title' => __('Backups', 'mainwp'), 'access' => mainwp_current_user_can('dashboard', 'execute_backups')), 'SecurityScan' => array('href' => 'admin.php?page=managesites&scanid=' . $site_id, 'title' => __('Security Scan', 'mainwp'), 'access' => true));
global $mainwpUseExternalPrimaryBackupsMethod;
if (!empty($mainwpUseExternalPrimaryBackupsMethod)) {
unset($site_pages['ManageSitesBackups']);
}
$breadcrumd = '';
if ($shownPage != 'SitesHelp' && !isset($managesites_pages[$shownPage])) {
$breadcrumd = self::getBreadcrumb($shownPage, $subPages);
}
?>
<div class="wrap">
<a href="https://mainwp.com" id="mainwplogo" title="MainWP" target="_blank">
<img src="<?php
echo plugins_url('images/logo.png', dirname(__FILE__));
?>
" height="50" alt="MainWP"/>
</a>
<h2><i class="fa fa-globe"></i> <?php
_e('Sites', 'mainwp');
?>
</h2>
<div style="clear: both;"></div>
<br/>
<div id="mainwp-tip-zone">
<?php
if ($shownPage == '') {
?>
<?php
if (MainWP_Utility::showUserTip('mainwp-managesites-tips')) {
?>
<div class="mainwp-tips mainwp_info-box-blue">
<span class="mainwp-tip" id="mainwp-managesites-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
_e('You can show more or less information per row by selecting "Screen Options" on the top right.', 'mainwp');
?>
</span>
<span><a href="#" class="mainwp-dismiss" ><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span>
</div>
<?php
}
?>
<?php
}
?>
<?php
if ($shownPage == 'ManageSitesDashboard') {
?>
<?php
if (MainWP_Utility::showUserTip('mainwp-managesitesdashboard-tips')) {
?>
<div class="mainwp-tips mainwp_info-box-blue">
<span class="mainwp-tip" id="mainwp-managesitesdashboard-tips"><strong><?php
_e('MainWP Tip', 'mainwp');
?>
: </strong><?php
_e('You can move the Widgets around to fit your needs and even adjust the number of columns by selecting "Screen Options" on the top right.', 'mainwp');
?>
</span>
<span><a href="#" class="mainwp-dismiss" ><i class="fa fa-times-circle"></i> <?php
_e('Dismiss', 'mainwp');
?>
</a></span>
</div>
<?php
}
?>
<?php
}
?>
</div>
<div class="mainwp-tabs" id="mainwp-tabs">
//.........这里部分代码省略.........