本文整理汇总了PHP中MainWP_Utility::getNotificationEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP MainWP_Utility::getNotificationEmail方法的具体用法?PHP MainWP_Utility::getNotificationEmail怎么用?PHP MainWP_Utility::getNotificationEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWP_Utility
的用法示例。
在下文中一共展示了MainWP_Utility::getNotificationEmail方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public static function render()
{
if (!mainwp_current_user_can('dashboard', 'manage_offline_checks')) {
mainwp_do_not_have_permissions(__('manage offline checks', 'mainwp'));
return;
}
$websites = MainWP_DB::Instance()->query(MainWP_DB::Instance()->getSQLWebsitesForCurrentUser());
$statusses = array('hourly', '2xday', 'daily', 'weekly');
do_action('mainwp-pageheader-settings', 'OfflineChecks');
?>
<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>
<div class="mainwp_info-box">
<strong><?php
_e('Notifications will be sent to', 'mainwp');
?>
<i><?php
echo MainWP_Utility::getNotificationEmail();
?>
</i> (<a href="<?php
echo admin_url();
?>
admin.php?page=Settings"><?php
_e('change', 'mainwp');
?>
</a>)</strong>
<br/><br/><?php
_e('MainWP performs two tests when checking your site for up-time.', 'mainwp');
?>
<br/>
<?php
_e('The first test we do is to check that the domain is valid.', 'mainwp');
?>
<br/>
<?php
_e('If this test passes we use a browser emulator to visit the website, this sends out a user agent (just like your web browser from your computer) and waits for a status message.', 'mainwp');
?>
<br/>
<?php
_e('We report any http status code from 200-399 as a success. Any other http status code returned is considered "offline" which is treated as a failure.', 'mainwp');
?>
</div>
<table class="wp-list-table widefat fixed" id="mainwp_offlinechecks">
<thead>
<tr>
<th scope="col" class="manage-column" style="text-align: left"><?php
_e('Site', 'mainwp');
?>
</th>
<th scope="col" id="col_status" class="manage-column"><?php
_e('Status', 'mainwp');
?>
</th>
<th scope="col" id="col_disabled" class="manage-column">
<a href="#" class="mainwp_offline_check_bulk" value="disabled"><?php
_e('Disabled', 'mainwp');
?>
</a>
</th>
<th scope="col" id="col_hourly" class="manage-column">
<a href="#" class="mainwp_offline_check_bulk" value="hourly"><?php
_e('Hourly', 'mainwp');
?>
</a>
</th>
<th scope="col" id="col_2timesday" class="manage-column">
<a href="#" class="mainwp_offline_check_bulk" value="2xday"><?php
_e('2x Day', 'mainwp');
?>
</a>
</th>
<th scope="col" id="col_daily" class="manage-column">
<a href="#" class="mainwp_offline_check_bulk" value="daily"><?php
_e('Daily', 'mainwp');
?>
</a>
</th>
<th scope="col" id="col_weekly" class="manage-column">
<a href="#" class="mainwp_offline_check_bulk" value="weekly"><?php
_e('Weekly', 'mainwp');
?>
</a>
</th>
<th scope="col" id="col_test" class="manage-column">
<a href="#" class="button button-primary" id="mainwp_offline_check_check_all"><?php
_e('Check All', 'mainwp');
?>
</a>
</th>
</tr>
</thead>
<tbody id="the-list">
<?php
while ($websites && ($website = @MainWP_DB::fetch_object($websites))) {
?>
<tr>
<input type="hidden" name="offline_check_website_id" id="offline_check_website_id"
value="<?php
//.........这里部分代码省略.........
示例2: mainwp_cronupdatescheck_action
//.........这里部分代码省略.........
$sitePluginConflicts = json_decode($website->pluginConflicts, true);
if (count($sitePluginConflicts) > 0) {
$infoTxt = '<a href="' . admin_url('admin.php?page=managesites&dashboard=' . $website->id) . '">' . stripslashes($website->name) . '</a> - ';
$pluginConflicts .= '<li>' . $infoTxt;
$added = false;
foreach ($sitePluginConflicts as $sitePluginConflict) {
if ($added) {
$pluginConflicts .= ', ';
}
$pluginConflicts .= $sitePluginConflict;
$added = true;
}
$pluginConflicts .= '</li>' . "\n";
}
/**
* Show theme conflicts
*/
$siteThemeConflicts = json_decode($website->themeConflicts, true);
if (count($siteThemeConflicts) > 0) {
$infoTxt = '<a href="' . admin_url('admin.php?page=managesites&dashboard=' . $website->id) . '">' . stripslashes($website->name) . '</a> - ';
$themeConflicts .= '<li>' . $infoTxt;
$added = false;
foreach ($siteThemeConflicts as $siteThemeConflict) {
if ($added) {
$themeConflicts .= ', ';
}
$themeConflicts .= $siteThemeConflict;
$added = true;
}
$themeConflicts .= '</li>' . "\n";
}
//Loop over last plugins & current plugins, check if we need to upgrade them..
$user = get_userdata($website->userid);
$email = MainWP_Utility::getNotificationEmail($user);
MainWP_Utility::update_option('mainwp_updatescheck_mail_email', $email);
MainWP_DB::Instance()->updateWebsiteSyncValues($website->id, array('dtsAutomaticSync' => time()));
MainWP_DB::Instance()->updateWebsiteOption($website, 'last_wp_upgrades', json_encode($websiteCoreUpgrades));
MainWP_DB::Instance()->updateWebsiteOption($website, 'last_plugin_upgrades', $website->plugin_upgrades);
MainWP_DB::Instance()->updateWebsiteOption($website, 'last_theme_upgrades', $website->theme_upgrades);
}
if (count($coreNewUpdate) != 0) {
$coreNewUpdateSaved = get_option('mainwp_updatescheck_mail_update_core_new');
MainWP_Utility::update_option('mainwp_updatescheck_mail_update_core_new', MainWP_Utility::array_merge($coreNewUpdateSaved, $coreNewUpdate));
}
if (count($pluginsNewUpdate) != 0) {
$pluginsNewUpdateSaved = get_option('mainwp_updatescheck_mail_update_plugins_new');
MainWP_Utility::update_option('mainwp_updatescheck_mail_update_plugins_new', MainWP_Utility::array_merge($pluginsNewUpdateSaved, $pluginsNewUpdate));
}
if (count($themesNewUpdate) != 0) {
$themesNewUpdateSaved = get_option('mainwp_updatescheck_mail_update_themes_new');
MainWP_Utility::update_option('mainwp_updatescheck_mail_update_themes_new', MainWP_Utility::array_merge($themesNewUpdateSaved, $themesNewUpdate));
}
if (count($coreToUpdate) != 0) {
$coreToUpdateSaved = get_option('mainwp_updatescheck_mail_update_core');
MainWP_Utility::update_option('mainwp_updatescheck_mail_update_core', MainWP_Utility::array_merge($coreToUpdateSaved, $coreToUpdate));
}
if (count($pluginsToUpdate) != 0) {
$pluginsToUpdateSaved = get_option('mainwp_updatescheck_mail_update_plugins');
MainWP_Utility::update_option('mainwp_updatescheck_mail_update_plugins', MainWP_Utility::array_merge($pluginsToUpdateSaved, $pluginsToUpdate));
}
if (count($themesToUpdate) != 0) {
$themesToUpdateSaved = get_option('mainwp_updatescheck_mail_update_themes');
MainWP_Utility::update_option('mainwp_updatescheck_mail_update_themes', MainWP_Utility::array_merge($themesToUpdateSaved, $themesToUpdate));
}
if (count($ignoredCoreToUpdate) != 0) {
$ignoredCoreToUpdateSaved = get_option('mainwp_updatescheck_mail_ignore_core');
示例3: 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');
?>
//.........这里部分代码省略.........
示例4: renderAllSites
//.........这里部分代码省略.........
value="hourly" <?php
echo $website->offline_checks == 'hourly' ? 'checked="true"' : '';
?>
/> <?php
_e('Hourly', 'mainwp');
?>
<input type="radio" name="offline_checks" id="check_2xday"
value="2xday" <?php
echo $website->offline_checks == '2xday' ? 'checked="true"' : '';
?>
/> <?php
_e('2x Day', 'mainwp');
?>
<input type="radio" name="offline_checks" id="check_daily"
value="daily" <?php
echo $website->offline_checks == 'daily' ? 'checked="true"' : '';
?>
/> <?php
_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');
?>
示例5: mwp_setup_notification
public function mwp_setup_notification()
{
$important_notification = get_option('mwp_setup_importantNotification', false);
$user_email = MainWP_Utility::getNotificationEmail();
?>
<h1><?php
_e('Notification', 'mainwp');
?>
</h1>
<form method="post">
<table class="form-table">
<tr>
<th scope="row"><?php
_e('Do you want to receive important email notifications from your dashboard?', 'mainwp');
?>
</th>
<td>
<div class="mainwp-checkbox">
<input type="checkbox" name="mwp_setup_options_important_notification"
id="mwp_setup_options_important_notification" <?php
echo $important_notification == 1 ? 'checked="true"' : '';
?>
/>
<label for="mwp_setup_options_important_notification"></label>
</div>
<br /><br />
<em>
<?php
_e('These are emails from your MainWP Dashboard notifying you of available updates and other maintenance related messages. You can change this later in your MainWP Settings tab.', 'mainwp');
?>
<br />
<?php
_e('These are NOT emails from the MainWP team and this does NOT sign you up for any mailing lists.', 'mainwp');
?>
</em>
</td>
</tr>
<tr>
<th scope="row"><?php
_e('Enter Your Email Address', 'mainwp');
?>
</th>
<td>
<input type="email" class="" name="mwp_setup_options_email" size="35" value="<?php
echo esc_attr($user_email);
?>
"/>
</td>
</tr>
</table>
<p class="mwp-setup-actions step">
<input type="submit" class="button-primary button button-large" value="<?php
esc_attr_e('Continue', 'mainwp');
?>
" name="save_step" />
<a href="<?php
echo esc_url($this->get_next_step_link());
?>
" class="button button-large"><?php
_e('Skip this step', 'mainwp');
?>
</a>
<a href="<?php
echo esc_url($this->get_back_step_link());
?>
" class="button button-large"><?php
_e('Back', 'mainwp');
?>
</a>
<?php
wp_nonce_field('mwp-setup');
?>
</p>
</form>
<?php
}