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
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
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://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
#!/usr/bin/env bash | |
if [ $# -lt 3 ]; then | |
echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version] [drop_db]" | |
exit 1 | |
fi | |
DB_NAME=$1 | |
DB_USER=$2 | |
DB_PASS=$3 |
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
<?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
'admin_filters' => array( | |
'pixie_article_audience' => array( | |
'taxonomy' => 'pixie-article-audience', | |
'title' => _x( 'Audience', 'Pixie Article Taxonomy', 'pixie-article' ), | |
), | |
), |
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
$options = array( | |
'labels' => $labels, | |
'menu_icon' => 'dashicons-media-document', | |
'admin_cols' => array( | |
'pixie_article_audience' => array( | |
'taxonomy' => 'pixie-article-audience', | |
'title' => _x( 'Audience', 'Pixie Article Taxonomy', 'pixie-article' ), | |
), | |
'post_date' => array( | |
'title' => __( 'Created', 'Date', 'pixie-article' ), |
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
require_once( 'extended-taxos/extended-taxos.php' ); | |
register_extended_taxonomy( 'pixie-article-audience', 'pixie-article' ); |