prefix . 'communievents_events'; $evcount = $wpdb->get_var("SELECT COUNT(id) FROM $tablename", 0, 0); $lastsync = $wpdb->get_var("SELECT MAX(lastsync) FROM $tablename", 0, 0); $nextsync = wp_next_scheduled('communievents_cron_hook'); if ($lastsync) { $lastsync_dt = new DateTime("@$lastsync"); $lastsync_str = $lastsync_dt->format('Y-m-d H:i:s'); } else { $lastsync_str = "NEVER"; } if ($nextsync) { $nextsync_dt = new DateTime("@$nextsync"); $nextsync_str = $nextsync_dt->format('Y-m-d H:i:s'); } else { $nextsync_str = "NEVER"; } $now_dt = new DateTime('now'); $now_str = $now_dt->format('Y-m-d H:i:s'); return "
| Event Count: | $evcount" . " |
| Last Sync: | $lastsync_str" . " |
| Next Sync: | $nextsync_str" . " |
| Now: | $now_str" . " |