Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[WordPress] A template for the WordPress plugin bootstrap file to be used when creating WordPress plugins.
* The plugin bootstrap file
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
* @link URL to plugin homepage
* @since 1.0.0
* @package TODO
* @wordpress-plugin
* Plugin Name: Name of the plugin
* Plugin URI: URL to the homepage of the plugin
* Description: Short description of the plugin
* Version: 1.0.0
* Author: Your name
* Author URI: Your company's URL
* License: GPL-2.0+
* License URI:
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
* Includes the class that provides the functionality for the plugin.
* Note: This could be done with PHP autoloading depending on your version
* of PHP.
include_once( 'class-demo-plugin.php' );
* Instantiates the plugin and and initializes the functionality necessary for
* WordPress.
* @since 1.0.0
function acme_demo_plugin() {
$plugin = new Demo_Plugin();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment