2011-07-11 17:37:07 -04:00
|
|
|
<?php
|
2013-05-12 08:57:18 -04:00
|
|
|
/**
|
|
|
|
* The WordPress Plugin Boilerplate.
|
|
|
|
*
|
|
|
|
* A foundation off of which to build well-documented WordPress plugins that also follow
|
|
|
|
* WordPress coding standards and PHP best practices.
|
|
|
|
*
|
2013-07-07 14:03:25 -04:00
|
|
|
* @package Plugin_Name
|
2013-05-16 09:40:25 -04:00
|
|
|
* @author Your Name <email@example.com>
|
|
|
|
* @license GPL-2.0+
|
2013-05-16 09:56:20 -04:00
|
|
|
* @link http://example.com
|
2013-05-16 09:40:25 -04:00
|
|
|
* @copyright 2013 Your Name or Company Name
|
2013-05-12 08:57:18 -04:00
|
|
|
*
|
|
|
|
* @wordpress-plugin
|
|
|
|
* Plugin Name: TODO
|
2013-05-15 10:16:38 -04:00
|
|
|
* Plugin URI: TODO
|
2013-05-12 08:57:18 -04:00
|
|
|
* Description: TODO
|
2013-05-15 10:16:38 -04:00
|
|
|
* Version: 1.0.0
|
|
|
|
* Author: TODO
|
|
|
|
* Author URI: TODO
|
2013-05-12 08:57:18 -04:00
|
|
|
* Text Domain: plugin-name-locale
|
2013-05-15 10:16:38 -04:00
|
|
|
* License: GPL-2.0+
|
2013-05-12 08:57:18 -04:00
|
|
|
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
2013-09-08 14:20:15 -04:00
|
|
|
* Domain Path: /languages
|
2013-05-12 08:57:18 -04:00
|
|
|
*/
|
2011-07-11 17:37:07 -04:00
|
|
|
|
2013-05-13 06:38:57 -04:00
|
|
|
// If this file is called directly, abort.
|
2013-05-15 10:00:38 -04:00
|
|
|
if ( ! defined( 'WPINC' ) ) {
|
|
|
|
die;
|
2013-05-11 17:38:50 -04:00
|
|
|
}
|
|
|
|
|
2013-05-15 10:02:10 -04:00
|
|
|
// TODO: replace `class-plugin-name.php` with the name of the actual plugin's class file
|
|
|
|
require_once( plugin_dir_path( __FILE__ ) . 'class-plugin-name.php' );
|
2013-10-14 17:37:41 +02:00
|
|
|
// TODO: replace `class-plugin-admin.php` with the name of the actual plugin's admin class file
|
|
|
|
if( is_admin() ) {
|
|
|
|
require_once( plugin_dir_path( __FILE__ ) . 'class-plugin-name-admin.php' );
|
|
|
|
}
|
2012-07-13 22:14:34 -04:00
|
|
|
|
2013-09-12 01:42:07 +02:00
|
|
|
// Register hooks that are fired when the plugin is activated or deactivated.
|
2013-09-12 17:58:52 +02:00
|
|
|
// When the plugin is deleted, the uninstall.php file is loaded.
|
2013-10-14 17:37:41 +02:00
|
|
|
// TODO: replace Plugin_Name with the name of the class defined in `class-plugin-name.php`
|
2013-07-07 14:03:25 -04:00
|
|
|
register_activation_hook( __FILE__, array( 'Plugin_Name', 'activate' ) );
|
|
|
|
register_deactivation_hook( __FILE__, array( 'Plugin_Name', 'deactivate' ) );
|
2013-05-13 08:43:08 -04:00
|
|
|
|
2013-10-14 17:37:41 +02:00
|
|
|
// TODO: replace Plugin_Name with the name of the class defined in `class-plugin-name.php`
|
2013-09-11 23:41:08 +02:00
|
|
|
add_action( 'plugins_loaded', array( 'Plugin_Name', 'get_instance' ) );
|
2013-10-14 17:37:41 +02:00
|
|
|
// TODO: replace Plugin_Name_Admin with the name of the class defined in `class-plugin-name-admin.php`
|
|
|
|
if( is_admin() ) {
|
|
|
|
//add_action( 'plugins_loaded', array( 'Plugin_Name_Admin', 'get_instance' ) );
|
|
|
|
}
|