{
// If the update transient exists don't get anything from the relay.
if ( false === ( get_transient( 'ServerStatCacheUpdate' ) ) ) {
- trigger_error( 'running updateCache' );
+ if ( GLM_SERVERSTATS_PLUGIN_DEBUG ) {
+ trigger_error( 'running updateCache' );
+ }
$lastUpdate = $this->getLastUpdatedTime();
$timestamp = 0;
if ( $lastUpdate ) {
set_transient( 'ServerStatCacheUpdate', true, 20 * MINUTE_IN_SECONDS );
if ( !empty( $notices ) ) {
- trigger_error( 'updating cache', E_USER_NOTICE );
+ if ( GLM_SERVERSTATS_PLUGIN_DEBUG ) {
+ trigger_error( 'updating cache', E_USER_NOTICE );
+ }
foreach ( $notices as $notice ) {
$this->cacheNotice( $notice );
}
} else {
- trigger_error( 'no new ones found', E_USER_NOTICE );
+ if ( GLM_SERVERSTATS_PLUGIN_DEBUG ) {
+ trigger_error( 'no new ones found', E_USER_NOTICE );
+ }
}
}
define('GLM_SERVERSTATS_PROVIDER', 'www.gaslightmedia.com:192.168.44.82:localhost'); // Development System
// Check if debug enabled
-if (GLM_SERVERSTATS_PLUGIN_DEBUG) {
+if ( GLM_SERVERSTATS_PLUGIN_DEBUG ) {
trigger_error("GLM Data Usage Debug Enabled", E_USER_NOTICE);
}
{if $view_type == 'main'}
{foreach $messages as $m}
<div class="glm-info-message">
- <div>{$m.updated.datetime|date_format:$dateFormat}</div>
+ <div>{$m.updated|strtotime|date_format:$dateFormat}</div>
<h2>{$m.title}</h2>
{$m.message}
</div>
</tr>
{foreach $messages as $m}
<tr>
- <td width="150"> {$m.updated.datetime|date_format:$dateFormat} </td>
+ <td width="150"> {$m.updated|strtotime|date_format:$dateFormat} </td>
<td> <a href="{$admin_url}?page={$thisPage}&glm_action=index&option=view&id={$m.id}">{$m.title}</a> </td>
<td> {$m.dashboard_message|strip_tags} </td>
</tr>