mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
efa4d08df3
Fixes #192
68 lines
1.9 KiB
PHP
68 lines
1.9 KiB
PHP
<?php
|
|
|
|
/**
|
|
/**
|
|
* Short Description (no period for file headers)
|
|
*
|
|
* Long Description.
|
|
*
|
|
* @link URL
|
|
* @since 1.0.0
|
|
* @package Plugin_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
|
|
* 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 code that runs during plugin activation.
|
|
*/
|
|
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-activator.php';
|
|
|
|
/**
|
|
* The code 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' ) );
|
|
|
|
/**
|
|
* This is the core plugin file that is used to define internationalization,
|
|
* dashboard-specific hooks, and public-facing site hooks.
|
|
*/
|
|
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name.php';
|
|
|
|
/**
|
|
* Begins execution of the plugin.
|
|
*
|
|
* 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.
|
|
*
|
|
* @since 1.0.0
|
|
*/
|
|
function run_plugin_name() {
|
|
|
|
$plugin = new Plugin_Name();
|
|
$plugin->run();
|
|
|
|
}
|
|
run_plugin_name();
|