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 | |
/** | |
* 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
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 | |
/** | |
* @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' ); |