* @license GPL-2.0+ * @link http://example.com * @copyright 2013 Paul Vincent Beigang * * @wordpress-plugin * Plugin Name: Advent calender * Plugin URI: @TODO * Description: Simple Advent calender which outputs 24 scheduled custom posts with images. * Version: 1.0.0 * Author: Paul Vincent Beigang * Author URI: @TODO * Text Domain: advent-calender * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Domain Path: /languages * GitHub Plugin URI: https://github.com// */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } /*----------------------------------------------------------------------------* * Public-Facing Functionality *----------------------------------------------------------------------------*/ require_once( plugin_dir_path( __FILE__ ) . 'public/class-advent-calender.php' ); /* * Register hooks that are fired when the plugin is activated or deactivated. * When the plugin is deleted, the uninstall.php file is loaded. */ register_activation_hook( __FILE__, array( 'Advent_Calender', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'Advent_Calender', 'deactivate' ) ); add_action( 'plugins_loaded', array( 'Advent_Calender', 'get_instance' ) ); /*----------------------------------------------------------------------------* * Dashboard and Administrative Functionality *----------------------------------------------------------------------------*/ /* * * If you want to include Ajax within the dashboard, change the following * conditional to: * * if ( is_admin() ) { * ... * } * * The code below is intended to to give the lightest footprint possible. */ if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { require_once( plugin_dir_path( __FILE__ ) . 'admin/class-advent-calender-admin.php' ); add_action( 'plugins_loaded', array( 'Advent_Calender_Admin', 'get_instance' ) ); }