-
-
Save tommcfarlin/962bf43b17b0cd73eed633dc5b4c58a5 to your computer and use it in GitHub Desktop.
[WordPress] A template for the WordPress plugin bootstrap file to be used when creating WordPress plugins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * 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: http://www.gnu.org/licenses/gpl-2.0.txt | |
| */ | |
| // If this file is called directly, abort. | |
| if ( ! defined( 'WPINC' ) ) { | |
| die; | |
| } | |
| /** | |
| * 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(); | |
| $plugin->init(); | |
| } | |
| acme_demo_plugin(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment