Skip to content

Instantly share code, notes, and snippets.

@ianmjones
Created April 8, 2016 14:47
Show Gist options
  • Save ianmjones/0c9efa095e5b33d5726d89be551e8b3a to your computer and use it in GitHub Desktop.
Save ianmjones/0c9efa095e5b33d5726d89be551e8b3a to your computer and use it in GitHub Desktop.
wp-cron-pixie.php
<?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
* Description: A little dashboard widget to manage the WordPress cron.
* Version: 1.0
* Author: Ian M. Jones
* Author URI: http://www.ianmjones.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: wp-cron-pixie
* Domain Path: /languages
* Network: False
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Returns info about the plugin.
*
* @return array
*/
function cron_pixie_meta() {
return array(
'slug' => 'wp-cron-pixie',
'name' => 'WP Cron Pixie',
'file' => __FILE__,
'version' => '1.0',
);
}
// Where the magic happens...
require plugin_dir_path( __FILE__ ) . 'includes/class-cron-pixie.php';
/**
* Initialize the plugin's functionality once the correct hook fires.
*/
function cron_pixie_admin_init() {
$cron_pixie = new Cron_Pixie( cron_pixie_meta() );
}
add_action( 'admin_init', 'cron_pixie_admin_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment