This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @link https://deliciousbrains.com/blog/ | |
* @since 1.0 | |
* @package Pixie_Article | |
* | |
* @wordpress-plugin | |
* Plugin Name: Pixie Article | |
* Plugin URI: https://deliciousbrains.com/blog/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runNow: function() { | |
// Only bother to run update if not due before next refresh. | |
var seconds_due = this.model.get( 'seconds_due' ); | |
if ( seconds_due > CronPixie.timer_period ) { | |
var timestamp = this.model.get( 'timestamp' ) - seconds_due; | |
this.model.save( | |
{ timestamp: timestamp, seconds_due: 0 } | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Cron_Pixie constructor. | |
* | |
* Registers all action and filter hooks if user can use widget. | |
* | |
* @param array $plugin_meta | |
*/ | |
public function __construct( $plugin_meta = array() ) { | |
if ( empty( $plugin_meta ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueues the JS scripts when the main dashboard page is loading. | |
* | |
* @param string $hook_page | |
*/ | |
public function enqueue_scripts( $hook_page ) { | |
if ( 'index.php' !== $hook_page ) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns list of cron schedules. | |
* | |
* @return array | |
*/ | |
private function _get_schedules() { | |
// Get list of schedules. | |
$schedules = wp_get_schedules(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CronPixie = CronPixie || {}; | |
(function( $, CronPixie ) { | |
'use strict'; | |
/** | |
* A mixin for collections/models. | |
* Based on http://taylorlovett.com/2014/09/28/syncing-backbone-models-and-collections-to-admin-ajax-php/ | |
*/ | |
var AdminAjaxSyncableMixin = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @link https://github.com/ianmjones/wp-cron-pixie | |
* @since 1.0 | |
* @package Cron_Pixie | |
* | |
* @wordpress-plugin | |
* Plugin Name: WP Cron Pixie | |
* Plugin URI: https://github.com/ianmjones/wp-cron-pixie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
# | |
# Base services. | |
# | |
data: | |
image: deliciousbrains/data@sha256:6fbc27c3c84c0e4d40b261e2c8246a2065a96916481ab475facfcd6e81548f31 | |
labels: | |
com.deliciousbrains.service: "data" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd `dirname $0` | |
source ./.env | |
while getopts "u:p:h:d:ct:z:s:vkge:" ARG | |
do | |
case ${ARG} in | |
e) TEST_ENV=$OPTARG;; |