2014-04-09 16:22:44 -04:00
|
|
|
<?php
|
2014-04-30 22:55:42 -04:00
|
|
|
|
2014-07-30 14:56:37 -04:00
|
|
|
/**
|
2014-08-01 16:47:08 -04:00
|
|
|
* The plugin bootstrap file
|
2014-04-11 10:36:57 -04:00
|
|
|
*
|
2014-08-19 15:06:09 -05:00
|
|
|
* This file is read by WordPress to generate the plugin information in the plugin
|
2014-08-01 16:47:08 -04:00
|
|
|
* Dashboard. This file also includes all of the dependencies used by the plugin,
|
|
|
|
* registers the activation and deactivation functions, and defines a function
|
2014-09-02 13:16:20 -04:00
|
|
|
* that starts the plugin.
|
2014-04-09 16:22:44 -04:00
|
|
|
*
|
2014-08-01 17:06:09 -04:00
|
|
|
* @link http://example.com
|
2014-07-30 14:56:37 -04:00
|
|
|
* @since 1.0.0
|
|
|
|
* @package Plugin_Name
|
2014-04-09 16:22:44 -04:00
|
|
|
*
|
|
|
|
* @wordpress-plugin
|
2014-05-05 00:16:52 -04:00
|
|
|
* Plugin Name: WordPress Plugin Boilerplate
|
2014-07-29 15:48:33 -04:00
|
|
|
* Plugin URI: http://example.com/plugin-name-uri/
|
2014-05-03 15:07:24 -04:00
|
|
|
* 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
|
2014-07-29 15:48:33 -04:00
|
|
|
* Author URI: http://example.com/
|
2014-04-09 16:22:44 -04:00
|
|
|
* License: GPL-2.0+
|
|
|
|
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
2014-07-30 21:52:41 +02:00
|
|
|
* Text Domain: plugin-name
|
2014-04-09 16:22:44 -04:00
|
|
|
* Domain Path: /languages
|
|
|
|
*/
|
|
|
|
|
|
|
|
// If this file is called directly, abort.
|
|
|
|
if ( ! defined( 'WPINC' ) ) {
|
|
|
|
die;
|
2014-04-11 10:36:57 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-07-29 15:48:33 -04:00
|
|
|
* The code that runs during plugin activation.
|
2014-04-11 10:36:57 -04:00
|
|
|
*/
|
2014-04-26 17:42:21 -04:00
|
|
|
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-activator.php';
|
2014-04-11 10:36:57 -04:00
|
|
|
|
|
|
|
/**
|
2014-07-29 15:48:33 -04:00
|
|
|
* The code that runs during plugin deactivation.
|
2014-04-11 10:36:57 -04:00
|
|
|
*/
|
2014-04-26 17:42:21 -04:00
|
|
|
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-deactivator.php';
|
2014-04-11 10:36:57 -04:00
|
|
|
|
|
|
|
/** 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 */
|
2014-09-03 15:11:55 +01:00
|
|
|
register_deactivation_hook( __FILE__, array( 'Plugin_Name_Deactivator', 'deactivate' ) );
|
2014-05-03 15:26:22 -04:00
|
|
|
|
2014-05-05 00:16:52 -04:00
|
|
|
/**
|
2014-08-01 16:47:08 -04:00
|
|
|
* The core plugin class that is used to define internationalization,
|
2014-07-30 15:03:33 -04:00
|
|
|
* dashboard-specific hooks, and public-facing site hooks.
|
2014-05-05 00:16:52 -04:00
|
|
|
*/
|
2014-11-04 16:47:16 -06:00
|
|
|
require plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name.php';
|
2014-05-03 15:26:22 -04:00
|
|
|
|
2014-05-05 00:16:52 -04:00
|
|
|
/**
|
2014-07-30 15:23:18 -04:00
|
|
|
* Begins execution of the plugin.
|
2014-06-26 16:19:57 -04:00
|
|
|
*
|
2014-07-30 15:23:18 -04:00
|
|
|
* Since everything within the plugin is registered via hooks,
|
|
|
|
* then kicking off the plugin from this point in the file does
|
|
|
|
* not affect the page life cycle.
|
2014-06-26 16:19:57 -04:00
|
|
|
*
|
|
|
|
* @since 1.0.0
|
2014-05-05 00:16:52 -04:00
|
|
|
*/
|
2014-05-08 23:33:47 -04:00
|
|
|
function run_plugin_name() {
|
2014-05-03 15:26:22 -04:00
|
|
|
|
2014-05-08 23:33:47 -04:00
|
|
|
$plugin = new Plugin_Name();
|
|
|
|
$plugin->run();
|
2014-05-03 15:26:22 -04:00
|
|
|
|
2014-05-08 23:33:47 -04:00
|
|
|
}
|
|
|
|
run_plugin_name();
|