Skip to content

Instantly share code, notes, and snippets.

Last active April 11, 2016 11:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ianmjones/273478d81b649554ac77281103c51690 to your computer and use it in GitHub Desktop.
* Provides the initial content for the widget.
public function dashboard_widget_content() {
<!-- Schedule Item template -->
<script type="text/template" id="cron-pixie-schedule-item-tmpl">
<span class="cron-pixie-schedule-display"><%= display %></span>
<ul class="cron-pixie-events"></ul>
<!-- Event Item template -->
<script type="text/template" id="cron-pixie-event-item-tmpl">
<% if ( undefined == hook ) { %>
<span class="cron-pixie-event-empty"><%= CronPixie.strings.no_events %></span>
<% } else { %>
<span class="cron-pixie-event-run dashicons dashicons-controls-forward" title="<%- CronPixie.strings.run_now %>"></span>
<span class="cron-pixie-event-hook"><%= hook %></span>
<div class="cron-pixie-event-timestamp dashicons-before dashicons-clock">
<span class="cron-pixie-event-due"><%- CronPixie.strings.due %>:&nbsp;<%= new Date( timestamp * 1000 ).toLocaleString() %></span>
<span class="cron-pixie-event-seconds-due">(<%= CronPixie.displayInterval( seconds_due ) %>)</span>
<% } %>
<!-- Main content -->
<div id="cron-pixie-main">
<ul class="cron-pixie-schedules"></ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment