Skip to content

Instantly share code, notes, and snippets.

@nickstewart95
Created June 8, 2020 23:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
<?php
/**
* Plugin Name: Sample Plugin
* Description: A sample plugin
* Version: 1.0
*/
require_once __DIR__ . '/vendor/autoload.php';
$plugin = new \Sample\Loader(__DIR__, plugin_dir_url(__FILE__));
$plugin->init();
register_activation_hook(__FILE__, [\Sample\Loader::class, 'activatePlugin']);
register_deactivation_hook(__FILE__, [\Sample\Loader::class, 'deactivatePlugin']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment