本文整理汇总了PHP中MainWP_Utility::renderToolTip方法的典型用法代码示例。如果您正苦于以下问题:PHP MainWP_Utility::renderToolTip方法的具体用法?PHP MainWP_Utility::renderToolTip怎么用?PHP MainWP_Utility::renderToolTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWP_Utility
的用法示例。
在下文中一共展示了MainWP_Utility::renderToolTip方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderAllThemesTable
//.........这里部分代码省略.........
<tbody id="the-posts-list" class="list:posts">
<?php
foreach ($themes as $slug => $theme) {
$name = $theme['name'];
if (!empty($search_status) && $search_status != 'all') {
if ($search_status == 'trust' && !in_array($slug, $trustedThemes)) {
continue;
} else {
if ($search_status == 'untrust' && in_array($slug, $trustedThemes)) {
continue;
} else {
if ($search_status == 'ignored' && !isset($decodedIgnoredThemes[$slug])) {
continue;
}
}
}
}
?>
<tr id="post-1" class="post-1 post type-post status-publish format-standard hentry category-uncategorized alternate iedit author-self" valign="top" theme_slug="<?php
echo urlencode($slug);
?>
" theme_name="<?php
echo rawurlencode($name);
?>
">
<th scope="row" class="check-column">
<input type="checkbox" name="theme[]" value="<?php
echo urlencode($slug);
?>
"></th>
<td scope="col" id="info_content" class="manage-column" style=""> <?php
if (isset($decodedIgnoredThemes[$slug])) {
MainWP_Utility::renderToolTip('Ignored themes will NOT be auto-updated.', null, 'images/icons/mainwp-red-info-16.png');
}
?>
</td>
<td scope="col" id="theme_content" class="manage-column sorted" style="">
<?php
echo $name;
?>
</td>
<td scope="col" id="plgstatus_content" class="manage-column" style="">
<?php
echo $theme['active'] == 1 ? __('Active', 'mainwp') : __('Inactive', 'mainwp');
?>
</td>
<td scope="col" id="trustlvl_content" class="manage-column" style="">
<?php
if (in_array($slug, $trustedThemes)) {
echo '<font color="#7fb100">Trusted</font>';
} else {
echo '<font color="#c00">Not Trusted</font>';
}
?>
</td>
<td scope="col" id="ignoredstatus_content" class="manage-column" style="">
<?php
if (isset($decodedIgnoredThemes[$slug])) {
echo '<font color="#c00">Ignored</font>';
}
?>
</td>
<td scope="col" id="notes_content" class="manage-column" style="">
<img src="<?php
echo plugins_url('images/notes.png', dirname(__FILE__));
示例2: renderMainWPTools
public static function renderMainWPTools()
{
if (!mainwp_current_user_can('dashboard', 'manage_dashboard_settings')) {
mainwp_do_not_have_permissions(__('manage dashboard settings', 'mainwp'));
return;
}
$wp_menu_items = array('dashboard' => __('Dashboard', 'mainwp'), 'posts' => __('Posts', 'mainwp'), 'media' => __('Media', 'mainwp'), 'pages' => __('Pages', 'mainwp'), 'appearance' => __('Appearance', 'mainwp'), 'comments' => __('Comments', 'mainwp'), 'users' => __('Users', 'mainwp'), 'tools' => __('Tools', 'mainwp'));
$hide_menus = get_option('mwp_setup_hide_wp_menus');
if (!is_array($hide_menus)) {
$hide_menus = array();
}
self::renderHeader('MainWPTools');
?>
<form method="POST" action="">
<div class="postbox" id="mainwp-tools">
<h3 class="mainwp_box_title">
<span><i class="fa fa-wrench"></i> <?php
_e('MainWP Tools', 'mainwp');
?>
</span></h3>
<div class="inside">
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php
_e('Force Dashboard to Establish New Connection', 'mainwp');
?>
<?php
MainWP_Utility::renderToolTip(__('Use this option to establish new connection with child sites.', 'mainwp'));
?>
</th>
<td>
<input type="submit" name="" id="force-destroy-sessions-button" class="button-primary button" value="<?php
esc_attr_e('Establish New Connection', 'mainwp');
?>
"/><br/>
<em>
<?php
_e('Forces your Dashboard to reconnect with your Child sites. This feature will log out any currently logged in users on the Child sites and require them to re-log in. Only needed if suggested by MainWP Support.', 'mainwp');
?>
</em>
</td>
</tr>
<tr>
<th scope="row"><?php
_e('Scan child sites for known issues', 'mainwp');
?>
<?php
MainWP_Utility::renderToolTip(__('Use this option to scan child sites for known issues.', 'mainwp'));
?>
</th>
<td>
<a href="<?php
echo admin_url('admin.php?page=MainWP_Child_Scan');
?>
" class="button-primary button"><?php
_e('Scan', 'mainwp');
?>
</a><br/>
<em>
<?php
_e('Scans each site individually for known issues.', 'mainwp');
?>
</em>
</td>
</tr>
<tr>
<th scope="row"><?php
_e('MainWP Quick Setup', 'mainwp');
?>
</th>
<td>
<a href="admin.php?page=mainwp-setup" class="button-primary button"/><?php
_e('Start Quick Setup', 'mainwp');
?>
</a><br/>
<em>
<?php
_e('MainWP Quick Setup allows you to quickly set your MainWP Dashboard preferences.', 'mainwp');
?>
</em>
</td>
</tr>
</tbody>
</table>
<div class="mainwp_info-box"><?php
_e('Changing this settings will overwrite Clean & Lock Extension settings. Do not forget to migrate the settings you wish to keep.', 'mainwp');
?>
</div>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php
_e('Hide WP Menus', 'mainwp');
?>
</th>
<td>
<ul class="mainwp_checkboxes mainwp_hide_wpmenu_checkboxes">
<?php
//.........这里部分代码省略.........
示例3: renderAllSites
//.........这里部分代码省略.........
_e('Daily', 'mainwp');
?>
<input type="radio" name="offline_checks" id="check_weekly" value="weekly"
<?php
echo $website->offline_checks == 'weekly' ? 'checked="true"' : '';
?>
/>
Weekly
<span class="mainwp-form_hint-display"><?php
_e('Notifications are sent to:', 'mainwp');
?>
<?php
echo MainWP_Utility::getNotificationEmail();
?>
(<?php
_e('this address can be changed', 'mainwp');
?>
<a
href="<?php
echo get_admin_url();
?>
admin.php?page=Settings"><?php
_e('here', 'mainwp');
?>
</a>)</span>
</td>
</tr>
<tr>
<th scope="row"><?php
_e('Client Plugin Folder Option', 'mainwp');
?>
<?php
MainWP_Utility::renderToolTip('Default, files/folders on the child site are viewable.<br />Hidden, when attempting to view files a 404 file will be returned, however a footprint does still exist.<br /><strong>Hiding the Child Plugin does require the plugin to make changes to your .htaccess file that in rare instances or server configurations could cause problems.</strong>');
?>
</th>
<td>
<div class="mainwp-radio" style="float: left;">
<input type="radio" value="" name="mainwp_options_footprint_plugin_folder" id="mainwp_options_footprint_plugin_folder_global" <?php
echo $pluginDir == '' ? 'checked="true"' : '';
?>
"/>
<label for="mainwp_options_footprint_plugin_folder_global"></label>
</div>Global Setting (<a href="<?php
echo admin_url('admin.php?page=Settings#network-footprint');
?>
">Change Here</a>)<br/>
<div class="mainwp-radio" style="float: left;">
<input type="radio" value="default" name="mainwp_options_footprint_plugin_folder" id="mainwp_options_footprint_plugin_folder_default" <?php
echo $pluginDir == 'default' ? 'checked="true"' : '';
?>
"/>
<label for="mainwp_options_footprint_plugin_folder_default"></label>
</div>Default<br/>
<div class="mainwp-radio" style="float: left;">
<input type="radio" value="hidden" name="mainwp_options_footprint_plugin_folder" id="mainwp_options_footprint_plugin_folder_hidden" <?php
echo $pluginDir == 'hidden' ? 'checked="true"' : '';
?>
/>
<label for="mainwp_options_footprint_plugin_folder_hidden"></label>
</div>Hidden (<strong>Note: </strong><i>If the heatmap is turned on, the heatmap javascript will still be visible.</i>) <br/>
</td>
</tr>
<tr>
<th scope="row"><?php
_e('Require Backup Before Upgrade', 'mainwp');
示例4: renderSettings
public static function renderSettings()
{
$userExtension = MainWP_DB::Instance()->getUserExtension();
$onlineNotifications = $userExtension == null || ($userExtension->offlineChecksOnlineNotification == null || $userExtension->offlineChecksOnlineNotification == '') ? '0' : $userExtension->offlineChecksOnlineNotification;
?>
<div class="postbox" id="mainwp-offline-check-options-settings">
<h3 class="mainwp_box_title">
<span><i class="fa fa-cog"></i> <?php
_e('Offline Check Options', 'mainwp');
?>
</span></h3>
<div class="inside">
<div class="mainwp_info-box-red">
<strong>IMPORTANT:</strong> This feature is being retired and replaced by the Free MainWP Advanced Uptime Monitor Extension which provides more advanced monitoring system.<br/>
<a href="https://mainwp.com/extension/advanced-uptime-monitor/">Get the Free MainWP Advanced Uptime Monitor Extension here!</a>
</div>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php
_e('Online Notifications', 'mainwp');
?>
<?php
MainWP_Utility::renderToolTip(__('Network will monitor your sites for downtime and uptime. By default emails are only sent when your site is down.', 'mainwp'));
?>
</th>
<td>
<div class="mainwp-checkbox">
<input type="checkbox" name="mainwp_options_offlinecheck_onlinenotification"
id="mainwp_options_offlinecheck_onlinenotification" <?php
echo $onlineNotifications == 1 ? 'checked="true"' : '';
?>
/>
<label for="mainwp_options_offlinecheck_onlinenotification"></label>
</div><?php
_e('Enable notifications even when the website is online', 'mainwp');
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<?php
}
示例5: renderRow
protected static function renderRow($pConfig, $pCompare, $pVersion, $pGetter, $pExtraText = '', $pExtraCompare = null, $pExtraVersion = null, $toolTip = null, $whatType = null, $errorType = self::WARNING)
{
$currentVersion = call_user_func(array(MainWP_Server_Information::getClassName(), $pGetter));
?>
<tr>
<td class="mwp-not-generate-row"><?php
if ($toolTip != null) {
?>
<a href="http://docs.mainwp.com/child-site-issues/" target="_blank"> <?php
MainWP_Utility::renderToolTip($toolTip);
?>
</a><?php
}
?>
</td>
<td><?php
echo $pConfig;
?>
</td>
<td><?php
echo $pCompare;
echo ($pVersion === true ? 'true' : (is_array($pVersion) && isset($pVersion['version']) ? $pVersion['version'] : $pVersion)) . ' ' . $pExtraText;
?>
</td>
<td><?php
echo $currentVersion === true ? 'true' : $currentVersion;
?>
</td>
<?php
if ($whatType == 'filesize') {
?>
<td><?php
echo self::filesize_compare($currentVersion, $pVersion, $pCompare) ? '<span class="mainwp-pass"><i class="fa fa-check-circle"></i> Pass</span>' : self::getWarningHTML($errorType);
?>
</td>
<?php
} else {
if ($whatType == 'curlssl') {
?>
<td><?php
echo self::curlssl_compare($pVersion, $pCompare) ? '<span class="mainwp-pass"><i class="fa fa-check-circle"></i> Pass</span>' : self::getWarningHTML($errorType);
?>
</td>
<?php
} else {
if ($pGetter == 'getMaxInputTime' && $currentVersion == -1) {
?>
<td><?php
echo '<span class="mainwp-pass"><i class="fa fa-check-circle"></i> Pass</span>';
?>
</td>
<?php
} else {
?>
<td><?php
echo version_compare($currentVersion, $pVersion, $pCompare) || $pExtraCompare != null && version_compare($currentVersion, $pExtraVersion, $pExtraCompare) ? '<span class="mainwp-pass"><i class="fa fa-check-circle"></i> Pass</span>' : self::getWarningHTML($errorType);
?>
</td>
<?php
}
}
}
?>
</tr>
<?php
}
示例6: renderSites
//.........这里部分代码省略.........
<?php
}
?>
</span>
</div>
<?php
}
?>
</div>
<?php
}
}
?>
</div>
</div>
<?php
//WP plugin Abandoned!
?>
<div class="clear">
<div class="mainwp-row">
<span class="mainwp-left-col">
<a href="#" id="mainwp_plugins_outdate_show" onClick="return rightnow_show('plugins_outdate', true);">
<span class="mainwp-rightnow-number"><?php
echo $total_plugins_outdate;
?>
</span> <?php
echo _n('Plugin', 'Plugins', $total_plugins_outdate, 'mainwp');
?>
<?php
_e('Possibly Abandoned', 'mainwp');
?>
</a> <?php
MainWP_Utility::renderToolTip(__('This feature checks the last updated status of plugins and alerts you if not updated in a specific amount of time. This gives you insight on if a plugin may have been abandoned by the author.', 'mainwp'), 'http://docs.mainwp.com/what-does-possibly-abandoned-mean/', 'images/info.png', 'float: none !important;');
?>
</span>
<span class="mainwp-mid-col"><a href="<?php
echo admin_url('admin.php?page=PluginsIgnoredAbandoned');
?>
"><?php
_e('Ignored', 'mainwp');
?>
(<?php
echo $total_pluginsIgnoredAbandoned;
?>
)</a></span>
<span class="mainwp-right-col"></span>
</div>
<div id="wp_plugins_outdate" style="display: none">
<?php
$str_format = __('Last Updated %s Days Ago', 'mainwp');
if ($userExtension->site_view == 1) {
@MainWP_DB::data_seek($websites, 0);
while ($websites && ($website = @MainWP_DB::fetch_object($websites))) {
$plugins_outdate = json_decode(MainWP_DB::Instance()->getWebsiteOption($website, 'plugins_outdate_info'), true);
if (!is_array($plugins_outdate)) {
$plugins_outdate = array();
}
if (count($plugins_outdate) > 0) {
$pluginsOutdateDismissed = json_decode(MainWP_DB::Instance()->getWebsiteOption($website, 'plugins_outdate_dismissed'), true);
if (is_array($pluginsOutdateDismissed)) {
$plugins_outdate = array_diff_key($plugins_outdate, $pluginsOutdateDismissed);
}
if (is_array($decodedDismissedPlugins)) {
$plugins_outdate = array_diff_key($plugins_outdate, $decodedDismissedPlugins);
}
示例7: usersSearchHandlerRenderer
protected static function usersSearchHandlerRenderer($users, $website)
{
$return = 0;
foreach ($users as $user) {
ob_start();
?>
<tr id="user-1" class="alternate">
<th scope="row" class="check-column"><input type="checkbox" name="user[]" value="1"></th>
<td class="username column-username">
<input class="userId" type="hidden" name="id" value="<?php
echo $user['id'];
?>
"/>
<input class="userName" type="hidden" name="name" value="<?php
echo $user['login'];
?>
"/>
<input class="websiteId" type="hidden" name="id"
value="<?php
echo $website->id;
?>
"/>
<?php
if (isset($user['avatar'])) {
echo $user['avatar'];
}
?>
<strong><abbr title="<?php
echo $user['login'];
?>
"><?php
echo $user['login'];
?>
</abbr></strong>
<div class="row-actions">
<span class="edit"><a
href="admin.php?page=SiteOpen&websiteid=<?php
echo $website->id;
?>
&location=<?php
echo base64_encode('user-edit.php?user_id=' . $user['id']);
?>
"
title="Edit this user"><?php
_e('Edit', 'mainwp');
?>
</a>
</span>
<?php
if ($user['id'] != 1 && $user['login'] != $website->adminname) {
?>
<span class="trash">
| <a class="user_submitdelete" title="Delete this user" href="#"><?php
_e('Delete', 'mainwp');
?>
</a>
</span>
<?php
} else {
if ($user['id'] == 1 || $user['login'] == $website->adminname) {
?>
<span class="trash">
| <span title="This user is used for our secure link, it can not be deleted." style="color: gray"><?php
_e('Delete', 'mainwp');
?>
<?php
MainWP_Utility::renderToolTip(__('This user is used for our secure link, it can not be deleted.', 'mainwp'), 'http://docs.mainwp.com/deleting-secure-link-admin', 'images/info.png', 'float: none !important;');
?>
</span>
</span>
<?php
}
}
?>
</div>
<div class="row-actions-working">
<i class="fa fa-spinner fa-pulse"></i> <?php
_e('Please wait', 'mainwp');
?>
</div>
</td>
<td class="name column-name"><?php
echo $user['display_name'];
?>
</td>
<td class="email column-email"><a
href="mailto:<?php
echo $user['email'];
?>
"><?php
echo $user['email'];
?>
</a></td>
<td class="role column-role"><?php
echo self::getRole($user['role']);
?>
</td>
<td class="posts column-posts" style="text-align: left; padding-left: 1.7em ;">
//.........这里部分代码省略.........
示例8: renderSettings
public static function renderSettings()
{
$userExtension = MainWP_DB::Instance()->getUserExtension();
$pluginDir = $userExtension == null || ($userExtension->pluginDir == null || $userExtension->pluginDir == '') ? 'default' : $userExtension->pluginDir;
$user_email = MainWP_Utility::getNotificationEmail();
$siteview = $userExtension->site_view;
$snAutomaticDailyUpdate = get_option('mainwp_automaticDailyUpdate');
$backup_before_upgrade = get_option('mainwp_backup_before_upgrade');
$lastAutomaticUpdate = MainWP_DB::Instance()->getWebsitesLastAutomaticSync();
if ($lastAutomaticUpdate == 0) {
$nextAutomaticUpdate = 'Any minute';
} else {
if (MainWP_DB::Instance()->getWebsitesCountWhereDtsAutomaticSyncSmallerThenStart() > 0 || MainWP_DB::Instance()->getWebsitesCheckUpdatesCount() > 0) {
$nextAutomaticUpdate = 'Processing your websites.';
} else {
$nextAutomaticUpdate = MainWP_Utility::formatTimestamp(MainWP_Utility::getTimestamp(mktime(0, 0, 0, date('n'), date('j') + 1)));
}
}
if ($lastAutomaticUpdate == 0) {
$lastAutomaticUpdate = 'Never';
} else {
$lastAutomaticUpdate = MainWP_Utility::formatTimestamp(MainWP_Utility::getTimestamp($lastAutomaticUpdate));
}
?>
<div class="postbox" id="mainwp-hide-child-plugin-settings">
<h3 class="mainwp_box_title">
<span><i class="fa fa-cog"></i> <?php
_e('Network Optimization', 'mainwp');
?>
</span></h3>
<div class="inside">
<div class="mainwp_info-box-red" style="margin-top: 5px;"><?php
_e('<strong>STOP BEFORE TURNING ON!</strong> Hiding the Child Plugin does require the plugin to make changes to your .htaccess file that in rare instances or server configurations could cause problems.', 'mainwp');
?>
</div>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php
_e('Hide MainWP Child Plugin from Search Engines', 'mainwp');
?>
<br/>
<em style="font-size: 12px;">(<?php
_e('does not hide from users', 'mainwp');
?>
)</em>
</th>
<td>
<table>
<tr>
<td valign="top" style="padding-left: 0; padding-right: 5px; padding-top: 0px; padding-bottom: 0px; vertical-align: top;">
<div class="mainwp-checkbox">
<input type="checkbox" value="hidden" name="mainwp_options_footprint_plugin_folder" id="mainwp_options_footprint_plugin_folder_default" <?php
echo $pluginDir == 'hidden' ? 'checked="true"' : '';
?>
/><label for="mainwp_options_footprint_plugin_folder_default"></label>
</div>
</td>
<td valign="top" style="padding: 0">
<label for="mainwp_options_footprint_plugin_folder_default">
<em><?php
_e('This will make anyone including Search Engines trying find your Child Plugin encounter a 404 page. Hiding the Child Plugin does require the plugin to make changes to your .htaccess file that in rare instances or server configurations could cause problems.', 'mainwp');
?>
</em>
</label>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th scope="row"><?php
_e('Optimize for Shared Hosting or Big Networks', 'mainwp');
?>
<?php
MainWP_Utility::renderToolTip(__('Updates will be cached for quick loading. A manual refresh from the Dashboard is required to view new plugins, themes, pages or users. Recommended for Networks over 50 sites.', 'mainwp'));
?>
</th>
<td>
<div class="mainwp-checkbox">
<input type="checkbox" name="mainwp_optimize"
id="mainwp_optimize" <?php
echo get_option('mainwp_optimize') == 1 ? 'checked="true"' : '';
?>
/>
<label for="mainwp_optimize"></label>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="postbox" id="mainwp-global-options-settings">
<h3 class="mainwp_box_title">
<span><i class="fa fa-cog"></i> <?php
_e('Global Options', 'mainwp');
?>
//.........这里部分代码省略.........
示例9: renderNewEdit
//.........这里部分代码省略.........
?>
style="display: none;"<?php
}
?>
>Creates a GZipped tar-archive. (Good compression, fast, low memory usage)</span>
<span id="info_tar.bz2" class="archive_info" <?php
if ($archiveFormat != 'tar.bz2') {
?>
style="display: none;"<?php
}
?>
>Creates a BZipped tar-archive. (Best compression, fast, low memory usage)</span>
</i>
</td>
</tr>
</table>
</td>
</tr>
<?php
$maximumFileDescriptorsOverride = isset($task) ? $task->maximumFileDescriptorsOverride == 1 : false;
$maximumFileDescriptorsAuto = isset($task) ? $task->maximumFileDescriptorsAuto == 1 : false;
$maximumFileDescriptors = isset($task) ? $task->maximumFileDescriptors : 150;
?>
<tr class="archive_method archive_zip" <?php
if ($archiveFormat != 'zip') {
?>
style="display: none;"<?php
}
?>
>
<th scope="row"><?php
_e('Maximum File Descriptors on Child', 'mainwp');
MainWP_Utility::renderToolTip('The maximum number of open file descriptors on the child hosting.', 'http://docs.mainwp.com/maximum-number-of-file-descriptors/');
?>
</th>
<td>
<div class="mainwp-radio" style="float: left;">
<input type="radio" value="" name="mainwp_options_maximumFileDescriptorsOverride" id="mainwp_options_maximumFileDescriptorsOverride_global" <?php
echo !$maximumFileDescriptorsOverride ? 'checked="true"' : '';
?>
"/>
<label for="mainwp_options_maximumFileDescriptorsOverride_global"></label>
</div>
Global Setting (<a href="<?php
echo admin_url('admin.php?page=Settings');
?>
">Change Here</a>)<br/>
<div class="mainwp-radio" style="float: left;">
<input type="radio" value="override" name="mainwp_options_maximumFileDescriptorsOverride" id="mainwp_options_maximumFileDescriptorsOverride_override" <?php
echo $maximumFileDescriptorsOverride ? 'checked="true"' : '';
?>
"/>
<label for="mainwp_options_maximumFileDescriptorsOverride_override"></label>
</div>
Override<br/><br/>
<div style="float: left">Auto detect: </div>
<div class="mainwp-checkbox">
<input type="checkbox" id="mainwp_maximumFileDescriptorsAuto" name="mainwp_maximumFileDescriptorsAuto" <?php
echo $maximumFileDescriptorsAuto ? 'checked="checked"' : '';
?>
/>
<label for="mainwp_maximumFileDescriptorsAuto"></label></div>
<div style="float: left">