1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-12-23 04:13:53 +02:00
WordPress-Plugin-Boilerplate/plugin-name/trunk/plugin-name.php
Tom McFarlin e29a775e76 completely refactoring the main plugin file
* leaving the de/activation code here for now
* moving all bootstrap code into class-plugin-name.php
* setting up this file to fire the plugin so that it's prepared to handle any hooks given to the loader
2014-05-08 23:33:47 -04:00

64 lines
1.9 KiB
PHP

<?php
/**
* Short Description (no period for file headers)
*
* Long Description.
*
* @package Plugin_Name
* @author Your Name or Company Name <email@domain.com>
* @license GPL-2.0+
* @link http://example.com/plugin-name
* @copyright 2014 Your Name or Company Name
*
* @wordpress-plugin
* Plugin Name: WordPress Plugin Boilerplate
* Plugin URI: http://example.com/plugin-name-uri
* Description: This is a short description of what the plugin does. It's displayed in the WordPress dashboard.
* Version: 1.0.0
* Author: Your Name or Your Company
* Author URI: http://example.com
* Text Domain: plugin-name-locale
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* The plugin activation class that runs during plugin activation.
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-activator.php';
/**
* The plugin deactivation class that runs during plugin deactivation.
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-deactivator.php';
/** This action is documented in includes/class-plugin-name-activator.php */
register_activation_hook( __FILE__, array( 'Plugin_Name_Activator', 'activate' ) );
/** This action is documented in includes/class-plugin-name-deactivator.php */
register_activation_hook( __FILE__, array( 'Plugin_Name_Deactivator', 'deactivate' ) );
/**
* The base class used to define certain functionality and attributes used among
* the dashboard-specific and public-facing functionality.
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name.php';
/**
* TODO
*/
function run_plugin_name() {
$plugin = new Plugin_Name();
$plugin->run();
}
run_plugin_name();